bool MMul::writeRecoverData(CompactBufferWriter& writer) const { MOZ_ASSERT(canRecoverOnBailout()); writer.writeUnsigned(uint32_t(RInstruction::Recover_Mul)); writer.writeByte(specialization_ == MIRType_Float32); MOZ_ASSERT(Mode(uint8_t(mode_)) == mode_); writer.writeByte(uint8_t(mode_)); return true; }
bool MSqrt::writeRecoverData(CompactBufferWriter &writer) const { MOZ_ASSERT(canRecoverOnBailout()); writer.writeUnsigned(uint32_t(RInstruction::Recover_Sqrt)); writer.writeByte(type() == MIRType_Float32); return true; }
bool MMinMax::writeRecoverData(CompactBufferWriter &writer) const { MOZ_ASSERT(canRecoverOnBailout()); writer.writeUnsigned(uint32_t(RInstruction::Recover_MinMax)); writer.writeByte(isMax_); return true; }
bool MCreateThisWithTemplate::writeRecoverData(CompactBufferWriter &writer) const { MOZ_ASSERT(canRecoverOnBailout()); writer.writeUnsigned(uint32_t(RInstruction::Recover_CreateThisWithTemplate)); writer.writeByte(bool(initialHeap() == gc::TenuredHeap)); return true; }
bool MNewObject::writeRecoverData(CompactBufferWriter &writer) const { MOZ_ASSERT(canRecoverOnBailout()); writer.writeUnsigned(uint32_t(RInstruction::Recover_NewObject)); writer.writeByte(templateObjectIsClassPrototype_); return true; }
bool MStringReplace::writeRecoverData(CompactBufferWriter& writer) const { MOZ_ASSERT(canRecoverOnBailout()); writer.writeUnsigned(uint32_t(RInstruction::Recover_StringReplace)); writer.writeByte(isFlatReplacement_); return true; }
bool MDiv::writeRecoverData(CompactBufferWriter& writer) const { MOZ_ASSERT(canRecoverOnBailout()); writer.writeUnsigned(uint32_t(RInstruction::Recover_Div)); writer.writeByte(specialization_ == MIRType::Float32); return true; }
bool MNewArray::writeRecoverData(CompactBufferWriter &writer) const { MOZ_ASSERT(canRecoverOnBailout()); writer.writeUnsigned(uint32_t(RInstruction::Recover_NewArray)); writer.writeUnsigned(count()); writer.writeByte(uint8_t(allocatingBehaviour())); return true; }
bool MNewObject::writeRecoverData(CompactBufferWriter& writer) const { MOZ_ASSERT(canRecoverOnBailout()); writer.writeUnsigned(uint32_t(RInstruction::Recover_NewObject)); MOZ_ASSERT(Mode(uint8_t(mode_)) == mode_); writer.writeByte(uint8_t(mode_)); return true; }
bool MSimdBox::writeRecoverData(CompactBufferWriter& writer) const { MOZ_ASSERT(canRecoverOnBailout()); writer.writeUnsigned(uint32_t(RInstruction::Recover_SimdBox)); static_assert(unsigned(SimdType::Count) < 0x100, "assuming SimdType fits in 8 bits"); writer.writeByte(uint8_t(simdType())); return true; }
bool MSimdBox::writeRecoverData(CompactBufferWriter& writer) const { MOZ_ASSERT(canRecoverOnBailout()); writer.writeUnsigned(uint32_t(RInstruction::Recover_SimdBox)); static_assert(sizeof(SimdType) == sizeof(uint8_t), "assuming uint8 storage class for SimdType"); writer.writeByte(uint8_t(simdType())); return true; }
bool MSimdBox::writeRecoverData(CompactBufferWriter& writer) const { MOZ_ASSERT(canRecoverOnBailout()); writer.writeUnsigned(uint32_t(RInstruction::Recover_SimdBox)); SimdTypeDescr& simdTypeDescr = templateObject()->typeDescr().as<SimdTypeDescr>(); SimdTypeDescr::Type type = simdTypeDescr.type(); writer.writeByte(uint8_t(type)); return true; }
bool MMathFunction::writeRecoverData(CompactBufferWriter& writer) const { MOZ_ASSERT(canRecoverOnBailout()); switch (function_) { case Round: writer.writeUnsigned(uint32_t(RInstruction::Recover_Round)); return true; case Sin: case Log: writer.writeUnsigned(uint32_t(RInstruction::Recover_MathFunction)); writer.writeByte(function_); return true; default: MOZ_CRASH("Unknown math function."); } }