• Home
  • Raw
  • Download

Lines Matching refs:builder_

29     builder_.Bind(&SuccessLabel);                                 \
31 successControl.SetState(builder_.GetState()); \
32 successControl.SetDepend(builder_.GetDepend()); \
34 builder_.Bind(&FailLabel); \
36 failControl.SetState(builder_.GetState()); \
37 failControl.SetDepend(builder_.GetDepend()); \
53 Environment env(gate, circuit_, &builder_); in CallRuntimeLowering()
97 GateRef envOffset = builder_.IntPtr(JSFunction::LEXICAL_ENV_OFFSET); in LowerGetEnv()
98 GateRef env = builder_.Load(VariableType::JS_ANY(), jsFunc, envOffset, acc_.GetDependRoot()); in LowerGetEnv()
119 Label exit(&builder_); in LowerToJSCall()
120 DEFVAlUE(res, (&builder_), VariableType::JS_ANY(), builder_.Undefined()); in LowerToJSCall()
124 builder_.Bind(&exit); in LowerToJSCall()
125 GateRef stateInGate = builder_.GetState(); in LowerToJSCall()
126 GateRef depend = builder_.GetDepend(); in LowerToJSCall()
133 auto condition = builder_.HasPendingException(glue_); in ReplaceHirWithPendingException()
134 GateRef ifBranch = builder_.Branch(state, condition); in ReplaceHirWithPendingException()
135 GateRef ifTrue = builder_.IfTrue(ifBranch); in ReplaceHirWithPendingException()
136 GateRef ifFalse = builder_.IfFalse(ifBranch); in ReplaceHirWithPendingException()
137 GateRef eDepend = builder_.DependRelay(ifTrue, depend); in ReplaceHirWithPendingException()
138 GateRef sDepend = builder_.DependRelay(ifFalse, depend); in ReplaceHirWithPendingException()
161 GateRef state = builder_.GetState(); in ReplaceHirWithValue()
163 GateRef depend = builder_.GetDepend(); in ReplaceHirWithValue()
165 GateRef exceptionVal = builder_.ExceptionConstant(); in ReplaceHirWithValue()
167 GateRef equal = builder_.Equal(value, exceptionVal); in ReplaceHirWithValue()
168 auto ifBranch = builder_.Branch(state, equal); in ReplaceHirWithValue()
170 GateRef ifTrue = builder_.IfTrue(ifBranch); in ReplaceHirWithValue()
171 GateRef ifFalse = builder_.IfFalse(ifBranch); in ReplaceHirWithValue()
172 GateRef eDepend = builder_.DependRelay(ifTrue, depend); in ReplaceHirWithValue()
173 GateRef sDepend = builder_.DependRelay(ifFalse, depend); in ReplaceHirWithValue()
178 acc_.ReplaceHirDirectly(hirGate, builder_.GetStateDepend(), value); in ReplaceHirWithValue()
190 acc_.ReplaceHirDirectly(hirGate, builder_.GetStateDepend(), value); in ReplaceHirToThrowCall()
197 Environment env(gate, circuit_, &builder_); in Lower()
709 GateRef slotId = builder_.ZExtInt16ToInt32(acc_.GetValueIn(gate, 0)); in LowerCallStubWithIC()
713 GateRef result = builder_.CallStub(glue_, gate, sign, inputs); in LowerCallStubWithIC()
721 …GateRef result = builder_.CallRuntime(glue_, index, Gate::InvalidGateRef, args, gate, name.c_str()… in LowerCallRuntime()
725 GateRef target = builder_.IntPtr(index); in LowerCallRuntime()
726 … GateRef result = builder_.Call(cs, glue_, target, builder_.GetDepend(), args, gate, name.c_str()); in LowerCallRuntime()
735 …GateRef result = builder_.CallNGCRuntime(glue_, index, Gate::InvalidGateRef, args, gate, name.c_st… in LowerCallNGCRuntime()
739 GateRef target = builder_.IntPtr(index); in LowerCallNGCRuntime()
740 … GateRef result = builder_.Call(cs, glue_, target, builder_.GetDepend(), args, gate, name.c_str()); in LowerCallNGCRuntime()
749 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Add, in LowerAdd2()
772 builder_.SetDepend(acc_.GetDep(saveRegister)); in SaveFrameToContext()
774builder_.Load(VariableType::JS_POINTER(), genObj, builder_.IntPtr(JSGeneratorObject::GENERATOR_CON… in SaveFrameToContext()
778 GateRef length = builder_.Int32(arrLength); in SaveFrameToContext()
779 GateRef taggedLength = builder_.ToTaggedInt(builder_.ZExtInt32ToInt64(length)); in SaveFrameToContext()
783 auto hole = builder_.HoleConstant(); in SaveFrameToContext()
788builder_.SetValueToTaggedArray(VariableType::JS_ANY(), glue_, taggedArray, builder_.Int32(idx), tm… in SaveFrameToContext()
795 GateRef regsArrayOffset = builder_.IntPtr(GeneratorContext::GENERATOR_REGS_ARRAY_OFFSET); in SaveFrameToContext()
796 builder_.Store(VariableType::JS_POINTER(), glue_, context, regsArrayOffset, taggedArray); in SaveFrameToContext()
799 GateRef thisOffset = builder_.IntPtr(GeneratorContext::GENERATOR_THIS_OFFSET); in SaveFrameToContext()
801 builder_.Store(VariableType::JS_ANY(), glue_, context, thisOffset, thisObj); in SaveFrameToContext()
804 GateRef methodOffset = builder_.IntPtr(GeneratorContext::GENERATOR_METHOD_OFFSET); in SaveFrameToContext()
806 builder_.Store(VariableType::JS_ANY(), glue_, context, methodOffset, jsFunc); in SaveFrameToContext()
809 GateRef accOffset = builder_.IntPtr(GeneratorContext::GENERATOR_ACC_OFFSET); in SaveFrameToContext()
811 builder_.Store(VariableType::JS_ANY(), glue_, context, accOffset, curAccGate); in SaveFrameToContext()
814 …GateRef generatorObjectOffset = builder_.IntPtr(GeneratorContext::GENERATOR_GENERATOR_OBJECT_OFFSE… in SaveFrameToContext()
815 builder_.Store(VariableType::JS_ANY(), glue_, context, generatorObjectOffset, genObj); in SaveFrameToContext()
818 GateRef lexicalEnvOffset = builder_.IntPtr(GeneratorContext::GENERATOR_LEXICALENV_OFFSET); in SaveFrameToContext()
819 builder_.Store(VariableType::JS_ANY(), glue_, context, lexicalEnvOffset, lexicalEnvGate); in SaveFrameToContext()
822 GateRef nregsOffset = builder_.IntPtr(GeneratorContext::GENERATOR_NREGS_OFFSET); in SaveFrameToContext()
823 builder_.Store(VariableType::INT32(), glue_, context, nregsOffset, length); in SaveFrameToContext()
826 GateRef bcSizeOffset = builder_.IntPtr(GeneratorContext::GENERATOR_BC_OFFSET_OFFSET); in SaveFrameToContext()
828 bcSizeGate = builder_.TruncInt64ToInt32(bcSizeGate); in SaveFrameToContext()
829 builder_.Store(VariableType::INT32(), glue_, context, bcSizeOffset, bcSizeGate); in SaveFrameToContext()
832 GateRef contextOffset = builder_.IntPtr(JSGeneratorObject::GENERATOR_CONTEXT_OFFSET); in SaveFrameToContext()
833 builder_.Store(VariableType::JS_POINTER(), glue_, genObj, contextOffset, context); in SaveFrameToContext()
836 builder_.Store(VariableType::JS_POINTER(), glue_, context, generatorObjectOffset, genObj); in SaveFrameToContext()
842 acc_.SetDep(gate, builder_.GetDepend()); in LowerSuspendGenerator()
865 GateRef taggedTrue = builder_.TaggedTrue(); in LowerAsyncFunctionResolve()
875 GateRef taggedFalse = builder_.TaggedFalse(); in LowerAsyncFunctionReject()
914 GateRef actualArgc = builder_.Int64(BytecodeCallArgc::ComputeCallArgc(acc_.GetNumValueIn(gate), in LowerCallArg0()
916 GateRef newTarget = builder_.Undefined(); in LowerCallArg0()
917 GateRef thisObj = builder_.Undefined(); in LowerCallArg0()
928 GateRef actualArgc = builder_.Int64(BytecodeCallArgc::ComputeCallArgc(acc_.GetNumValueIn(gate), in LowerCallthisrangeImm8Imm8V8()
933 GateRef newTarget = builder_.Undefined(); in LowerCallthisrangeImm8Imm8V8()
953 GateRef actualArgc = builder_.Int64(BytecodeCallArgc::ComputeCallArgc(acc_.GetNumValueIn(gate), in LowerWideCallthisrangePrefImm16V8()
958 GateRef newTarget = builder_.Undefined(); in LowerWideCallthisrangePrefImm16V8()
978 GateRef stateInGate = builder_.GetState(); in LowerCallSpread()
987 GateRef actualArgc = builder_.Int64(BytecodeCallArgc::ComputeCallArgc(acc_.GetNumValueIn(gate), in LowerCallrangeImm8Imm8V8()
991 GateRef newTarget = builder_.Undefined(); in LowerCallrangeImm8Imm8V8()
992 GateRef thisObj = builder_.Undefined(); in LowerCallrangeImm8Imm8V8()
1017 GateRef exceptionOffset = builder_.Int64(JSThread::GlueData::GetExceptionOffset(false)); in LowerThrow()
1018 builder_.Store(VariableType::INT64(), glue_, glue_, exceptionOffset, exception); in LowerThrow()
1020 GateRef result = builder_.GetDepend(); in LowerThrow()
1052 Label successExit(&builder_); in LowerThrowIfNotObject()
1053 Label exceptionExit(&builder_); in LowerThrowIfNotObject()
1054 Label isEcmaObject(&builder_); in LowerThrowIfNotObject()
1055 Label notEcmaObject(&builder_); in LowerThrowIfNotObject()
1056 Label isHeapObject(&builder_); in LowerThrowIfNotObject()
1057 builder_.Branch(builder_.TaggedIsHeapObject(value), &isHeapObject, &notEcmaObject); in LowerThrowIfNotObject()
1058 builder_.Bind(&isHeapObject); in LowerThrowIfNotObject()
1059 builder_.Branch(builder_.TaggedObjectIsEcmaObject(value), &isEcmaObject, &notEcmaObject); in LowerThrowIfNotObject()
1060 builder_.Bind(&isEcmaObject); in LowerThrowIfNotObject()
1062 builder_.Jump(&successExit); in LowerThrowIfNotObject()
1064 builder_.Bind(&notEcmaObject); in LowerThrowIfNotObject()
1067 builder_.Jump(&exceptionExit); in LowerThrowIfNotObject()
1079 Label successExit(&builder_); in LowerThrowUndefinedIfHole()
1080 Label exceptionExit(&builder_); in LowerThrowUndefinedIfHole()
1081 Label isHole(&builder_); in LowerThrowUndefinedIfHole()
1082 Label notHole(&builder_); in LowerThrowUndefinedIfHole()
1083 builder_.Branch(builder_.TaggedIsHole(hole), &isHole, &notHole); in LowerThrowUndefinedIfHole()
1084 builder_.Bind(&notHole); in LowerThrowUndefinedIfHole()
1086 builder_.Jump(&successExit); in LowerThrowUndefinedIfHole()
1088 builder_.Bind(&isHole); in LowerThrowUndefinedIfHole()
1091 builder_.Jump(&exceptionExit); in LowerThrowUndefinedIfHole()
1103 Label successExit(&builder_); in LowerThrowUndefinedIfHoleWithName()
1104 Label exceptionExit(&builder_); in LowerThrowUndefinedIfHoleWithName()
1105 Label isHole(&builder_); in LowerThrowUndefinedIfHoleWithName()
1106 Label notHole(&builder_); in LowerThrowUndefinedIfHoleWithName()
1107 builder_.Branch(builder_.TaggedIsHole(hole), &isHole, &notHole); in LowerThrowUndefinedIfHoleWithName()
1108 builder_.Bind(&notHole); in LowerThrowUndefinedIfHoleWithName()
1110 builder_.Jump(&successExit); in LowerThrowUndefinedIfHoleWithName()
1112 builder_.Bind(&isHole); in LowerThrowUndefinedIfHoleWithName()
1114 GateRef obj = builder_.GetObjectFromConstPool(glue_, gate, jsFunc, in LowerThrowUndefinedIfHoleWithName()
1115builder_.ZExtInt16ToInt32(acc_.GetValueIn(gate, 0)), in LowerThrowUndefinedIfHoleWithName()
1118 builder_.Jump(&exceptionExit); in LowerThrowUndefinedIfHoleWithName()
1129 {builder_.ToTaggedInt(acc_.GetValueIn(gate, 0)), acc_.GetValueIn(gate, 1)}, true); in LowerThrowIfSuperNotCorrectCall()
1143 GateRef exceptionOffset = builder_.Int64(JSThread::GlueData::GetExceptionOffset(false)); in LowerExceptionHandler()
1144 GateRef val = builder_.Int64Add(glue_, exceptionOffset); in LowerExceptionHandler()
1148 GateRef holeCst = builder_.HoleConstant(); in LowerExceptionHandler()
1171 GateRef offset = builder_.Int64(JSThread::GlueData::GetGlobalObjOffset(false)); in LowerLdGlobal()
1172 GateRef val = builder_.Int64Add(glue_, offset); in LowerLdGlobal()
1174 { builder_.GetDepend(), val }, VariableType::JS_ANY().GetGateType()); in LowerLdGlobal()
1182 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Sub, in LowerSub2()
1191 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Mul, in LowerMul2()
1200 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Div, in LowerDiv2()
1209 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Mod, in LowerMod2()
1218 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Equal, in LowerEq()
1227 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::NotEqual, in LowerNotEq()
1236 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Less, in LowerLess()
1245 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::LessEq, in LowerLessEq()
1254 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Greater, in LowerGreater()
1263 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::GreaterEq, in LowerGreaterEq()
1290 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Inc, in LowerInc()
1299 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Dec, in LowerDec()
1308 Label notNumber(&builder_); in LowerToNumber()
1309 Label checkResult(&builder_); in LowerToNumber()
1311 DEFVAlUE(result, (&builder_), VariableType::JS_ANY(), value); in LowerToNumber()
1312 builder_.Branch(builder_.TaggedIsNumber(value), &checkResult, &notNumber); in LowerToNumber()
1313 builder_.Bind(&notNumber); in LowerToNumber()
1316 builder_.Jump(&checkResult); in LowerToNumber()
1318 builder_.Bind(&checkResult); in LowerToNumber()
1326 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Neg, in LowerNeg()
1335 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Not, in LowerNot()
1344 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Shl, in LowerShl2()
1353 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Shr, in LowerShr2()
1362 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Ashr, in LowerAshr2()
1371 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::And, in LowerAnd2()
1380 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Or, in LowerOr2()
1389 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::Xor, in LowerXor2()
1436 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::StrictNotEqual, in LowerFastStrictNotEqual()
1445 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::StrictEqual, in LowerFastStrictEqual()
1452 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::CreateEmptyArray, { glue_ }); in LowerCreateEmptyArray()
1465 GateRef index = builder_.TruncInt64ToInt32(acc_.GetValueIn(gate, 0)); in LowerCreateArrayWithBuffer()
1466 …GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::CreateArrayWithBuffer, { glue_, … in LowerCreateArrayWithBuffer()
1476 …GateRef obj = builder_.GetObjectFromConstPool(glue_, gate, jsFunc, builder_.TruncInt64ToInt32(inde… in LowerCreateObjectWithBuffer()
1488 GateRef index = builder_.ToTaggedInt(acc_.GetValueIn(gate, 0)); in LowerStModuleVar()
1499 GateRef index = builder_.ToTaggedInt(acc_.GetValueIn(gate, 0)); in LowerSetGeneratorState()
1532 GateRef numberBigInt = builder_.LoadObjectFromConstPool(jsFunc, stringId); in LowerLdBigInt()
1541 Label notNumber(&builder_); in LowerToNumeric()
1542 Label checkResult(&builder_); in LowerToNumeric()
1544 DEFVAlUE(result, (&builder_), VariableType::JS_ANY(), value); in LowerToNumeric()
1545 builder_.Branch(builder_.TaggedIsNumeric(value), &checkResult, &notNumber); in LowerToNumeric()
1546 builder_.Bind(&notNumber); in LowerToNumeric()
1549 builder_.Jump(&checkResult); in LowerToNumeric()
1551 builder_.Bind(&checkResult); in LowerToNumeric()
1570 GateRef index = builder_.ToTaggedInt(acc_.GetValueIn(gate, 0)); in LowerLdLocalModuleVarByIndex()
1579 GateRef index = builder_.ToTaggedInt(acc_.GetValueIn(gate, 0)); in LowerExternalModule()
1589 GateRef index = builder_.ToTaggedInt(acc_.GetValueIn(gate, 0)); in LowerGetModuleNamespace()
1639 Label slowpath(&builder_); in LowerIsTrueOrFalse()
1640 Label isTrue(&builder_); in LowerIsTrueOrFalse()
1641 Label isFalse(&builder_); in LowerIsTrueOrFalse()
1642 Label successExit(&builder_); in LowerIsTrueOrFalse()
1646 DEFVAlUE(result, (&builder_), VariableType::JS_ANY(), value); in LowerIsTrueOrFalse()
1647 result = builder_.CallStub(glue_, gate, CommonStubCSigns::ToBoolean, { glue_, value }); in LowerIsTrueOrFalse()
1649 builder_.Branch(builder_.TaggedIsTrue(*result), &isTrue, &isFalse); in LowerIsTrueOrFalse()
1650 builder_.Bind(&isTrue); in LowerIsTrueOrFalse()
1652 result = builder_.TaggedFalse(); in LowerIsTrueOrFalse()
1653 builder_.Jump(&successExit); in LowerIsTrueOrFalse()
1655 builder_.Bind(&isFalse); in LowerIsTrueOrFalse()
1657 result = builder_.TaggedTrue(); in LowerIsTrueOrFalse()
1658 builder_.Jump(&successExit); in LowerIsTrueOrFalse()
1660 builder_.Bind(&successExit); in LowerIsTrueOrFalse()
1667 Label fastPath(&builder_); in LowerNewObjRange()
1668 Label slowPath(&builder_); in LowerNewObjRange()
1669 Label threadCheck(&builder_); in LowerNewObjRange()
1670 Label successExit(&builder_); in LowerNewObjRange()
1671 Label exit(&builder_); in LowerNewObjRange()
1673 DEFVAlUE(result, (&builder_), VariableType::JS_ANY(), builder_.Undefined()); in LowerNewObjRange()
1676 …GateRef thisObj = builder_.CallStub(glue_, gate, CommonStubCSigns::NewThisObjectChecked, { glue_, … in LowerNewObjRange()
1677 builder_.Branch(builder_.TaggedIsHole(thisObj), &slowPath, &fastPath); in LowerNewObjRange()
1678 builder_.Bind(&fastPath); in LowerNewObjRange()
1681 … GateRef actualArgc = builder_.Int64(BytecodeCallArgc::ComputeCallArgc(acc_.GetNumValueIn(gate), in LowerNewObjRange()
1695 builder_.Bind(&exit); in LowerNewObjRange()
1696 …result = builder_.CallStub(glue_, gate, CommonStubCSigns::ConstructorCheck, { glue_, ctor, *result… in LowerNewObjRange()
1697 builder_.Jump(&threadCheck); in LowerNewObjRange()
1699 builder_.Bind(&slowPath); in LowerNewObjRange()
1707 builder_.Jump(&threadCheck); in LowerNewObjRange()
1709 builder_.Bind(&threadCheck); in LowerNewObjRange()
1710 ReplaceHirWithPendingException(gate, builder_.GetState(), builder_.GetDepend(), *result); in LowerNewObjRange()
1718 GateRef condition = builder_.IsSpecial(value, JSTaggedValue::VALUE_FALSE); in LowerConditionJump()
1719 GateRef ifBranch = builder_.Branch(acc_.GetState(gate), condition); in LowerConditionJump()
1720 GateRef ifTrue = builder_.IfTrue(ifBranch); in LowerConditionJump()
1721 GateRef ifFalse = builder_.IfFalse(ifBranch); in LowerConditionJump()
1726 ifBranch = isEqualJump ? builder_.Branch(ifFalse, builder_.TaggedIsInt(value)) in LowerConditionJump()
1727 : builder_.Branch(ifTrue, builder_.TaggedIsInt(value)); in LowerConditionJump()
1728 GateRef isInt = builder_.IfTrue(ifBranch); in LowerConditionJump()
1729 GateRef notInt = builder_.IfFalse(ifBranch); in LowerConditionJump()
1731 condition = builder_.Equal(builder_.TaggedGetInt(value), builder_.Int32(0)); in LowerConditionJump()
1732 ifBranch = builder_.Branch(isInt, condition); in LowerConditionJump()
1733 GateRef isZero = builder_.IfTrue(ifBranch); in LowerConditionJump()
1734 GateRef notZero = builder_.IfFalse(ifBranch); in LowerConditionJump()
1737 auto mergeIntState = builder_.Merge(intFalseState); in LowerConditionJump()
1741 ifBranch = builder_.Branch(mergeIntState, builder_.TaggedIsDouble(value)); in LowerConditionJump()
1742 GateRef isDouble = builder_.IfTrue(ifBranch); in LowerConditionJump()
1743 GateRef notDouble = builder_.IfFalse(ifBranch); in LowerConditionJump()
1745 condition = builder_.Equal(builder_.GetDoubleOfTDouble(value), builder_.Double(0)); in LowerConditionJump()
1746 ifBranch = builder_.Branch(isDouble, condition); in LowerConditionJump()
1747 GateRef isDoubleZero = builder_.IfTrue(ifBranch); in LowerConditionJump()
1748 GateRef notDoubleZero = builder_.IfFalse(ifBranch); in LowerConditionJump()
1751 auto mergeFalseState = builder_.Merge(doubleFalseState); in LowerConditionJump()
1753 GateRef mergeTrueState = builder_.Merge(trueState); in LowerConditionJump()
1806 builder_.SetDepend(acc_.GetDep(depGate)); in LowerCreateObjectWithExcludedKeys()
1810 GateRef length = builder_.Int32(numIn); in LowerCreateObjectWithExcludedKeys()
1811 GateRef taggedLength = builder_.ToTaggedInt(builder_.ZExtInt32ToInt64(length)); in LowerCreateObjectWithExcludedKeys()
1812 args.emplace_back(builder_.ToTaggedInt(numKeys)); in LowerCreateObjectWithExcludedKeys()
1814 args.emplace_back(builder_.ToTaggedInt(firstArgRegIdx)); in LowerCreateObjectWithExcludedKeys()
1832 GateRef pattern = builder_.LoadObjectFromConstPool(jsFunc, stringId); in LowerCreateRegExpWithLiteral()
1834 GateRef newGate = LowerCallRuntime(gate, id, { pattern, builder_.ToTaggedInt(flags) }, true); in LowerCreateRegExpWithLiteral()
1846 GateRef holeConst = builder_.HoleConstant(); in LowerStOwnByValue()
1847 DEFVAlUE(result, (&builder_), VariableType::JS_ANY(), holeConst); in LowerStOwnByValue()
1848 Label isHeapObject(&builder_); in LowerStOwnByValue()
1849 Label slowPath(&builder_); in LowerStOwnByValue()
1850 Label exit(&builder_); in LowerStOwnByValue()
1851 builder_.Branch(builder_.TaggedIsHeapObject(receiver), &isHeapObject, &slowPath); in LowerStOwnByValue()
1852 builder_.Bind(&isHeapObject); in LowerStOwnByValue()
1853 Label notClassConstructor(&builder_); in LowerStOwnByValue()
1854 builder_.Branch(builder_.IsClassConstructor(receiver), &slowPath, &notClassConstructor); in LowerStOwnByValue()
1855 builder_.Bind(&notClassConstructor); in LowerStOwnByValue()
1856 Label notClassPrototype(&builder_); in LowerStOwnByValue()
1857 builder_.Branch(builder_.IsClassPrototype(receiver), &slowPath, &notClassPrototype); in LowerStOwnByValue()
1858 builder_.Bind(&notClassPrototype); in LowerStOwnByValue()
1860 result = builder_.CallStub(glue_, gate, CommonStubCSigns::SetPropertyByValueWithOwn, in LowerStOwnByValue()
1862 builder_.Branch(builder_.IsSpecial(*result, JSTaggedValue::VALUE_HOLE), &slowPath, &exit); in LowerStOwnByValue()
1864 builder_.Bind(&slowPath); in LowerStOwnByValue()
1867 builder_.Jump(&exit); in LowerStOwnByValue()
1869 builder_.Bind(&exit); in LowerStOwnByValue()
1881 GateRef holeConst = builder_.HoleConstant(); in LowerStOwnByIndex()
1882 DEFVAlUE(result, (&builder_), VariableType::JS_ANY(), holeConst); in LowerStOwnByIndex()
1883 Label isHeapObject(&builder_); in LowerStOwnByIndex()
1884 Label slowPath(&builder_); in LowerStOwnByIndex()
1885 Label exit(&builder_); in LowerStOwnByIndex()
1886 builder_.Branch(builder_.TaggedIsHeapObject(receiver), &isHeapObject, &slowPath); in LowerStOwnByIndex()
1887 builder_.Bind(&isHeapObject); in LowerStOwnByIndex()
1888 Label notClassConstructor(&builder_); in LowerStOwnByIndex()
1889 builder_.Branch(builder_.IsClassConstructor(receiver), &slowPath, &notClassConstructor); in LowerStOwnByIndex()
1890 builder_.Bind(&notClassConstructor); in LowerStOwnByIndex()
1891 Label notClassPrototype(&builder_); in LowerStOwnByIndex()
1892 builder_.Branch(builder_.IsClassPrototype(receiver), &slowPath, &notClassPrototype); in LowerStOwnByIndex()
1893 builder_.Bind(&notClassPrototype); in LowerStOwnByIndex()
1895 result = builder_.CallStub(glue_, gate, CommonStubCSigns::SetPropertyByIndexWithOwn, in LowerStOwnByIndex()
1896 { glue_, receiver, builder_.TruncInt64ToInt32(index), accValue }); in LowerStOwnByIndex()
1897 builder_.Branch(builder_.IsSpecial(*result, JSTaggedValue::VALUE_HOLE), &slowPath, &exit); in LowerStOwnByIndex()
1899 builder_.Bind(&slowPath); in LowerStOwnByIndex()
1901 auto args = {receiver, builder_.ToTaggedInt(index), accValue }; in LowerStOwnByIndex()
1903 builder_.Jump(&exit); in LowerStOwnByIndex()
1905 builder_.Bind(&exit); in LowerStOwnByIndex()
1915 GateRef propKey = builder_.LoadObjectFromConstPool(jsFunc, stringId); in LowerStOwnByName()
1919 GateRef holeConst = builder_.HoleConstant(); in LowerStOwnByName()
1920 DEFVAlUE(result, (&builder_), VariableType::JS_ANY(), holeConst); in LowerStOwnByName()
1921 Label isJSObject(&builder_); in LowerStOwnByName()
1922 Label slowPath(&builder_); in LowerStOwnByName()
1923 Label exit(&builder_); in LowerStOwnByName()
1924 builder_.Branch(builder_.IsJSObject(receiver), &isJSObject, &slowPath); in LowerStOwnByName()
1925 builder_.Bind(&isJSObject); in LowerStOwnByName()
1926 Label notClassConstructor(&builder_); in LowerStOwnByName()
1927 builder_.Branch(builder_.IsClassConstructor(receiver), &slowPath, &notClassConstructor); in LowerStOwnByName()
1928 builder_.Bind(&notClassConstructor); in LowerStOwnByName()
1929 Label notClassPrototype(&builder_); in LowerStOwnByName()
1930 builder_.Branch(builder_.IsClassPrototype(receiver), &slowPath, &notClassPrototype); in LowerStOwnByName()
1931 builder_.Bind(&notClassPrototype); in LowerStOwnByName()
1933 result = builder_.CallStub(glue_, gate, CommonStubCSigns::SetPropertyByNameWithOwn, in LowerStOwnByName()
1935 builder_.Branch(builder_.IsSpecial(*result, JSTaggedValue::VALUE_HOLE), &slowPath, &exit); in LowerStOwnByName()
1937 builder_.Bind(&slowPath); in LowerStOwnByName()
1940 builder_.Jump(&exit); in LowerStOwnByName()
1942 builder_.Bind(&exit); in LowerStOwnByName()
1951 GateRef result = builder_.CallStub(glue_, gate, CommonStubCSigns::NewLexicalEnv, in LowerNewLexicalEnv()
1952 { glue_, lexEnv, builder_.TruncInt64ToInt32(acc_.GetValueIn(gate, 0)) }); in LowerNewLexicalEnv()
1962 auto args = { builder_.ToTaggedInt(acc_.GetValueIn(gate, 0)), in LowerNewLexicalEnvWithName()
1963 builder_.ToTaggedInt(acc_.GetValueIn(gate, 1)), in LowerNewLexicalEnvWithName()
1972 GateRef index = builder_.Int32(LexicalEnv::PARENT_ENV_INDEX); in LowerPopLexicalEnv()
1973 GateRef parentEnv = builder_.GetValueFromTaggedArray(currentEnv, index); in LowerPopLexicalEnv()
2015 GateRef propKey = builder_.LoadObjectFromConstPool(jsFunc, stringId); in LowerStConstToGlobalRecord()
2021 GateRef isConstGate = isConst ? builder_.TaggedTrue() : builder_.TaggedFalse(); in LowerStConstToGlobalRecord()
2033 Label isHeapObject(&builder_); in LowerStOwnByValueWithNameSet()
2034 Label slowPath(&builder_); in LowerStOwnByValueWithNameSet()
2035 Label notClassConstructor(&builder_); in LowerStOwnByValueWithNameSet()
2036 Label notClassPrototype(&builder_); in LowerStOwnByValueWithNameSet()
2037 Label notHole(&builder_); in LowerStOwnByValueWithNameSet()
2038 Label successExit(&builder_); in LowerStOwnByValueWithNameSet()
2039 Label exceptionExit(&builder_); in LowerStOwnByValueWithNameSet()
2041 builder_.Branch(builder_.TaggedIsHeapObject(receiver), &isHeapObject, &slowPath); in LowerStOwnByValueWithNameSet()
2042 builder_.Bind(&isHeapObject); in LowerStOwnByValueWithNameSet()
2044 builder_.Branch(builder_.IsClassConstructor(receiver), &slowPath, &notClassConstructor); in LowerStOwnByValueWithNameSet()
2045 builder_.Bind(&notClassConstructor); in LowerStOwnByValueWithNameSet()
2047 builder_.Branch(builder_.IsClassPrototype(receiver), &slowPath, &notClassPrototype); in LowerStOwnByValueWithNameSet()
2048 builder_.Bind(&notClassPrototype); in LowerStOwnByValueWithNameSet()
2050 res = builder_.CallStub(glue_, gate, CommonStubCSigns::DeprecatedSetPropertyByValue, in LowerStOwnByValueWithNameSet()
2052 builder_.Branch(builder_.IsSpecial(res, JSTaggedValue::VALUE_HOLE), in LowerStOwnByValueWithNameSet()
2054 builder_.Bind(&notHole); in LowerStOwnByValueWithNameSet()
2056 Label notexception(&builder_); in LowerStOwnByValueWithNameSet()
2057 builder_.Branch(builder_.IsSpecial(res, JSTaggedValue::VALUE_EXCEPTION), in LowerStOwnByValueWithNameSet()
2059 builder_.Bind(&notexception); in LowerStOwnByValueWithNameSet()
2061 builder_.Jump(&successExit); in LowerStOwnByValueWithNameSet()
2066 builder_.Bind(&slowPath); in LowerStOwnByValueWithNameSet()
2069 builder_.Branch(builder_.IsSpecial(res, JSTaggedValue::VALUE_EXCEPTION), in LowerStOwnByValueWithNameSet()
2082 GateRef propKey = builder_.LoadObjectFromConstPool(jsFunc, stringId); in LowerStOwnByNameWithNameSet()
2086 Label isJSObject(&builder_); in LowerStOwnByNameWithNameSet()
2087 Label notJSObject(&builder_); in LowerStOwnByNameWithNameSet()
2088 Label notClassConstructor(&builder_); in LowerStOwnByNameWithNameSet()
2089 Label notClassPrototype(&builder_); in LowerStOwnByNameWithNameSet()
2090 Label notHole(&builder_); in LowerStOwnByNameWithNameSet()
2091 Label successExit(&builder_); in LowerStOwnByNameWithNameSet()
2092 Label exceptionExit(&builder_); in LowerStOwnByNameWithNameSet()
2093 builder_.Branch(builder_.IsJSObject(receiver), &isJSObject, &notJSObject); in LowerStOwnByNameWithNameSet()
2094 builder_.Bind(&isJSObject); in LowerStOwnByNameWithNameSet()
2096 builder_.Branch(builder_.IsClassConstructor(receiver), &notJSObject, &notClassConstructor); in LowerStOwnByNameWithNameSet()
2097 builder_.Bind(&notClassConstructor); in LowerStOwnByNameWithNameSet()
2099 builder_.Branch(builder_.IsClassPrototype(receiver), &notJSObject, &notClassPrototype); in LowerStOwnByNameWithNameSet()
2100 builder_.Bind(&notClassPrototype); in LowerStOwnByNameWithNameSet()
2102 result = builder_.CallStub(glue_, gate, CommonStubCSigns::SetPropertyByNameWithOwn, in LowerStOwnByNameWithNameSet()
2104 builder_.Branch(builder_.IsSpecial(result, JSTaggedValue::VALUE_HOLE), in LowerStOwnByNameWithNameSet()
2106 builder_.Bind(&notHole); in LowerStOwnByNameWithNameSet()
2108 Label notException(&builder_); in LowerStOwnByNameWithNameSet()
2109 builder_.Branch(builder_.IsSpecial(result, JSTaggedValue::VALUE_EXCEPTION), in LowerStOwnByNameWithNameSet()
2111 builder_.Bind(&notException); in LowerStOwnByNameWithNameSet()
2113 builder_.Jump(&successExit); in LowerStOwnByNameWithNameSet()
2118 builder_.Bind(&notJSObject); in LowerStOwnByNameWithNameSet()
2121 builder_.Branch(builder_.IsSpecial(result, JSTaggedValue::VALUE_EXCEPTION), in LowerStOwnByNameWithNameSet()
2181 GateRef holeConst = builder_.HoleConstant(); in LowerLdObjByIndex()
2182 DEFVAlUE(varAcc, (&builder_), VariableType::JS_ANY(), holeConst); in LowerLdObjByIndex()
2186 Label fastPath(&builder_); in LowerLdObjByIndex()
2187 Label slowPath(&builder_); in LowerLdObjByIndex()
2188 Label exit(&builder_); in LowerLdObjByIndex()
2189 builder_.Branch(builder_.TaggedIsHeapObject(receiver), &fastPath, &slowPath); in LowerLdObjByIndex()
2190 builder_.Bind(&fastPath); in LowerLdObjByIndex()
2192 varAcc = builder_.CallStub(glue_, gate, CommonStubCSigns::GetPropertyByIndex, in LowerLdObjByIndex()
2193 {glue_, receiver, builder_.TruncInt64ToInt32(index)}); in LowerLdObjByIndex()
2194 builder_.Branch(builder_.IsSpecial(*varAcc, JSTaggedValue::VALUE_HOLE), &slowPath, &exit); in LowerLdObjByIndex()
2196 builder_.Bind(&slowPath); in LowerLdObjByIndex()
2198 GateRef undefined = builder_.Undefined(); in LowerLdObjByIndex()
2199 auto args = { receiver, builder_.ToTaggedInt(index), builder_.TaggedFalse(), undefined }; in LowerLdObjByIndex()
2201 builder_.Jump(&exit); in LowerLdObjByIndex()
2203 builder_.Bind(&exit); in LowerLdObjByIndex()
2211 Label exit(&builder_); in LowerStObjByIndex()
2212 Label fastPath(&builder_); in LowerStObjByIndex()
2213 Label slowPath(&builder_); in LowerStObjByIndex()
2217 DEFVAlUE(result, (&builder_), VariableType::JS_ANY(), builder_.HoleConstant()); in LowerStObjByIndex()
2218 builder_.Branch(builder_.TaggedIsHeapObject(receiver), &fastPath, &slowPath); in LowerStObjByIndex()
2219 builder_.Bind(&fastPath); in LowerStObjByIndex()
2221 result = builder_.CallStub(glue_, gate, CommonStubCSigns::SetPropertyByIndex, in LowerStObjByIndex()
2222 {glue_, receiver, builder_.TruncInt64ToInt32(index), accValue}); in LowerStObjByIndex()
2223 builder_.Branch(builder_.IsSpecial(*result, JSTaggedValue::VALUE_HOLE), &slowPath, &exit); in LowerStObjByIndex()
2225 builder_.Bind(&slowPath); in LowerStObjByIndex()
2228 {receiver, builder_.ToTaggedInt(index), accValue}, true); in LowerStObjByIndex()
2229 builder_.Jump(&exit); in LowerStObjByIndex()
2231 builder_.Bind(&exit); in LowerStObjByIndex()
2277 GateRef prop = builder_.LoadObjectFromConstPool(jsFunc, stringId); in LowerLdSuperByName()
2289 GateRef prop = builder_.LoadObjectFromConstPool(jsFunc, stringId); in LowerStSuperByName()
2316 acc_.SetDep(gate, builder_.GetDepend()); in LowerAsyncGeneratorResolve()
2348 GateRef level = builder_.TruncInt64ToInt32(acc_.GetValueIn(gate, 0)); in LowerLdLexVar()
2349 GateRef slot = builder_.TruncInt64ToInt32(acc_.GetValueIn(gate, 1)); in LowerLdLexVar()
2350 …DEFVAlUE(currentEnv, (&builder_), VariableType::JS_ANY(), acc_.GetValueIn(gate, 2)); // 2: Get cur… in LowerLdLexVar()
2351 GateRef index = builder_.Int32(LexicalEnv::PARENT_ENV_INDEX); in LowerLdLexVar()
2352 Label exit(&builder_); in LowerLdLexVar()
2355 builder_.Jump(&exit); in LowerLdLexVar()
2357 currentEnv = builder_.GetValueFromTaggedArray(*currentEnv, index); in LowerLdLexVar()
2358 builder_.Jump(&exit); in LowerLdLexVar()
2360 DEFVAlUE(i, (&builder_), VariableType::INT32(), builder_.Int32(0)); in LowerLdLexVar()
2361 Label loopHead(&builder_); in LowerLdLexVar()
2362 Label loopEnd(&builder_); in LowerLdLexVar()
2363 builder_.Branch(builder_.Int32LessThan(*i, level), &loopHead, &exit); in LowerLdLexVar()
2364 builder_.LoopBegin(&loopHead); in LowerLdLexVar()
2365 currentEnv = builder_.GetValueFromTaggedArray(*currentEnv, index); in LowerLdLexVar()
2366 i = builder_.Int32Add(*i, builder_.Int32(1)); in LowerLdLexVar()
2367 builder_.Branch(builder_.Int32LessThan(*i, level), &loopEnd, &exit); in LowerLdLexVar()
2368 builder_.Bind(&loopEnd); in LowerLdLexVar()
2369 builder_.LoopEnd(&loopHead); in LowerLdLexVar()
2371 builder_.Bind(&exit); in LowerLdLexVar()
2372 GateRef valueIndex = builder_.Int32Add(slot, builder_.Int32(LexicalEnv::RESERVED_ENV_LENGTH)); in LowerLdLexVar()
2373 GateRef result = builder_.GetValueFromTaggedArray(*currentEnv, valueIndex); in LowerLdLexVar()
2381 GateRef level = builder_.TruncInt64ToInt32(acc_.GetValueIn(gate, 0)); in LowerStLexVar()
2382 GateRef slot = builder_.TruncInt64ToInt32(acc_.GetValueIn(gate, 1)); in LowerStLexVar()
2384 …DEFVAlUE(currentEnv, (&builder_), VariableType::JS_ANY(), acc_.GetValueIn(gate, 2)); // 2: Get cur… in LowerStLexVar()
2385 GateRef index = builder_.Int32(LexicalEnv::PARENT_ENV_INDEX); in LowerStLexVar()
2386 Label exit(&builder_); in LowerStLexVar()
2389 builder_.Jump(&exit); in LowerStLexVar()
2391 currentEnv = builder_.GetValueFromTaggedArray(*currentEnv, index); in LowerStLexVar()
2392 builder_.Jump(&exit); in LowerStLexVar()
2394 DEFVAlUE(i, (&builder_), VariableType::INT32(), builder_.Int32(0)); in LowerStLexVar()
2395 Label loopHead(&builder_); in LowerStLexVar()
2396 Label loopEnd(&builder_); in LowerStLexVar()
2397 builder_.Branch(builder_.Int32LessThan(*i, level), &loopHead, &exit); in LowerStLexVar()
2398 builder_.LoopBegin(&loopHead); in LowerStLexVar()
2399 currentEnv = builder_.GetValueFromTaggedArray(*currentEnv, index); in LowerStLexVar()
2400 i = builder_.Int32Add(*i, builder_.Int32(1)); in LowerStLexVar()
2401 builder_.Branch(builder_.Int32LessThan(*i, level), &loopEnd, &exit); in LowerStLexVar()
2402 builder_.Bind(&loopEnd); in LowerStLexVar()
2403 builder_.LoopEnd(&loopHead); in LowerStLexVar()
2405 builder_.Bind(&exit); in LowerStLexVar()
2406 GateRef valueIndex = builder_.Int32Add(slot, builder_.Int32(LexicalEnv::RESERVED_ENV_LENGTH)); in LowerStLexVar()
2407 builder_.SetValueToTaggedArray(VariableType::JS_ANY(), glue_, *currentEnv, valueIndex, value); in LowerStLexVar()
2422 GateRef constpool = builder_.GetConstPoolFromFunction(jsFunc); in LowerDefineClassWithBuffer()
2423 GateRef module = builder_.GetModuleFromFunction(jsFunc); in LowerDefineClassWithBuffer()
2424 Label isException(&builder_); in LowerDefineClassWithBuffer()
2425 Label isNotException(&builder_); in LowerDefineClassWithBuffer()
2429 builder_.ToTaggedInt(methodId), builder_.ToTaggedInt(literalId), module }; in LowerDefineClassWithBuffer()
2431builder_.Branch(builder_.IsSpecial(result, JSTaggedValue::VALUE_EXCEPTION), &isException, &isNotEx… in LowerDefineClassWithBuffer()
2435 builder_.Bind(&isNotException); in LowerDefineClassWithBuffer()
2437 builder_.SetLexicalEnvToFunction(glue_, result, lexicalEnv); in LowerDefineClassWithBuffer()
2438 builder_.SetModuleToFunction(glue_, result, module); in LowerDefineClassWithBuffer()
2440 { result, builder_.ToTaggedInt(length) }, true); in LowerDefineClassWithBuffer()
2441 successControl.SetState(builder_.GetState()); in LowerDefineClassWithBuffer()
2442 successControl.SetDepend(builder_.GetDepend()); in LowerDefineClassWithBuffer()
2444 builder_.Bind(&isException); in LowerDefineClassWithBuffer()
2446 failControl.SetState(builder_.GetState()); in LowerDefineClassWithBuffer()
2447 failControl.SetDepend(builder_.GetDepend()); in LowerDefineClassWithBuffer()
2455 GateRef methodId = builder_.TruncInt64ToInt32(acc_.GetValueIn(gate, 0)); in LowerDefineFunc()
2457 …auto method = builder_.GetObjectFromConstPool(glue_, gate, jsFunc, methodId, ConstPoolType::METHOD… in LowerDefineFunc()
2459 Label defaultLabel(&builder_); in LowerDefineFunc()
2460 Label successExit(&builder_); in LowerDefineFunc()
2461 Label exceptionExit(&builder_); in LowerDefineFunc()
2463 builder_.Branch(builder_.TaggedIsException(result), &exceptionExit, &defaultLabel); in LowerDefineFunc()
2464 builder_.Bind(&defaultLabel); in LowerDefineFunc()
2466 GateRef hClass = builder_.LoadHClass(result); in LowerDefineFunc()
2467 builder_.SetPropertyInlinedProps(glue_, result, hClass, builder_.ToTaggedInt(length), in LowerDefineFunc()
2468 builder_.Int32(JSFunction::LENGTH_INLINE_PROPERTY_INDEX), VariableType::INT64()); in LowerDefineFunc()
2470 builder_.SetLexicalEnvToFunction(glue_, result, env); in LowerDefineFunc()
2471 builder_.SetModuleToFunction(glue_, result, builder_.GetModuleFromFunction(jsFunc)); in LowerDefineFunc()
2472 builder_.SetHomeObjectToFunction(glue_, result, builder_.GetHomeObjectFromFunction(jsFunc)); in LowerDefineFunc()
2473 builder_.Jump(&successExit); in LowerDefineFunc()
2493 Label entry(&builder_); in LowerTypeof()
2494 Label exit(&builder_); in LowerTypeof()
2496 GateRef gConstAddr = builder_.Load(VariableType::JS_POINTER(), glue_, in LowerTypeof()
2497builder_.IntPtr(JSThread::GlueData::GetGlobalConstOffset(builder_.GetCompilationConfig()->Is32Bit(… in LowerTypeof()
2498 … GateRef undefinedIndex = builder_.GetGlobalConstantString(ConstantIndex::UNDEFINED_STRING_INDEX); in LowerTypeof()
2499 …GateRef gConstUndefinedStr = builder_.Load(VariableType::JS_POINTER(), gConstAddr, undefinedIndex); in LowerTypeof()
2500 DEFVAlUE(result, (&builder_), VariableType::JS_POINTER(), gConstUndefinedStr); in LowerTypeof()
2501 Label objIsTrue(&builder_); in LowerTypeof()
2502 Label objNotTrue(&builder_); in LowerTypeof()
2503 Label defaultLabel(&builder_); in LowerTypeof()
2504 GateRef gConstBooleanStr = builder_.Load(VariableType::JS_POINTER(), gConstAddr, in LowerTypeof()
2505 builder_.GetGlobalConstantString(ConstantIndex::BOOLEAN_STRING_INDEX)); in LowerTypeof()
2506 builder_.Branch(builder_.TaggedIsTrue(obj), &objIsTrue, &objNotTrue); in LowerTypeof()
2507 builder_.Bind(&objIsTrue); in LowerTypeof()
2510 builder_.Jump(&exit); in LowerTypeof()
2512 builder_.Bind(&objNotTrue); in LowerTypeof()
2514 Label objIsFalse(&builder_); in LowerTypeof()
2515 Label objNotFalse(&builder_); in LowerTypeof()
2516 builder_.Branch(builder_.TaggedIsFalse(obj), &objIsFalse, &objNotFalse); in LowerTypeof()
2517 builder_.Bind(&objIsFalse); in LowerTypeof()
2520 builder_.Jump(&exit); in LowerTypeof()
2522 builder_.Bind(&objNotFalse); in LowerTypeof()
2524 Label objIsNull(&builder_); in LowerTypeof()
2525 Label objNotNull(&builder_); in LowerTypeof()
2526 builder_.Branch(builder_.TaggedIsNull(obj), &objIsNull, &objNotNull); in LowerTypeof()
2527 builder_.Bind(&objIsNull); in LowerTypeof()
2529 result = builder_.Load(VariableType::JS_POINTER(), gConstAddr, in LowerTypeof()
2530 builder_.GetGlobalConstantString(ConstantIndex::OBJECT_STRING_INDEX)); in LowerTypeof()
2531 builder_.Jump(&exit); in LowerTypeof()
2533 builder_.Bind(&objNotNull); in LowerTypeof()
2535 Label objIsUndefined(&builder_); in LowerTypeof()
2536 Label objNotUndefined(&builder_); in LowerTypeof()
2537 builder_.Branch(builder_.TaggedIsUndefined(obj), &objIsUndefined, &objNotUndefined); in LowerTypeof()
2538 builder_.Bind(&objIsUndefined); in LowerTypeof()
2540 result = builder_.Load(VariableType::JS_POINTER(), gConstAddr, in LowerTypeof()
2541 builder_.GetGlobalConstantString(ConstantIndex::UNDEFINED_STRING_INDEX)); in LowerTypeof()
2542 builder_.Jump(&exit); in LowerTypeof()
2544 builder_.Bind(&objNotUndefined); in LowerTypeof()
2545 builder_.Jump(&defaultLabel); in LowerTypeof()
2549 builder_.Bind(&defaultLabel); in LowerTypeof()
2551 Label objIsHeapObject(&builder_); in LowerTypeof()
2552 Label objNotHeapObject(&builder_); in LowerTypeof()
2553 builder_.Branch(builder_.TaggedIsHeapObject(obj), &objIsHeapObject, &objNotHeapObject); in LowerTypeof()
2554 builder_.Bind(&objIsHeapObject); in LowerTypeof()
2556 Label objIsString(&builder_); in LowerTypeof()
2557 Label objNotString(&builder_); in LowerTypeof()
2558 builder_.Branch(builder_.TaggedObjectIsString(obj), &objIsString, &objNotString); in LowerTypeof()
2559 builder_.Bind(&objIsString); in LowerTypeof()
2561 result = builder_.Load(VariableType::JS_POINTER(), gConstAddr, in LowerTypeof()
2562 builder_.GetGlobalConstantString(ConstantIndex::STRING_STRING_INDEX)); in LowerTypeof()
2563 builder_.Jump(&exit); in LowerTypeof()
2565 builder_.Bind(&objNotString); in LowerTypeof()
2567 Label objIsSymbol(&builder_); in LowerTypeof()
2568 Label objNotSymbol(&builder_); in LowerTypeof()
2569builder_.Branch(builder_.IsJsType(obj, JSType::SYMBOL), &objIsSymbol, &objNotSymbol); in LowerTypeof()
2570 builder_.Bind(&objIsSymbol); in LowerTypeof()
2572 result = builder_.Load(VariableType::JS_POINTER(), gConstAddr, in LowerTypeof()
2573 builder_.GetGlobalConstantString(ConstantIndex::SYMBOL_STRING_INDEX)); in LowerTypeof()
2574 builder_.Jump(&exit); in LowerTypeof()
2576 builder_.Bind(&objNotSymbol); in LowerTypeof()
2578 Label objIsCallable(&builder_); in LowerTypeof()
2579 Label objNotCallable(&builder_); in LowerTypeof()
2580 builder_.Branch(builder_.IsCallable(obj), &objIsCallable, &objNotCallable); in LowerTypeof()
2581 builder_.Bind(&objIsCallable); in LowerTypeof()
2583 result = builder_.Load(VariableType::JS_POINTER(), gConstAddr, in LowerTypeof()
2584 builder_.GetGlobalConstantString(ConstantIndex::FUNCTION_STRING_INDEX)); in LowerTypeof()
2585 builder_.Jump(&exit); in LowerTypeof()
2587 builder_.Bind(&objNotCallable); in LowerTypeof()
2589 Label objIsBigInt(&builder_); in LowerTypeof()
2590 Label objNotBigInt(&builder_); in LowerTypeof()
2591builder_.Branch(builder_.IsJsType(obj, JSType::BIGINT), &objIsBigInt, &objNotBigInt); in LowerTypeof()
2592 builder_.Bind(&objIsBigInt); in LowerTypeof()
2594 result = builder_.Load(VariableType::JS_POINTER(), gConstAddr, in LowerTypeof()
2595builder_.GetGlobalConstantString(ConstantIndex::BIGINT_STRING_INDEX)); in LowerTypeof()
2596 builder_.Jump(&exit); in LowerTypeof()
2598 builder_.Bind(&objNotBigInt); in LowerTypeof()
2600 result = builder_.Load(VariableType::JS_POINTER(), gConstAddr, in LowerTypeof()
2601builder_.GetGlobalConstantString(ConstantIndex::OBJECT_STRING_INDEX)); in LowerTypeof()
2602 builder_.Jump(&exit); in LowerTypeof()
2608 builder_.Bind(&objNotHeapObject); in LowerTypeof()
2610 Label objIsNum(&builder_); in LowerTypeof()
2611 Label objNotNum(&builder_); in LowerTypeof()
2612 builder_.Branch(builder_.TaggedIsNumber(obj), &objIsNum, &objNotNum); in LowerTypeof()
2613 builder_.Bind(&objIsNum); in LowerTypeof()
2615 result = builder_.Load(VariableType::JS_POINTER(), gConstAddr, in LowerTypeof()
2616 builder_.GetGlobalConstantString(ConstantIndex::NUMBER_STRING_INDEX)); in LowerTypeof()
2617 builder_.Jump(&exit); in LowerTypeof()
2619 builder_.Bind(&objNotNum); in LowerTypeof()
2620 builder_.Jump(&exit); in LowerTypeof()
2623 builder_.Bind(&exit); in LowerTypeof()
2629 GateRef offset = builder_.PtrMul(builder_.ZExtInt32ToPtr(indexOffset), in GetValueFromTaggedArray()
2630 builder_.IntPtr(JSTaggedValue::TaggedTypeSize())); in GetValueFromTaggedArray()
2631 GateRef dataOffset = builder_.PtrAdd(offset, builder_.IntPtr(TaggedArray::DATA_OFFSET)); in GetValueFromTaggedArray()
2632 GateRef value = builder_.Load(VariableType::JS_ANY(), arrayGate, dataOffset); in GetValueFromTaggedArray()
2640 auto indexOffset = builder_.Int32(index); in LowerStoreRegister()
2651 GateRef contextOffset = builder_.IntPtr(JSGeneratorObject::GENERATOR_CONTEXT_OFFSET); in LowerResumeGenerator()
2652 GateRef contextGate = builder_.Load(VariableType::JS_POINTER(), obj, contextOffset); in LowerResumeGenerator()
2653 GateRef arrayOffset = builder_.IntPtr(GeneratorContext::GENERATOR_REGS_ARRAY_OFFSET); in LowerResumeGenerator()
2654 GateRef arrayGate = builder_.Load(VariableType::JS_POINTER(), contextGate, arrayOffset); in LowerResumeGenerator()
2668 Label isAsyncGeneratorObj(&builder_); in LowerResumeGenerator()
2669 Label notAsyncGeneratorObj(&builder_); in LowerResumeGenerator()
2670 Label exit(&builder_); in LowerResumeGenerator()
2671 DEFVAlUE(result, (&builder_), VariableType::JS_ANY(), builder_.HoleConstant()); in LowerResumeGenerator()
2672builder_.Branch(builder_.TaggedIsAsyncGeneratorObject(obj), &isAsyncGeneratorObj, &notAsyncGenerat… in LowerResumeGenerator()
2673 builder_.Bind(&isAsyncGeneratorObj); in LowerResumeGenerator()
2675 …GateRef resumeResultOffset = builder_.IntPtr(JSAsyncGeneratorObject::GENERATOR_RESUME_RESULT_OFFSE… in LowerResumeGenerator()
2676 result = builder_.Load(VariableType::JS_ANY(), obj, resumeResultOffset); in LowerResumeGenerator()
2677 builder_.Jump(&exit); in LowerResumeGenerator()
2679 builder_.Bind(&notAsyncGeneratorObj); in LowerResumeGenerator()
2681 … GateRef resumeResultOffset = builder_.IntPtr(JSGeneratorObject::GENERATOR_RESUME_RESULT_OFFSET); in LowerResumeGenerator()
2682 result = builder_.Load(VariableType::JS_ANY(), obj, resumeResultOffset); in LowerResumeGenerator()
2683 builder_.Jump(&exit); in LowerResumeGenerator()
2685 builder_.Bind(&exit); in LowerResumeGenerator()
2693 DEFVAlUE(result, (&builder_), VariableType::JS_ANY(), builder_.Undefined()); in LowerGetResumeMode()
2694 Label isAsyncGeneratorObj(&builder_); in LowerGetResumeMode()
2695 Label notAsyncGeneratorObj(&builder_); in LowerGetResumeMode()
2696 Label exit(&builder_); in LowerGetResumeMode()
2698builder_.Branch(builder_.TaggedIsAsyncGeneratorObject(obj), &isAsyncGeneratorObj, &notAsyncGenerat… in LowerGetResumeMode()
2699 builder_.Bind(&isAsyncGeneratorObj); in LowerGetResumeMode()
2701 GateRef bitFieldOffset = builder_.IntPtr(JSAsyncGeneratorObject::BIT_FIELD_OFFSET); in LowerGetResumeMode()
2702 GateRef bitField = builder_.Load(VariableType::INT32(), obj, bitFieldOffset); in LowerGetResumeMode()
2703 auto bitfieldlsr = builder_.Int32LSR(bitField, in LowerGetResumeMode()
2704builder_.Int32(JSAsyncGeneratorObject::ResumeModeBits::START_BIT)); in LowerGetResumeMode()
2705 GateRef modeBits = builder_.Int32And(bitfieldlsr, in LowerGetResumeMode()
2706builder_.Int32((1LU << JSAsyncGeneratorObject::ResumeModeBits::SIZE) - 1)); in LowerGetResumeMode()
2707 auto resumeMode = builder_.SExtInt32ToInt64(modeBits); in LowerGetResumeMode()
2708 result = builder_.ToTaggedIntPtr(resumeMode); in LowerGetResumeMode()
2709 builder_.Jump(&exit); in LowerGetResumeMode()
2711 builder_.Bind(&notAsyncGeneratorObj); in LowerGetResumeMode()
2713 GateRef bitFieldOffset = builder_.IntPtr(JSGeneratorObject::BIT_FIELD_OFFSET); in LowerGetResumeMode()
2714 GateRef bitField = builder_.Load(VariableType::INT32(), obj, bitFieldOffset); in LowerGetResumeMode()
2715 …auto bitfieldlsr = builder_.Int32LSR(bitField, builder_.Int32(JSGeneratorObject::ResumeModeBits::S… in LowerGetResumeMode()
2716 GateRef modeBits = builder_.Int32And(bitfieldlsr, in LowerGetResumeMode()
2717builder_.Int32((1LU << JSGeneratorObject::ResumeModeBits::SIZE) - 1)); in LowerGetResumeMode()
2718 auto resumeMode = builder_.SExtInt32ToInt64(modeBits); in LowerGetResumeMode()
2719 result = builder_.ToTaggedIntPtr(resumeMode); in LowerGetResumeMode()
2720 builder_.Jump(&exit); in LowerGetResumeMode()
2722 builder_.Bind(&exit); in LowerGetResumeMode()
2731 GateRef methodId = builder_.TruncInt64ToInt32(acc_.GetValueIn(gate, 0)); in LowerDefineMethod()
2732 …auto method = builder_.GetObjectFromConstPool(glue_, gate, jsFunc, methodId, ConstPoolType::METHOD… in LowerDefineMethod()
2736 Label defaultLabel(&builder_); in LowerDefineMethod()
2737 Label successExit(&builder_); in LowerDefineMethod()
2738 Label exceptionExit(&builder_); in LowerDefineMethod()
2740 builder_.Branch(builder_.IsSpecial(result, JSTaggedValue::VALUE_EXCEPTION), in LowerDefineMethod()
2742 builder_.Bind(&defaultLabel); in LowerDefineMethod()
2744 GateRef hclass = builder_.LoadHClass(result); in LowerDefineMethod()
2745 builder_.SetPropertyInlinedProps(glue_, result, hclass, builder_.ToTaggedInt(length), in LowerDefineMethod()
2746 builder_.Int32(JSFunction::LENGTH_INLINE_PROPERTY_INDEX), VariableType::INT64()); in LowerDefineMethod()
2748 builder_.SetLexicalEnvToFunction(glue_, result, env); in LowerDefineMethod()
2749 builder_.SetModuleToFunction(glue_, result, builder_.GetModuleFromFunction(jsFunc)); in LowerDefineMethod()
2750 builder_.Jump(&successExit); in LowerDefineMethod()
2759 GateRef newGate = builder_.CallStub(glue_, gate, CommonStubCSigns::GetUnmapedArgs, in LowerGetUnmappedArgs()
2760 { glue_, builder_.TruncInt64ToInt32(actualArgc) }); in LowerGetUnmappedArgs()
2767 GateRef taggedArgc = builder_.ToTaggedInt(actualArgc); in LowerCopyRestArgs()
2769 GateRef taggedRestIdx = builder_.ToTaggedInt(restIdx); in LowerCopyRestArgs()
2780 GateRef newGate = LowerCallRuntime(gate, id, {builder_.ToTaggedInt(index)}); in LowerWideLdPatchVar()
2788 GateRef newGate = LowerCallRuntime(gate, id, {builder_.ToTaggedInt(index)}); in LowerWideStPatchVar()
2800 auto ecmaOpcodeGate = builder_.Int32(static_cast<uint32_t>(ecmaOpcode)); in AddProfiling()
2801 GateRef constOpcode = builder_.ToTaggedInt(builder_.ZExtInt32ToInt64(ecmaOpcodeGate)); in AddProfiling()
2802 GateRef slowPath = builder_.Int32ToTaggedInt(builder_.Int32(0)); in AddProfiling()
2803 GateRef debugGate = builder_.CallRuntime(glue_, RTSTUB_ID(DebugAOTPrint), acc_.GetDep(gate), in AddProfiling()
2814 auto ecmaOpcodeGate = builder_.Int32(static_cast<uint32_t>(ecmaOpcode)); in AddProfiling()
2815 GateRef constOpcode = builder_.Int32ToTaggedInt(ecmaOpcodeGate); in AddProfiling()
2817builder_.Int32ToTaggedInt(builder_.Int32(static_cast<int32_t>(OptCodeProfiler::Mode::SLOW_PATH))); in AddProfiling()
2818 …GateRef profiling = builder_.CallRuntime(glue_, RTSTUB_ID(ProfileOptimizedCode), acc_.GetDep(gate), in AddProfiling()
2829 GateRef actualArgc = builder_.Int64(BytecodeCallArgc::ComputeCallArgc(acc_.GetNumValueIn(gate), in LowerCallthis0Imm8V8()
2831 GateRef newTarget = builder_.Undefined(); in LowerCallthis0Imm8V8()
2841 GateRef actualArgc = builder_.Int64(BytecodeCallArgc::ComputeCallArgc(acc_.GetNumValueIn(gate), in LowerCallArg1Imm8V8()
2844 GateRef newTarget = builder_.Undefined(); in LowerCallArg1Imm8V8()
2846 GateRef thisObj = builder_.Undefined(); in LowerCallArg1Imm8V8()
2858 GateRef actualArgc = builder_.Int64(BytecodeCallArgc::ComputeCallArgc(acc_.GetNumValueIn(gate), in LowerWideCallrangePrefImm16V8()
2861 GateRef newTarget = builder_.Undefined(); in LowerWideCallrangePrefImm16V8()
2862 GateRef thisObj = builder_.Undefined(); in LowerWideCallrangePrefImm16V8()
2888 GateRef actualArgc = builder_.Int64(BytecodeCallArgc::ComputeCallArgc(acc_.GetNumValueIn(gate), in LowerCallThisArg1()
2890 GateRef newTarget = builder_.Undefined(); in LowerCallThisArg1()
2901 GateRef actualArgc = builder_.Int64(BytecodeCallArgc::ComputeCallArgc(acc_.GetNumValueIn(gate), in LowerCallargs2Imm8V8V8()
2903 GateRef newTarget = builder_.Undefined(); in LowerCallargs2Imm8V8V8()
2904 GateRef thisObj = builder_.Undefined(); in LowerCallargs2Imm8V8V8()
2916 GateRef actualArgc = builder_.Int64(BytecodeCallArgc::ComputeCallArgc(acc_.GetNumValueIn(gate), in LowerCallargs3Imm8V8V8()
2918 GateRef newTarget = builder_.Undefined(); in LowerCallargs3Imm8V8V8()
2919 GateRef thisObj = builder_.Undefined(); in LowerCallargs3Imm8V8V8()
2932 GateRef actualArgc = builder_.Int64(BytecodeCallArgc::ComputeCallArgc(acc_.GetNumValueIn(gate), in LowerCallthis2Imm8V8V8V8()
2934 GateRef newTarget = builder_.Undefined(); in LowerCallthis2Imm8V8V8V8()
2948 GateRef actualArgc = builder_.Int64(BytecodeCallArgc::ComputeCallArgc(acc_.GetNumValueIn(gate), in LowerCallthis3Imm8V8V8V8V8()
2950 GateRef newTarget = builder_.Undefined(); in LowerCallthis3Imm8V8V8V8V8()
2970 Environment env(gate, circuit_, &builder_); in LowerConstruct()
2985 Label exit(&builder_); in LowerConstruct()
2986 DEFVAlUE(res, (&builder_), VariableType::JS_ANY(), builder_.Undefined()); in LowerConstruct()
2988 builder_.Bind(&exit); in LowerConstruct()
2990 GateRef result = builder_.CallStub( in LowerConstruct()
2992 GateRef state = builder_.GetState(); in LowerConstruct()
3000 Label isHeapObject(&builder_); in LowerFastCall()
3001 Label isJsFcuntion(&builder_); in LowerFastCall()
3002 Label fastCall(&builder_); in LowerFastCall()
3003 Label notFastCall(&builder_); in LowerFastCall()
3004 Label call(&builder_); in LowerFastCall()
3005 Label call1(&builder_); in LowerFastCall()
3006 Label slowCall(&builder_); in LowerFastCall()
3007 Label callBridge(&builder_); in LowerFastCall()
3008 Label callBridge1(&builder_); in LowerFastCall()
3009 Label slowPath(&builder_); in LowerFastCall()
3010 Label notCallConstructor(&builder_); in LowerFastCall()
3011 Label isCallConstructor(&builder_); in LowerFastCall()
3012 builder_.Branch(builder_.TaggedIsHeapObject(func), &isHeapObject, &slowPath); in LowerFastCall()
3013 builder_.Bind(&isHeapObject); in LowerFastCall()
3015 GateRef hClass = builder_.LoadHClass(func); in LowerFastCall()
3016 …GateRef bitfield = builder_.Load(VariableType::INT32(), hClass, builder_.Int32(JSHClass::BIT_FIELD… in LowerFastCall()
3018builder_.Branch(builder_.IsClassConstructorWithBitField(bitfield), &slowPath, &notCallConstructor); in LowerFastCall()
3019 builder_.Bind(&notCallConstructor); in LowerFastCall()
3021builder_.Branch(builder_.IsClassConstructorWithBitField(bitfield), &isCallConstructor, &slowPath); in LowerFastCall()
3022 builder_.Bind(&isCallConstructor); in LowerFastCall()
3025 GateRef method = builder_.GetMethodFromFunction(func); in LowerFastCall()
3026 builder_.Branch(builder_.CanFastCallWithBitField(bitfield), &fastCall, &notFastCall); in LowerFastCall()
3027 builder_.Bind(&fastCall); in LowerFastCall()
3029 GateRef expectedArgc = builder_.Int64Add(builder_.GetExpectedNumOfArgs(method), in LowerFastCall()
3030 builder_.Int64(NUM_MANDATORY_JSFUNC_ARGS)); in LowerFastCall()
3031builder_.Branch(builder_.Int64LessThanOrEqual(expectedArgc, argc), &call, &callBridge); in LowerFastCall()
3032 builder_.Bind(&call); in LowerFastCall()
3034 builder_.StartCallTimer(glue_, gate, {glue_, func, builder_.True()}, true); in LowerFastCall()
3035 GateRef code = builder_.GetCodeAddr(method); in LowerFastCall()
3036 auto depend = builder_.GetDepend(); in LowerFastCall()
3038 … result->WriteVariable(builder_.Call(cs, glue, code, depend, argsFastCall, gate)); in LowerFastCall()
3039 builder_.EndCallTimer(glue_, gate, {glue_, func}, true); in LowerFastCall()
3040 builder_.Jump(exit); in LowerFastCall()
3042 builder_.Bind(&callBridge); in LowerFastCall()
3044 builder_.StartCallTimer(glue_, gate, {glue_, func, builder_.True()}, true); in LowerFastCall()
3046 GateRef target = builder_.IntPtr(RTSTUB_ID(OptimizedFastCallAndPushUndefined)); in LowerFastCall()
3047 auto depend = builder_.GetDepend(); in LowerFastCall()
3048 result->WriteVariable(builder_.Call(cs, glue, target, depend, args, gate)); in LowerFastCall()
3049 builder_.EndCallTimer(glue_, gate, {glue_, func}, true); in LowerFastCall()
3050 builder_.Jump(exit); in LowerFastCall()
3053 builder_.Bind(&notFastCall); in LowerFastCall()
3055 builder_.Branch(builder_.IsOptimizedWithBitField(bitfield), &slowCall, &slowPath); in LowerFastCall()
3056 builder_.Bind(&slowCall); in LowerFastCall()
3058 GateRef method = builder_.GetMethodFromFunction(func); in LowerFastCall()
3059 GateRef expectedArgc = builder_.Int64Add(builder_.GetExpectedNumOfArgs(method), in LowerFastCall()
3060 builder_.Int64(NUM_MANDATORY_JSFUNC_ARGS)); in LowerFastCall()
3061builder_.Branch(builder_.Int64LessThanOrEqual(expectedArgc, argc), &call1, &callBridge1); in LowerFastCall()
3062 builder_.Bind(&call1); in LowerFastCall()
3064 builder_.StartCallTimer(glue_, gate, {glue_, func, builder_.True()}, true); in LowerFastCall()
3065 GateRef code = builder_.GetCodeAddr(method); in LowerFastCall()
3066 auto depend = builder_.GetDepend(); in LowerFastCall()
3068 result->WriteVariable(builder_.Call(cs, glue, code, depend, args, gate)); in LowerFastCall()
3069 builder_.EndCallTimer(glue_, gate, {glue_, func}, true); in LowerFastCall()
3070 builder_.Jump(exit); in LowerFastCall()
3072 builder_.Bind(&callBridge1); in LowerFastCall()
3074 builder_.StartCallTimer(glue_, gate, {glue_, func, builder_.True()}, true); in LowerFastCall()
3076 GateRef target = builder_.IntPtr(RTSTUB_ID(OptimizedCallAndPushUndefined)); in LowerFastCall()
3077 auto depend = builder_.GetDepend(); in LowerFastCall()
3078 result->WriteVariable(builder_.Call(cs, glue, target, depend, args, gate)); in LowerFastCall()
3079 builder_.EndCallTimer(glue_, gate, {glue_, func}, true); in LowerFastCall()
3080 builder_.Jump(exit); in LowerFastCall()
3084 builder_.Bind(&slowPath); in LowerFastCall()
3087 builder_.StartCallTimer(glue_, gate, {glue_, func, builder_.True()}, true); in LowerFastCall()
3089 GateRef target = builder_.IntPtr(RTSTUB_ID(JSCallNew)); in LowerFastCall()
3090 auto depend = builder_.GetDepend(); in LowerFastCall()
3091 result->WriteVariable(builder_.Call(cs, glue, target, depend, args, gate)); in LowerFastCall()
3092 builder_.EndCallTimer(glue_, gate, {glue_, func}, true); in LowerFastCall()
3093 builder_.Jump(exit); in LowerFastCall()
3095 builder_.StartCallTimer(glue_, gate, {glue_, func, builder_.True()}, true); in LowerFastCall()
3097 GateRef target = builder_.IntPtr(RTSTUB_ID(JSCall)); in LowerFastCall()
3098 auto depend = builder_.GetDepend(); in LowerFastCall()
3099 result->WriteVariable(builder_.Call(cs, glue, target, depend, args, gate)); in LowerFastCall()
3100 builder_.EndCallTimer(glue_, gate, {glue_, func}, true); in LowerFastCall()
3101 builder_.Jump(exit); in LowerFastCall()
3108 Environment env(gate, circuit_, &builder_); in LowerTypedCall()
3110 GateRef method = builder_.GetMethodFromFunction(func); in LowerTypedCall()
3111 GateRef code = builder_.GetCodeAddr(method); in LowerTypedCall()
3117 GateRef state = builder_.GetState(); in LowerTypedCall()
3118 auto depend = builder_.GetDepend(); in LowerTypedCall()
3120 GateRef result = builder_.Call(cs, glue_, code, depend, args, gate); in LowerTypedCall()
3126 Environment env(gate, circuit_, &builder_); in LowerTypedFastCall()
3128 GateRef method = builder_.GetMethodFromFunction(func); in LowerTypedFastCall()
3129 GateRef code = builder_.GetCodeAddr(method); in LowerTypedFastCall()
3135 GateRef state = builder_.GetState(); in LowerTypedFastCall()
3136 auto depend = builder_.GetDepend(); in LowerTypedFastCall()
3138 GateRef result = builder_.Call(cs, glue_, code, depend, args, gate); in LowerTypedFastCall()
3144 Environment env(gate, circuit_, &builder_); in LowerCheckSafePointAndStackOver()
3145 Label slowPath(&builder_); in LowerCheckSafePointAndStackOver()
3146 Label dispatch(&builder_); in LowerCheckSafePointAndStackOver()
3147 Label checkStackOver(&builder_); in LowerCheckSafePointAndStackOver()
3148 Label stackOverflow(&builder_); in LowerCheckSafePointAndStackOver()
3149 GateRef stackLimit = builder_.Load(VariableType::INT64(), glue_, in LowerCheckSafePointAndStackOver()
3150builder_.IntPtr(JSThread::GlueData::GetStackLimitOffset(builder_.GetCompilationConfig()->Is32Bit()… in LowerCheckSafePointAndStackOver()
3151 GateRef interruptsFlag = builder_.Load(VariableType::INT8(), glue_, in LowerCheckSafePointAndStackOver()
3152builder_.IntPtr(JSThread::GlueData::GetInterruptVectorOffset(builder_.GetCompilationConfig()->Is32… in LowerCheckSafePointAndStackOver()
3153 GateRef spValue = builder_.ReadSp(); in LowerCheckSafePointAndStackOver()
3154 builder_.Branch(builder_.Int8Equal(interruptsFlag, in LowerCheckSafePointAndStackOver()
3155 builder_.Int8(VmThreadControl::VM_NEED_SUSPENSION)), &slowPath, &checkStackOver); in LowerCheckSafePointAndStackOver()
3156 builder_.Bind(&slowPath); in LowerCheckSafePointAndStackOver()
3159 builder_.Jump(&checkStackOver); in LowerCheckSafePointAndStackOver()
3161 builder_.Bind(&checkStackOver); in LowerCheckSafePointAndStackOver()
3163builder_.Branch(builder_.Int64LessThanOrEqual(spValue, stackLimit), &stackOverflow, &dispatch); in LowerCheckSafePointAndStackOver()
3164 builder_.Bind(&stackOverflow); in LowerCheckSafePointAndStackOver()
3167 builder_.Return(res); in LowerCheckSafePointAndStackOver()
3170 builder_.Bind(&dispatch); in LowerCheckSafePointAndStackOver()
3171 acc_.ReplaceGate(gate, builder_.GetState(), builder_.GetDepend(), Circuit::NullGate()); in LowerCheckSafePointAndStackOver()
3187 GateRef res = builder_.LoadObjectFromConstPool(jsFunc, stringId); in LowerLdStr()