зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1106947 - Make CodeGenerator visit() methods infallible, r=jandem.
This commit is contained in:
Родитель
3324f67238
Коммит
c40a137190
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -49,7 +49,7 @@ class OutOfLineRegExpTest;
|
|||
|
||||
class CodeGenerator : public CodeGeneratorSpecific
|
||||
{
|
||||
bool generateArgumentsChecks(bool bailout = true);
|
||||
void generateArgumentsChecks(bool bailout = true);
|
||||
bool generateBody();
|
||||
|
||||
public:
|
||||
|
@ -61,321 +61,321 @@ class CodeGenerator : public CodeGeneratorSpecific
|
|||
bool generateAsmJS(AsmJSFunctionLabels *labels);
|
||||
bool link(JSContext *cx, types::CompilerConstraintList *constraints);
|
||||
|
||||
bool visitLabel(LLabel *lir);
|
||||
bool visitNop(LNop *lir);
|
||||
bool visitOsiPoint(LOsiPoint *lir);
|
||||
bool visitGoto(LGoto *lir);
|
||||
bool visitTableSwitch(LTableSwitch *ins);
|
||||
bool visitTableSwitchV(LTableSwitchV *ins);
|
||||
bool visitCloneLiteral(LCloneLiteral *lir);
|
||||
bool visitParameter(LParameter *lir);
|
||||
bool visitCallee(LCallee *lir);
|
||||
bool visitIsConstructing(LIsConstructing *lir);
|
||||
bool visitStart(LStart *lir);
|
||||
bool visitReturn(LReturn *ret);
|
||||
bool visitDefVar(LDefVar *lir);
|
||||
bool visitDefFun(LDefFun *lir);
|
||||
bool visitOsrEntry(LOsrEntry *lir);
|
||||
bool visitOsrScopeChain(LOsrScopeChain *lir);
|
||||
bool visitOsrValue(LOsrValue *lir);
|
||||
bool visitOsrReturnValue(LOsrReturnValue *lir);
|
||||
bool visitOsrArgumentsObject(LOsrArgumentsObject *lir);
|
||||
bool visitStackArgT(LStackArgT *lir);
|
||||
bool visitStackArgV(LStackArgV *lir);
|
||||
bool visitMoveGroup(LMoveGroup *group);
|
||||
bool visitValueToInt32(LValueToInt32 *lir);
|
||||
bool visitValueToDouble(LValueToDouble *lir);
|
||||
bool visitValueToFloat32(LValueToFloat32 *lir);
|
||||
bool visitFloat32ToDouble(LFloat32ToDouble *lir);
|
||||
bool visitDoubleToFloat32(LDoubleToFloat32 *lir);
|
||||
bool visitInt32ToFloat32(LInt32ToFloat32 *lir);
|
||||
bool visitInt32ToDouble(LInt32ToDouble *lir);
|
||||
void visitLabel(LLabel *lir);
|
||||
void visitNop(LNop *lir);
|
||||
void visitOsiPoint(LOsiPoint *lir);
|
||||
void visitGoto(LGoto *lir);
|
||||
void visitTableSwitch(LTableSwitch *ins);
|
||||
void visitTableSwitchV(LTableSwitchV *ins);
|
||||
void visitCloneLiteral(LCloneLiteral *lir);
|
||||
void visitParameter(LParameter *lir);
|
||||
void visitCallee(LCallee *lir);
|
||||
void visitIsConstructing(LIsConstructing *lir);
|
||||
void visitStart(LStart *lir);
|
||||
void visitReturn(LReturn *ret);
|
||||
void visitDefVar(LDefVar *lir);
|
||||
void visitDefFun(LDefFun *lir);
|
||||
void visitOsrEntry(LOsrEntry *lir);
|
||||
void visitOsrScopeChain(LOsrScopeChain *lir);
|
||||
void visitOsrValue(LOsrValue *lir);
|
||||
void visitOsrReturnValue(LOsrReturnValue *lir);
|
||||
void visitOsrArgumentsObject(LOsrArgumentsObject *lir);
|
||||
void visitStackArgT(LStackArgT *lir);
|
||||
void visitStackArgV(LStackArgV *lir);
|
||||
void visitMoveGroup(LMoveGroup *group);
|
||||
void visitValueToInt32(LValueToInt32 *lir);
|
||||
void visitValueToDouble(LValueToDouble *lir);
|
||||
void visitValueToFloat32(LValueToFloat32 *lir);
|
||||
void visitFloat32ToDouble(LFloat32ToDouble *lir);
|
||||
void visitDoubleToFloat32(LDoubleToFloat32 *lir);
|
||||
void visitInt32ToFloat32(LInt32ToFloat32 *lir);
|
||||
void visitInt32ToDouble(LInt32ToDouble *lir);
|
||||
void emitOOLTestObject(Register objreg, Label *ifTruthy, Label *ifFalsy, Register scratch);
|
||||
bool visitTestOAndBranch(LTestOAndBranch *lir);
|
||||
bool visitTestVAndBranch(LTestVAndBranch *lir);
|
||||
bool visitFunctionDispatch(LFunctionDispatch *lir);
|
||||
bool visitTypeObjectDispatch(LTypeObjectDispatch *lir);
|
||||
bool visitBooleanToString(LBooleanToString *lir);
|
||||
void visitTestOAndBranch(LTestOAndBranch *lir);
|
||||
void visitTestVAndBranch(LTestVAndBranch *lir);
|
||||
void visitFunctionDispatch(LFunctionDispatch *lir);
|
||||
void visitTypeObjectDispatch(LTypeObjectDispatch *lir);
|
||||
void visitBooleanToString(LBooleanToString *lir);
|
||||
void emitIntToString(Register input, Register output, Label *ool);
|
||||
bool visitIntToString(LIntToString *lir);
|
||||
bool visitDoubleToString(LDoubleToString *lir);
|
||||
bool visitValueToString(LValueToString *lir);
|
||||
bool visitValueToObjectOrNull(LValueToObjectOrNull *lir);
|
||||
bool visitInteger(LInteger *lir);
|
||||
bool visitRegExp(LRegExp *lir);
|
||||
bool visitRegExpExec(LRegExpExec *lir);
|
||||
bool visitOutOfLineRegExpExec(OutOfLineRegExpExec *ool);
|
||||
bool visitRegExpTest(LRegExpTest *lir);
|
||||
bool visitOutOfLineRegExpTest(OutOfLineRegExpTest *ool);
|
||||
bool visitRegExpReplace(LRegExpReplace *lir);
|
||||
bool visitStringReplace(LStringReplace *lir);
|
||||
bool visitLambda(LLambda *lir);
|
||||
bool visitLambdaArrow(LLambdaArrow *lir);
|
||||
bool visitLambdaForSingleton(LLambdaForSingleton *lir);
|
||||
bool visitLambdaPar(LLambdaPar *lir);
|
||||
bool visitPointer(LPointer *lir);
|
||||
bool visitSlots(LSlots *lir);
|
||||
bool visitLoadSlotT(LLoadSlotT *lir);
|
||||
bool visitLoadSlotV(LLoadSlotV *lir);
|
||||
bool visitStoreSlotT(LStoreSlotT *lir);
|
||||
bool visitStoreSlotV(LStoreSlotV *lir);
|
||||
bool visitElements(LElements *lir);
|
||||
bool visitConvertElementsToDoubles(LConvertElementsToDoubles *lir);
|
||||
bool visitMaybeToDoubleElement(LMaybeToDoubleElement *lir);
|
||||
bool visitMaybeCopyElementsForWrite(LMaybeCopyElementsForWrite *lir);
|
||||
bool visitGuardObjectIdentity(LGuardObjectIdentity *guard);
|
||||
bool visitGuardShapePolymorphic(LGuardShapePolymorphic *lir);
|
||||
bool visitTypeBarrierV(LTypeBarrierV *lir);
|
||||
bool visitTypeBarrierO(LTypeBarrierO *lir);
|
||||
bool visitMonitorTypes(LMonitorTypes *lir);
|
||||
bool visitPostWriteBarrierO(LPostWriteBarrierO *lir);
|
||||
bool visitPostWriteBarrierV(LPostWriteBarrierV *lir);
|
||||
bool visitOutOfLineCallPostWriteBarrier(OutOfLineCallPostWriteBarrier *ool);
|
||||
bool visitCallNative(LCallNative *call);
|
||||
bool emitCallInvokeFunction(LInstruction *call, Register callereg,
|
||||
void visitIntToString(LIntToString *lir);
|
||||
void visitDoubleToString(LDoubleToString *lir);
|
||||
void visitValueToString(LValueToString *lir);
|
||||
void visitValueToObjectOrNull(LValueToObjectOrNull *lir);
|
||||
void visitInteger(LInteger *lir);
|
||||
void visitRegExp(LRegExp *lir);
|
||||
void visitRegExpExec(LRegExpExec *lir);
|
||||
void visitOutOfLineRegExpExec(OutOfLineRegExpExec *ool);
|
||||
void visitRegExpTest(LRegExpTest *lir);
|
||||
void visitOutOfLineRegExpTest(OutOfLineRegExpTest *ool);
|
||||
void visitRegExpReplace(LRegExpReplace *lir);
|
||||
void visitStringReplace(LStringReplace *lir);
|
||||
void visitLambda(LLambda *lir);
|
||||
void visitLambdaArrow(LLambdaArrow *lir);
|
||||
void visitLambdaForSingleton(LLambdaForSingleton *lir);
|
||||
void visitLambdaPar(LLambdaPar *lir);
|
||||
void visitPointer(LPointer *lir);
|
||||
void visitSlots(LSlots *lir);
|
||||
void visitLoadSlotT(LLoadSlotT *lir);
|
||||
void visitLoadSlotV(LLoadSlotV *lir);
|
||||
void visitStoreSlotT(LStoreSlotT *lir);
|
||||
void visitStoreSlotV(LStoreSlotV *lir);
|
||||
void visitElements(LElements *lir);
|
||||
void visitConvertElementsToDoubles(LConvertElementsToDoubles *lir);
|
||||
void visitMaybeToDoubleElement(LMaybeToDoubleElement *lir);
|
||||
void visitMaybeCopyElementsForWrite(LMaybeCopyElementsForWrite *lir);
|
||||
void visitGuardObjectIdentity(LGuardObjectIdentity *guard);
|
||||
void visitGuardShapePolymorphic(LGuardShapePolymorphic *lir);
|
||||
void visitTypeBarrierV(LTypeBarrierV *lir);
|
||||
void visitTypeBarrierO(LTypeBarrierO *lir);
|
||||
void visitMonitorTypes(LMonitorTypes *lir);
|
||||
void visitPostWriteBarrierO(LPostWriteBarrierO *lir);
|
||||
void visitPostWriteBarrierV(LPostWriteBarrierV *lir);
|
||||
void visitOutOfLineCallPostWriteBarrier(OutOfLineCallPostWriteBarrier *ool);
|
||||
void visitCallNative(LCallNative *call);
|
||||
void emitCallInvokeFunction(LInstruction *call, Register callereg,
|
||||
uint32_t argc, uint32_t unusedStack);
|
||||
bool visitCallGeneric(LCallGeneric *call);
|
||||
bool visitCallKnown(LCallKnown *call);
|
||||
bool emitCallInvokeFunction(LApplyArgsGeneric *apply, Register extraStackSize);
|
||||
void visitCallGeneric(LCallGeneric *call);
|
||||
void visitCallKnown(LCallKnown *call);
|
||||
void emitCallInvokeFunction(LApplyArgsGeneric *apply, Register extraStackSize);
|
||||
void emitPushArguments(LApplyArgsGeneric *apply, Register extraStackSpace);
|
||||
void emitPopArguments(LApplyArgsGeneric *apply, Register extraStackSize);
|
||||
bool visitApplyArgsGeneric(LApplyArgsGeneric *apply);
|
||||
bool visitBail(LBail *lir);
|
||||
bool visitUnreachable(LUnreachable *unreachable);
|
||||
bool visitGetDynamicName(LGetDynamicName *lir);
|
||||
bool visitFilterArgumentsOrEvalS(LFilterArgumentsOrEvalS *lir);
|
||||
bool visitFilterArgumentsOrEvalV(LFilterArgumentsOrEvalV *lir);
|
||||
bool visitCallDirectEvalS(LCallDirectEvalS *lir);
|
||||
bool visitCallDirectEvalV(LCallDirectEvalV *lir);
|
||||
bool visitDoubleToInt32(LDoubleToInt32 *lir);
|
||||
bool visitFloat32ToInt32(LFloat32ToInt32 *lir);
|
||||
bool visitNewArrayCallVM(LNewArray *lir);
|
||||
bool visitNewArray(LNewArray *lir);
|
||||
bool visitOutOfLineNewArray(OutOfLineNewArray *ool);
|
||||
bool visitNewArrayCopyOnWrite(LNewArrayCopyOnWrite *lir);
|
||||
bool visitNewArrayDynamicLength(LNewArrayDynamicLength *lir);
|
||||
bool visitNewObjectVMCall(LNewObject *lir);
|
||||
bool visitNewObject(LNewObject *lir);
|
||||
bool visitOutOfLineNewObject(OutOfLineNewObject *ool);
|
||||
bool visitNewTypedObject(LNewTypedObject *lir);
|
||||
bool visitNewDeclEnvObject(LNewDeclEnvObject *lir);
|
||||
bool visitNewCallObject(LNewCallObject *lir);
|
||||
bool visitNewSingletonCallObject(LNewSingletonCallObject *lir);
|
||||
bool visitNewCallObjectPar(LNewCallObjectPar *lir);
|
||||
bool visitNewStringObject(LNewStringObject *lir);
|
||||
bool visitNewPar(LNewPar *lir);
|
||||
bool visitNewDenseArrayPar(LNewDenseArrayPar *lir);
|
||||
bool visitNewDerivedTypedObject(LNewDerivedTypedObject *lir);
|
||||
bool visitInitElem(LInitElem *lir);
|
||||
bool visitInitElemGetterSetter(LInitElemGetterSetter *lir);
|
||||
bool visitMutateProto(LMutateProto *lir);
|
||||
bool visitInitProp(LInitProp *lir);
|
||||
bool visitInitPropGetterSetter(LInitPropGetterSetter *lir);
|
||||
bool visitCreateThis(LCreateThis *lir);
|
||||
bool visitCreateThisWithProto(LCreateThisWithProto *lir);
|
||||
bool visitCreateThisWithTemplate(LCreateThisWithTemplate *lir);
|
||||
bool visitCreateArgumentsObject(LCreateArgumentsObject *lir);
|
||||
bool visitGetArgumentsObjectArg(LGetArgumentsObjectArg *lir);
|
||||
bool visitSetArgumentsObjectArg(LSetArgumentsObjectArg *lir);
|
||||
bool visitReturnFromCtor(LReturnFromCtor *lir);
|
||||
bool visitComputeThis(LComputeThis *lir);
|
||||
bool visitLoadArrowThis(LLoadArrowThis *lir);
|
||||
bool visitArrayLength(LArrayLength *lir);
|
||||
bool visitSetArrayLength(LSetArrayLength *lir);
|
||||
bool visitTypedArrayLength(LTypedArrayLength *lir);
|
||||
bool visitTypedArrayElements(LTypedArrayElements *lir);
|
||||
bool visitTypedObjectElements(LTypedObjectElements *lir);
|
||||
bool visitSetTypedObjectOffset(LSetTypedObjectOffset *lir);
|
||||
bool visitTypedObjectProto(LTypedObjectProto *ins);
|
||||
bool visitStringLength(LStringLength *lir);
|
||||
bool visitSubstr(LSubstr *lir);
|
||||
bool visitInitializedLength(LInitializedLength *lir);
|
||||
bool visitSetInitializedLength(LSetInitializedLength *lir);
|
||||
bool visitNotO(LNotO *ins);
|
||||
bool visitNotV(LNotV *ins);
|
||||
bool visitBoundsCheck(LBoundsCheck *lir);
|
||||
bool visitBoundsCheckRange(LBoundsCheckRange *lir);
|
||||
bool visitBoundsCheckLower(LBoundsCheckLower *lir);
|
||||
bool visitLoadFixedSlotV(LLoadFixedSlotV *ins);
|
||||
bool visitLoadFixedSlotT(LLoadFixedSlotT *ins);
|
||||
bool visitStoreFixedSlotV(LStoreFixedSlotV *ins);
|
||||
bool visitStoreFixedSlotT(LStoreFixedSlotT *ins);
|
||||
bool emitGetPropertyPolymorphic(LInstruction *lir, Register obj,
|
||||
void visitApplyArgsGeneric(LApplyArgsGeneric *apply);
|
||||
void visitBail(LBail *lir);
|
||||
void visitUnreachable(LUnreachable *unreachable);
|
||||
void visitGetDynamicName(LGetDynamicName *lir);
|
||||
void visitFilterArgumentsOrEvalS(LFilterArgumentsOrEvalS *lir);
|
||||
void visitFilterArgumentsOrEvalV(LFilterArgumentsOrEvalV *lir);
|
||||
void visitCallDirectEvalS(LCallDirectEvalS *lir);
|
||||
void visitCallDirectEvalV(LCallDirectEvalV *lir);
|
||||
void visitDoubleToInt32(LDoubleToInt32 *lir);
|
||||
void visitFloat32ToInt32(LFloat32ToInt32 *lir);
|
||||
void visitNewArrayCallVM(LNewArray *lir);
|
||||
void visitNewArray(LNewArray *lir);
|
||||
void visitOutOfLineNewArray(OutOfLineNewArray *ool);
|
||||
void visitNewArrayCopyOnWrite(LNewArrayCopyOnWrite *lir);
|
||||
void visitNewArrayDynamicLength(LNewArrayDynamicLength *lir);
|
||||
void visitNewObjectVMCall(LNewObject *lir);
|
||||
void visitNewObject(LNewObject *lir);
|
||||
void visitOutOfLineNewObject(OutOfLineNewObject *ool);
|
||||
void visitNewTypedObject(LNewTypedObject *lir);
|
||||
void visitNewDeclEnvObject(LNewDeclEnvObject *lir);
|
||||
void visitNewCallObject(LNewCallObject *lir);
|
||||
void visitNewSingletonCallObject(LNewSingletonCallObject *lir);
|
||||
void visitNewCallObjectPar(LNewCallObjectPar *lir);
|
||||
void visitNewStringObject(LNewStringObject *lir);
|
||||
void visitNewPar(LNewPar *lir);
|
||||
void visitNewDenseArrayPar(LNewDenseArrayPar *lir);
|
||||
void visitNewDerivedTypedObject(LNewDerivedTypedObject *lir);
|
||||
void visitInitElem(LInitElem *lir);
|
||||
void visitInitElemGetterSetter(LInitElemGetterSetter *lir);
|
||||
void visitMutateProto(LMutateProto *lir);
|
||||
void visitInitProp(LInitProp *lir);
|
||||
void visitInitPropGetterSetter(LInitPropGetterSetter *lir);
|
||||
void visitCreateThis(LCreateThis *lir);
|
||||
void visitCreateThisWithProto(LCreateThisWithProto *lir);
|
||||
void visitCreateThisWithTemplate(LCreateThisWithTemplate *lir);
|
||||
void visitCreateArgumentsObject(LCreateArgumentsObject *lir);
|
||||
void visitGetArgumentsObjectArg(LGetArgumentsObjectArg *lir);
|
||||
void visitSetArgumentsObjectArg(LSetArgumentsObjectArg *lir);
|
||||
void visitReturnFromCtor(LReturnFromCtor *lir);
|
||||
void visitComputeThis(LComputeThis *lir);
|
||||
void visitLoadArrowThis(LLoadArrowThis *lir);
|
||||
void visitArrayLength(LArrayLength *lir);
|
||||
void visitSetArrayLength(LSetArrayLength *lir);
|
||||
void visitTypedArrayLength(LTypedArrayLength *lir);
|
||||
void visitTypedArrayElements(LTypedArrayElements *lir);
|
||||
void visitTypedObjectElements(LTypedObjectElements *lir);
|
||||
void visitSetTypedObjectOffset(LSetTypedObjectOffset *lir);
|
||||
void visitTypedObjectProto(LTypedObjectProto *ins);
|
||||
void visitStringLength(LStringLength *lir);
|
||||
void visitSubstr(LSubstr *lir);
|
||||
void visitInitializedLength(LInitializedLength *lir);
|
||||
void visitSetInitializedLength(LSetInitializedLength *lir);
|
||||
void visitNotO(LNotO *ins);
|
||||
void visitNotV(LNotV *ins);
|
||||
void visitBoundsCheck(LBoundsCheck *lir);
|
||||
void visitBoundsCheckRange(LBoundsCheckRange *lir);
|
||||
void visitBoundsCheckLower(LBoundsCheckLower *lir);
|
||||
void visitLoadFixedSlotV(LLoadFixedSlotV *ins);
|
||||
void visitLoadFixedSlotT(LLoadFixedSlotT *ins);
|
||||
void visitStoreFixedSlotV(LStoreFixedSlotV *ins);
|
||||
void visitStoreFixedSlotT(LStoreFixedSlotT *ins);
|
||||
void emitGetPropertyPolymorphic(LInstruction *lir, Register obj,
|
||||
Register scratch, const TypedOrValueRegister &output);
|
||||
bool visitGetPropertyPolymorphicV(LGetPropertyPolymorphicV *ins);
|
||||
bool visitGetPropertyPolymorphicT(LGetPropertyPolymorphicT *ins);
|
||||
bool emitSetPropertyPolymorphic(LInstruction *lir, Register obj,
|
||||
void visitGetPropertyPolymorphicV(LGetPropertyPolymorphicV *ins);
|
||||
void visitGetPropertyPolymorphicT(LGetPropertyPolymorphicT *ins);
|
||||
void emitSetPropertyPolymorphic(LInstruction *lir, Register obj,
|
||||
Register scratch, const ConstantOrRegister &value);
|
||||
bool visitSetPropertyPolymorphicV(LSetPropertyPolymorphicV *ins);
|
||||
bool visitArraySplice(LArraySplice *splice);
|
||||
bool visitSetPropertyPolymorphicT(LSetPropertyPolymorphicT *ins);
|
||||
bool visitAbsI(LAbsI *lir);
|
||||
bool visitAtan2D(LAtan2D *lir);
|
||||
bool visitHypot(LHypot *lir);
|
||||
bool visitPowI(LPowI *lir);
|
||||
bool visitPowD(LPowD *lir);
|
||||
bool visitRandom(LRandom *lir);
|
||||
bool visitMathFunctionD(LMathFunctionD *ins);
|
||||
bool visitMathFunctionF(LMathFunctionF *ins);
|
||||
bool visitModD(LModD *ins);
|
||||
bool visitMinMaxI(LMinMaxI *lir);
|
||||
bool visitBinaryV(LBinaryV *lir);
|
||||
bool emitCompareS(LInstruction *lir, JSOp op, Register left, Register right, Register output);
|
||||
bool visitCompareS(LCompareS *lir);
|
||||
bool visitCompareStrictS(LCompareStrictS *lir);
|
||||
bool visitCompareVM(LCompareVM *lir);
|
||||
bool visitIsNullOrLikeUndefined(LIsNullOrLikeUndefined *lir);
|
||||
bool visitIsNullOrLikeUndefinedAndBranch(LIsNullOrLikeUndefinedAndBranch *lir);
|
||||
bool visitEmulatesUndefined(LEmulatesUndefined *lir);
|
||||
bool visitEmulatesUndefinedAndBranch(LEmulatesUndefinedAndBranch *lir);
|
||||
bool emitConcat(LInstruction *lir, Register lhs, Register rhs, Register output);
|
||||
bool visitConcat(LConcat *lir);
|
||||
bool visitConcatPar(LConcatPar *lir);
|
||||
bool visitCharCodeAt(LCharCodeAt *lir);
|
||||
bool visitFromCharCode(LFromCharCode *lir);
|
||||
bool visitStringSplit(LStringSplit *lir);
|
||||
bool visitFunctionEnvironment(LFunctionEnvironment *lir);
|
||||
bool visitForkJoinContext(LForkJoinContext *lir);
|
||||
bool visitGuardThreadExclusive(LGuardThreadExclusive *lir);
|
||||
bool visitCallGetProperty(LCallGetProperty *lir);
|
||||
bool visitCallGetElement(LCallGetElement *lir);
|
||||
bool visitCallSetElement(LCallSetElement *lir);
|
||||
bool visitCallInitElementArray(LCallInitElementArray *lir);
|
||||
bool visitThrow(LThrow *lir);
|
||||
bool visitTypeOfV(LTypeOfV *lir);
|
||||
bool visitOutOfLineTypeOfV(OutOfLineTypeOfV *ool);
|
||||
bool visitToIdV(LToIdV *lir);
|
||||
template<typename T> bool emitLoadElementT(LLoadElementT *lir, const T &source);
|
||||
bool visitLoadElementT(LLoadElementT *lir);
|
||||
bool visitLoadElementV(LLoadElementV *load);
|
||||
bool visitLoadElementHole(LLoadElementHole *lir);
|
||||
bool visitLoadUnboxedPointerV(LLoadUnboxedPointerV *lir);
|
||||
bool visitLoadUnboxedPointerT(LLoadUnboxedPointerT *lir);
|
||||
bool visitStoreElementT(LStoreElementT *lir);
|
||||
bool visitStoreElementV(LStoreElementV *lir);
|
||||
bool visitStoreElementHoleT(LStoreElementHoleT *lir);
|
||||
bool visitStoreElementHoleV(LStoreElementHoleV *lir);
|
||||
bool visitStoreUnboxedPointer(LStoreUnboxedPointer *lir);
|
||||
bool emitArrayPopShift(LInstruction *lir, const MArrayPopShift *mir, Register obj,
|
||||
void visitSetPropertyPolymorphicV(LSetPropertyPolymorphicV *ins);
|
||||
void visitArraySplice(LArraySplice *splice);
|
||||
void visitSetPropertyPolymorphicT(LSetPropertyPolymorphicT *ins);
|
||||
void visitAbsI(LAbsI *lir);
|
||||
void visitAtan2D(LAtan2D *lir);
|
||||
void visitHypot(LHypot *lir);
|
||||
void visitPowI(LPowI *lir);
|
||||
void visitPowD(LPowD *lir);
|
||||
void visitRandom(LRandom *lir);
|
||||
void visitMathFunctionD(LMathFunctionD *ins);
|
||||
void visitMathFunctionF(LMathFunctionF *ins);
|
||||
void visitModD(LModD *ins);
|
||||
void visitMinMaxI(LMinMaxI *lir);
|
||||
void visitBinaryV(LBinaryV *lir);
|
||||
void emitCompareS(LInstruction *lir, JSOp op, Register left, Register right, Register output);
|
||||
void visitCompareS(LCompareS *lir);
|
||||
void visitCompareStrictS(LCompareStrictS *lir);
|
||||
void visitCompareVM(LCompareVM *lir);
|
||||
void visitIsNullOrLikeUndefined(LIsNullOrLikeUndefined *lir);
|
||||
void visitIsNullOrLikeUndefinedAndBranch(LIsNullOrLikeUndefinedAndBranch *lir);
|
||||
void visitEmulatesUndefined(LEmulatesUndefined *lir);
|
||||
void visitEmulatesUndefinedAndBranch(LEmulatesUndefinedAndBranch *lir);
|
||||
void emitConcat(LInstruction *lir, Register lhs, Register rhs, Register output);
|
||||
void visitConcat(LConcat *lir);
|
||||
void visitConcatPar(LConcatPar *lir);
|
||||
void visitCharCodeAt(LCharCodeAt *lir);
|
||||
void visitFromCharCode(LFromCharCode *lir);
|
||||
void visitStringSplit(LStringSplit *lir);
|
||||
void visitFunctionEnvironment(LFunctionEnvironment *lir);
|
||||
void visitForkJoinContext(LForkJoinContext *lir);
|
||||
void visitGuardThreadExclusive(LGuardThreadExclusive *lir);
|
||||
void visitCallGetProperty(LCallGetProperty *lir);
|
||||
void visitCallGetElement(LCallGetElement *lir);
|
||||
void visitCallSetElement(LCallSetElement *lir);
|
||||
void visitCallInitElementArray(LCallInitElementArray *lir);
|
||||
void visitThrow(LThrow *lir);
|
||||
void visitTypeOfV(LTypeOfV *lir);
|
||||
void visitOutOfLineTypeOfV(OutOfLineTypeOfV *ool);
|
||||
void visitToIdV(LToIdV *lir);
|
||||
template<typename T> void emitLoadElementT(LLoadElementT *lir, const T &source);
|
||||
void visitLoadElementT(LLoadElementT *lir);
|
||||
void visitLoadElementV(LLoadElementV *load);
|
||||
void visitLoadElementHole(LLoadElementHole *lir);
|
||||
void visitLoadUnboxedPointerV(LLoadUnboxedPointerV *lir);
|
||||
void visitLoadUnboxedPointerT(LLoadUnboxedPointerT *lir);
|
||||
void visitStoreElementT(LStoreElementT *lir);
|
||||
void visitStoreElementV(LStoreElementV *lir);
|
||||
void visitStoreElementHoleT(LStoreElementHoleT *lir);
|
||||
void visitStoreElementHoleV(LStoreElementHoleV *lir);
|
||||
void visitStoreUnboxedPointer(LStoreUnboxedPointer *lir);
|
||||
void emitArrayPopShift(LInstruction *lir, const MArrayPopShift *mir, Register obj,
|
||||
Register elementsTemp, Register lengthTemp, TypedOrValueRegister out);
|
||||
bool visitArrayPopShiftV(LArrayPopShiftV *lir);
|
||||
bool visitArrayPopShiftT(LArrayPopShiftT *lir);
|
||||
bool emitArrayPush(LInstruction *lir, const MArrayPush *mir, Register obj,
|
||||
void visitArrayPopShiftV(LArrayPopShiftV *lir);
|
||||
void visitArrayPopShiftT(LArrayPopShiftT *lir);
|
||||
void emitArrayPush(LInstruction *lir, const MArrayPush *mir, Register obj,
|
||||
ConstantOrRegister value, Register elementsTemp, Register length);
|
||||
bool visitArrayPushV(LArrayPushV *lir);
|
||||
bool visitArrayPushT(LArrayPushT *lir);
|
||||
bool visitArrayConcat(LArrayConcat *lir);
|
||||
bool visitArrayJoin(LArrayJoin *lir);
|
||||
bool visitLoadTypedArrayElement(LLoadTypedArrayElement *lir);
|
||||
bool visitLoadTypedArrayElementHole(LLoadTypedArrayElementHole *lir);
|
||||
bool visitStoreTypedArrayElement(LStoreTypedArrayElement *lir);
|
||||
bool visitStoreTypedArrayElementHole(LStoreTypedArrayElementHole *lir);
|
||||
bool visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement *lir);
|
||||
bool visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElementBinop *lir);
|
||||
bool visitClampIToUint8(LClampIToUint8 *lir);
|
||||
bool visitClampDToUint8(LClampDToUint8 *lir);
|
||||
bool visitClampVToUint8(LClampVToUint8 *lir);
|
||||
bool visitCallIteratorStart(LCallIteratorStart *lir);
|
||||
bool visitIteratorStart(LIteratorStart *lir);
|
||||
bool visitIteratorMore(LIteratorMore *lir);
|
||||
bool visitIsNoIterAndBranch(LIsNoIterAndBranch *lir);
|
||||
bool visitIteratorEnd(LIteratorEnd *lir);
|
||||
bool visitArgumentsLength(LArgumentsLength *lir);
|
||||
bool visitGetFrameArgument(LGetFrameArgument *lir);
|
||||
bool visitSetFrameArgumentT(LSetFrameArgumentT *lir);
|
||||
bool visitSetFrameArgumentC(LSetFrameArgumentC *lir);
|
||||
bool visitSetFrameArgumentV(LSetFrameArgumentV *lir);
|
||||
bool visitRunOncePrologue(LRunOncePrologue *lir);
|
||||
bool emitRest(LInstruction *lir, Register array, Register numActuals,
|
||||
void visitArrayPushV(LArrayPushV *lir);
|
||||
void visitArrayPushT(LArrayPushT *lir);
|
||||
void visitArrayConcat(LArrayConcat *lir);
|
||||
void visitArrayJoin(LArrayJoin *lir);
|
||||
void visitLoadTypedArrayElement(LLoadTypedArrayElement *lir);
|
||||
void visitLoadTypedArrayElementHole(LLoadTypedArrayElementHole *lir);
|
||||
void visitStoreTypedArrayElement(LStoreTypedArrayElement *lir);
|
||||
void visitStoreTypedArrayElementHole(LStoreTypedArrayElementHole *lir);
|
||||
void visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement *lir);
|
||||
void visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElementBinop *lir);
|
||||
void visitClampIToUint8(LClampIToUint8 *lir);
|
||||
void visitClampDToUint8(LClampDToUint8 *lir);
|
||||
void visitClampVToUint8(LClampVToUint8 *lir);
|
||||
void visitCallIteratorStart(LCallIteratorStart *lir);
|
||||
void visitIteratorStart(LIteratorStart *lir);
|
||||
void visitIteratorMore(LIteratorMore *lir);
|
||||
void visitIsNoIterAndBranch(LIsNoIterAndBranch *lir);
|
||||
void visitIteratorEnd(LIteratorEnd *lir);
|
||||
void visitArgumentsLength(LArgumentsLength *lir);
|
||||
void visitGetFrameArgument(LGetFrameArgument *lir);
|
||||
void visitSetFrameArgumentT(LSetFrameArgumentT *lir);
|
||||
void visitSetFrameArgumentC(LSetFrameArgumentC *lir);
|
||||
void visitSetFrameArgumentV(LSetFrameArgumentV *lir);
|
||||
void visitRunOncePrologue(LRunOncePrologue *lir);
|
||||
void emitRest(LInstruction *lir, Register array, Register numActuals,
|
||||
Register temp0, Register temp1, unsigned numFormals,
|
||||
JSObject *templateObject, bool saveAndRestore, Register resultreg);
|
||||
bool visitRest(LRest *lir);
|
||||
bool visitRestPar(LRestPar *lir);
|
||||
bool visitCallSetProperty(LCallSetProperty *ins);
|
||||
bool visitCallDeleteProperty(LCallDeleteProperty *lir);
|
||||
bool visitCallDeleteElement(LCallDeleteElement *lir);
|
||||
bool visitBitNotV(LBitNotV *lir);
|
||||
bool visitBitOpV(LBitOpV *lir);
|
||||
bool emitInstanceOf(LInstruction *ins, JSObject *prototypeObject);
|
||||
bool visitIn(LIn *ins);
|
||||
bool visitInArray(LInArray *ins);
|
||||
bool visitInstanceOfO(LInstanceOfO *ins);
|
||||
bool visitInstanceOfV(LInstanceOfV *ins);
|
||||
bool visitCallInstanceOf(LCallInstanceOf *ins);
|
||||
bool visitProfilerStackOp(LProfilerStackOp *lir);
|
||||
bool visitGetDOMProperty(LGetDOMProperty *lir);
|
||||
bool visitGetDOMMember(LGetDOMMember *lir);
|
||||
bool visitSetDOMProperty(LSetDOMProperty *lir);
|
||||
bool visitCallDOMNative(LCallDOMNative *lir);
|
||||
bool visitCallGetIntrinsicValue(LCallGetIntrinsicValue *lir);
|
||||
bool visitIsCallable(LIsCallable *lir);
|
||||
bool visitOutOfLineIsCallable(OutOfLineIsCallable *ool);
|
||||
bool visitIsObject(LIsObject *lir);
|
||||
bool visitIsObjectAndBranch(LIsObjectAndBranch *lir);
|
||||
bool visitHaveSameClass(LHaveSameClass *lir);
|
||||
bool visitHasClass(LHasClass *lir);
|
||||
bool visitAsmJSParameter(LAsmJSParameter *lir);
|
||||
bool visitAsmJSReturn(LAsmJSReturn *ret);
|
||||
bool visitAsmJSVoidReturn(LAsmJSVoidReturn *ret);
|
||||
bool visitLexicalCheck(LLexicalCheck *ins);
|
||||
bool visitThrowUninitializedLexical(LThrowUninitializedLexical *ins);
|
||||
bool visitDebugger(LDebugger *ins);
|
||||
void visitRest(LRest *lir);
|
||||
void visitRestPar(LRestPar *lir);
|
||||
void visitCallSetProperty(LCallSetProperty *ins);
|
||||
void visitCallDeleteProperty(LCallDeleteProperty *lir);
|
||||
void visitCallDeleteElement(LCallDeleteElement *lir);
|
||||
void visitBitNotV(LBitNotV *lir);
|
||||
void visitBitOpV(LBitOpV *lir);
|
||||
void emitInstanceOf(LInstruction *ins, JSObject *prototypeObject);
|
||||
void visitIn(LIn *ins);
|
||||
void visitInArray(LInArray *ins);
|
||||
void visitInstanceOfO(LInstanceOfO *ins);
|
||||
void visitInstanceOfV(LInstanceOfV *ins);
|
||||
void visitCallInstanceOf(LCallInstanceOf *ins);
|
||||
void visitProfilerStackOp(LProfilerStackOp *lir);
|
||||
void visitGetDOMProperty(LGetDOMProperty *lir);
|
||||
void visitGetDOMMember(LGetDOMMember *lir);
|
||||
void visitSetDOMProperty(LSetDOMProperty *lir);
|
||||
void visitCallDOMNative(LCallDOMNative *lir);
|
||||
void visitCallGetIntrinsicValue(LCallGetIntrinsicValue *lir);
|
||||
void visitIsCallable(LIsCallable *lir);
|
||||
void visitOutOfLineIsCallable(OutOfLineIsCallable *ool);
|
||||
void visitIsObject(LIsObject *lir);
|
||||
void visitIsObjectAndBranch(LIsObjectAndBranch *lir);
|
||||
void visitHaveSameClass(LHaveSameClass *lir);
|
||||
void visitHasClass(LHasClass *lir);
|
||||
void visitAsmJSParameter(LAsmJSParameter *lir);
|
||||
void visitAsmJSReturn(LAsmJSReturn *ret);
|
||||
void visitAsmJSVoidReturn(LAsmJSVoidReturn *ret);
|
||||
void visitLexicalCheck(LLexicalCheck *ins);
|
||||
void visitThrowUninitializedLexical(LThrowUninitializedLexical *ins);
|
||||
void visitDebugger(LDebugger *ins);
|
||||
|
||||
bool visitCheckOverRecursed(LCheckOverRecursed *lir);
|
||||
bool visitCheckOverRecursedFailure(CheckOverRecursedFailure *ool);
|
||||
void visitCheckOverRecursed(LCheckOverRecursed *lir);
|
||||
void visitCheckOverRecursedFailure(CheckOverRecursedFailure *ool);
|
||||
|
||||
bool visitCheckOverRecursedPar(LCheckOverRecursedPar *lir);
|
||||
void visitCheckOverRecursedPar(LCheckOverRecursedPar *lir);
|
||||
|
||||
bool visitInterruptCheckPar(LInterruptCheckPar *lir);
|
||||
bool visitOutOfLineInterruptCheckPar(OutOfLineInterruptCheckPar *ool);
|
||||
void visitInterruptCheckPar(LInterruptCheckPar *lir);
|
||||
void visitOutOfLineInterruptCheckPar(OutOfLineInterruptCheckPar *ool);
|
||||
|
||||
bool visitInterruptCheckImplicit(LInterruptCheckImplicit *ins);
|
||||
bool visitOutOfLineInterruptCheckImplicit(OutOfLineInterruptCheckImplicit *ins);
|
||||
void visitInterruptCheckImplicit(LInterruptCheckImplicit *ins);
|
||||
void visitOutOfLineInterruptCheckImplicit(OutOfLineInterruptCheckImplicit *ins);
|
||||
|
||||
bool visitUnboxFloatingPoint(LUnboxFloatingPoint *lir);
|
||||
bool visitOutOfLineUnboxFloatingPoint(OutOfLineUnboxFloatingPoint *ool);
|
||||
bool visitOutOfLineStoreElementHole(OutOfLineStoreElementHole *ool);
|
||||
void visitUnboxFloatingPoint(LUnboxFloatingPoint *lir);
|
||||
void visitOutOfLineUnboxFloatingPoint(OutOfLineUnboxFloatingPoint *ool);
|
||||
void visitOutOfLineStoreElementHole(OutOfLineStoreElementHole *ool);
|
||||
|
||||
bool visitOutOfLineNewGCThingPar(OutOfLineNewGCThingPar *ool);
|
||||
void visitOutOfLineNewGCThingPar(OutOfLineNewGCThingPar *ool);
|
||||
void loadJSScriptForBlock(MBasicBlock *block, Register reg);
|
||||
void loadOutermostJSScript(Register reg);
|
||||
|
||||
// Inline caches visitors.
|
||||
bool visitOutOfLineCache(OutOfLineUpdateCache *ool);
|
||||
void visitOutOfLineCache(OutOfLineUpdateCache *ool);
|
||||
|
||||
bool visitGetPropertyCacheV(LGetPropertyCacheV *ins);
|
||||
bool visitGetPropertyCacheT(LGetPropertyCacheT *ins);
|
||||
bool visitGetElementCacheV(LGetElementCacheV *ins);
|
||||
bool visitGetElementCacheT(LGetElementCacheT *ins);
|
||||
bool visitSetElementCacheV(LSetElementCacheV *ins);
|
||||
bool visitSetElementCacheT(LSetElementCacheT *ins);
|
||||
bool visitBindNameCache(LBindNameCache *ins);
|
||||
bool visitCallSetProperty(LInstruction *ins);
|
||||
bool visitSetPropertyCacheV(LSetPropertyCacheV *ins);
|
||||
bool visitSetPropertyCacheT(LSetPropertyCacheT *ins);
|
||||
bool visitGetNameCache(LGetNameCache *ins);
|
||||
bool visitCallsiteCloneCache(LCallsiteCloneCache *ins);
|
||||
void visitGetPropertyCacheV(LGetPropertyCacheV *ins);
|
||||
void visitGetPropertyCacheT(LGetPropertyCacheT *ins);
|
||||
void visitGetElementCacheV(LGetElementCacheV *ins);
|
||||
void visitGetElementCacheT(LGetElementCacheT *ins);
|
||||
void visitSetElementCacheV(LSetElementCacheV *ins);
|
||||
void visitSetElementCacheT(LSetElementCacheT *ins);
|
||||
void visitBindNameCache(LBindNameCache *ins);
|
||||
void visitCallSetProperty(LInstruction *ins);
|
||||
void visitSetPropertyCacheV(LSetPropertyCacheV *ins);
|
||||
void visitSetPropertyCacheT(LSetPropertyCacheT *ins);
|
||||
void visitGetNameCache(LGetNameCache *ins);
|
||||
void visitCallsiteCloneCache(LCallsiteCloneCache *ins);
|
||||
|
||||
bool visitGetPropertyIC(OutOfLineUpdateCache *ool, DataPtr<GetPropertyIC> &ic);
|
||||
bool visitGetPropertyParIC(OutOfLineUpdateCache *ool, DataPtr<GetPropertyParIC> &ic);
|
||||
bool visitSetPropertyIC(OutOfLineUpdateCache *ool, DataPtr<SetPropertyIC> &ic);
|
||||
bool visitSetPropertyParIC(OutOfLineUpdateCache *ool, DataPtr<SetPropertyParIC> &ic);
|
||||
bool visitGetElementIC(OutOfLineUpdateCache *ool, DataPtr<GetElementIC> &ic);
|
||||
bool visitGetElementParIC(OutOfLineUpdateCache *ool, DataPtr<GetElementParIC> &ic);
|
||||
bool visitSetElementIC(OutOfLineUpdateCache *ool, DataPtr<SetElementIC> &ic);
|
||||
bool visitSetElementParIC(OutOfLineUpdateCache *ool, DataPtr<SetElementParIC> &ic);
|
||||
bool visitBindNameIC(OutOfLineUpdateCache *ool, DataPtr<BindNameIC> &ic);
|
||||
bool visitNameIC(OutOfLineUpdateCache *ool, DataPtr<NameIC> &ic);
|
||||
bool visitCallsiteCloneIC(OutOfLineUpdateCache *ool, DataPtr<CallsiteCloneIC> &ic);
|
||||
void visitGetPropertyIC(OutOfLineUpdateCache *ool, DataPtr<GetPropertyIC> &ic);
|
||||
void visitGetPropertyParIC(OutOfLineUpdateCache *ool, DataPtr<GetPropertyParIC> &ic);
|
||||
void visitSetPropertyIC(OutOfLineUpdateCache *ool, DataPtr<SetPropertyIC> &ic);
|
||||
void visitSetPropertyParIC(OutOfLineUpdateCache *ool, DataPtr<SetPropertyParIC> &ic);
|
||||
void visitGetElementIC(OutOfLineUpdateCache *ool, DataPtr<GetElementIC> &ic);
|
||||
void visitGetElementParIC(OutOfLineUpdateCache *ool, DataPtr<GetElementParIC> &ic);
|
||||
void visitSetElementIC(OutOfLineUpdateCache *ool, DataPtr<SetElementIC> &ic);
|
||||
void visitSetElementParIC(OutOfLineUpdateCache *ool, DataPtr<SetElementParIC> &ic);
|
||||
void visitBindNameIC(OutOfLineUpdateCache *ool, DataPtr<BindNameIC> &ic);
|
||||
void visitNameIC(OutOfLineUpdateCache *ool, DataPtr<NameIC> &ic);
|
||||
void visitCallsiteCloneIC(OutOfLineUpdateCache *ool, DataPtr<CallsiteCloneIC> &ic);
|
||||
|
||||
bool visitAssertRangeI(LAssertRangeI *ins);
|
||||
bool visitAssertRangeD(LAssertRangeD *ins);
|
||||
bool visitAssertRangeF(LAssertRangeF *ins);
|
||||
bool visitAssertRangeV(LAssertRangeV *ins);
|
||||
void visitAssertRangeI(LAssertRangeI *ins);
|
||||
void visitAssertRangeD(LAssertRangeD *ins);
|
||||
void visitAssertRangeF(LAssertRangeF *ins);
|
||||
void visitAssertRangeV(LAssertRangeV *ins);
|
||||
|
||||
bool visitInterruptCheck(LInterruptCheck *lir);
|
||||
bool visitAsmJSInterruptCheck(LAsmJSInterruptCheck *lir);
|
||||
bool visitRecompileCheck(LRecompileCheck *ins);
|
||||
void visitInterruptCheck(LInterruptCheck *lir);
|
||||
void visitAsmJSInterruptCheck(LAsmJSInterruptCheck *lir);
|
||||
void visitRecompileCheck(LRecompileCheck *ins);
|
||||
|
||||
IonScriptCounts *extractScriptCounts() {
|
||||
IonScriptCounts *counts = scriptCounts_;
|
||||
|
@ -384,32 +384,32 @@ class CodeGenerator : public CodeGeneratorSpecific
|
|||
}
|
||||
|
||||
private:
|
||||
bool addGetPropertyCache(LInstruction *ins, RegisterSet liveRegs, Register objReg,
|
||||
void addGetPropertyCache(LInstruction *ins, RegisterSet liveRegs, Register objReg,
|
||||
PropertyName *name, TypedOrValueRegister output,
|
||||
bool monitoredResult, jsbytecode *profilerLeavePc);
|
||||
bool addGetElementCache(LInstruction *ins, Register obj, ConstantOrRegister index,
|
||||
void addGetElementCache(LInstruction *ins, Register obj, ConstantOrRegister index,
|
||||
TypedOrValueRegister output, bool monitoredResult,
|
||||
bool allowDoubleResult, jsbytecode *profilerLeavePc);
|
||||
bool addSetPropertyCache(LInstruction *ins, RegisterSet liveRegs, Register objReg,
|
||||
void addSetPropertyCache(LInstruction *ins, RegisterSet liveRegs, Register objReg,
|
||||
PropertyName *name, ConstantOrRegister value, bool strict,
|
||||
bool needsTypeBarrier, jsbytecode *profilerLeavePc);
|
||||
bool addSetElementCache(LInstruction *ins, Register obj, Register unboxIndex, Register temp,
|
||||
void addSetElementCache(LInstruction *ins, Register obj, Register unboxIndex, Register temp,
|
||||
FloatRegister tempDouble, FloatRegister tempFloat32,
|
||||
ValueOperand index, ConstantOrRegister value,
|
||||
bool strict, bool guardHoles, jsbytecode *profilerLeavePc);
|
||||
|
||||
bool generateBranchV(const ValueOperand &value, Label *ifTrue, Label *ifFalse, FloatRegister fr);
|
||||
|
||||
bool emitAllocateGCThingPar(LInstruction *lir, Register objReg, Register cxReg,
|
||||
void emitAllocateGCThingPar(LInstruction *lir, Register objReg, Register cxReg,
|
||||
Register tempReg1, Register tempReg2,
|
||||
NativeObject *templateObj);
|
||||
|
||||
bool emitCallToUncompiledScriptPar(LInstruction *lir, Register calleeReg);
|
||||
void emitCallToUncompiledScriptPar(LInstruction *lir, Register calleeReg);
|
||||
|
||||
void emitLambdaInit(Register resultReg, Register scopeChainReg,
|
||||
const LambdaFunctionInfo &info);
|
||||
|
||||
bool emitFilterArgumentsOrEval(LInstruction *lir, Register string, Register temp1,
|
||||
void emitFilterArgumentsOrEval(LInstruction *lir, Register string, Register temp1,
|
||||
Register temp2);
|
||||
|
||||
IonScriptCounts *maybeCreateScriptCounts();
|
||||
|
@ -475,19 +475,19 @@ class CodeGenerator : public CodeGeneratorSpecific
|
|||
int32_t offsetAdjustment);
|
||||
|
||||
// Bailout if an element about to be written to is a hole.
|
||||
bool emitStoreHoleCheck(Register elements, const LAllocation *index, int32_t offsetAdjustment,
|
||||
void emitStoreHoleCheck(Register elements, const LAllocation *index, int32_t offsetAdjustment,
|
||||
LSnapshot *snapshot);
|
||||
|
||||
bool emitAssertRangeI(const Range *r, Register input);
|
||||
bool emitAssertRangeD(const Range *r, FloatRegister input, FloatRegister temp);
|
||||
void emitAssertRangeI(const Range *r, Register input);
|
||||
void emitAssertRangeD(const Range *r, FloatRegister input, FloatRegister temp);
|
||||
|
||||
Vector<CodeOffsetLabel, 0, JitAllocPolicy> ionScriptLabels_;
|
||||
#ifdef DEBUG
|
||||
bool branchIfInvalidated(Register temp, Label *invalidated);
|
||||
void branchIfInvalidated(Register temp, Label *invalidated);
|
||||
|
||||
bool emitDebugResultChecks(LInstruction *ins);
|
||||
bool emitObjectOrStringResultChecks(LInstruction *lir, MDefinition *mir);
|
||||
bool emitValueResultChecks(LInstruction *lir, MDefinition *mir);
|
||||
void emitDebugResultChecks(LInstruction *ins);
|
||||
void emitObjectOrStringResultChecks(LInstruction *lir, MDefinition *mir);
|
||||
void emitValueResultChecks(LInstruction *lir, MDefinition *mir);
|
||||
#endif
|
||||
|
||||
// Script counts created during code generation.
|
||||
|
|
|
@ -113,6 +113,10 @@ class CompactBufferWriter
|
|||
: enoughMemory_(true)
|
||||
{ }
|
||||
|
||||
void setOOM() {
|
||||
enoughMemory_ = false;
|
||||
}
|
||||
|
||||
// Note: writeByte() takes uint32 to catch implicit casts with a runtime
|
||||
// assert.
|
||||
void writeByte(uint32_t byte) {
|
||||
|
|
|
@ -46,7 +46,7 @@ class IonCacheVisitor
|
|||
{
|
||||
public:
|
||||
#define VISIT_INS(op) \
|
||||
virtual bool visit##op##IC(CodeGenerator *codegen) { \
|
||||
virtual void visit##op##IC(CodeGenerator *codegen) { \
|
||||
MOZ_CRASH("NYI: " #op "IC"); \
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ class IonCache
|
|||
|
||||
virtual Kind kind() const = 0;
|
||||
|
||||
virtual bool accept(CodeGenerator *codegen, IonCacheVisitor *visitor) = 0;
|
||||
virtual void accept(CodeGenerator *codegen, IonCacheVisitor *visitor) = 0;
|
||||
|
||||
public:
|
||||
|
||||
|
@ -516,8 +516,8 @@ class DispatchIonCache : public IonCache
|
|||
return IonCache::Cache_##ickind; \
|
||||
} \
|
||||
\
|
||||
bool accept(CodeGenerator *codegen, IonCacheVisitor *visitor) { \
|
||||
return visitor->visit##ickind##IC(codegen); \
|
||||
void accept(CodeGenerator *codegen, IonCacheVisitor *visitor) { \
|
||||
visitor->visit##ickind##IC(codegen); \
|
||||
} \
|
||||
\
|
||||
static const VMFunction UpdateInfo;
|
||||
|
|
|
@ -719,15 +719,15 @@ class LNode
|
|||
LIR_OPCODE_LIST(LIROP)
|
||||
# undef LIROP
|
||||
|
||||
virtual bool accept(LElementVisitor *visitor) = 0;
|
||||
virtual void accept(LElementVisitor *visitor) = 0;
|
||||
|
||||
#define LIR_HEADER(opcode) \
|
||||
Opcode op() const { \
|
||||
return LInstruction::LOp_##opcode; \
|
||||
} \
|
||||
bool accept(LElementVisitor *visitor) { \
|
||||
void accept(LElementVisitor *visitor) { \
|
||||
visitor->setElement(this); \
|
||||
return visitor->visit##opcode(this); \
|
||||
visitor->visit##opcode(this); \
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -823,7 +823,7 @@ class LElementVisitor
|
|||
{}
|
||||
|
||||
public:
|
||||
#define VISIT_INS(op) virtual bool visit##op(L##op *) { MOZ_CRASH("NYI: " #op); }
|
||||
#define VISIT_INS(op) virtual void visit##op(L##op *) { MOZ_CRASH("NYI: " #op); }
|
||||
LIR_OPCODE_LIST(VISIT_INS)
|
||||
#undef VISIT_INS
|
||||
};
|
||||
|
|
|
@ -697,13 +697,12 @@ RecoverWriter::startRecover(uint32_t instructionCount, bool resumeAfter)
|
|||
return recoverOffset;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
RecoverWriter::writeInstruction(const MNode *rp)
|
||||
{
|
||||
if (!rp->writeRecoverData(writer_))
|
||||
return false;
|
||||
writer_.setOOM();
|
||||
instructionsWritten_++;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -398,7 +398,7 @@ class RecoverWriter
|
|||
public:
|
||||
SnapshotOffset startRecover(uint32_t instructionCount, bool resumeAfter);
|
||||
|
||||
bool writeInstruction(const MNode *rp);
|
||||
void writeInstruction(const MNode *rp);
|
||||
|
||||
void endRecover();
|
||||
|
||||
|
|
|
@ -1295,10 +1295,10 @@ Assembler::oom() const
|
|||
preBarriers_.oom();
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
Assembler::addCodeLabel(CodeLabel label)
|
||||
{
|
||||
return codeLabels_.append(label);
|
||||
propagateOOM(codeLabels_.append(label));
|
||||
}
|
||||
|
||||
// Size of the instruction stream, in bytes. Including pools. This function
|
||||
|
|
|
@ -1275,7 +1275,7 @@ class Assembler : public AssemblerShared
|
|||
void copyDataRelocationTable(uint8_t *dest);
|
||||
void copyPreBarrierTable(uint8_t *dest);
|
||||
|
||||
bool addCodeLabel(CodeLabel label);
|
||||
void addCodeLabel(CodeLabel label);
|
||||
size_t numCodeLabels() const {
|
||||
return codeLabels_.length();
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -45,32 +45,32 @@ class CodeGeneratorARM : public CodeGeneratorShared
|
|||
|
||||
MoveOperand toMoveOperand(const LAllocation *a) const;
|
||||
|
||||
bool bailoutIf(Assembler::Condition condition, LSnapshot *snapshot);
|
||||
bool bailoutFrom(Label *label, LSnapshot *snapshot);
|
||||
bool bailout(LSnapshot *snapshot);
|
||||
void bailoutIf(Assembler::Condition condition, LSnapshot *snapshot);
|
||||
void bailoutFrom(Label *label, LSnapshot *snapshot);
|
||||
void bailout(LSnapshot *snapshot);
|
||||
|
||||
template <typename T1, typename T2>
|
||||
bool bailoutCmpPtr(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
void bailoutCmpPtr(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
masm.cmpPtr(lhs, rhs);
|
||||
return bailoutIf(c, snapshot);
|
||||
bailoutIf(c, snapshot);
|
||||
}
|
||||
bool bailoutTestPtr(Assembler::Condition c, Register lhs, Register rhs, LSnapshot *snapshot) {
|
||||
void bailoutTestPtr(Assembler::Condition c, Register lhs, Register rhs, LSnapshot *snapshot) {
|
||||
masm.testPtr(lhs, rhs);
|
||||
return bailoutIf(c, snapshot);
|
||||
bailoutIf(c, snapshot);
|
||||
}
|
||||
template <typename T1, typename T2>
|
||||
bool bailoutCmp32(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
void bailoutCmp32(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
masm.cmp32(lhs, rhs);
|
||||
return bailoutIf(c, snapshot);
|
||||
bailoutIf(c, snapshot);
|
||||
}
|
||||
template <typename T1, typename T2>
|
||||
bool bailoutTest32(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
void bailoutTest32(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
masm.test32(lhs, rhs);
|
||||
return bailoutIf(c, snapshot);
|
||||
bailoutIf(c, snapshot);
|
||||
}
|
||||
bool bailoutIfFalseBool(Register reg, LSnapshot *snapshot) {
|
||||
void bailoutIfFalseBool(Register reg, LSnapshot *snapshot) {
|
||||
masm.test32(reg, Imm32(0xFF));
|
||||
return bailoutIf(Assembler::Zero, snapshot);
|
||||
bailoutIf(Assembler::Zero, snapshot);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -103,70 +103,70 @@ class CodeGeneratorARM : public CodeGeneratorShared
|
|||
emitBranch(cond, ifTrue, ifFalse);
|
||||
}
|
||||
|
||||
bool emitTableSwitchDispatch(MTableSwitch *mir, Register index, Register base);
|
||||
void emitTableSwitchDispatch(MTableSwitch *mir, Register index, Register base);
|
||||
|
||||
public:
|
||||
// Instruction visitors.
|
||||
virtual bool visitMinMaxD(LMinMaxD *ins);
|
||||
virtual bool visitMinMaxF(LMinMaxF *ins);
|
||||
virtual bool visitAbsD(LAbsD *ins);
|
||||
virtual bool visitAbsF(LAbsF *ins);
|
||||
virtual bool visitSqrtD(LSqrtD *ins);
|
||||
virtual bool visitSqrtF(LSqrtF *ins);
|
||||
virtual bool visitAddI(LAddI *ins);
|
||||
virtual bool visitSubI(LSubI *ins);
|
||||
virtual bool visitBitNotI(LBitNotI *ins);
|
||||
virtual bool visitBitOpI(LBitOpI *ins);
|
||||
virtual void visitMinMaxD(LMinMaxD *ins);
|
||||
virtual void visitMinMaxF(LMinMaxF *ins);
|
||||
virtual void visitAbsD(LAbsD *ins);
|
||||
virtual void visitAbsF(LAbsF *ins);
|
||||
virtual void visitSqrtD(LSqrtD *ins);
|
||||
virtual void visitSqrtF(LSqrtF *ins);
|
||||
virtual void visitAddI(LAddI *ins);
|
||||
virtual void visitSubI(LSubI *ins);
|
||||
virtual void visitBitNotI(LBitNotI *ins);
|
||||
virtual void visitBitOpI(LBitOpI *ins);
|
||||
|
||||
virtual bool visitMulI(LMulI *ins);
|
||||
virtual void visitMulI(LMulI *ins);
|
||||
|
||||
virtual bool visitDivI(LDivI *ins);
|
||||
virtual bool visitSoftDivI(LSoftDivI *ins);
|
||||
virtual bool visitDivPowTwoI(LDivPowTwoI *ins);
|
||||
virtual bool visitModI(LModI *ins);
|
||||
virtual bool visitSoftModI(LSoftModI *ins);
|
||||
virtual bool visitModPowTwoI(LModPowTwoI *ins);
|
||||
virtual bool visitModMaskI(LModMaskI *ins);
|
||||
virtual bool visitPowHalfD(LPowHalfD *ins);
|
||||
virtual bool visitShiftI(LShiftI *ins);
|
||||
virtual bool visitUrshD(LUrshD *ins);
|
||||
virtual void visitDivI(LDivI *ins);
|
||||
virtual void visitSoftDivI(LSoftDivI *ins);
|
||||
virtual void visitDivPowTwoI(LDivPowTwoI *ins);
|
||||
virtual void visitModI(LModI *ins);
|
||||
virtual void visitSoftModI(LSoftModI *ins);
|
||||
virtual void visitModPowTwoI(LModPowTwoI *ins);
|
||||
virtual void visitModMaskI(LModMaskI *ins);
|
||||
virtual void visitPowHalfD(LPowHalfD *ins);
|
||||
virtual void visitShiftI(LShiftI *ins);
|
||||
virtual void visitUrshD(LUrshD *ins);
|
||||
|
||||
virtual bool visitClzI(LClzI *ins);
|
||||
virtual void visitClzI(LClzI *ins);
|
||||
|
||||
virtual bool visitTestIAndBranch(LTestIAndBranch *test);
|
||||
virtual bool visitCompare(LCompare *comp);
|
||||
virtual bool visitCompareAndBranch(LCompareAndBranch *comp);
|
||||
virtual bool visitTestDAndBranch(LTestDAndBranch *test);
|
||||
virtual bool visitTestFAndBranch(LTestFAndBranch *test);
|
||||
virtual bool visitCompareD(LCompareD *comp);
|
||||
virtual bool visitCompareF(LCompareF *comp);
|
||||
virtual bool visitCompareDAndBranch(LCompareDAndBranch *comp);
|
||||
virtual bool visitCompareFAndBranch(LCompareFAndBranch *comp);
|
||||
virtual bool visitCompareB(LCompareB *lir);
|
||||
virtual bool visitCompareBAndBranch(LCompareBAndBranch *lir);
|
||||
virtual bool visitCompareV(LCompareV *lir);
|
||||
virtual bool visitCompareVAndBranch(LCompareVAndBranch *lir);
|
||||
virtual bool visitBitAndAndBranch(LBitAndAndBranch *baab);
|
||||
virtual bool visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble *lir);
|
||||
virtual bool visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir);
|
||||
virtual bool visitNotI(LNotI *ins);
|
||||
virtual bool visitNotD(LNotD *ins);
|
||||
virtual bool visitNotF(LNotF *ins);
|
||||
virtual void visitTestIAndBranch(LTestIAndBranch *test);
|
||||
virtual void visitCompare(LCompare *comp);
|
||||
virtual void visitCompareAndBranch(LCompareAndBranch *comp);
|
||||
virtual void visitTestDAndBranch(LTestDAndBranch *test);
|
||||
virtual void visitTestFAndBranch(LTestFAndBranch *test);
|
||||
virtual void visitCompareD(LCompareD *comp);
|
||||
virtual void visitCompareF(LCompareF *comp);
|
||||
virtual void visitCompareDAndBranch(LCompareDAndBranch *comp);
|
||||
virtual void visitCompareFAndBranch(LCompareFAndBranch *comp);
|
||||
virtual void visitCompareB(LCompareB *lir);
|
||||
virtual void visitCompareBAndBranch(LCompareBAndBranch *lir);
|
||||
virtual void visitCompareV(LCompareV *lir);
|
||||
virtual void visitCompareVAndBranch(LCompareVAndBranch *lir);
|
||||
virtual void visitBitAndAndBranch(LBitAndAndBranch *baab);
|
||||
virtual void visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble *lir);
|
||||
virtual void visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir);
|
||||
virtual void visitNotI(LNotI *ins);
|
||||
virtual void visitNotD(LNotD *ins);
|
||||
virtual void visitNotF(LNotF *ins);
|
||||
|
||||
virtual bool visitMathD(LMathD *math);
|
||||
virtual bool visitMathF(LMathF *math);
|
||||
virtual bool visitFloor(LFloor *lir);
|
||||
virtual bool visitFloorF(LFloorF *lir);
|
||||
virtual bool visitCeil(LCeil *lir);
|
||||
virtual bool visitCeilF(LCeilF *lir);
|
||||
virtual bool visitRound(LRound *lir);
|
||||
virtual bool visitRoundF(LRoundF *lir);
|
||||
virtual bool visitTruncateDToInt32(LTruncateDToInt32 *ins);
|
||||
virtual bool visitTruncateFToInt32(LTruncateFToInt32 *ins);
|
||||
virtual void visitMathD(LMathD *math);
|
||||
virtual void visitMathF(LMathF *math);
|
||||
virtual void visitFloor(LFloor *lir);
|
||||
virtual void visitFloorF(LFloorF *lir);
|
||||
virtual void visitCeil(LCeil *lir);
|
||||
virtual void visitCeilF(LCeilF *lir);
|
||||
virtual void visitRound(LRound *lir);
|
||||
virtual void visitRoundF(LRoundF *lir);
|
||||
virtual void visitTruncateDToInt32(LTruncateDToInt32 *ins);
|
||||
virtual void visitTruncateFToInt32(LTruncateFToInt32 *ins);
|
||||
|
||||
// Out of line visitors.
|
||||
bool visitOutOfLineBailout(OutOfLineBailout *ool);
|
||||
bool visitOutOfLineTableSwitch(OutOfLineTableSwitch *ool);
|
||||
void visitOutOfLineBailout(OutOfLineBailout *ool);
|
||||
void visitOutOfLineTableSwitch(OutOfLineTableSwitch *ool);
|
||||
|
||||
protected:
|
||||
ValueOperand ToValue(LInstruction *ins, size_t pos);
|
||||
|
@ -176,9 +176,9 @@ class CodeGeneratorARM : public CodeGeneratorShared
|
|||
// Functions for LTestVAndBranch.
|
||||
Register splitTagForTest(const ValueOperand &value);
|
||||
|
||||
bool divICommon(MDiv *mir, Register lhs, Register rhs, Register output, LSnapshot *snapshot,
|
||||
void divICommon(MDiv *mir, Register lhs, Register rhs, Register output, LSnapshot *snapshot,
|
||||
Label &done);
|
||||
bool modICommon(MMod *mir, Register lhs, Register rhs, Register output, LSnapshot *snapshot,
|
||||
void modICommon(MMod *mir, Register lhs, Register rhs, Register output, LSnapshot *snapshot,
|
||||
Label &done);
|
||||
|
||||
void memoryBarrier(MemoryBarrierBits barrier);
|
||||
|
@ -187,60 +187,60 @@ class CodeGeneratorARM : public CodeGeneratorShared
|
|||
CodeGeneratorARM(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm);
|
||||
|
||||
public:
|
||||
bool visitBox(LBox *box);
|
||||
bool visitBoxFloatingPoint(LBoxFloatingPoint *box);
|
||||
bool visitUnbox(LUnbox *unbox);
|
||||
bool visitValue(LValue *value);
|
||||
bool visitDouble(LDouble *ins);
|
||||
bool visitFloat32(LFloat32 *ins);
|
||||
void visitBox(LBox *box);
|
||||
void visitBoxFloatingPoint(LBoxFloatingPoint *box);
|
||||
void visitUnbox(LUnbox *unbox);
|
||||
void visitValue(LValue *value);
|
||||
void visitDouble(LDouble *ins);
|
||||
void visitFloat32(LFloat32 *ins);
|
||||
|
||||
bool visitGuardShape(LGuardShape *guard);
|
||||
bool visitGuardObjectType(LGuardObjectType *guard);
|
||||
bool visitGuardClass(LGuardClass *guard);
|
||||
void visitGuardShape(LGuardShape *guard);
|
||||
void visitGuardObjectType(LGuardObjectType *guard);
|
||||
void visitGuardClass(LGuardClass *guard);
|
||||
|
||||
bool visitNegI(LNegI *lir);
|
||||
bool visitNegD(LNegD *lir);
|
||||
bool visitNegF(LNegF *lir);
|
||||
bool visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins);
|
||||
bool visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins);
|
||||
bool visitAsmJSCall(LAsmJSCall *ins);
|
||||
bool visitAsmJSLoadHeap(LAsmJSLoadHeap *ins);
|
||||
bool visitAsmJSStoreHeap(LAsmJSStoreHeap *ins);
|
||||
bool visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap *ins);
|
||||
bool visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap *ins);
|
||||
bool visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins);
|
||||
bool visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins);
|
||||
bool visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins);
|
||||
bool visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc *ins);
|
||||
bool visitAsmJSPassStackArg(LAsmJSPassStackArg *ins);
|
||||
void visitNegI(LNegI *lir);
|
||||
void visitNegD(LNegD *lir);
|
||||
void visitNegF(LNegF *lir);
|
||||
void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins);
|
||||
void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins);
|
||||
void visitAsmJSCall(LAsmJSCall *ins);
|
||||
void visitAsmJSLoadHeap(LAsmJSLoadHeap *ins);
|
||||
void visitAsmJSStoreHeap(LAsmJSStoreHeap *ins);
|
||||
void visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap *ins);
|
||||
void visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap *ins);
|
||||
void visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins);
|
||||
void visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins);
|
||||
void visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins);
|
||||
void visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc *ins);
|
||||
void visitAsmJSPassStackArg(LAsmJSPassStackArg *ins);
|
||||
|
||||
bool visitForkJoinGetSlice(LForkJoinGetSlice *ins);
|
||||
void visitForkJoinGetSlice(LForkJoinGetSlice *ins);
|
||||
|
||||
bool visitMemoryBarrier(LMemoryBarrier *ins);
|
||||
void visitMemoryBarrier(LMemoryBarrier *ins);
|
||||
|
||||
bool generateInvalidateEpilogue();
|
||||
void generateInvalidateEpilogue();
|
||||
|
||||
protected:
|
||||
bool visitEffectiveAddress(LEffectiveAddress *ins);
|
||||
bool visitUDiv(LUDiv *ins);
|
||||
bool visitUMod(LUMod *ins);
|
||||
bool visitSoftUDivOrMod(LSoftUDivOrMod *ins);
|
||||
void visitEffectiveAddress(LEffectiveAddress *ins);
|
||||
void visitUDiv(LUDiv *ins);
|
||||
void visitUMod(LUMod *ins);
|
||||
void visitSoftUDivOrMod(LSoftUDivOrMod *ins);
|
||||
|
||||
public:
|
||||
// Unimplemented SIMD instructions
|
||||
bool visitSimdSplatX4(LSimdSplatX4 *lir) { MOZ_CRASH("NYI"); }
|
||||
bool visitInt32x4(LInt32x4 *ins) { MOZ_CRASH("NYI"); }
|
||||
bool visitFloat32x4(LFloat32x4 *ins) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdExtractElementI(LSimdExtractElementI *ins) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdExtractElementF(LSimdExtractElementF *ins) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdSignMaskX4(LSimdSignMaskX4 *ins) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdSwizzleI(LSimdSwizzleI *lir) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdSwizzleF(LSimdSwizzleF *lir) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdBinaryCompIx4(LSimdBinaryCompIx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdBinaryCompFx4(LSimdBinaryCompFx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdBinaryArithIx4(LSimdBinaryArithIx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdBinaryArithFx4(LSimdBinaryArithFx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdBinaryBitwiseX4(LSimdBinaryBitwiseX4 *lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdSplatX4(LSimdSplatX4 *lir) { MOZ_CRASH("NYI"); }
|
||||
void visitInt32x4(LInt32x4 *ins) { MOZ_CRASH("NYI"); }
|
||||
void visitFloat32x4(LFloat32x4 *ins) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdExtractElementI(LSimdExtractElementI *ins) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdExtractElementF(LSimdExtractElementF *ins) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdSignMaskX4(LSimdSignMaskX4 *ins) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdSwizzleI(LSimdSwizzleI *lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdSwizzleF(LSimdSwizzleF *lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryCompIx4(LSimdBinaryCompIx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryCompFx4(LSimdBinaryCompFx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryArithIx4(LSimdBinaryArithIx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryArithFx4(LSimdBinaryArithFx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryBitwiseX4(LSimdBinaryBitwiseX4 *lir) { MOZ_CRASH("NYI"); }
|
||||
};
|
||||
|
||||
typedef CodeGeneratorARM CodeGeneratorSpecific;
|
||||
|
@ -258,7 +258,7 @@ class OutOfLineBailout : public OutOfLineCodeBase<CodeGeneratorARM>
|
|||
frameSize_(frameSize)
|
||||
{ }
|
||||
|
||||
bool accept(CodeGeneratorARM *codegen);
|
||||
void accept(CodeGeneratorARM *codegen);
|
||||
|
||||
LSnapshot *snapshot() const {
|
||||
return snapshot_;
|
||||
|
|
|
@ -1766,7 +1766,7 @@ MacroAssemblerARM::ma_vstr(VFPRegister src, Register base, Register index, int32
|
|||
return ma_vstr(src, Operand(ScratchRegister, 0), cc);
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
MacroAssemblerARMCompat::buildFakeExitFrame(Register scratch, uint32_t *offset)
|
||||
{
|
||||
DebugOnly<uint32_t> initialDepth = framePushed();
|
||||
|
@ -1789,7 +1789,6 @@ MacroAssemblerARMCompat::buildFakeExitFrame(Register scratch, uint32_t *offset)
|
|||
MOZ_ASSERT(pseudoReturnOffset - offsetBeforePush == 8);
|
||||
|
||||
*offset = pseudoReturnOffset;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -1284,7 +1284,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
|||
|
||||
// Builds an exit frame on the stack, with a return address to an internal
|
||||
// non-function. Returns offset to be passed to markSafepointAt().
|
||||
bool buildFakeExitFrame(Register scratch, uint32_t *offset);
|
||||
void buildFakeExitFrame(Register scratch, uint32_t *offset);
|
||||
|
||||
void callWithExitFrame(Label *target);
|
||||
void callWithExitFrame(JitCode *target);
|
||||
|
|
|
@ -479,10 +479,10 @@ Assembler::oom() const
|
|||
preBarriers_.oom();
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
Assembler::addCodeLabel(CodeLabel label)
|
||||
{
|
||||
return codeLabels_.append(label);
|
||||
propagateOOM(codeLabels_.append(label));
|
||||
}
|
||||
|
||||
// Size of the instruction stream, in bytes.
|
||||
|
|
|
@ -790,7 +790,7 @@ class Assembler : public AssemblerShared
|
|||
void copyDataRelocationTable(uint8_t *dest);
|
||||
void copyPreBarrierTable(uint8_t *dest);
|
||||
|
||||
bool addCodeLabel(CodeLabel label);
|
||||
void addCodeLabel(CodeLabel label);
|
||||
size_t numCodeLabels() const {
|
||||
return codeLabels_.length();
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -61,45 +61,44 @@ class CodeGeneratorMIPS : public CodeGeneratorShared
|
|||
MoveOperand toMoveOperand(const LAllocation *a) const;
|
||||
|
||||
template <typename T1, typename T2>
|
||||
bool bailoutCmp32(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
bool goodBailout;
|
||||
void bailoutCmp32(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
Label skip;
|
||||
masm.ma_b(lhs, rhs, &skip, Assembler::InvertCondition(c), ShortJump);
|
||||
goodBailout = bailout(snapshot);
|
||||
bailout(snapshot);
|
||||
masm.bind(&skip);
|
||||
return goodBailout;
|
||||
}
|
||||
template<typename T>
|
||||
bool bailoutCmp32(Assembler::Condition c, Operand lhs, T rhs, LSnapshot *snapshot) {
|
||||
void bailoutCmp32(Assembler::Condition c, Operand lhs, T rhs, LSnapshot *snapshot) {
|
||||
if (lhs.getTag() == Operand::REG)
|
||||
return bailoutCmp32(c, lhs.toReg(), rhs, snapshot);
|
||||
if (lhs.getTag() == Operand::MEM)
|
||||
return bailoutCmp32(c, lhs.toAddress(), rhs, snapshot);
|
||||
bailoutCmp32(c, lhs.toReg(), rhs, snapshot);
|
||||
else if (lhs.getTag() == Operand::MEM)
|
||||
bailoutCmp32(c, lhs.toAddress(), rhs, snapshot);
|
||||
else
|
||||
MOZ_CRASH("Invalid operand tag.");
|
||||
}
|
||||
template<typename T>
|
||||
bool bailoutTest32(Assembler::Condition c, Register lhs, T rhs, LSnapshot *snapshot) {
|
||||
void bailoutTest32(Assembler::Condition c, Register lhs, T rhs, LSnapshot *snapshot) {
|
||||
Label bail;
|
||||
masm.branchTest32(c, lhs, rhs, &bail);
|
||||
return bailoutFrom(&bail, snapshot);
|
||||
bailoutFrom(&bail, snapshot);
|
||||
}
|
||||
template <typename T1, typename T2>
|
||||
bool bailoutCmpPtr(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
return bailoutCmp32(c, lhs, rhs, snapshot);
|
||||
void bailoutCmpPtr(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
bailoutCmp32(c, lhs, rhs, snapshot);
|
||||
}
|
||||
bool bailoutTestPtr(Assembler::Condition c, Register lhs, Register rhs, LSnapshot *snapshot) {
|
||||
void bailoutTestPtr(Assembler::Condition c, Register lhs, Register rhs, LSnapshot *snapshot) {
|
||||
Label bail;
|
||||
masm.branchTestPtr(c, lhs, rhs, &bail);
|
||||
return bailoutFrom(&bail, snapshot);
|
||||
bailoutFrom(&bail, snapshot);
|
||||
}
|
||||
bool bailoutIfFalseBool(Register reg, LSnapshot *snapshot) {
|
||||
void bailoutIfFalseBool(Register reg, LSnapshot *snapshot) {
|
||||
Label bail;
|
||||
masm.branchTest32(Assembler::Zero, reg, Imm32(0xFF), &bail);
|
||||
return bailoutFrom(&bail, snapshot);
|
||||
bailoutFrom(&bail, snapshot);
|
||||
}
|
||||
|
||||
bool bailoutFrom(Label *label, LSnapshot *snapshot);
|
||||
bool bailout(LSnapshot *snapshot);
|
||||
void bailoutFrom(Label *label, LSnapshot *snapshot);
|
||||
void bailout(LSnapshot *snapshot);
|
||||
|
||||
protected:
|
||||
bool generatePrologue();
|
||||
|
@ -162,68 +161,68 @@ class CodeGeneratorMIPS : public CodeGeneratorShared
|
|||
emitBranch(value.typeReg(), (Imm32)ImmType(JSVAL_TYPE_OBJECT), cond, ifTrue, ifFalse);
|
||||
}
|
||||
|
||||
bool emitTableSwitchDispatch(MTableSwitch *mir, Register index, Register base);
|
||||
void emitTableSwitchDispatch(MTableSwitch *mir, Register index, Register base);
|
||||
|
||||
public:
|
||||
// Instruction visitors.
|
||||
virtual bool visitMinMaxD(LMinMaxD *ins);
|
||||
virtual bool visitMinMaxF(LMinMaxF *ins);
|
||||
virtual bool visitAbsD(LAbsD *ins);
|
||||
virtual bool visitAbsF(LAbsF *ins);
|
||||
virtual bool visitSqrtD(LSqrtD *ins);
|
||||
virtual bool visitSqrtF(LSqrtF *ins);
|
||||
virtual bool visitAddI(LAddI *ins);
|
||||
virtual bool visitSubI(LSubI *ins);
|
||||
virtual bool visitBitNotI(LBitNotI *ins);
|
||||
virtual bool visitBitOpI(LBitOpI *ins);
|
||||
virtual void visitMinMaxD(LMinMaxD *ins);
|
||||
virtual void visitMinMaxF(LMinMaxF *ins);
|
||||
virtual void visitAbsD(LAbsD *ins);
|
||||
virtual void visitAbsF(LAbsF *ins);
|
||||
virtual void visitSqrtD(LSqrtD *ins);
|
||||
virtual void visitSqrtF(LSqrtF *ins);
|
||||
virtual void visitAddI(LAddI *ins);
|
||||
virtual void visitSubI(LSubI *ins);
|
||||
virtual void visitBitNotI(LBitNotI *ins);
|
||||
virtual void visitBitOpI(LBitOpI *ins);
|
||||
|
||||
virtual bool visitMulI(LMulI *ins);
|
||||
virtual void visitMulI(LMulI *ins);
|
||||
|
||||
virtual bool visitDivI(LDivI *ins);
|
||||
virtual bool visitDivPowTwoI(LDivPowTwoI *ins);
|
||||
virtual bool visitModI(LModI *ins);
|
||||
virtual bool visitModPowTwoI(LModPowTwoI *ins);
|
||||
virtual bool visitModMaskI(LModMaskI *ins);
|
||||
virtual bool visitPowHalfD(LPowHalfD *ins);
|
||||
virtual bool visitShiftI(LShiftI *ins);
|
||||
virtual bool visitUrshD(LUrshD *ins);
|
||||
virtual void visitDivI(LDivI *ins);
|
||||
virtual void visitDivPowTwoI(LDivPowTwoI *ins);
|
||||
virtual void visitModI(LModI *ins);
|
||||
virtual void visitModPowTwoI(LModPowTwoI *ins);
|
||||
virtual void visitModMaskI(LModMaskI *ins);
|
||||
virtual void visitPowHalfD(LPowHalfD *ins);
|
||||
virtual void visitShiftI(LShiftI *ins);
|
||||
virtual void visitUrshD(LUrshD *ins);
|
||||
|
||||
virtual bool visitClzI(LClzI *ins);
|
||||
virtual void visitClzI(LClzI *ins);
|
||||
|
||||
virtual bool visitTestIAndBranch(LTestIAndBranch *test);
|
||||
virtual bool visitCompare(LCompare *comp);
|
||||
virtual bool visitCompareAndBranch(LCompareAndBranch *comp);
|
||||
virtual bool visitTestDAndBranch(LTestDAndBranch *test);
|
||||
virtual bool visitTestFAndBranch(LTestFAndBranch *test);
|
||||
virtual bool visitCompareD(LCompareD *comp);
|
||||
virtual bool visitCompareF(LCompareF *comp);
|
||||
virtual bool visitCompareDAndBranch(LCompareDAndBranch *comp);
|
||||
virtual bool visitCompareFAndBranch(LCompareFAndBranch *comp);
|
||||
virtual bool visitCompareB(LCompareB *lir);
|
||||
virtual bool visitCompareBAndBranch(LCompareBAndBranch *lir);
|
||||
virtual bool visitCompareV(LCompareV *lir);
|
||||
virtual bool visitCompareVAndBranch(LCompareVAndBranch *lir);
|
||||
virtual bool visitBitAndAndBranch(LBitAndAndBranch *lir);
|
||||
virtual bool visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble *lir);
|
||||
virtual bool visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir);
|
||||
virtual bool visitNotI(LNotI *ins);
|
||||
virtual bool visitNotD(LNotD *ins);
|
||||
virtual bool visitNotF(LNotF *ins);
|
||||
virtual void visitTestIAndBranch(LTestIAndBranch *test);
|
||||
virtual void visitCompare(LCompare *comp);
|
||||
virtual void visitCompareAndBranch(LCompareAndBranch *comp);
|
||||
virtual void visitTestDAndBranch(LTestDAndBranch *test);
|
||||
virtual void visitTestFAndBranch(LTestFAndBranch *test);
|
||||
virtual void visitCompareD(LCompareD *comp);
|
||||
virtual void visitCompareF(LCompareF *comp);
|
||||
virtual void visitCompareDAndBranch(LCompareDAndBranch *comp);
|
||||
virtual void visitCompareFAndBranch(LCompareFAndBranch *comp);
|
||||
virtual void visitCompareB(LCompareB *lir);
|
||||
virtual void visitCompareBAndBranch(LCompareBAndBranch *lir);
|
||||
virtual void visitCompareV(LCompareV *lir);
|
||||
virtual void visitCompareVAndBranch(LCompareVAndBranch *lir);
|
||||
virtual void visitBitAndAndBranch(LBitAndAndBranch *lir);
|
||||
virtual void visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble *lir);
|
||||
virtual void visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir);
|
||||
virtual void visitNotI(LNotI *ins);
|
||||
virtual void visitNotD(LNotD *ins);
|
||||
virtual void visitNotF(LNotF *ins);
|
||||
|
||||
virtual bool visitMathD(LMathD *math);
|
||||
virtual bool visitMathF(LMathF *math);
|
||||
virtual bool visitFloor(LFloor *lir);
|
||||
virtual bool visitFloorF(LFloorF *lir);
|
||||
virtual bool visitCeil(LCeil *lir);
|
||||
virtual bool visitCeilF(LCeilF *lir);
|
||||
virtual bool visitRound(LRound *lir);
|
||||
virtual bool visitRoundF(LRoundF *lir);
|
||||
virtual bool visitTruncateDToInt32(LTruncateDToInt32 *ins);
|
||||
virtual bool visitTruncateFToInt32(LTruncateFToInt32 *ins);
|
||||
virtual void visitMathD(LMathD *math);
|
||||
virtual void visitMathF(LMathF *math);
|
||||
virtual void visitFloor(LFloor *lir);
|
||||
virtual void visitFloorF(LFloorF *lir);
|
||||
virtual void visitCeil(LCeil *lir);
|
||||
virtual void visitCeilF(LCeilF *lir);
|
||||
virtual void visitRound(LRound *lir);
|
||||
virtual void visitRoundF(LRoundF *lir);
|
||||
virtual void visitTruncateDToInt32(LTruncateDToInt32 *ins);
|
||||
virtual void visitTruncateFToInt32(LTruncateFToInt32 *ins);
|
||||
|
||||
// Out of line visitors.
|
||||
bool visitOutOfLineBailout(OutOfLineBailout *ool);
|
||||
bool visitOutOfLineTableSwitch(OutOfLineTableSwitch *ool);
|
||||
void visitOutOfLineBailout(OutOfLineBailout *ool);
|
||||
void visitOutOfLineTableSwitch(OutOfLineTableSwitch *ool);
|
||||
|
||||
protected:
|
||||
ValueOperand ToValue(LInstruction *ins, size_t pos);
|
||||
|
@ -237,56 +236,56 @@ class CodeGeneratorMIPS : public CodeGeneratorShared
|
|||
CodeGeneratorMIPS(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm);
|
||||
|
||||
public:
|
||||
bool visitBox(LBox *box);
|
||||
bool visitBoxFloatingPoint(LBoxFloatingPoint *box);
|
||||
bool visitUnbox(LUnbox *unbox);
|
||||
bool visitValue(LValue *value);
|
||||
bool visitDouble(LDouble *ins);
|
||||
bool visitFloat32(LFloat32 *ins);
|
||||
void visitBox(LBox *box);
|
||||
void visitBoxFloatingPoint(LBoxFloatingPoint *box);
|
||||
void visitUnbox(LUnbox *unbox);
|
||||
void visitValue(LValue *value);
|
||||
void visitDouble(LDouble *ins);
|
||||
void visitFloat32(LFloat32 *ins);
|
||||
|
||||
bool visitGuardShape(LGuardShape *guard);
|
||||
bool visitGuardObjectType(LGuardObjectType *guard);
|
||||
bool visitGuardClass(LGuardClass *guard);
|
||||
void visitGuardShape(LGuardShape *guard);
|
||||
void visitGuardObjectType(LGuardObjectType *guard);
|
||||
void visitGuardClass(LGuardClass *guard);
|
||||
|
||||
bool visitNegI(LNegI *lir);
|
||||
bool visitNegD(LNegD *lir);
|
||||
bool visitNegF(LNegF *lir);
|
||||
bool visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins);
|
||||
bool visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins);
|
||||
bool visitAsmJSCall(LAsmJSCall *ins);
|
||||
bool visitAsmJSLoadHeap(LAsmJSLoadHeap *ins);
|
||||
bool visitAsmJSStoreHeap(LAsmJSStoreHeap *ins);
|
||||
bool visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap *ins);
|
||||
bool visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap *ins);
|
||||
bool visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins);
|
||||
bool visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins);
|
||||
bool visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins);
|
||||
bool visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc *ins);
|
||||
void visitNegI(LNegI *lir);
|
||||
void visitNegD(LNegD *lir);
|
||||
void visitNegF(LNegF *lir);
|
||||
void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins);
|
||||
void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins);
|
||||
void visitAsmJSCall(LAsmJSCall *ins);
|
||||
void visitAsmJSLoadHeap(LAsmJSLoadHeap *ins);
|
||||
void visitAsmJSStoreHeap(LAsmJSStoreHeap *ins);
|
||||
void visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap *ins);
|
||||
void visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap *ins);
|
||||
void visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins);
|
||||
void visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins);
|
||||
void visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins);
|
||||
void visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc *ins);
|
||||
|
||||
bool visitAsmJSPassStackArg(LAsmJSPassStackArg *ins);
|
||||
void visitAsmJSPassStackArg(LAsmJSPassStackArg *ins);
|
||||
|
||||
bool visitForkJoinGetSlice(LForkJoinGetSlice *ins);
|
||||
void visitForkJoinGetSlice(LForkJoinGetSlice *ins);
|
||||
|
||||
bool generateInvalidateEpilogue();
|
||||
void generateInvalidateEpilogue();
|
||||
|
||||
protected:
|
||||
bool visitEffectiveAddress(LEffectiveAddress *ins);
|
||||
bool visitUDiv(LUDiv *ins);
|
||||
bool visitUMod(LUMod *ins);
|
||||
void visitEffectiveAddress(LEffectiveAddress *ins);
|
||||
void visitUDiv(LUDiv *ins);
|
||||
void visitUMod(LUMod *ins);
|
||||
|
||||
public:
|
||||
// Unimplemented SIMD instructions
|
||||
bool visitSimdSplatX4(LSimdSplatX4 *lir) { MOZ_CRASH("NYI"); }
|
||||
bool visitInt32x4(LInt32x4 *ins) { MOZ_CRASH("NYI"); }
|
||||
bool visitFloat32x4(LFloat32x4 *ins) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdExtractElementI(LSimdExtractElementI *ins) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdExtractElementF(LSimdExtractElementF *ins) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdSignMaskX4(LSimdSignMaskX4 *ins) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdBinaryCompIx4(LSimdBinaryCompIx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdBinaryCompFx4(LSimdBinaryCompFx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdBinaryArithIx4(LSimdBinaryArithIx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdBinaryArithFx4(LSimdBinaryArithFx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
bool visitSimdBinaryBitwiseX4(LSimdBinaryBitwiseX4 *lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdSplatX4(LSimdSplatX4 *lir) { MOZ_CRASH("NYI"); }
|
||||
void visitInt32x4(LInt32x4 *ins) { MOZ_CRASH("NYI"); }
|
||||
void visitFloat32x4(LFloat32x4 *ins) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdExtractElementI(LSimdExtractElementI *ins) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdExtractElementF(LSimdExtractElementF *ins) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdSignMaskX4(LSimdSignMaskX4 *ins) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryCompIx4(LSimdBinaryCompIx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryCompFx4(LSimdBinaryCompFx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryArithIx4(LSimdBinaryArithIx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryArithFx4(LSimdBinaryArithFx4 *lir) { MOZ_CRASH("NYI"); }
|
||||
void visitSimdBinaryBitwiseX4(LSimdBinaryBitwiseX4 *lir) { MOZ_CRASH("NYI"); }
|
||||
};
|
||||
|
||||
typedef CodeGeneratorMIPS CodeGeneratorSpecific;
|
||||
|
@ -303,7 +302,7 @@ class OutOfLineBailout : public OutOfLineCodeBase<CodeGeneratorMIPS>
|
|||
frameSize_(frameSize)
|
||||
{ }
|
||||
|
||||
bool accept(CodeGeneratorMIPS *codegen);
|
||||
void accept(CodeGeneratorMIPS *codegen);
|
||||
|
||||
LSnapshot *snapshot() const {
|
||||
return snapshot_;
|
||||
|
|
|
@ -1475,7 +1475,7 @@ MacroAssemblerMIPS::ma_bc1d(FloatRegister lhs, FloatRegister rhs, Label *label,
|
|||
branchWithCode(getBranchCode(testKind, fcc), label, jumpKind);
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
MacroAssemblerMIPSCompat::buildFakeExitFrame(Register scratch, uint32_t *offset)
|
||||
{
|
||||
mozilla::DebugOnly<uint32_t> initialDepth = framePushed();
|
||||
|
@ -1491,7 +1491,7 @@ MacroAssemblerMIPSCompat::buildFakeExitFrame(Register scratch, uint32_t *offset)
|
|||
*offset = currentOffset();
|
||||
|
||||
MOZ_ASSERT(framePushed() == initialDepth + ExitFrameLayout::Size());
|
||||
return addCodeLabel(cl);
|
||||
addCodeLabel(cl);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -1131,7 +1131,7 @@ public:
|
|||
|
||||
// Builds an exit frame on the stack, with a return address to an internal
|
||||
// non-function. Returns offset to be passed to markSafepointAt().
|
||||
bool buildFakeExitFrame(Register scratch, uint32_t *offset);
|
||||
void buildFakeExitFrame(Register scratch, uint32_t *offset);
|
||||
|
||||
void callWithExitFrame(Label *target);
|
||||
void callWithExitFrame(JitCode *target);
|
||||
|
|
|
@ -287,8 +287,7 @@ JitRuntime::generateEnterJIT(JSContext *cx, EnterJitType type)
|
|||
if (type == EnterJitBaseline) {
|
||||
// Baseline OSR will return here.
|
||||
masm.bind(returnLabel.src());
|
||||
if (!masm.addCodeLabel(returnLabel))
|
||||
return nullptr;
|
||||
masm.addCodeLabel(returnLabel);
|
||||
}
|
||||
|
||||
// Pop arguments off the stack.
|
||||
|
|
|
@ -26,16 +26,16 @@ class CodeGeneratorNone : public CodeGeneratorShared
|
|||
template <typename T> inline Register ToOperand(T) { MOZ_CRASH(); }
|
||||
MoveOperand toMoveOperand(const LAllocation *) const { MOZ_CRASH(); }
|
||||
template <typename T1, typename T2>
|
||||
bool bailoutCmp32(Assembler::Condition, T1, T2, LSnapshot *) { MOZ_CRASH(); }
|
||||
void bailoutCmp32(Assembler::Condition, T1, T2, LSnapshot *) { MOZ_CRASH(); }
|
||||
template<typename T>
|
||||
bool bailoutTest32(Assembler::Condition, Register, T, LSnapshot *) { MOZ_CRASH(); }
|
||||
void bailoutTest32(Assembler::Condition, Register, T, LSnapshot *) { MOZ_CRASH(); }
|
||||
template <typename T1, typename T2>
|
||||
bool bailoutCmpPtr(Assembler::Condition, T1, T2, LSnapshot *) { MOZ_CRASH(); }
|
||||
bool bailoutTestPtr(Assembler::Condition, Register, Register, LSnapshot *) { MOZ_CRASH(); }
|
||||
bool bailoutIfFalseBool(Register, LSnapshot *) { MOZ_CRASH(); }
|
||||
bool bailoutFrom(Label *, LSnapshot *) { MOZ_CRASH(); }
|
||||
bool bailout(LSnapshot *) { MOZ_CRASH(); }
|
||||
bool bailoutIf(Assembler::Condition, LSnapshot *) { MOZ_CRASH(); }
|
||||
void bailoutCmpPtr(Assembler::Condition, T1, T2, LSnapshot *) { MOZ_CRASH(); }
|
||||
void bailoutTestPtr(Assembler::Condition, Register, Register, LSnapshot *) { MOZ_CRASH(); }
|
||||
void bailoutIfFalseBool(Register, LSnapshot *) { MOZ_CRASH(); }
|
||||
void bailoutFrom(Label *, LSnapshot *) { MOZ_CRASH(); }
|
||||
void bailout(LSnapshot *) { MOZ_CRASH(); }
|
||||
void bailoutIf(Assembler::Condition, LSnapshot *) { MOZ_CRASH(); }
|
||||
bool generatePrologue() { MOZ_CRASH(); }
|
||||
bool generateEpilogue() { MOZ_CRASH(); }
|
||||
bool generateOutOfLineCode() { MOZ_CRASH(); }
|
||||
|
@ -48,11 +48,11 @@ class CodeGeneratorNone : public CodeGeneratorShared
|
|||
void testObjectEmitBranch(Assembler::Condition, ValueOperand, MBasicBlock *, MBasicBlock *) {
|
||||
MOZ_CRASH();
|
||||
}
|
||||
bool emitTableSwitchDispatch(MTableSwitch *, Register, Register) { MOZ_CRASH(); }
|
||||
void emitTableSwitchDispatch(MTableSwitch *, Register, Register) { MOZ_CRASH(); }
|
||||
ValueOperand ToValue(LInstruction *, size_t) { MOZ_CRASH(); }
|
||||
ValueOperand ToOutValue(LInstruction *) { MOZ_CRASH(); }
|
||||
ValueOperand ToTempValue(LInstruction *, size_t) { MOZ_CRASH(); }
|
||||
bool generateInvalidateEpilogue() { MOZ_CRASH(); }
|
||||
void generateInvalidateEpilogue() { MOZ_CRASH(); }
|
||||
};
|
||||
|
||||
typedef CodeGeneratorNone CodeGeneratorSpecific;
|
||||
|
|
|
@ -418,7 +418,7 @@ class MacroAssemblerNone : public Assembler
|
|||
void branchValueIsNurseryObject(Condition, ValueOperand, Register, Label *) { MOZ_CRASH(); }
|
||||
#endif
|
||||
|
||||
bool buildFakeExitFrame(Register, uint32_t *) { MOZ_CRASH(); }
|
||||
void buildFakeExitFrame(Register, uint32_t *) { MOZ_CRASH(); }
|
||||
bool buildOOLFakeExitFrame(void *) { MOZ_CRASH(); }
|
||||
void loadAsmJSActivation(Register) { MOZ_CRASH(); }
|
||||
void loadAsmJSHeapRegisterFromGlobalData() { MOZ_CRASH(); }
|
||||
|
|
|
@ -926,6 +926,10 @@ class AssemblerShared
|
|||
enoughMemory_ &= success;
|
||||
}
|
||||
|
||||
void setOOM() {
|
||||
enoughMemory_ = false;
|
||||
}
|
||||
|
||||
bool oom() const {
|
||||
return !enoughMemory_;
|
||||
}
|
||||
|
|
|
@ -334,8 +334,8 @@ class AssemblerX86Shared : public AssemblerShared
|
|||
void copyDataRelocationTable(uint8_t *dest);
|
||||
void copyPreBarrierTable(uint8_t *dest);
|
||||
|
||||
bool addCodeLabel(CodeLabel label) {
|
||||
return codeLabels_.append(label);
|
||||
void addCodeLabel(CodeLabel label) {
|
||||
propagateOOM(codeLabels_.append(label));
|
||||
}
|
||||
size_t numCodeLabels() const {
|
||||
return codeLabels_.length();
|
||||
|
|
|
@ -127,8 +127,7 @@ CodeGeneratorShared::generateOutOfLineCode()
|
|||
outOfLineCode_[i]->bind(&masm);
|
||||
|
||||
oolIns = outOfLineCode_[i];
|
||||
if (!outOfLineCode_[i]->generate(this))
|
||||
return false;
|
||||
outOfLineCode_[i]->generate(this);
|
||||
sps_.finishOOL();
|
||||
}
|
||||
sps_.setPushed(topScript);
|
||||
|
@ -137,20 +136,20 @@ CodeGeneratorShared::generateOutOfLineCode()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorShared::addOutOfLineCode(OutOfLineCode *code, const MInstruction *mir)
|
||||
{
|
||||
MOZ_ASSERT(mir);
|
||||
return addOutOfLineCode(code, mir->trackedSite());
|
||||
addOutOfLineCode(code, mir->trackedSite());
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorShared::addOutOfLineCode(OutOfLineCode *code, const BytecodeSite *site)
|
||||
{
|
||||
code->setFramePushed(masm.framePushed());
|
||||
code->setBytecodeSite(site);
|
||||
MOZ_ASSERT_IF(!gen->compilingAsmJS(), code->script()->containsPC(code->pc()));
|
||||
return outOfLineCode_.append(code);
|
||||
masm.propagateOOM(outOfLineCode_.append(code));
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -279,7 +278,7 @@ ToStackIndex(LAllocation *a)
|
|||
return -int32_t(sizeof(JitFrameLayout) + a->toArgument()->index());
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorShared::encodeAllocation(LSnapshot *snapshot, MDefinition *mir,
|
||||
uint32_t *allocIndex)
|
||||
{
|
||||
|
@ -343,8 +342,7 @@ CodeGeneratorShared::encodeAllocation(LSnapshot *snapshot, MDefinition *mir,
|
|||
} else {
|
||||
MConstant *constant = mir->toConstant();
|
||||
uint32_t index;
|
||||
if (!graph.addConstantToPool(constant->value(), &index))
|
||||
return false;
|
||||
masm.propagateOOM(graph.addConstantToPool(constant->value(), &index));
|
||||
alloc = RValueAllocation::ConstantPool(index);
|
||||
}
|
||||
break;
|
||||
|
@ -359,8 +357,7 @@ CodeGeneratorShared::encodeAllocation(LSnapshot *snapshot, MDefinition *mir,
|
|||
: (type == MIRType_MagicOptimizedOut
|
||||
? JS_OPTIMIZED_OUT
|
||||
: JS_UNINITIALIZED_LEXICAL));
|
||||
if (!graph.addConstantToPool(v, &index))
|
||||
return false;
|
||||
masm.propagateOOM(graph.addConstantToPool(v, &index));
|
||||
alloc = RValueAllocation::ConstantPool(index);
|
||||
break;
|
||||
}
|
||||
|
@ -393,14 +390,13 @@ CodeGeneratorShared::encodeAllocation(LSnapshot *snapshot, MDefinition *mir,
|
|||
|
||||
snapshots_.add(alloc);
|
||||
*allocIndex += mir->isRecoveredOnBailout() ? 0 : 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorShared::encode(LRecoverInfo *recover)
|
||||
{
|
||||
if (recover->recoverOffset() != INVALID_RECOVER_OFFSET)
|
||||
return true;
|
||||
return;
|
||||
|
||||
uint32_t numInstructions = recover->numInstructions();
|
||||
JitSpew(JitSpew_IonSnapshots, "Encoding LRecoverInfo %p (frameCount %u, instructions %u)",
|
||||
|
@ -412,25 +408,22 @@ CodeGeneratorShared::encode(LRecoverInfo *recover)
|
|||
|
||||
RecoverOffset offset = recovers_.startRecover(numInstructions, resumeAfter);
|
||||
|
||||
for (MNode **it = recover->begin(), **end = recover->end(); it != end; ++it) {
|
||||
if (!recovers_.writeInstruction(*it))
|
||||
return false;
|
||||
}
|
||||
for (MNode **it = recover->begin(), **end = recover->end(); it != end; ++it)
|
||||
recovers_.writeInstruction(*it);
|
||||
|
||||
recovers_.endRecover();
|
||||
recover->setRecoverOffset(offset);
|
||||
return !recovers_.oom();
|
||||
masm.propagateOOM(!recovers_.oom());
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorShared::encode(LSnapshot *snapshot)
|
||||
{
|
||||
if (snapshot->snapshotOffset() != INVALID_SNAPSHOT_OFFSET)
|
||||
return true;
|
||||
return;
|
||||
|
||||
LRecoverInfo *recoverInfo = snapshot->recoverInfo();
|
||||
if (!encode(recoverInfo))
|
||||
return false;
|
||||
encode(recoverInfo);
|
||||
|
||||
RecoverOffset recoverOffset = recoverInfo->recoverOffset();
|
||||
MOZ_ASSERT(recoverOffset != INVALID_RECOVER_OFFSET);
|
||||
|
@ -463,15 +456,14 @@ CodeGeneratorShared::encode(LSnapshot *snapshot)
|
|||
uint32_t allocIndex = 0;
|
||||
for (LRecoverInfo::OperandIter it(recoverInfo); !it; ++it) {
|
||||
DebugOnly<uint32_t> allocWritten = snapshots_.allocWritten();
|
||||
if (!encodeAllocation(snapshot, *it, &allocIndex))
|
||||
return false;
|
||||
encodeAllocation(snapshot, *it, &allocIndex);
|
||||
MOZ_ASSERT(allocWritten + 1 == snapshots_.allocWritten());
|
||||
}
|
||||
|
||||
MOZ_ASSERT(allocIndex == snapshot->numSlots());
|
||||
snapshots_.endSnapshot();
|
||||
snapshot->setSnapshotOffset(offset);
|
||||
return !snapshots_.oom();
|
||||
masm.propagateOOM(!snapshots_.oom());
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -726,18 +718,18 @@ CodeGeneratorShared::verifyCompactNativeToBytecodeMap(JitCode *code)
|
|||
#endif // DEBUG
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorShared::markSafepoint(LInstruction *ins)
|
||||
{
|
||||
return markSafepointAt(masm.currentOffset(), ins);
|
||||
markSafepointAt(masm.currentOffset(), ins);
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorShared::markSafepointAt(uint32_t offset, LInstruction *ins)
|
||||
{
|
||||
MOZ_ASSERT_IF(!safepointIndices_.empty(),
|
||||
offset - safepointIndices_.back().displacement() >= sizeof(uint32_t));
|
||||
return safepointIndices_.append(SafepointIndex(offset, ins->safepoint()));
|
||||
masm.propagateOOM(safepointIndices_.append(SafepointIndex(offset, ins->safepoint())));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -768,17 +760,17 @@ CodeGeneratorShared::ensureOsiSpace()
|
|||
lastOsiPointOffset_ = masm.currentOffset();
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorShared::markOsiPoint(LOsiPoint *ins, uint32_t *callPointOffset)
|
||||
uint32_t
|
||||
CodeGeneratorShared::markOsiPoint(LOsiPoint *ins)
|
||||
{
|
||||
if (!encode(ins->snapshot()))
|
||||
return false;
|
||||
|
||||
encode(ins->snapshot());
|
||||
ensureOsiSpace();
|
||||
|
||||
*callPointOffset = masm.currentOffset();
|
||||
uint32_t offset = masm.currentOffset();
|
||||
SnapshotOffset so = ins->snapshot()->snapshotOffset();
|
||||
return osiIndices_.append(OsiIndex(*callPointOffset, so));
|
||||
masm.propagateOOM(osiIndices_.append(OsiIndex(offset, so)));
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
#ifdef CHECK_OSIPOINT_REGISTERS
|
||||
|
@ -992,7 +984,7 @@ CodeGeneratorShared::resetOsiPointRegs(LSafepoint *safepoint)
|
|||
|
||||
// Before doing any call to Cpp, you should ensure that volatile
|
||||
// registers are evicted by the register allocator.
|
||||
bool
|
||||
void
|
||||
CodeGeneratorShared::callVM(const VMFunction &fun, LInstruction *ins, const Register *dynStack)
|
||||
{
|
||||
// Different execution modes have different sets of VM functions.
|
||||
|
@ -1011,8 +1003,7 @@ CodeGeneratorShared::callVM(const VMFunction &fun, LInstruction *ins, const Regi
|
|||
#endif
|
||||
|
||||
#ifdef JS_TRACE_LOGGING
|
||||
if (!emitTracelogStartEvent(TraceLogger::VM))
|
||||
return false;
|
||||
emitTracelogStartEvent(TraceLogger::VM);
|
||||
#endif
|
||||
|
||||
// Stack is:
|
||||
|
@ -1025,8 +1016,10 @@ CodeGeneratorShared::callVM(const VMFunction &fun, LInstruction *ins, const Regi
|
|||
|
||||
// Get the wrapper of the VM function.
|
||||
JitCode *wrapper = gen->jitRuntime()->getVMWrapper(fun);
|
||||
if (!wrapper)
|
||||
return false;
|
||||
if (!wrapper) {
|
||||
masm.setOOM();
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CHECK_OSIPOINT_REGISTERS
|
||||
if (shouldVerifyOsiPointRegs(ins->safepoint()))
|
||||
|
@ -1043,8 +1036,7 @@ CodeGeneratorShared::callVM(const VMFunction &fun, LInstruction *ins, const Regi
|
|||
else
|
||||
callOffset = masm.callWithExitFrame(wrapper);
|
||||
|
||||
if (!markSafepointAt(callOffset, ins))
|
||||
return false;
|
||||
markSafepointAt(callOffset, ins);
|
||||
|
||||
// Remove rest of the frame left on the stack. We remove the return address
|
||||
// which is implicitly poped when returning.
|
||||
|
@ -1056,11 +1048,8 @@ CodeGeneratorShared::callVM(const VMFunction &fun, LInstruction *ins, const Regi
|
|||
// ... frame ...
|
||||
|
||||
#ifdef JS_TRACE_LOGGING
|
||||
if (!emitTracelogStopEvent(TraceLogger::VM))
|
||||
return false;
|
||||
emitTracelogStopEvent(TraceLogger::VM);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
class OutOfLineTruncateSlow : public OutOfLineCodeBase<CodeGeneratorShared>
|
||||
|
@ -1074,8 +1063,8 @@ class OutOfLineTruncateSlow : public OutOfLineCodeBase<CodeGeneratorShared>
|
|||
: src_(src), dest_(dest), needFloat32Conversion_(needFloat32Conversion)
|
||||
{ }
|
||||
|
||||
bool accept(CodeGeneratorShared *codegen) {
|
||||
return codegen->visitOutOfLineTruncateSlow(this);
|
||||
void accept(CodeGeneratorShared *codegen) {
|
||||
codegen->visitOutOfLineTruncateSlow(this);
|
||||
}
|
||||
FloatRegister src() const {
|
||||
return src_;
|
||||
|
@ -1093,36 +1082,30 @@ OutOfLineCode *
|
|||
CodeGeneratorShared::oolTruncateDouble(FloatRegister src, Register dest, MInstruction *mir)
|
||||
{
|
||||
OutOfLineTruncateSlow *ool = new(alloc()) OutOfLineTruncateSlow(src, dest);
|
||||
if (!addOutOfLineCode(ool, mir))
|
||||
return nullptr;
|
||||
addOutOfLineCode(ool, mir);
|
||||
return ool;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorShared::emitTruncateDouble(FloatRegister src, Register dest, MInstruction *mir)
|
||||
{
|
||||
OutOfLineCode *ool = oolTruncateDouble(src, dest, mir);
|
||||
if (!ool)
|
||||
return false;
|
||||
|
||||
masm.branchTruncateDouble(src, dest, ool->entry());
|
||||
masm.bind(ool->rejoin());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorShared::emitTruncateFloat32(FloatRegister src, Register dest, MInstruction *mir)
|
||||
{
|
||||
OutOfLineTruncateSlow *ool = new(alloc()) OutOfLineTruncateSlow(src, dest, true);
|
||||
if (!addOutOfLineCode(ool, mir))
|
||||
return false;
|
||||
addOutOfLineCode(ool, mir);
|
||||
|
||||
masm.branchTruncateFloat32(src, dest, ool->entry());
|
||||
masm.bind(ool->rejoin());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorShared::visitOutOfLineTruncateSlow(OutOfLineTruncateSlow *ool)
|
||||
{
|
||||
FloatRegister src = ool->src();
|
||||
|
@ -1156,7 +1139,6 @@ CodeGeneratorShared::visitOutOfLineTruncateSlow(OutOfLineTruncateSlow *ool)
|
|||
restoreVolatile(dest);
|
||||
|
||||
masm.jump(ool->rejoin());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -306,11 +306,10 @@ class CodeGeneratorShared : public LElementVisitor
|
|||
}
|
||||
|
||||
protected:
|
||||
// Encodes an LSnapshot into the compressed snapshot buffer, returning
|
||||
// false on failure.
|
||||
bool encode(LRecoverInfo *recover);
|
||||
bool encode(LSnapshot *snapshot);
|
||||
bool encodeAllocation(LSnapshot *snapshot, MDefinition *def, uint32_t *startIndex);
|
||||
// Encodes an LSnapshot into the compressed snapshot buffer.
|
||||
void encode(LRecoverInfo *recover);
|
||||
void encode(LSnapshot *snapshot);
|
||||
void encodeAllocation(LSnapshot *snapshot, MDefinition *def, uint32_t *startIndex);
|
||||
|
||||
// Attempts to assign a BailoutId to a snapshot, if one isn't already set.
|
||||
// If the bailout table is full, this returns false, which is not a fatal
|
||||
|
@ -328,14 +327,13 @@ class CodeGeneratorShared : public LElementVisitor
|
|||
|
||||
// Mark the safepoint on |ins| as corresponding to the current assembler location.
|
||||
// The location should be just after a call.
|
||||
bool markSafepoint(LInstruction *ins);
|
||||
bool markSafepointAt(uint32_t offset, LInstruction *ins);
|
||||
void markSafepoint(LInstruction *ins);
|
||||
void markSafepointAt(uint32_t offset, LInstruction *ins);
|
||||
|
||||
// Mark the OSI point |ins| as corresponding to the current
|
||||
// assembler location inside the |osiIndices_|. Return the assembler
|
||||
// location for the OSI point return location within
|
||||
// |returnPointOffset|.
|
||||
bool markOsiPoint(LOsiPoint *ins, uint32_t *returnPointOffset);
|
||||
// location for the OSI point return location.
|
||||
uint32_t markOsiPoint(LOsiPoint *ins);
|
||||
|
||||
// Ensure that there is enough room between the last OSI point and the
|
||||
// current instruction, such that:
|
||||
|
@ -345,8 +343,8 @@ class CodeGeneratorShared : public LElementVisitor
|
|||
void ensureOsiSpace();
|
||||
|
||||
OutOfLineCode *oolTruncateDouble(FloatRegister src, Register dest, MInstruction *mir);
|
||||
bool emitTruncateDouble(FloatRegister src, Register dest, MInstruction *mir);
|
||||
bool emitTruncateFloat32(FloatRegister src, Register dest, MInstruction *mir);
|
||||
void emitTruncateDouble(FloatRegister src, Register dest, MInstruction *mir);
|
||||
void emitTruncateFloat32(FloatRegister src, Register dest, MInstruction *mir);
|
||||
|
||||
void emitAsmJSCall(LAsmJSCall *ins);
|
||||
|
||||
|
@ -455,14 +453,14 @@ class CodeGeneratorShared : public LElementVisitor
|
|||
masm.storeCallResultValue(t);
|
||||
}
|
||||
|
||||
bool callVM(const VMFunction &f, LInstruction *ins, const Register *dynStack = nullptr);
|
||||
void callVM(const VMFunction &f, LInstruction *ins, const Register *dynStack = nullptr);
|
||||
|
||||
template <class ArgSeq, class StoreOutputTo>
|
||||
inline OutOfLineCode *oolCallVM(const VMFunction &fun, LInstruction *ins, const ArgSeq &args,
|
||||
const StoreOutputTo &out);
|
||||
|
||||
bool callVM(const VMFunctionsModal &f, LInstruction *ins, const Register *dynStack = nullptr) {
|
||||
return callVM(f[gen->info().executionMode()], ins, dynStack);
|
||||
void callVM(const VMFunctionsModal &f, LInstruction *ins, const Register *dynStack = nullptr) {
|
||||
callVM(f[gen->info().executionMode()], ins, dynStack);
|
||||
}
|
||||
|
||||
template <class ArgSeq, class StoreOutputTo>
|
||||
|
@ -472,13 +470,13 @@ class CodeGeneratorShared : public LElementVisitor
|
|||
return oolCallVM(f[gen->info().executionMode()], ins, args, out);
|
||||
}
|
||||
|
||||
bool addCache(LInstruction *lir, size_t cacheIndex);
|
||||
void addCache(LInstruction *lir, size_t cacheIndex);
|
||||
size_t addCacheLocations(const CacheLocationList &locs, size_t *numLocs);
|
||||
ReciprocalMulConstants computeDivisionConstants(int d);
|
||||
|
||||
protected:
|
||||
bool addOutOfLineCode(OutOfLineCode *code, const MInstruction *mir);
|
||||
bool addOutOfLineCode(OutOfLineCode *code, const BytecodeSite *site);
|
||||
void addOutOfLineCode(OutOfLineCode *code, const MInstruction *mir);
|
||||
void addOutOfLineCode(OutOfLineCode *code, const BytecodeSite *site);
|
||||
bool hasOutOfLineCode() { return !outOfLineCode_.empty(); }
|
||||
bool generateOutOfLineCode();
|
||||
|
||||
|
@ -503,29 +501,29 @@ class CodeGeneratorShared : public LElementVisitor
|
|||
|
||||
public:
|
||||
template <class ArgSeq, class StoreOutputTo>
|
||||
bool visitOutOfLineCallVM(OutOfLineCallVM<ArgSeq, StoreOutputTo> *ool);
|
||||
void visitOutOfLineCallVM(OutOfLineCallVM<ArgSeq, StoreOutputTo> *ool);
|
||||
|
||||
bool visitOutOfLineTruncateSlow(OutOfLineTruncateSlow *ool);
|
||||
void visitOutOfLineTruncateSlow(OutOfLineTruncateSlow *ool);
|
||||
|
||||
bool omitOverRecursedCheck() const;
|
||||
|
||||
#ifdef JS_TRACE_LOGGING
|
||||
protected:
|
||||
bool emitTracelogScript(bool isStart);
|
||||
bool emitTracelogTree(bool isStart, uint32_t textId);
|
||||
void emitTracelogScript(bool isStart);
|
||||
void emitTracelogTree(bool isStart, uint32_t textId);
|
||||
|
||||
public:
|
||||
bool emitTracelogScriptStart() {
|
||||
return emitTracelogScript(/* isStart =*/ true);
|
||||
void emitTracelogScriptStart() {
|
||||
emitTracelogScript(/* isStart =*/ true);
|
||||
}
|
||||
bool emitTracelogScriptStop() {
|
||||
return emitTracelogScript(/* isStart =*/ false);
|
||||
void emitTracelogScriptStop() {
|
||||
emitTracelogScript(/* isStart =*/ false);
|
||||
}
|
||||
bool emitTracelogStartEvent(uint32_t textId) {
|
||||
return emitTracelogTree(/* isStart =*/ true, textId);
|
||||
void emitTracelogStartEvent(uint32_t textId) {
|
||||
emitTracelogTree(/* isStart =*/ true, textId);
|
||||
}
|
||||
bool emitTracelogStopEvent(uint32_t textId) {
|
||||
return emitTracelogTree(/* isStart =*/ false, textId);
|
||||
void emitTracelogStopEvent(uint32_t textId) {
|
||||
emitTracelogTree(/* isStart =*/ false, textId);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
@ -544,7 +542,7 @@ class OutOfLineCode : public TempObject
|
|||
site_()
|
||||
{ }
|
||||
|
||||
virtual bool generate(CodeGeneratorShared *codegen) = 0;
|
||||
virtual void generate(CodeGeneratorShared *codegen) = 0;
|
||||
|
||||
Label *entry() {
|
||||
return &entry_;
|
||||
|
@ -580,12 +578,12 @@ template <typename T>
|
|||
class OutOfLineCodeBase : public OutOfLineCode
|
||||
{
|
||||
public:
|
||||
virtual bool generate(CodeGeneratorShared *codegen) {
|
||||
return accept(static_cast<T *>(codegen));
|
||||
virtual void generate(CodeGeneratorShared *codegen) {
|
||||
accept(static_cast<T *>(codegen));
|
||||
}
|
||||
|
||||
public:
|
||||
virtual bool accept(T *codegen) = 0;
|
||||
virtual void accept(T *codegen) = 0;
|
||||
};
|
||||
|
||||
// ArgSeq store arguments for OutOfLineCallVM.
|
||||
|
@ -752,8 +750,8 @@ class OutOfLineCallVM : public OutOfLineCodeBase<CodeGeneratorShared>
|
|||
out_(out)
|
||||
{ }
|
||||
|
||||
bool accept(CodeGeneratorShared *codegen) {
|
||||
return codegen->visitOutOfLineCallVM(this);
|
||||
void accept(CodeGeneratorShared *codegen) {
|
||||
codegen->visitOutOfLineCallVM(this);
|
||||
}
|
||||
|
||||
LInstruction *lir() const { return lir_; }
|
||||
|
@ -771,25 +769,22 @@ CodeGeneratorShared::oolCallVM(const VMFunction &fun, LInstruction *lir, const A
|
|||
MOZ_ASSERT(lir->mirRaw()->isInstruction());
|
||||
|
||||
OutOfLineCode *ool = new(alloc()) OutOfLineCallVM<ArgSeq, StoreOutputTo>(lir, fun, args, out);
|
||||
if (!addOutOfLineCode(ool, lir->mirRaw()->toInstruction()))
|
||||
return nullptr;
|
||||
addOutOfLineCode(ool, lir->mirRaw()->toInstruction());
|
||||
return ool;
|
||||
}
|
||||
|
||||
template <class ArgSeq, class StoreOutputTo>
|
||||
bool
|
||||
void
|
||||
CodeGeneratorShared::visitOutOfLineCallVM(OutOfLineCallVM<ArgSeq, StoreOutputTo> *ool)
|
||||
{
|
||||
LInstruction *lir = ool->lir();
|
||||
|
||||
saveLive(lir);
|
||||
ool->args().generate(this);
|
||||
if (!callVM(ool->function(), lir))
|
||||
return false;
|
||||
callVM(ool->function(), lir);
|
||||
ool->out().generate(this);
|
||||
restoreLiveIgnore(lir, ool->out().clobbered());
|
||||
masm.jump(ool->rejoin());
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace jit
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -29,7 +29,7 @@ class CodeGeneratorX86Shared : public CodeGeneratorShared
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
bool bailout(const T &t, LSnapshot *snapshot);
|
||||
void bailout(const T &t, LSnapshot *snapshot);
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -46,8 +46,8 @@ class CodeGeneratorX86Shared : public CodeGeneratorShared
|
|||
|
||||
AnyRegister dest() const { return dest_; }
|
||||
AsmJSHeapAccess::ViewType viewType() const { return viewType_; }
|
||||
bool accept(CodeGeneratorX86Shared *codegen) {
|
||||
return codegen->visitOutOfLineLoadTypedArrayOutOfBounds(this);
|
||||
void accept(CodeGeneratorX86Shared *codegen) {
|
||||
codegen->visitOutOfLineLoadTypedArrayOutOfBounds(this);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -71,48 +71,48 @@ class CodeGeneratorX86Shared : public CodeGeneratorShared
|
|||
|
||||
MoveOperand toMoveOperand(const LAllocation *a) const;
|
||||
|
||||
bool bailoutIf(Assembler::Condition condition, LSnapshot *snapshot);
|
||||
bool bailoutIf(Assembler::DoubleCondition condition, LSnapshot *snapshot);
|
||||
bool bailoutFrom(Label *label, LSnapshot *snapshot);
|
||||
bool bailout(LSnapshot *snapshot);
|
||||
void bailoutIf(Assembler::Condition condition, LSnapshot *snapshot);
|
||||
void bailoutIf(Assembler::DoubleCondition condition, LSnapshot *snapshot);
|
||||
void bailoutFrom(Label *label, LSnapshot *snapshot);
|
||||
void bailout(LSnapshot *snapshot);
|
||||
|
||||
template <typename T1, typename T2>
|
||||
bool bailoutCmpPtr(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
void bailoutCmpPtr(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
masm.cmpPtr(lhs, rhs);
|
||||
return bailoutIf(c, snapshot);
|
||||
bailoutIf(c, snapshot);
|
||||
}
|
||||
bool bailoutTestPtr(Assembler::Condition c, Register lhs, Register rhs, LSnapshot *snapshot) {
|
||||
void bailoutTestPtr(Assembler::Condition c, Register lhs, Register rhs, LSnapshot *snapshot) {
|
||||
masm.testPtr(lhs, rhs);
|
||||
return bailoutIf(c, snapshot);
|
||||
bailoutIf(c, snapshot);
|
||||
}
|
||||
template <typename T1, typename T2>
|
||||
bool bailoutCmp32(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
void bailoutCmp32(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
masm.cmp32(lhs, rhs);
|
||||
return bailoutIf(c, snapshot);
|
||||
bailoutIf(c, snapshot);
|
||||
}
|
||||
template <typename T1, typename T2>
|
||||
bool bailoutTest32(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
void bailoutTest32(Assembler::Condition c, T1 lhs, T2 rhs, LSnapshot *snapshot) {
|
||||
masm.test32(lhs, rhs);
|
||||
return bailoutIf(c, snapshot);
|
||||
bailoutIf(c, snapshot);
|
||||
}
|
||||
bool bailoutIfFalseBool(Register reg, LSnapshot *snapshot) {
|
||||
void bailoutIfFalseBool(Register reg, LSnapshot *snapshot) {
|
||||
masm.test32(reg, Imm32(0xFF));
|
||||
return bailoutIf(Assembler::Zero, snapshot);
|
||||
bailoutIf(Assembler::Zero, snapshot);
|
||||
}
|
||||
bool bailoutCvttsd2si(FloatRegister src, Register dest, LSnapshot *snapshot) {
|
||||
void bailoutCvttsd2si(FloatRegister src, Register dest, LSnapshot *snapshot) {
|
||||
// cvttsd2si returns 0x80000000 on failure. Test for it by
|
||||
// subtracting 1 and testing overflow. The other possibility is to test
|
||||
// equality for INT_MIN after a comparison, but 1 costs fewer bytes to
|
||||
// materialize.
|
||||
masm.cvttsd2si(src, dest);
|
||||
masm.cmp32(dest, Imm32(1));
|
||||
return bailoutIf(Assembler::Overflow, snapshot);
|
||||
bailoutIf(Assembler::Overflow, snapshot);
|
||||
}
|
||||
bool bailoutCvttss2si(FloatRegister src, Register dest, LSnapshot *snapshot) {
|
||||
void bailoutCvttss2si(FloatRegister src, Register dest, LSnapshot *snapshot) {
|
||||
// Same trick as explained in the above comment.
|
||||
masm.cvttss2si(src, dest);
|
||||
masm.cmp32(dest, Imm32(1));
|
||||
return bailoutIf(Assembler::Overflow, snapshot);
|
||||
bailoutIf(Assembler::Overflow, snapshot);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -147,106 +147,106 @@ class CodeGeneratorX86Shared : public CodeGeneratorShared
|
|||
emitBranch(cond, ifTrue, ifFalse);
|
||||
}
|
||||
|
||||
bool emitTableSwitchDispatch(MTableSwitch *mir, Register index, Register base);
|
||||
void emitTableSwitchDispatch(MTableSwitch *mir, Register index, Register base);
|
||||
|
||||
public:
|
||||
CodeGeneratorX86Shared(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm);
|
||||
|
||||
public:
|
||||
// Instruction visitors.
|
||||
virtual bool visitDouble(LDouble *ins);
|
||||
virtual bool visitFloat32(LFloat32 *ins);
|
||||
virtual bool visitMinMaxD(LMinMaxD *ins);
|
||||
virtual bool visitMinMaxF(LMinMaxF *ins);
|
||||
virtual bool visitAbsD(LAbsD *ins);
|
||||
virtual bool visitAbsF(LAbsF *ins);
|
||||
virtual bool visitClzI(LClzI *ins);
|
||||
virtual bool visitSqrtD(LSqrtD *ins);
|
||||
virtual bool visitSqrtF(LSqrtF *ins);
|
||||
virtual bool visitPowHalfD(LPowHalfD *ins);
|
||||
virtual bool visitAddI(LAddI *ins);
|
||||
virtual bool visitSubI(LSubI *ins);
|
||||
virtual bool visitMulI(LMulI *ins);
|
||||
virtual bool visitDivI(LDivI *ins);
|
||||
virtual bool visitDivPowTwoI(LDivPowTwoI *ins);
|
||||
virtual bool visitDivOrModConstantI(LDivOrModConstantI *ins);
|
||||
virtual bool visitModI(LModI *ins);
|
||||
virtual bool visitModPowTwoI(LModPowTwoI *ins);
|
||||
virtual bool visitBitNotI(LBitNotI *ins);
|
||||
virtual bool visitBitOpI(LBitOpI *ins);
|
||||
virtual bool visitShiftI(LShiftI *ins);
|
||||
virtual bool visitUrshD(LUrshD *ins);
|
||||
virtual bool visitTestIAndBranch(LTestIAndBranch *test);
|
||||
virtual bool visitTestDAndBranch(LTestDAndBranch *test);
|
||||
virtual bool visitTestFAndBranch(LTestFAndBranch *test);
|
||||
virtual bool visitCompare(LCompare *comp);
|
||||
virtual bool visitCompareAndBranch(LCompareAndBranch *comp);
|
||||
virtual bool visitCompareD(LCompareD *comp);
|
||||
virtual bool visitCompareDAndBranch(LCompareDAndBranch *comp);
|
||||
virtual bool visitCompareF(LCompareF *comp);
|
||||
virtual bool visitCompareFAndBranch(LCompareFAndBranch *comp);
|
||||
virtual bool visitBitAndAndBranch(LBitAndAndBranch *baab);
|
||||
virtual bool visitNotI(LNotI *comp);
|
||||
virtual bool visitNotD(LNotD *comp);
|
||||
virtual bool visitNotF(LNotF *comp);
|
||||
virtual bool visitMathD(LMathD *math);
|
||||
virtual bool visitMathF(LMathF *math);
|
||||
virtual bool visitFloor(LFloor *lir);
|
||||
virtual bool visitFloorF(LFloorF *lir);
|
||||
virtual bool visitCeil(LCeil *lir);
|
||||
virtual bool visitCeilF(LCeilF *lir);
|
||||
virtual bool visitRound(LRound *lir);
|
||||
virtual bool visitRoundF(LRoundF *lir);
|
||||
virtual bool visitGuardShape(LGuardShape *guard);
|
||||
virtual bool visitGuardObjectType(LGuardObjectType *guard);
|
||||
virtual bool visitGuardClass(LGuardClass *guard);
|
||||
virtual bool visitEffectiveAddress(LEffectiveAddress *ins);
|
||||
virtual bool visitUDivOrMod(LUDivOrMod *ins);
|
||||
virtual bool visitAsmJSPassStackArg(LAsmJSPassStackArg *ins);
|
||||
virtual bool visitMemoryBarrier(LMemoryBarrier *ins);
|
||||
virtual void visitDouble(LDouble *ins);
|
||||
virtual void visitFloat32(LFloat32 *ins);
|
||||
virtual void visitMinMaxD(LMinMaxD *ins);
|
||||
virtual void visitMinMaxF(LMinMaxF *ins);
|
||||
virtual void visitAbsD(LAbsD *ins);
|
||||
virtual void visitAbsF(LAbsF *ins);
|
||||
virtual void visitClzI(LClzI *ins);
|
||||
virtual void visitSqrtD(LSqrtD *ins);
|
||||
virtual void visitSqrtF(LSqrtF *ins);
|
||||
virtual void visitPowHalfD(LPowHalfD *ins);
|
||||
virtual void visitAddI(LAddI *ins);
|
||||
virtual void visitSubI(LSubI *ins);
|
||||
virtual void visitMulI(LMulI *ins);
|
||||
virtual void visitDivI(LDivI *ins);
|
||||
virtual void visitDivPowTwoI(LDivPowTwoI *ins);
|
||||
virtual void visitDivOrModConstantI(LDivOrModConstantI *ins);
|
||||
virtual void visitModI(LModI *ins);
|
||||
virtual void visitModPowTwoI(LModPowTwoI *ins);
|
||||
virtual void visitBitNotI(LBitNotI *ins);
|
||||
virtual void visitBitOpI(LBitOpI *ins);
|
||||
virtual void visitShiftI(LShiftI *ins);
|
||||
virtual void visitUrshD(LUrshD *ins);
|
||||
virtual void visitTestIAndBranch(LTestIAndBranch *test);
|
||||
virtual void visitTestDAndBranch(LTestDAndBranch *test);
|
||||
virtual void visitTestFAndBranch(LTestFAndBranch *test);
|
||||
virtual void visitCompare(LCompare *comp);
|
||||
virtual void visitCompareAndBranch(LCompareAndBranch *comp);
|
||||
virtual void visitCompareD(LCompareD *comp);
|
||||
virtual void visitCompareDAndBranch(LCompareDAndBranch *comp);
|
||||
virtual void visitCompareF(LCompareF *comp);
|
||||
virtual void visitCompareFAndBranch(LCompareFAndBranch *comp);
|
||||
virtual void visitBitAndAndBranch(LBitAndAndBranch *baab);
|
||||
virtual void visitNotI(LNotI *comp);
|
||||
virtual void visitNotD(LNotD *comp);
|
||||
virtual void visitNotF(LNotF *comp);
|
||||
virtual void visitMathD(LMathD *math);
|
||||
virtual void visitMathF(LMathF *math);
|
||||
virtual void visitFloor(LFloor *lir);
|
||||
virtual void visitFloorF(LFloorF *lir);
|
||||
virtual void visitCeil(LCeil *lir);
|
||||
virtual void visitCeilF(LCeilF *lir);
|
||||
virtual void visitRound(LRound *lir);
|
||||
virtual void visitRoundF(LRoundF *lir);
|
||||
virtual void visitGuardShape(LGuardShape *guard);
|
||||
virtual void visitGuardObjectType(LGuardObjectType *guard);
|
||||
virtual void visitGuardClass(LGuardClass *guard);
|
||||
virtual void visitEffectiveAddress(LEffectiveAddress *ins);
|
||||
virtual void visitUDivOrMod(LUDivOrMod *ins);
|
||||
virtual void visitAsmJSPassStackArg(LAsmJSPassStackArg *ins);
|
||||
virtual void visitMemoryBarrier(LMemoryBarrier *ins);
|
||||
|
||||
bool visitOutOfLineLoadTypedArrayOutOfBounds(OutOfLineLoadTypedArrayOutOfBounds *ool);
|
||||
void visitOutOfLineLoadTypedArrayOutOfBounds(OutOfLineLoadTypedArrayOutOfBounds *ool);
|
||||
|
||||
bool visitForkJoinGetSlice(LForkJoinGetSlice *ins);
|
||||
void visitForkJoinGetSlice(LForkJoinGetSlice *ins);
|
||||
|
||||
bool visitNegI(LNegI *lir);
|
||||
bool visitNegD(LNegD *lir);
|
||||
bool visitNegF(LNegF *lir);
|
||||
void visitNegI(LNegI *lir);
|
||||
void visitNegD(LNegD *lir);
|
||||
void visitNegF(LNegF *lir);
|
||||
|
||||
// SIMD operators
|
||||
bool visitSimdValueInt32x4(LSimdValueInt32x4 *lir);
|
||||
bool visitSimdValueFloat32x4(LSimdValueFloat32x4 *lir);
|
||||
bool visitSimdSplatX4(LSimdSplatX4 *lir);
|
||||
bool visitInt32x4(LInt32x4 *ins);
|
||||
bool visitFloat32x4(LFloat32x4 *ins);
|
||||
bool visitInt32x4ToFloat32x4(LInt32x4ToFloat32x4 *ins);
|
||||
bool visitFloat32x4ToInt32x4(LFloat32x4ToInt32x4 *ins);
|
||||
bool visitSimdExtractElementI(LSimdExtractElementI *lir);
|
||||
bool visitSimdExtractElementF(LSimdExtractElementF *lir);
|
||||
bool visitSimdInsertElementI(LSimdInsertElementI *lir);
|
||||
bool visitSimdInsertElementF(LSimdInsertElementF *lir);
|
||||
bool visitSimdSignMaskX4(LSimdSignMaskX4 *ins);
|
||||
bool visitSimdSwizzleI(LSimdSwizzleI *lir);
|
||||
bool visitSimdSwizzleF(LSimdSwizzleF *lir);
|
||||
bool visitSimdShuffle(LSimdShuffle *lir);
|
||||
bool visitSimdUnaryArithIx4(LSimdUnaryArithIx4 *lir);
|
||||
bool visitSimdUnaryArithFx4(LSimdUnaryArithFx4 *lir);
|
||||
bool visitSimdBinaryCompIx4(LSimdBinaryCompIx4 *lir);
|
||||
bool visitSimdBinaryCompFx4(LSimdBinaryCompFx4 *lir);
|
||||
bool visitSimdBinaryArithIx4(LSimdBinaryArithIx4 *lir);
|
||||
bool visitSimdBinaryArithFx4(LSimdBinaryArithFx4 *lir);
|
||||
bool visitSimdBinaryBitwiseX4(LSimdBinaryBitwiseX4 *lir);
|
||||
bool visitSimdShift(LSimdShift *lir);
|
||||
bool visitSimdSelect(LSimdSelect *ins);
|
||||
void visitSimdValueInt32x4(LSimdValueInt32x4 *lir);
|
||||
void visitSimdValueFloat32x4(LSimdValueFloat32x4 *lir);
|
||||
void visitSimdSplatX4(LSimdSplatX4 *lir);
|
||||
void visitInt32x4(LInt32x4 *ins);
|
||||
void visitFloat32x4(LFloat32x4 *ins);
|
||||
void visitInt32x4ToFloat32x4(LInt32x4ToFloat32x4 *ins);
|
||||
void visitFloat32x4ToInt32x4(LFloat32x4ToInt32x4 *ins);
|
||||
void visitSimdExtractElementI(LSimdExtractElementI *lir);
|
||||
void visitSimdExtractElementF(LSimdExtractElementF *lir);
|
||||
void visitSimdInsertElementI(LSimdInsertElementI *lir);
|
||||
void visitSimdInsertElementF(LSimdInsertElementF *lir);
|
||||
void visitSimdSignMaskX4(LSimdSignMaskX4 *ins);
|
||||
void visitSimdSwizzleI(LSimdSwizzleI *lir);
|
||||
void visitSimdSwizzleF(LSimdSwizzleF *lir);
|
||||
void visitSimdShuffle(LSimdShuffle *lir);
|
||||
void visitSimdUnaryArithIx4(LSimdUnaryArithIx4 *lir);
|
||||
void visitSimdUnaryArithFx4(LSimdUnaryArithFx4 *lir);
|
||||
void visitSimdBinaryCompIx4(LSimdBinaryCompIx4 *lir);
|
||||
void visitSimdBinaryCompFx4(LSimdBinaryCompFx4 *lir);
|
||||
void visitSimdBinaryArithIx4(LSimdBinaryArithIx4 *lir);
|
||||
void visitSimdBinaryArithFx4(LSimdBinaryArithFx4 *lir);
|
||||
void visitSimdBinaryBitwiseX4(LSimdBinaryBitwiseX4 *lir);
|
||||
void visitSimdShift(LSimdShift *lir);
|
||||
void visitSimdSelect(LSimdSelect *ins);
|
||||
|
||||
// Out of line visitors.
|
||||
bool visitOutOfLineBailout(OutOfLineBailout *ool);
|
||||
bool visitOutOfLineUndoALUOperation(OutOfLineUndoALUOperation *ool);
|
||||
bool visitMulNegativeZeroCheck(MulNegativeZeroCheck *ool);
|
||||
bool visitModOverflowCheck(ModOverflowCheck *ool);
|
||||
bool visitReturnZero(ReturnZero *ool);
|
||||
bool visitOutOfLineTableSwitch(OutOfLineTableSwitch *ool);
|
||||
bool generateInvalidateEpilogue();
|
||||
void visitOutOfLineBailout(OutOfLineBailout *ool);
|
||||
void visitOutOfLineUndoALUOperation(OutOfLineUndoALUOperation *ool);
|
||||
void visitMulNegativeZeroCheck(MulNegativeZeroCheck *ool);
|
||||
void visitModOverflowCheck(ModOverflowCheck *ool);
|
||||
void visitReturnZero(ReturnZero *ool);
|
||||
void visitOutOfLineTableSwitch(OutOfLineTableSwitch *ool);
|
||||
void generateInvalidateEpilogue();
|
||||
};
|
||||
|
||||
// An out-of-line bailout thunk.
|
||||
|
@ -259,7 +259,7 @@ class OutOfLineBailout : public OutOfLineCodeBase<CodeGeneratorX86Shared>
|
|||
: snapshot_(snapshot)
|
||||
{ }
|
||||
|
||||
bool accept(CodeGeneratorX86Shared *codegen);
|
||||
void accept(CodeGeneratorX86Shared *codegen);
|
||||
|
||||
LSnapshot *snapshot() const {
|
||||
return snapshot_;
|
||||
|
|
|
@ -146,7 +146,7 @@ MacroAssembler::clampDoubleToUint8(FloatRegister input, Register output)
|
|||
|
||||
// Builds an exit frame on the stack, with a return address to an internal
|
||||
// non-function. Returns offset to be passed to markSafepointAt().
|
||||
bool
|
||||
void
|
||||
MacroAssemblerX86Shared::buildFakeExitFrame(Register scratch, uint32_t *offset)
|
||||
{
|
||||
mozilla::DebugOnly<uint32_t> initialDepth = framePushed();
|
||||
|
@ -162,7 +162,7 @@ MacroAssemblerX86Shared::buildFakeExitFrame(Register scratch, uint32_t *offset)
|
|||
*offset = currentOffset();
|
||||
|
||||
MOZ_ASSERT(framePushed() == initialDepth + ExitFrameLayout::Size());
|
||||
return addCodeLabel(cl);
|
||||
addCodeLabel(cl);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1190,7 +1190,7 @@ class MacroAssemblerX86Shared : public Assembler
|
|||
|
||||
// Builds an exit frame on the stack, with a return address to an internal
|
||||
// non-function. Returns offset to be passed to markSafepointAt().
|
||||
bool buildFakeExitFrame(Register scratch, uint32_t *offset);
|
||||
void buildFakeExitFrame(Register scratch, uint32_t *offset);
|
||||
void callWithExitFrame(Label *target);
|
||||
void callWithExitFrame(JitCode *target);
|
||||
|
||||
|
|
|
@ -57,15 +57,14 @@ FrameSizeClass::frameSize() const
|
|||
MOZ_CRASH("x64 does not use frame size classes");
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitValue(LValue *value)
|
||||
{
|
||||
LDefinition *reg = value->getDef(0);
|
||||
masm.moveValue(value->value(), ToRegister(reg));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitBox(LBox *box)
|
||||
{
|
||||
const LAllocation *in = box->getOperand(0);
|
||||
|
@ -81,10 +80,9 @@ CodeGeneratorX64::visitBox(LBox *box)
|
|||
} else {
|
||||
masm.boxValue(ValueTypeFromMIRType(box->type()), ToRegister(in), ToRegister(result));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitUnbox(LUnbox *unbox)
|
||||
{
|
||||
MUnbox *mir = unbox->mir();
|
||||
|
@ -111,8 +109,7 @@ CodeGeneratorX64::visitUnbox(LUnbox *unbox)
|
|||
default:
|
||||
MOZ_CRASH("Given MIRType cannot be unboxed.");
|
||||
}
|
||||
if (!bailoutIf(cond, unbox->snapshot()))
|
||||
return false;
|
||||
bailoutIf(cond, unbox->snapshot());
|
||||
}
|
||||
|
||||
Operand input = ToOperand(unbox->getOperand(LUnbox::Input));
|
||||
|
@ -136,11 +133,9 @@ CodeGeneratorX64::visitUnbox(LUnbox *unbox)
|
|||
default:
|
||||
MOZ_CRASH("Given MIRType cannot be unboxed.");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitCompareB(LCompareB *lir)
|
||||
{
|
||||
MCompare *mir = lir->mir();
|
||||
|
@ -160,10 +155,9 @@ CodeGeneratorX64::visitCompareB(LCompareB *lir)
|
|||
// Perform the comparison.
|
||||
masm.cmpq(lhs.valueReg(), ScratchReg);
|
||||
masm.emitSet(JSOpToCondition(mir->compareType(), mir->jsop()), output);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitCompareBAndBranch(LCompareBAndBranch *lir)
|
||||
{
|
||||
MCompare *mir = lir->cmpMir();
|
||||
|
@ -182,9 +176,9 @@ CodeGeneratorX64::visitCompareBAndBranch(LCompareBAndBranch *lir)
|
|||
// Perform the comparison.
|
||||
masm.cmpq(lhs.valueReg(), ScratchReg);
|
||||
emitBranch(JSOpToCondition(mir->compareType(), mir->jsop()), lir->ifTrue(), lir->ifFalse());
|
||||
return true;
|
||||
}
|
||||
bool
|
||||
|
||||
void
|
||||
CodeGeneratorX64::visitCompareV(LCompareV *lir)
|
||||
{
|
||||
MCompare *mir = lir->mir();
|
||||
|
@ -196,10 +190,9 @@ CodeGeneratorX64::visitCompareV(LCompareV *lir)
|
|||
|
||||
masm.cmpq(lhs.valueReg(), rhs.valueReg());
|
||||
masm.emitSet(JSOpToCondition(mir->compareType(), mir->jsop()), output);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitCompareVAndBranch(LCompareVAndBranch *lir)
|
||||
{
|
||||
MCompare *mir = lir->cmpMir();
|
||||
|
@ -212,36 +205,33 @@ CodeGeneratorX64::visitCompareVAndBranch(LCompareVAndBranch *lir)
|
|||
|
||||
masm.cmpq(lhs.valueReg(), rhs.valueReg());
|
||||
emitBranch(JSOpToCondition(mir->compareType(), mir->jsop()), lir->ifTrue(), lir->ifFalse());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble *lir)
|
||||
{
|
||||
masm.convertUInt32ToDouble(ToRegister(lir->input()), ToFloatRegister(lir->output()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir)
|
||||
{
|
||||
masm.convertUInt32ToFloat32(ToRegister(lir->input()), ToFloatRegister(lir->output()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins)
|
||||
{
|
||||
MOZ_CRASH("NYI");
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitAsmJSCall(LAsmJSCall *ins)
|
||||
{
|
||||
emitAsmJSCall(ins);
|
||||
|
@ -255,8 +245,6 @@ CodeGeneratorX64::visitAsmJSCall(LAsmJSCall *ins)
|
|||
masm.breakpoint();
|
||||
masm.bind(&ok);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -266,7 +254,7 @@ CodeGeneratorX64::memoryBarrier(MemoryBarrierBits barrier)
|
|||
masm.storeLoadFence();
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitAsmJSLoadHeap(LAsmJSLoadHeap *ins)
|
||||
{
|
||||
MAsmJSLoadHeap *mir = ins->mir();
|
||||
|
@ -288,8 +276,7 @@ CodeGeneratorX64::visitAsmJSLoadHeap(LAsmJSLoadHeap *ins)
|
|||
uint32_t maybeCmpOffset = AsmJSHeapAccess::NoLengthCheck;
|
||||
if (mir->needsBoundsCheck()) {
|
||||
ool = new(alloc()) OutOfLineLoadTypedArrayOutOfBounds(ToAnyRegister(out), vt);
|
||||
if (!addOutOfLineCode(ool, ins->mir()))
|
||||
return false;
|
||||
addOutOfLineCode(ool, ins->mir());
|
||||
|
||||
CodeOffsetLabel cmp = masm.cmplWithPatch(ToRegister(ptr), Imm32(0));
|
||||
masm.j(Assembler::AboveOrEqual, ool->entry());
|
||||
|
@ -315,10 +302,9 @@ CodeGeneratorX64::visitAsmJSLoadHeap(LAsmJSLoadHeap *ins)
|
|||
masm.bind(ool->rejoin());
|
||||
memoryBarrier(ins->mir()->barrierAfter());
|
||||
masm.append(AsmJSHeapAccess(before, after, vt, ToAnyRegister(out), maybeCmpOffset));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitAsmJSStoreHeap(LAsmJSStoreHeap *ins)
|
||||
{
|
||||
MAsmJSStoreHeap *mir = ins->mir();
|
||||
|
@ -378,10 +364,9 @@ CodeGeneratorX64::visitAsmJSStoreHeap(LAsmJSStoreHeap *ins)
|
|||
masm.bind(&rejoin);
|
||||
memoryBarrier(ins->mir()->barrierAfter());
|
||||
masm.append(AsmJSHeapAccess(before, after, vt, maybeCmpOffset));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap *ins)
|
||||
{
|
||||
MAsmJSCompareExchangeHeap *mir = ins->mir();
|
||||
|
@ -420,10 +405,9 @@ CodeGeneratorX64::visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap *ins)
|
|||
if (rejoin.used())
|
||||
masm.bind(&rejoin);
|
||||
masm.append(AsmJSHeapAccess(after, after, mir->viewType(), maybeCmpOffset));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap *ins)
|
||||
{
|
||||
MAsmJSAtomicBinopHeap *mir = ins->mir();
|
||||
|
@ -471,10 +455,9 @@ CodeGeneratorX64::visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap *ins)
|
|||
if (rejoin.used())
|
||||
masm.bind(&rejoin);
|
||||
masm.append(AsmJSHeapAccess(after, after, mir->viewType(), maybeCmpOffset));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins)
|
||||
{
|
||||
MAsmJSLoadGlobalVar *mir = ins->mir();
|
||||
|
@ -506,10 +489,9 @@ CodeGeneratorX64::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins)
|
|||
}
|
||||
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins)
|
||||
{
|
||||
MAsmJSStoreGlobalVar *mir = ins->mir();
|
||||
|
@ -541,10 +523,9 @@ CodeGeneratorX64::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins)
|
|||
}
|
||||
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins)
|
||||
{
|
||||
MAsmJSLoadFuncPtr *mir = ins->mir();
|
||||
|
@ -556,17 +537,15 @@ CodeGeneratorX64::visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins)
|
|||
CodeOffsetLabel label = masm.leaRipRelative(tmp);
|
||||
masm.loadPtr(Operand(tmp, index, TimesEight, 0), out);
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc *ins)
|
||||
{
|
||||
MAsmJSLoadFFIFunc *mir = ins->mir();
|
||||
|
||||
CodeOffsetLabel label = masm.loadRipRelativeInt64(ToRegister(ins->output()));
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -576,7 +555,7 @@ DispatchIonCache::initializeAddCacheState(LInstruction *ins, AddCacheState *addS
|
|||
addState->dispatchScratch = ScratchReg;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitTruncateDToInt32(LTruncateDToInt32 *ins)
|
||||
{
|
||||
FloatRegister input = ToFloatRegister(ins->input());
|
||||
|
@ -585,10 +564,10 @@ CodeGeneratorX64::visitTruncateDToInt32(LTruncateDToInt32 *ins)
|
|||
// On x64, branchTruncateDouble uses cvttsd2sq. Unlike the x86
|
||||
// implementation, this should handle most doubles and we can just
|
||||
// call a stub if it fails.
|
||||
return emitTruncateDouble(input, output, ins->mir());
|
||||
emitTruncateDouble(input, output, ins->mir());
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX64::visitTruncateFToInt32(LTruncateFToInt32 *ins)
|
||||
{
|
||||
FloatRegister input = ToFloatRegister(ins->input());
|
||||
|
@ -597,5 +576,5 @@ CodeGeneratorX64::visitTruncateFToInt32(LTruncateFToInt32 *ins)
|
|||
// On x64, branchTruncateFloat32 uses cvttss2sq. Unlike the x86
|
||||
// implementation, this should handle most floats and we can just
|
||||
// call a stub if it fails.
|
||||
return emitTruncateFloat32(input, output, ins->mir());
|
||||
emitTruncateFloat32(input, output, ins->mir());
|
||||
}
|
||||
|
|
|
@ -31,28 +31,28 @@ class CodeGeneratorX64 : public CodeGeneratorX86Shared
|
|||
CodeGeneratorX64(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm);
|
||||
|
||||
public:
|
||||
bool visitValue(LValue *value);
|
||||
bool visitBox(LBox *box);
|
||||
bool visitUnbox(LUnbox *unbox);
|
||||
bool visitCompareB(LCompareB *lir);
|
||||
bool visitCompareBAndBranch(LCompareBAndBranch *lir);
|
||||
bool visitCompareV(LCompareV *lir);
|
||||
bool visitCompareVAndBranch(LCompareVAndBranch *lir);
|
||||
bool visitTruncateDToInt32(LTruncateDToInt32 *ins);
|
||||
bool visitTruncateFToInt32(LTruncateFToInt32 *ins);
|
||||
bool visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins);
|
||||
bool visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins);
|
||||
bool visitAsmJSCall(LAsmJSCall *ins);
|
||||
bool visitAsmJSLoadHeap(LAsmJSLoadHeap *ins);
|
||||
bool visitAsmJSStoreHeap(LAsmJSStoreHeap *ins);
|
||||
bool visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap *ins);
|
||||
bool visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap *ins);
|
||||
bool visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins);
|
||||
bool visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins);
|
||||
bool visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins);
|
||||
bool visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc *ins);
|
||||
bool visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble *lir);
|
||||
bool visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir);
|
||||
void visitValue(LValue *value);
|
||||
void visitBox(LBox *box);
|
||||
void visitUnbox(LUnbox *unbox);
|
||||
void visitCompareB(LCompareB *lir);
|
||||
void visitCompareBAndBranch(LCompareBAndBranch *lir);
|
||||
void visitCompareV(LCompareV *lir);
|
||||
void visitCompareVAndBranch(LCompareVAndBranch *lir);
|
||||
void visitTruncateDToInt32(LTruncateDToInt32 *ins);
|
||||
void visitTruncateFToInt32(LTruncateFToInt32 *ins);
|
||||
void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins);
|
||||
void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins);
|
||||
void visitAsmJSCall(LAsmJSCall *ins);
|
||||
void visitAsmJSLoadHeap(LAsmJSLoadHeap *ins);
|
||||
void visitAsmJSStoreHeap(LAsmJSStoreHeap *ins);
|
||||
void visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap *ins);
|
||||
void visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap *ins);
|
||||
void visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins);
|
||||
void visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins);
|
||||
void visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins);
|
||||
void visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc *ins);
|
||||
void visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble *lir);
|
||||
void visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir);
|
||||
};
|
||||
|
||||
typedef CodeGeneratorX64 CodeGeneratorSpecific;
|
||||
|
|
|
@ -253,8 +253,7 @@ JitRuntime::generateEnterJIT(JSContext *cx, EnterJitType type)
|
|||
if (type == EnterJitBaseline) {
|
||||
// Baseline OSR will return here.
|
||||
masm.bind(returnLabel.src());
|
||||
if (!masm.addCodeLabel(returnLabel))
|
||||
return nullptr;
|
||||
masm.addCodeLabel(returnLabel);
|
||||
}
|
||||
|
||||
// Pop arguments and padding from stack.
|
||||
|
|
|
@ -84,15 +84,14 @@ CodeGeneratorX86::ToTempValue(LInstruction *ins, size_t pos)
|
|||
return ValueOperand(typeReg, payloadReg);
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitValue(LValue *value)
|
||||
{
|
||||
const ValueOperand out = ToOutValue(value);
|
||||
masm.moveValue(value->value(), out);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitBox(LBox *box)
|
||||
{
|
||||
const LDefinition *type = box->getDef(TYPE_INDEX);
|
||||
|
@ -104,10 +103,9 @@ CodeGeneratorX86::visitBox(LBox *box)
|
|||
// virtual register. All that needs to be written is the type tag for
|
||||
// the type definition.
|
||||
masm.mov(ImmWord(MIRTypeToTag(box->type())), ToRegister(type));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitBoxFloatingPoint(LBoxFloatingPoint *box)
|
||||
{
|
||||
const LAllocation *in = box->getOperand(0);
|
||||
|
@ -119,10 +117,9 @@ CodeGeneratorX86::visitBoxFloatingPoint(LBoxFloatingPoint *box)
|
|||
reg = ScratchFloat32Reg;
|
||||
}
|
||||
masm.boxDouble(reg, out);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitUnbox(LUnbox *unbox)
|
||||
{
|
||||
// Note that for unbox, the type and payload indexes are switched on the
|
||||
|
@ -131,13 +128,11 @@ CodeGeneratorX86::visitUnbox(LUnbox *unbox)
|
|||
|
||||
if (mir->fallible()) {
|
||||
masm.cmpl(ToOperand(unbox->type()), Imm32(MIRTypeToTag(mir->type())));
|
||||
if (!bailoutIf(Assembler::NotEqual, unbox->snapshot()))
|
||||
return false;
|
||||
bailoutIf(Assembler::NotEqual, unbox->snapshot());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitCompareB(LCompareB *lir)
|
||||
{
|
||||
MCompare *mir = lir->mir();
|
||||
|
@ -164,10 +159,9 @@ CodeGeneratorX86::visitCompareB(LCompareB *lir)
|
|||
}
|
||||
|
||||
masm.bind(&done);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitCompareBAndBranch(LCompareBAndBranch *lir)
|
||||
{
|
||||
MCompare *mir = lir->cmpMir();
|
||||
|
@ -184,10 +178,9 @@ CodeGeneratorX86::visitCompareBAndBranch(LCompareBAndBranch *lir)
|
|||
else
|
||||
masm.cmp32(lhs.payloadReg(), ToRegister(rhs));
|
||||
emitBranch(JSOpToCondition(mir->compareType(), mir->jsop()), lir->ifTrue(), lir->ifFalse());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitCompareV(LCompareV *lir)
|
||||
{
|
||||
MCompare *mir = lir->mir();
|
||||
|
@ -212,10 +205,9 @@ CodeGeneratorX86::visitCompareV(LCompareV *lir)
|
|||
}
|
||||
|
||||
masm.bind(&done);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitCompareVAndBranch(LCompareVAndBranch *lir)
|
||||
{
|
||||
MCompare *mir = lir->cmpMir();
|
||||
|
@ -232,11 +224,9 @@ CodeGeneratorX86::visitCompareVAndBranch(LCompareVAndBranch *lir)
|
|||
jumpToBlock(notEqual, Assembler::NotEqual);
|
||||
masm.cmp32(lhs.payloadReg(), rhs.payloadReg());
|
||||
emitBranch(cond, lir->ifTrue(), lir->ifFalse());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble *lir)
|
||||
{
|
||||
Register input = ToRegister(lir->input());
|
||||
|
@ -247,10 +237,9 @@ CodeGeneratorX86::visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble *lir)
|
|||
|
||||
// Beware: convertUInt32ToDouble clobbers input.
|
||||
masm.convertUInt32ToDouble(temp, ToFloatRegister(lir->output()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir)
|
||||
{
|
||||
Register input = ToRegister(lir->input());
|
||||
|
@ -262,7 +251,6 @@ CodeGeneratorX86::visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir)
|
|||
|
||||
// Beware: convertUInt32ToFloat32 clobbers input.
|
||||
masm.convertUInt32ToFloat32(temp, output);
|
||||
return true;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
@ -286,7 +274,7 @@ CodeGeneratorX86::loadViewTypeElement(AsmJSHeapAccess::ViewType vt, const T &src
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::loadAndNoteViewTypeElement(AsmJSHeapAccess::ViewType vt, const T &srcAddr,
|
||||
const LDefinition *out)
|
||||
{
|
||||
|
@ -294,10 +282,9 @@ CodeGeneratorX86::loadAndNoteViewTypeElement(AsmJSHeapAccess::ViewType vt, const
|
|||
loadViewTypeElement(vt, srcAddr, out);
|
||||
uint32_t after = masm.size();
|
||||
masm.append(AsmJSHeapAccess(before, after, vt, ToAnyRegister(out)));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins)
|
||||
{
|
||||
const MLoadTypedArrayElementStatic *mir = ins->mir();
|
||||
|
@ -310,15 +297,14 @@ CodeGeneratorX86::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic
|
|||
OutOfLineLoadTypedArrayOutOfBounds *ool = nullptr;
|
||||
if (!mir->fallible()) {
|
||||
ool = new(alloc()) OutOfLineLoadTypedArrayOutOfBounds(ToAnyRegister(out), vt);
|
||||
if (!addOutOfLineCode(ool, ins->mir()))
|
||||
return false;
|
||||
addOutOfLineCode(ool, ins->mir());
|
||||
}
|
||||
|
||||
masm.cmpl(ptr, Imm32(mir->length()));
|
||||
if (ool)
|
||||
masm.j(Assembler::AboveOrEqual, ool->entry());
|
||||
else if (!bailoutIf(Assembler::AboveOrEqual, ins->snapshot()))
|
||||
return false;
|
||||
else
|
||||
bailoutIf(Assembler::AboveOrEqual, ins->snapshot());
|
||||
|
||||
Address srcAddr(ptr, (int32_t) mir->base());
|
||||
loadViewTypeElement(vt, srcAddr, out);
|
||||
|
@ -328,10 +314,9 @@ CodeGeneratorX86::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic
|
|||
masm.canonicalizeFloat(ToFloatRegister(out));
|
||||
if (ool)
|
||||
masm.bind(ool->rejoin());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitAsmJSCall(LAsmJSCall *ins)
|
||||
{
|
||||
MAsmJSCall *mir = ins->mir();
|
||||
|
@ -354,8 +339,6 @@ CodeGeneratorX86::visitAsmJSCall(LAsmJSCall *ins)
|
|||
masm.freeStack(sizeof(double));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -365,7 +348,7 @@ CodeGeneratorX86::memoryBarrier(MemoryBarrierBits barrier)
|
|||
masm.storeLoadFence();
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitAsmJSLoadHeap(LAsmJSLoadHeap *ins)
|
||||
{
|
||||
const MAsmJSLoadHeap *mir = ins->mir();
|
||||
|
@ -383,7 +366,7 @@ CodeGeneratorX86::visitAsmJSLoadHeap(LAsmJSLoadHeap *ins)
|
|||
PatchedAbsoluteAddress srcAddr((void *) ptr->toConstant()->toInt32());
|
||||
loadAndNoteViewTypeElement(vt, srcAddr, out);
|
||||
memoryBarrier(ins->mir()->barrierAfter());
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
Register ptrReg = ToRegister(ptr);
|
||||
|
@ -392,12 +375,11 @@ CodeGeneratorX86::visitAsmJSLoadHeap(LAsmJSLoadHeap *ins)
|
|||
if (!mir->needsBoundsCheck()) {
|
||||
loadAndNoteViewTypeElement(vt, srcAddr, out);
|
||||
memoryBarrier(ins->mir()->barrierAfter());
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
OutOfLineLoadTypedArrayOutOfBounds *ool = new(alloc()) OutOfLineLoadTypedArrayOutOfBounds(ToAnyRegister(out), vt);
|
||||
if (!addOutOfLineCode(ool, mir))
|
||||
return false;
|
||||
addOutOfLineCode(ool, mir);
|
||||
|
||||
CodeOffsetLabel cmp = masm.cmplWithPatch(ptrReg, Imm32(0));
|
||||
masm.j(Assembler::AboveOrEqual, ool->entry());
|
||||
|
@ -408,7 +390,6 @@ CodeGeneratorX86::visitAsmJSLoadHeap(LAsmJSLoadHeap *ins)
|
|||
masm.bind(ool->rejoin());
|
||||
memoryBarrier(ins->mir()->barrierAfter());
|
||||
masm.append(AsmJSHeapAccess(before, after, vt, ToAnyRegister(out), cmp.offset()));
|
||||
return true;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
@ -442,7 +423,7 @@ CodeGeneratorX86::storeAndNoteViewTypeElement(AsmJSHeapAccess::ViewType vt,
|
|||
masm.append(AsmJSHeapAccess(before, after, vt));
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins)
|
||||
{
|
||||
MStoreTypedArrayElementStatic *mir = ins->mir();
|
||||
|
@ -458,10 +439,9 @@ CodeGeneratorX86::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStati
|
|||
Address dstAddr(ptr, (int32_t) mir->base());
|
||||
storeViewTypeElement(vt, value, dstAddr);
|
||||
masm.bind(&rejoin);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitAsmJSStoreHeap(LAsmJSStoreHeap *ins)
|
||||
{
|
||||
MAsmJSStoreHeap *mir = ins->mir();
|
||||
|
@ -479,7 +459,7 @@ CodeGeneratorX86::visitAsmJSStoreHeap(LAsmJSStoreHeap *ins)
|
|||
PatchedAbsoluteAddress dstAddr((void *) ptr->toConstant()->toInt32());
|
||||
storeAndNoteViewTypeElement(vt, value, dstAddr);
|
||||
memoryBarrier(ins->mir()->barrierAfter());
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
Register ptrReg = ToRegister(ptr);
|
||||
|
@ -488,7 +468,7 @@ CodeGeneratorX86::visitAsmJSStoreHeap(LAsmJSStoreHeap *ins)
|
|||
if (!mir->needsBoundsCheck()) {
|
||||
storeAndNoteViewTypeElement(vt, value, dstAddr);
|
||||
memoryBarrier(ins->mir()->barrierAfter());
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
CodeOffsetLabel cmp = masm.cmplWithPatch(ptrReg, Imm32(0));
|
||||
|
@ -501,10 +481,9 @@ CodeGeneratorX86::visitAsmJSStoreHeap(LAsmJSStoreHeap *ins)
|
|||
masm.bind(&rejoin);
|
||||
memoryBarrier(ins->mir()->barrierAfter());
|
||||
masm.append(AsmJSHeapAccess(before, after, vt, cmp.offset()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap *ins)
|
||||
{
|
||||
MAsmJSCompareExchangeHeap *mir = ins->mir();
|
||||
|
@ -550,11 +529,9 @@ CodeGeneratorX86::visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap *ins)
|
|||
ToAnyRegister(ins->output()));
|
||||
if (rejoin.used())
|
||||
masm.bind(&rejoin);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap *ins)
|
||||
{
|
||||
MAsmJSAtomicBinopHeap *mir = ins->mir();
|
||||
|
@ -610,11 +587,9 @@ CodeGeneratorX86::visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap *ins)
|
|||
}
|
||||
if (rejoin.used())
|
||||
masm.bind(&rejoin);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins)
|
||||
{
|
||||
MAsmJSLoadGlobalVar *mir = ins->mir();
|
||||
|
@ -644,10 +619,9 @@ CodeGeneratorX86::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins)
|
|||
MOZ_CRASH("unexpected type in visitAsmJSLoadGlobalVar");
|
||||
}
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins)
|
||||
{
|
||||
MAsmJSStoreGlobalVar *mir = ins->mir();
|
||||
|
@ -678,10 +652,9 @@ CodeGeneratorX86::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins)
|
|||
MOZ_CRASH("unexpected type in visitAsmJSStoreGlobalVar");
|
||||
}
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins)
|
||||
{
|
||||
MAsmJSLoadFuncPtr *mir = ins->mir();
|
||||
|
@ -690,10 +663,9 @@ CodeGeneratorX86::visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins)
|
|||
Register out = ToRegister(ins->output());
|
||||
CodeOffsetLabel label = masm.movlWithPatch(PatchedAbsoluteAddress(), index, TimesFour, out);
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc *ins)
|
||||
{
|
||||
MAsmJSLoadFFIFunc *mir = ins->mir();
|
||||
|
@ -701,7 +673,6 @@ CodeGeneratorX86::visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc *ins)
|
|||
Register out = ToRegister(ins->output());
|
||||
CodeOffsetLabel label = masm.movlWithPatch(PatchedAbsoluteAddress(), out);
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -771,8 +742,8 @@ class OutOfLineTruncate : public OutOfLineCodeBase<CodeGeneratorX86>
|
|||
: ins_(ins)
|
||||
{ }
|
||||
|
||||
bool accept(CodeGeneratorX86 *codegen) {
|
||||
return codegen->visitOutOfLineTruncate(this);
|
||||
void accept(CodeGeneratorX86 *codegen) {
|
||||
codegen->visitOutOfLineTruncate(this);
|
||||
}
|
||||
LTruncateDToInt32 *ins() const {
|
||||
return ins_;
|
||||
|
@ -788,8 +759,8 @@ class OutOfLineTruncateFloat32 : public OutOfLineCodeBase<CodeGeneratorX86>
|
|||
: ins_(ins)
|
||||
{ }
|
||||
|
||||
bool accept(CodeGeneratorX86 *codegen) {
|
||||
return codegen->visitOutOfLineTruncateFloat32(this);
|
||||
void accept(CodeGeneratorX86 *codegen) {
|
||||
codegen->visitOutOfLineTruncateFloat32(this);
|
||||
}
|
||||
LTruncateFToInt32 *ins() const {
|
||||
return ins_;
|
||||
|
@ -799,37 +770,33 @@ class OutOfLineTruncateFloat32 : public OutOfLineCodeBase<CodeGeneratorX86>
|
|||
} // namespace jit
|
||||
} // namespace js
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitTruncateDToInt32(LTruncateDToInt32 *ins)
|
||||
{
|
||||
FloatRegister input = ToFloatRegister(ins->input());
|
||||
Register output = ToRegister(ins->output());
|
||||
|
||||
OutOfLineTruncate *ool = new(alloc()) OutOfLineTruncate(ins);
|
||||
if (!addOutOfLineCode(ool, ins->mir()))
|
||||
return false;
|
||||
addOutOfLineCode(ool, ins->mir());
|
||||
|
||||
masm.branchTruncateDouble(input, output, ool->entry());
|
||||
masm.bind(ool->rejoin());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitTruncateFToInt32(LTruncateFToInt32 *ins)
|
||||
{
|
||||
FloatRegister input = ToFloatRegister(ins->input());
|
||||
Register output = ToRegister(ins->output());
|
||||
|
||||
OutOfLineTruncateFloat32 *ool = new(alloc()) OutOfLineTruncateFloat32(ins);
|
||||
if (!addOutOfLineCode(ool, ins->mir()))
|
||||
return false;
|
||||
addOutOfLineCode(ool, ins->mir());
|
||||
|
||||
masm.branchTruncateFloat32(input, output, ool->entry());
|
||||
masm.bind(ool->rejoin());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitOutOfLineTruncate(OutOfLineTruncate *ool)
|
||||
{
|
||||
LTruncateDToInt32 *ins = ool->ins();
|
||||
|
@ -915,10 +882,9 @@ CodeGeneratorX86::visitOutOfLineTruncate(OutOfLineTruncate *ool)
|
|||
}
|
||||
|
||||
masm.jump(ool->rejoin());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
CodeGeneratorX86::visitOutOfLineTruncateFloat32(OutOfLineTruncateFloat32 *ool)
|
||||
{
|
||||
LTruncateFToInt32 *ins = ool->ins();
|
||||
|
@ -1010,5 +976,4 @@ CodeGeneratorX86::visitOutOfLineTruncateFloat32(OutOfLineTruncateFloat32 *ool)
|
|||
}
|
||||
|
||||
masm.jump(ool->rejoin());
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ class CodeGeneratorX86 : public CodeGeneratorX86Shared
|
|||
ValueOperand ToTempValue(LInstruction *ins, size_t pos);
|
||||
|
||||
template<typename T>
|
||||
bool loadAndNoteViewTypeElement(AsmJSHeapAccess::ViewType vt, const T &srcAddr,
|
||||
void loadAndNoteViewTypeElement(AsmJSHeapAccess::ViewType vt, const T &srcAddr,
|
||||
const LDefinition *out);
|
||||
template<typename T>
|
||||
void loadViewTypeElement(AsmJSHeapAccess::ViewType vt, const T &srcAddr,
|
||||
|
@ -47,32 +47,32 @@ class CodeGeneratorX86 : public CodeGeneratorX86Shared
|
|||
CodeGeneratorX86(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm);
|
||||
|
||||
public:
|
||||
bool visitBox(LBox *box);
|
||||
bool visitBoxFloatingPoint(LBoxFloatingPoint *box);
|
||||
bool visitUnbox(LUnbox *unbox);
|
||||
bool visitValue(LValue *value);
|
||||
bool visitCompareB(LCompareB *lir);
|
||||
bool visitCompareBAndBranch(LCompareBAndBranch *lir);
|
||||
bool visitCompareV(LCompareV *lir);
|
||||
bool visitCompareVAndBranch(LCompareVAndBranch *lir);
|
||||
bool visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble *lir);
|
||||
bool visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir);
|
||||
bool visitTruncateDToInt32(LTruncateDToInt32 *ins);
|
||||
bool visitTruncateFToInt32(LTruncateFToInt32 *ins);
|
||||
bool visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins);
|
||||
bool visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins);
|
||||
bool visitAsmJSCall(LAsmJSCall *ins);
|
||||
bool visitAsmJSLoadHeap(LAsmJSLoadHeap *ins);
|
||||
bool visitAsmJSStoreHeap(LAsmJSStoreHeap *ins);
|
||||
bool visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap *ins);
|
||||
bool visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap *ins);
|
||||
bool visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins);
|
||||
bool visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins);
|
||||
bool visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins);
|
||||
bool visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc *ins);
|
||||
void visitBox(LBox *box);
|
||||
void visitBoxFloatingPoint(LBoxFloatingPoint *box);
|
||||
void visitUnbox(LUnbox *unbox);
|
||||
void visitValue(LValue *value);
|
||||
void visitCompareB(LCompareB *lir);
|
||||
void visitCompareBAndBranch(LCompareBAndBranch *lir);
|
||||
void visitCompareV(LCompareV *lir);
|
||||
void visitCompareVAndBranch(LCompareVAndBranch *lir);
|
||||
void visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble *lir);
|
||||
void visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir);
|
||||
void visitTruncateDToInt32(LTruncateDToInt32 *ins);
|
||||
void visitTruncateFToInt32(LTruncateFToInt32 *ins);
|
||||
void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins);
|
||||
void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins);
|
||||
void visitAsmJSCall(LAsmJSCall *ins);
|
||||
void visitAsmJSLoadHeap(LAsmJSLoadHeap *ins);
|
||||
void visitAsmJSStoreHeap(LAsmJSStoreHeap *ins);
|
||||
void visitAsmJSCompareExchangeHeap(LAsmJSCompareExchangeHeap *ins);
|
||||
void visitAsmJSAtomicBinopHeap(LAsmJSAtomicBinopHeap *ins);
|
||||
void visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins);
|
||||
void visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins);
|
||||
void visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins);
|
||||
void visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc *ins);
|
||||
|
||||
bool visitOutOfLineTruncate(OutOfLineTruncate *ool);
|
||||
bool visitOutOfLineTruncateFloat32(OutOfLineTruncateFloat32 *ool);
|
||||
void visitOutOfLineTruncate(OutOfLineTruncate *ool);
|
||||
void visitOutOfLineTruncateFloat32(OutOfLineTruncateFloat32 *ool);
|
||||
};
|
||||
|
||||
typedef CodeGeneratorX86 CodeGeneratorSpecific;
|
||||
|
|
|
@ -170,7 +170,7 @@ MacroAssemblerX86::finish()
|
|||
for (size_t i = 0; i < doubles_.length(); i++) {
|
||||
CodeLabel cl(doubles_[i].uses);
|
||||
writeDoubleConstant(doubles_[i].value, cl.src());
|
||||
enoughMemory_ &= addCodeLabel(cl);
|
||||
addCodeLabel(cl);
|
||||
if (!enoughMemory_)
|
||||
return;
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ MacroAssemblerX86::finish()
|
|||
for (size_t i = 0; i < floats_.length(); i++) {
|
||||
CodeLabel cl(floats_[i].uses);
|
||||
writeFloatConstant(floats_[i].value, cl.src());
|
||||
enoughMemory_ &= addCodeLabel(cl);
|
||||
addCodeLabel(cl);
|
||||
if (!enoughMemory_)
|
||||
return;
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ MacroAssemblerX86::finish()
|
|||
case SimdConstant::Float32x4: writeFloat32x4Constant(v.value, cl.src()); break;
|
||||
default: MOZ_CRASH("unexpected SimdConstant type");
|
||||
}
|
||||
enoughMemory_ &= addCodeLabel(cl);
|
||||
addCodeLabel(cl);
|
||||
if (!enoughMemory_)
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -249,8 +249,7 @@ JitRuntime::generateEnterJIT(JSContext *cx, EnterJitType type)
|
|||
if (type == EnterJitBaseline) {
|
||||
// Baseline OSR will return here.
|
||||
masm.bind(returnLabel.src());
|
||||
if (!masm.addCodeLabel(returnLabel))
|
||||
return nullptr;
|
||||
masm.addCodeLabel(returnLabel);
|
||||
}
|
||||
|
||||
// Pop arguments off the stack.
|
||||
|
|
Загрузка…
Ссылка в новой задаче