14514f5e3Sopenharmony_ci/*
24514f5e3Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
34514f5e3Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
44514f5e3Sopenharmony_ci * you may not use this file except in compliance with the License.
54514f5e3Sopenharmony_ci * You may obtain a copy of the License at
64514f5e3Sopenharmony_ci *
74514f5e3Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
84514f5e3Sopenharmony_ci *
94514f5e3Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
104514f5e3Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
114514f5e3Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
124514f5e3Sopenharmony_ci * See the License for the specific language governing permissions and
134514f5e3Sopenharmony_ci * limitations under the License.
144514f5e3Sopenharmony_ci */
154514f5e3Sopenharmony_ci
164514f5e3Sopenharmony_ci#ifndef ECMASCRIPT_COMPILER_STUB_BUILDER_H
174514f5e3Sopenharmony_ci#define ECMASCRIPT_COMPILER_STUB_BUILDER_H
184514f5e3Sopenharmony_ci
194514f5e3Sopenharmony_ci#include "ecmascript/base/config.h"
204514f5e3Sopenharmony_ci#include "ecmascript/compiler/call_signature.h"
214514f5e3Sopenharmony_ci#include "ecmascript/compiler/circuit_builder.h"
224514f5e3Sopenharmony_ci#include "ecmascript/compiler/lcr_gate_meta_data.h"
234514f5e3Sopenharmony_ci#include "ecmascript/compiler/profiler_operation.h"
244514f5e3Sopenharmony_ci#include "ecmascript/compiler/share_gate_meta_data.h"
254514f5e3Sopenharmony_ci#include "ecmascript/compiler/variable_type.h"
264514f5e3Sopenharmony_ci
274514f5e3Sopenharmony_cinamespace panda::ecmascript::kungfu {
284514f5e3Sopenharmony_cistruct StringInfoGateRef;
294514f5e3Sopenharmony_ciusing namespace panda::ecmascript;
304514f5e3Sopenharmony_ci// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
314514f5e3Sopenharmony_ci#define DEFVARIABLE(varname, type, val) Variable varname(GetEnvironment(), type, NextVariableId(), val)
324514f5e3Sopenharmony_ci
334514f5e3Sopenharmony_ci#define SUBENTRY(messageId, condition)                                              \
344514f5e3Sopenharmony_ci    GateRef glueArg = PtrArgument(0);                                               \
354514f5e3Sopenharmony_ci    auto env = GetEnvironment();                                                    \
364514f5e3Sopenharmony_ci    Label subEntry(env);                                                            \
374514f5e3Sopenharmony_ci    env->SubCfgEntry(&subEntry);                                                    \
384514f5e3Sopenharmony_ci    Label nextLabel(env);                                                           \
394514f5e3Sopenharmony_ci    Assert(messageId, __LINE__, glueArg, condition, &nextLabel);                    \
404514f5e3Sopenharmony_ci    Bind(&nextLabel)
414514f5e3Sopenharmony_ci#define SUBENTRY_WITH_GLUE(messageId, condition, glueArg)                           \
424514f5e3Sopenharmony_ci    auto env = GetEnvironment();                                                    \
434514f5e3Sopenharmony_ci    Label subEntry(env);                                                            \
444514f5e3Sopenharmony_ci    env->SubCfgEntry(&subEntry);                                                    \
454514f5e3Sopenharmony_ci    Label nextLabel(env);                                                           \
464514f5e3Sopenharmony_ci    Assert(messageId, __LINE__, glueArg, condition, &nextLabel);                    \
474514f5e3Sopenharmony_ci    Bind(&nextLabel)
484514f5e3Sopenharmony_ci
494514f5e3Sopenharmony_ci#ifndef NDEBUG
504514f5e3Sopenharmony_ci#define ASM_ASSERT(messageId, condition)                                            \
514514f5e3Sopenharmony_ci    if (!GetEnvironment()->GetCircuit()->IsOptimizedOrFastJit() &&                  \
524514f5e3Sopenharmony_ci        !GetEnvironment()->IsBaselineBuiltin()) {                                   \
534514f5e3Sopenharmony_ci        SUBENTRY(messageId, condition);                                             \
544514f5e3Sopenharmony_ci        EXITENTRY();                                                                \
554514f5e3Sopenharmony_ci    }
564514f5e3Sopenharmony_ci#define ASM_ASSERT_WITH_GLUE(messageId, condition, glue)                            \
574514f5e3Sopenharmony_ci    SUBENTRY_WITH_GLUE(messageId, condition, glue)
584514f5e3Sopenharmony_ci#elif defined(ENABLE_ASM_ASSERT)
594514f5e3Sopenharmony_ci#define ASM_ASSERT(messageId, condition)                                            \
604514f5e3Sopenharmony_ci    if (!GetEnvironment()->GetCircuit()->IsOptimizedOrFastJit() &&                  \
614514f5e3Sopenharmony_ci        !GetEnvironment()->IsBaselineBuiltin()) {                                   \
624514f5e3Sopenharmony_ci        SUBENTRY(messageId, condition);                                             \
634514f5e3Sopenharmony_ci        EXITENTRY();                                                                \
644514f5e3Sopenharmony_ci    }
654514f5e3Sopenharmony_ci#define ASM_ASSERT_WITH_GLUE(messageId, condition, glue)                            \
664514f5e3Sopenharmony_ci    SUBENTRY_WITH_GLUE(messageId, condition, glue)
674514f5e3Sopenharmony_ci#else
684514f5e3Sopenharmony_ci#define ASM_ASSERT(messageId, ...) ((void)0)
694514f5e3Sopenharmony_ci#define ASM_ASSERT_WITH_GLUE(messageId, ...) ((void)0)
704514f5e3Sopenharmony_ci#endif
714514f5e3Sopenharmony_ci
724514f5e3Sopenharmony_ci#ifndef NDEBUG
734514f5e3Sopenharmony_ci#define EXITENTRY()                                                                 \
744514f5e3Sopenharmony_ci    GetEnvironment()->SubCfgExit()
754514f5e3Sopenharmony_ci#elif defined(ENABLE_ASM_ASSERT)
764514f5e3Sopenharmony_ci#define EXITENTRY()                                                                 \
774514f5e3Sopenharmony_ci    GetEnvironment()->SubCfgExit()
784514f5e3Sopenharmony_ci#else
794514f5e3Sopenharmony_ci#define EXITENTRY() ((void)0)
804514f5e3Sopenharmony_ci#endif
814514f5e3Sopenharmony_ci
824514f5e3Sopenharmony_ciclass StubBuilder {
834514f5e3Sopenharmony_cipublic:
844514f5e3Sopenharmony_ci    explicit StubBuilder(StubBuilder *parent)
854514f5e3Sopenharmony_ci        : callSignature_(parent->GetCallSignature()), env_(parent->GetEnvironment()) {}
864514f5e3Sopenharmony_ci    StubBuilder(CallSignature *callSignature, Environment *env)
874514f5e3Sopenharmony_ci        : callSignature_(callSignature), env_(env) {}
884514f5e3Sopenharmony_ci    explicit StubBuilder(Environment *env)
894514f5e3Sopenharmony_ci        : env_(env) {}
904514f5e3Sopenharmony_ci    virtual ~StubBuilder() = default;
914514f5e3Sopenharmony_ci    NO_MOVE_SEMANTIC(StubBuilder);
924514f5e3Sopenharmony_ci    NO_COPY_SEMANTIC(StubBuilder);
934514f5e3Sopenharmony_ci    virtual void GenerateCircuit() = 0;
944514f5e3Sopenharmony_ci    Environment *GetEnvironment() const
954514f5e3Sopenharmony_ci    {
964514f5e3Sopenharmony_ci        return env_;
974514f5e3Sopenharmony_ci    }
984514f5e3Sopenharmony_ci    CallSignature *GetCallSignature() const
994514f5e3Sopenharmony_ci    {
1004514f5e3Sopenharmony_ci        return callSignature_;
1014514f5e3Sopenharmony_ci    }
1024514f5e3Sopenharmony_ci    int NextVariableId();
1034514f5e3Sopenharmony_ci    // constant
1044514f5e3Sopenharmony_ci    GateRef Int8(int8_t value);
1054514f5e3Sopenharmony_ci    GateRef Int16(int16_t value);
1064514f5e3Sopenharmony_ci    GateRef Int32(int32_t value);
1074514f5e3Sopenharmony_ci    GateRef Int64(int64_t value);
1084514f5e3Sopenharmony_ci    GateRef TaggedInt(int32_t value);
1094514f5e3Sopenharmony_ci    GateRef StringPtr(std::string_view str);
1104514f5e3Sopenharmony_ci    GateRef IntPtr(int64_t value);
1114514f5e3Sopenharmony_ci    GateRef IntPtrSize();
1124514f5e3Sopenharmony_ci    GateRef RelocatableData(uint64_t value);
1134514f5e3Sopenharmony_ci    GateRef True();
1144514f5e3Sopenharmony_ci    GateRef False();
1154514f5e3Sopenharmony_ci    GateRef Boolean(bool value);
1164514f5e3Sopenharmony_ci    GateRef Double(double value);
1174514f5e3Sopenharmony_ci    GateRef Undefined();
1184514f5e3Sopenharmony_ci    GateRef Hole();
1194514f5e3Sopenharmony_ci    GateRef SpecialHole();
1204514f5e3Sopenharmony_ci    GateRef Null();
1214514f5e3Sopenharmony_ci    GateRef NullPtr();
1224514f5e3Sopenharmony_ci    GateRef Exception();
1234514f5e3Sopenharmony_ci    // parameter
1244514f5e3Sopenharmony_ci    GateRef Argument(size_t index);
1254514f5e3Sopenharmony_ci    GateRef Int1Argument(size_t index);
1264514f5e3Sopenharmony_ci    GateRef Int32Argument(size_t index);
1274514f5e3Sopenharmony_ci    GateRef Int64Argument(size_t index);
1284514f5e3Sopenharmony_ci    GateRef TaggedArgument(size_t index);
1294514f5e3Sopenharmony_ci    GateRef TaggedPointerArgument(size_t index);
1304514f5e3Sopenharmony_ci    GateRef PtrArgument(size_t index);
1314514f5e3Sopenharmony_ci    GateRef Float32Argument(size_t index);
1324514f5e3Sopenharmony_ci    GateRef Float64Argument(size_t index);
1334514f5e3Sopenharmony_ci    GateRef Alloca(int size);
1344514f5e3Sopenharmony_ci    // control flow
1354514f5e3Sopenharmony_ci    GateRef Return(GateRef value);
1364514f5e3Sopenharmony_ci    GateRef Return();
1374514f5e3Sopenharmony_ci    void Bind(Label *label);
1384514f5e3Sopenharmony_ci    void Jump(Label *label);
1394514f5e3Sopenharmony_ci
1404514f5e3Sopenharmony_ci#define BRANCH(condition, trueLabel, falseLabel)                       \
1414514f5e3Sopenharmony_ci    {                                                                  \
1424514f5e3Sopenharmony_ci        std::ostringstream os;                                         \
1434514f5e3Sopenharmony_ci        os << __func__ << ": " << #trueLabel << "- " << #falseLabel;   \
1444514f5e3Sopenharmony_ci        Branch(condition, trueLabel, falseLabel, os.str().c_str());    \
1454514f5e3Sopenharmony_ci    }
1464514f5e3Sopenharmony_ci
1474514f5e3Sopenharmony_ci    void Branch(GateRef condition, Label *trueLabel, Label *falseLabel, const char *comment = nullptr);
1484514f5e3Sopenharmony_ci
1494514f5e3Sopenharmony_ci#define BRANCH_LIKELY(condition, trueLabel, falseLabel)                                  \
1504514f5e3Sopenharmony_ci    {                                                                                    \
1514514f5e3Sopenharmony_ci        std::ostringstream os;                                                           \
1524514f5e3Sopenharmony_ci        os << __func__ << ": " << #trueLabel << "(likely)- " << #falseLabel;             \
1534514f5e3Sopenharmony_ci        BranchPredict(condition, trueLabel, falseLabel,                                  \
1544514f5e3Sopenharmony_ci            BranchWeight::DEOPT_WEIGHT, BranchWeight::ONE_WEIGHT, os.str().c_str());     \
1554514f5e3Sopenharmony_ci    }
1564514f5e3Sopenharmony_ci
1574514f5e3Sopenharmony_ci#define BRANCH_UNLIKELY(condition, trueLabel, falseLabel)                                \
1584514f5e3Sopenharmony_ci    {                                                                                    \
1594514f5e3Sopenharmony_ci        std::ostringstream os;                                                           \
1604514f5e3Sopenharmony_ci        os << __func__ << ": " << #trueLabel << "(unlikely)- " << #falseLabel;           \
1614514f5e3Sopenharmony_ci        BranchPredict(condition, trueLabel, falseLabel,                                  \
1624514f5e3Sopenharmony_ci            BranchWeight::ONE_WEIGHT, BranchWeight::DEOPT_WEIGHT, os.str().c_str());     \
1634514f5e3Sopenharmony_ci    }
1644514f5e3Sopenharmony_ci
1654514f5e3Sopenharmony_ci#define BRANCH_NO_WEIGHT(condition, trueLabel, falseLabel)                               \
1664514f5e3Sopenharmony_ci    {                                                                                    \
1674514f5e3Sopenharmony_ci        std::ostringstream os;                                                           \
1684514f5e3Sopenharmony_ci        os << __func__ << ": " << #trueLabel << "(no weight)- " << #falseLabel;          \
1694514f5e3Sopenharmony_ci        BranchPredict(condition, trueLabel, falseLabel,                                  \
1704514f5e3Sopenharmony_ci            BranchWeight::ZERO_WEIGHT, BranchWeight::ZERO_WEIGHT, os.str().c_str());     \
1714514f5e3Sopenharmony_ci    }
1724514f5e3Sopenharmony_ci
1734514f5e3Sopenharmony_ci    void BranchPredict(GateRef condition, Label *trueLabel, Label *falseLabel,
1744514f5e3Sopenharmony_ci                       uint32_t trueWeight = BranchWeight::ONE_WEIGHT, uint32_t falseWeight = BranchWeight::ONE_WEIGHT,
1754514f5e3Sopenharmony_ci                       const char *comment = nullptr);
1764514f5e3Sopenharmony_ci
1774514f5e3Sopenharmony_ci    void Switch(GateRef index, Label *defaultLabel, int64_t *keysValue, Label *keysLabel, int numberOfKeys);
1784514f5e3Sopenharmony_ci    void LoopBegin(Label *loopHead);
1794514f5e3Sopenharmony_ci    void LoopEnd(Label *loopHead);
1804514f5e3Sopenharmony_ci    /// LoopEnd with safepoint
1814514f5e3Sopenharmony_ci    void LoopEnd(Label *loopHead, Environment *env, GateRef glue);
1824514f5e3Sopenharmony_ci    GateRef CheckSuspend(GateRef glue);
1834514f5e3Sopenharmony_ci    // call operation
1844514f5e3Sopenharmony_ci    GateRef CallRuntime(GateRef glue, int index, const std::vector<GateRef>& args);
1854514f5e3Sopenharmony_ci    GateRef CallRuntime(GateRef glue, int index, GateRef argc, GateRef argv);
1864514f5e3Sopenharmony_ci    GateRef CallNGCRuntime(GateRef glue, int index,
1874514f5e3Sopenharmony_ci                           const std::vector<GateRef>& args, GateRef hir = Circuit::NullGate());
1884514f5e3Sopenharmony_ci    GateRef FastCallOptimized(GateRef glue, GateRef code,
1894514f5e3Sopenharmony_ci                              const std::vector<GateRef>& args, GateRef hir = Circuit::NullGate());
1904514f5e3Sopenharmony_ci    GateRef CallOptimized(GateRef glue, GateRef code,
1914514f5e3Sopenharmony_ci                          const std::vector<GateRef>& args, GateRef hir = Circuit::NullGate());
1924514f5e3Sopenharmony_ci    GateRef GetAotCodeAddr(GateRef jsFunc);
1934514f5e3Sopenharmony_ci    GateRef CallStub(GateRef glue, int index, const std::initializer_list<GateRef>& args);
1944514f5e3Sopenharmony_ci    GateRef CallBuiltinRuntime(GateRef glue, const std::initializer_list<GateRef>& args, bool isNew = false);
1954514f5e3Sopenharmony_ci    GateRef CallBuiltinRuntimeWithNewTarget(GateRef glue, const std::initializer_list<GateRef>& args);
1964514f5e3Sopenharmony_ci    void DebugPrint(GateRef thread, std::initializer_list<GateRef> args);
1974514f5e3Sopenharmony_ci    void FatalPrint(GateRef thread, std::initializer_list<GateRef> args);
1984514f5e3Sopenharmony_ci    // memory
1994514f5e3Sopenharmony_ci    GateRef Load(VariableType type, GateRef base, GateRef offset);
2004514f5e3Sopenharmony_ci    GateRef Load(VariableType type, GateRef base);
2014514f5e3Sopenharmony_ci    void Store(VariableType type,
2024514f5e3Sopenharmony_ci               GateRef glue,
2034514f5e3Sopenharmony_ci               GateRef base,
2044514f5e3Sopenharmony_ci               GateRef offset,
2054514f5e3Sopenharmony_ci               GateRef value,
2064514f5e3Sopenharmony_ci               MemoryAttribute mAttr = MemoryAttribute::Default());
2074514f5e3Sopenharmony_ci    // arithmetic
2084514f5e3Sopenharmony_ci    GateRef TaggedCastToIntPtr(GateRef x);
2094514f5e3Sopenharmony_ci    GateRef Int16Add(GateRef x, GateRef y);
2104514f5e3Sopenharmony_ci    GateRef Int32Add(GateRef x, GateRef y);
2114514f5e3Sopenharmony_ci    GateRef Int64Add(GateRef x, GateRef y);
2124514f5e3Sopenharmony_ci    GateRef DoubleAdd(GateRef x, GateRef y);
2134514f5e3Sopenharmony_ci    GateRef PtrAdd(GateRef x, GateRef y);
2144514f5e3Sopenharmony_ci    GateRef PtrSub(GateRef x, GateRef y);
2154514f5e3Sopenharmony_ci    GateRef PtrMul(GateRef x, GateRef y);
2164514f5e3Sopenharmony_ci    GateRef IntPtrEqual(GateRef x, GateRef y);
2174514f5e3Sopenharmony_ci    GateRef Int16Sub(GateRef x, GateRef y);
2184514f5e3Sopenharmony_ci    GateRef Int32Sub(GateRef x, GateRef y);
2194514f5e3Sopenharmony_ci    GateRef Int64Sub(GateRef x, GateRef y);
2204514f5e3Sopenharmony_ci    GateRef DoubleSub(GateRef x, GateRef y);
2214514f5e3Sopenharmony_ci    GateRef Int32Mul(GateRef x, GateRef y);
2224514f5e3Sopenharmony_ci    GateRef Int64Mul(GateRef x, GateRef y);
2234514f5e3Sopenharmony_ci    GateRef DoubleMul(GateRef x, GateRef y);
2244514f5e3Sopenharmony_ci    GateRef DoubleDiv(GateRef x, GateRef y);
2254514f5e3Sopenharmony_ci    GateRef Int32Div(GateRef x, GateRef y);
2264514f5e3Sopenharmony_ci    GateRef Int32Mod(GateRef x, GateRef y);
2274514f5e3Sopenharmony_ci    GateRef DoubleMod(GateRef x, GateRef y);
2284514f5e3Sopenharmony_ci    GateRef Int64Div(GateRef x, GateRef y);
2294514f5e3Sopenharmony_ci    GateRef IntPtrDiv(GateRef x, GateRef y);
2304514f5e3Sopenharmony_ci    // bit operation
2314514f5e3Sopenharmony_ci    GateRef Int32Or(GateRef x, GateRef y);
2324514f5e3Sopenharmony_ci    GateRef Int8And(GateRef x, GateRef y);
2334514f5e3Sopenharmony_ci    GateRef Int8Xor(GateRef x, GateRef y);
2344514f5e3Sopenharmony_ci    GateRef Int32And(GateRef x, GateRef y);
2354514f5e3Sopenharmony_ci    GateRef IntPtrAnd(GateRef x, GateRef y);
2364514f5e3Sopenharmony_ci    GateRef BitAnd(GateRef x, GateRef y);
2374514f5e3Sopenharmony_ci    GateRef BitOr(GateRef x, GateRef y);
2384514f5e3Sopenharmony_ci    GateRef Int32Not(GateRef x);
2394514f5e3Sopenharmony_ci    GateRef IntPtrNot(GateRef x);
2404514f5e3Sopenharmony_ci    GateRef BoolNot(GateRef x);
2414514f5e3Sopenharmony_ci    GateRef Int32Xor(GateRef x, GateRef y);
2424514f5e3Sopenharmony_ci    GateRef FixLoadType(GateRef x);
2434514f5e3Sopenharmony_ci    GateRef Int64Or(GateRef x, GateRef y);
2444514f5e3Sopenharmony_ci    GateRef IntPtrOr(GateRef x, GateRef y);
2454514f5e3Sopenharmony_ci    GateRef Int64And(GateRef x, GateRef y);
2464514f5e3Sopenharmony_ci    GateRef Int64Xor(GateRef x, GateRef y);
2474514f5e3Sopenharmony_ci    GateRef Int64Not(GateRef x);
2484514f5e3Sopenharmony_ci    GateRef Int16LSL(GateRef x, GateRef y);
2494514f5e3Sopenharmony_ci    GateRef Int32LSL(GateRef x, GateRef y);
2504514f5e3Sopenharmony_ci    GateRef Int64LSL(GateRef x, GateRef y);
2514514f5e3Sopenharmony_ci    GateRef IntPtrLSL(GateRef x, GateRef y);
2524514f5e3Sopenharmony_ci    GateRef Int8LSR(GateRef x, GateRef y);
2534514f5e3Sopenharmony_ci    GateRef Int32LSR(GateRef x, GateRef y);
2544514f5e3Sopenharmony_ci    GateRef Int64LSR(GateRef x, GateRef y);
2554514f5e3Sopenharmony_ci    GateRef IntPtrLSR(GateRef x, GateRef y);
2564514f5e3Sopenharmony_ci    GateRef Int32ASR(GateRef x, GateRef y);
2574514f5e3Sopenharmony_ci    GateRef TaggedIsInt(GateRef x);
2584514f5e3Sopenharmony_ci    GateRef TaggedIsDouble(GateRef x);
2594514f5e3Sopenharmony_ci    GateRef TaggedIsObject(GateRef x);
2604514f5e3Sopenharmony_ci    GateRef TaggedIsNumber(GateRef x);
2614514f5e3Sopenharmony_ci    GateRef TaggedIsNumeric(GateRef x);
2624514f5e3Sopenharmony_ci    GateRef TaggedIsHole(GateRef x);
2634514f5e3Sopenharmony_ci    GateRef TaggedIsNotHole(GateRef x);
2644514f5e3Sopenharmony_ci    GateRef TaggedIsUndefined(GateRef x);
2654514f5e3Sopenharmony_ci    GateRef TaggedIsException(GateRef x);
2664514f5e3Sopenharmony_ci    GateRef TaggedIsSpecial(GateRef x);
2674514f5e3Sopenharmony_ci    GateRef TaggedIsRegularObject(GateRef x);
2684514f5e3Sopenharmony_ci    GateRef TaggedIsHeapObject(GateRef x);
2694514f5e3Sopenharmony_ci    GateRef TaggedIsAccessor(GateRef x);
2704514f5e3Sopenharmony_ci    GateRef ObjectAddressToRange(GateRef x);
2714514f5e3Sopenharmony_ci    GateRef RegionInSpace(GateRef region, RegionSpaceFlag space);
2724514f5e3Sopenharmony_ci    GateRef RegionInSpace(GateRef region, RegionSpaceFlag spaceBegin, RegionSpaceFlag spaceEnd);
2734514f5e3Sopenharmony_ci    GateRef InEdenGeneration(GateRef region);
2744514f5e3Sopenharmony_ci    GateRef InYoungGeneration(GateRef region);
2754514f5e3Sopenharmony_ci    GateRef InGeneralYoungGeneration(GateRef region);
2764514f5e3Sopenharmony_ci    GateRef InGeneralOldGeneration(GateRef region);
2774514f5e3Sopenharmony_ci    GateRef InSharedHeap(GateRef region);
2784514f5e3Sopenharmony_ci    GateRef InSharedSweepableSpace(GateRef region);
2794514f5e3Sopenharmony_ci    GateRef TaggedIsGeneratorObject(GateRef x);
2804514f5e3Sopenharmony_ci    GateRef TaggedIsJSArray(GateRef x);
2814514f5e3Sopenharmony_ci    GateRef IsTaggedArray(GateRef x);
2824514f5e3Sopenharmony_ci    GateRef TaggedIsAsyncGeneratorObject(GateRef x);
2834514f5e3Sopenharmony_ci    GateRef TaggedIsJSGlobalObject(GateRef x);
2844514f5e3Sopenharmony_ci    GateRef TaggedIsWeak(GateRef x);
2854514f5e3Sopenharmony_ci    GateRef TaggedIsPrototypeHandler(GateRef x);
2864514f5e3Sopenharmony_ci    GateRef TaggedIsStoreTSHandler(GateRef x);
2874514f5e3Sopenharmony_ci    GateRef TaggedIsTransWithProtoHandler(GateRef x);
2884514f5e3Sopenharmony_ci    GateRef TaggedIsTransitionHandler(GateRef x);
2894514f5e3Sopenharmony_ci    GateRef TaggedIsString(GateRef obj);
2904514f5e3Sopenharmony_ci    GateRef TaggedIsStringIterator(GateRef obj);
2914514f5e3Sopenharmony_ci    GateRef TaggedIsSharedObj(GateRef obj);
2924514f5e3Sopenharmony_ci    GateRef BothAreString(GateRef x, GateRef y);
2934514f5e3Sopenharmony_ci    GateRef TaggedIsStringOrSymbol(GateRef obj);
2944514f5e3Sopenharmony_ci    GateRef TaggedIsSymbol(GateRef obj);
2954514f5e3Sopenharmony_ci    GateRef TaggedIsArrayBuffer(GateRef obj);
2964514f5e3Sopenharmony_ci    GateRef TaggedIsProtoChangeMarker(GateRef obj);
2974514f5e3Sopenharmony_ci    GateRef GetNextPositionForHash(GateRef last, GateRef count, GateRef size);
2984514f5e3Sopenharmony_ci    GateRef DoubleIsNAN(GateRef x);
2994514f5e3Sopenharmony_ci    GateRef DoubleIsINF(GateRef x);
3004514f5e3Sopenharmony_ci    GateRef DoubleIsNanOrInf(GateRef x);
3014514f5e3Sopenharmony_ci    GateRef DoubleAbs(GateRef x);
3024514f5e3Sopenharmony_ci    GateRef DoubleIsInteger(GateRef x);
3034514f5e3Sopenharmony_ci    GateRef DoubleTrunc(GateRef x);
3044514f5e3Sopenharmony_ci    GateRef TaggedIsNull(GateRef x);
3054514f5e3Sopenharmony_ci    GateRef TaggedIsUndefinedOrNull(GateRef x);
3064514f5e3Sopenharmony_ci    GateRef TaggedIsUndefinedOrNullOrHole(GateRef x);
3074514f5e3Sopenharmony_ci    GateRef TaggedIsTrue(GateRef x);
3084514f5e3Sopenharmony_ci    GateRef TaggedIsFalse(GateRef x);
3094514f5e3Sopenharmony_ci    GateRef TaggedIsBoolean(GateRef x);
3104514f5e3Sopenharmony_ci    GateRef TaggedGetInt(GateRef x);
3114514f5e3Sopenharmony_ci    GateRef NumberGetInt(GateRef glue, GateRef x);
3124514f5e3Sopenharmony_ci    GateRef TaggedGetNumber(GateRef x);
3134514f5e3Sopenharmony_ci    GateRef Int8ToTaggedInt(GateRef x);
3144514f5e3Sopenharmony_ci    GateRef Int16ToTaggedInt(GateRef x);
3154514f5e3Sopenharmony_ci    GateRef IntToTaggedPtr(GateRef x);
3164514f5e3Sopenharmony_ci    GateRef IntToTaggedInt(GateRef x);
3174514f5e3Sopenharmony_ci    GateRef Int64ToTaggedInt(GateRef x);
3184514f5e3Sopenharmony_ci    GateRef Int64ToTaggedIntPtr(GateRef x);
3194514f5e3Sopenharmony_ci    GateRef DoubleToTaggedDoublePtr(GateRef x);
3204514f5e3Sopenharmony_ci    GateRef BooleanToTaggedBooleanPtr(GateRef x);
3214514f5e3Sopenharmony_ci    GateRef TaggedPtrToTaggedDoublePtr(GateRef x);
3224514f5e3Sopenharmony_ci    GateRef TaggedPtrToTaggedIntPtr(GateRef x);
3234514f5e3Sopenharmony_ci    GateRef CastDoubleToInt64(GateRef x);
3244514f5e3Sopenharmony_ci    GateRef CastFloat32ToInt32(GateRef x);
3254514f5e3Sopenharmony_ci    GateRef TaggedTrue();
3264514f5e3Sopenharmony_ci    GateRef TaggedFalse();
3274514f5e3Sopenharmony_ci    GateRef TaggedUndefined();
3284514f5e3Sopenharmony_ci    // compare operation
3294514f5e3Sopenharmony_ci    GateRef Int8Equal(GateRef x, GateRef y);
3304514f5e3Sopenharmony_ci    GateRef Int8GreaterThanOrEqual(GateRef x, GateRef y);
3314514f5e3Sopenharmony_ci    GateRef Equal(GateRef x, GateRef y);
3324514f5e3Sopenharmony_ci    GateRef NotEqual(GateRef x, GateRef y);
3334514f5e3Sopenharmony_ci    GateRef Int32Equal(GateRef x, GateRef y);
3344514f5e3Sopenharmony_ci    GateRef Int32NotEqual(GateRef x, GateRef y);
3354514f5e3Sopenharmony_ci    GateRef Int64Equal(GateRef x, GateRef y);
3364514f5e3Sopenharmony_ci    GateRef DoubleEqual(GateRef x, GateRef y);
3374514f5e3Sopenharmony_ci    GateRef DoubleNotEqual(GateRef x, GateRef y);
3384514f5e3Sopenharmony_ci    GateRef Int64NotEqual(GateRef x, GateRef y);
3394514f5e3Sopenharmony_ci    GateRef DoubleLessThan(GateRef x, GateRef y);
3404514f5e3Sopenharmony_ci    GateRef DoubleLessThanOrEqual(GateRef x, GateRef y);
3414514f5e3Sopenharmony_ci    GateRef DoubleGreaterThan(GateRef x, GateRef y);
3424514f5e3Sopenharmony_ci    GateRef DoubleGreaterThanOrEqual(GateRef x, GateRef y);
3434514f5e3Sopenharmony_ci    GateRef Int32GreaterThan(GateRef x, GateRef y);
3444514f5e3Sopenharmony_ci    GateRef Int32LessThan(GateRef x, GateRef y);
3454514f5e3Sopenharmony_ci    GateRef Int32GreaterThanOrEqual(GateRef x, GateRef y);
3464514f5e3Sopenharmony_ci    GateRef Int32LessThanOrEqual(GateRef x, GateRef y);
3474514f5e3Sopenharmony_ci    GateRef Int32UnsignedGreaterThan(GateRef x, GateRef y);
3484514f5e3Sopenharmony_ci    GateRef Int32UnsignedLessThan(GateRef x, GateRef y);
3494514f5e3Sopenharmony_ci    GateRef Int32UnsignedGreaterThanOrEqual(GateRef x, GateRef y);
3504514f5e3Sopenharmony_ci    GateRef Int32UnsignedLessThanOrEqual(GateRef x, GateRef y);
3514514f5e3Sopenharmony_ci    GateRef Int64GreaterThan(GateRef x, GateRef y);
3524514f5e3Sopenharmony_ci    GateRef Int64LessThan(GateRef x, GateRef y);
3534514f5e3Sopenharmony_ci    GateRef Int64LessThanOrEqual(GateRef x, GateRef y);
3544514f5e3Sopenharmony_ci    GateRef Int64GreaterThanOrEqual(GateRef x, GateRef y);
3554514f5e3Sopenharmony_ci    GateRef Int64UnsignedLessThanOrEqual(GateRef x, GateRef y);
3564514f5e3Sopenharmony_ci    GateRef Int64UnsignedGreaterThan(GateRef x, GateRef y);
3574514f5e3Sopenharmony_ci    GateRef Int64UnsignedGreaterThanOrEqual(GateRef x, GateRef y);
3584514f5e3Sopenharmony_ci    GateRef IntPtrGreaterThan(GateRef x, GateRef y);
3594514f5e3Sopenharmony_ci    // cast operation
3604514f5e3Sopenharmony_ci    GateRef ChangeInt64ToIntPtr(GateRef val);
3614514f5e3Sopenharmony_ci    GateRef ZExtInt32ToPtr(GateRef val);
3624514f5e3Sopenharmony_ci    GateRef ChangeIntPtrToInt32(GateRef val);
3634514f5e3Sopenharmony_ci    GateRef ToLength(GateRef glue, GateRef target);
3644514f5e3Sopenharmony_ci    GateRef ToIndex(GateRef glue, GateRef tagged);
3654514f5e3Sopenharmony_ci
3664514f5e3Sopenharmony_ci    // math operation
3674514f5e3Sopenharmony_ci    GateRef Sqrt(GateRef x);
3684514f5e3Sopenharmony_ci    GateRef GetSetterFromAccessor(GateRef accessor);
3694514f5e3Sopenharmony_ci    GateRef GetElementsArray(GateRef object);
3704514f5e3Sopenharmony_ci    void SetElementsArray(VariableType type, GateRef glue, GateRef object, GateRef elementsArray,
3714514f5e3Sopenharmony_ci                          MemoryAttribute mAttr = MemoryAttribute::Default());
3724514f5e3Sopenharmony_ci    GateRef GetPropertiesArray(GateRef object);
3734514f5e3Sopenharmony_ci    // SetProperties in js_object.h
3744514f5e3Sopenharmony_ci    void SetPropertiesArray(VariableType type, GateRef glue, GateRef object, GateRef propsArray,
3754514f5e3Sopenharmony_ci                            MemoryAttribute mAttr = MemoryAttribute::Default());
3764514f5e3Sopenharmony_ci    GateRef GetHash(GateRef object);
3774514f5e3Sopenharmony_ci    void SetHash(GateRef glue, GateRef object, GateRef hash);
3784514f5e3Sopenharmony_ci    GateRef GetLengthOfTaggedArray(GateRef array);
3794514f5e3Sopenharmony_ci    GateRef GetLengthOfJSTypedArray(GateRef array);
3804514f5e3Sopenharmony_ci    GateRef GetExtractLengthOfTaggedArray(GateRef array);
3814514f5e3Sopenharmony_ci    // object operation
3824514f5e3Sopenharmony_ci    GateRef IsJSHClass(GateRef obj);
3834514f5e3Sopenharmony_ci    GateRef LoadHClass(GateRef object);
3844514f5e3Sopenharmony_ci    void CanNotConvertNotValidObject(GateRef obj);
3854514f5e3Sopenharmony_ci    void IsNotPropertyKey(GateRef obj);
3864514f5e3Sopenharmony_ci    GateRef CreateDataProperty(GateRef glue, GateRef obj, GateRef proKey, GateRef value);
3874514f5e3Sopenharmony_ci    GateRef CreateDataPropertyOrThrow(GateRef glue, GateRef onj, GateRef proKey, GateRef value);
3884514f5e3Sopenharmony_ci    GateRef DefineField(GateRef glue, GateRef obj, GateRef proKey, GateRef value);
3894514f5e3Sopenharmony_ci    void StoreHClass(GateRef glue, GateRef object, GateRef hClass);
3904514f5e3Sopenharmony_ci    void StoreHClassWithoutBarrier(GateRef glue, GateRef object, GateRef hClass);
3914514f5e3Sopenharmony_ci    void StoreBuiltinHClass(GateRef glue, GateRef object, GateRef hClass);
3924514f5e3Sopenharmony_ci    void StorePrototype(GateRef glue, GateRef hclass, GateRef prototype);
3934514f5e3Sopenharmony_ci    void CopyAllHClass(GateRef glue, GateRef dstHClass, GateRef scrHClass);
3944514f5e3Sopenharmony_ci    GateRef GetObjectType(GateRef hClass);
3954514f5e3Sopenharmony_ci    GateRef IsDictionaryMode(GateRef object);
3964514f5e3Sopenharmony_ci    GateRef IsDictionaryModeByHClass(GateRef hClass);
3974514f5e3Sopenharmony_ci    GateRef IsDictionaryElement(GateRef hClass);
3984514f5e3Sopenharmony_ci    GateRef IsStableElements(GateRef hClass);
3994514f5e3Sopenharmony_ci    GateRef HasConstructorByHClass(GateRef hClass);
4004514f5e3Sopenharmony_ci    GateRef HasConstructor(GateRef object);
4014514f5e3Sopenharmony_ci    GateRef IsClassConstructorFromBitField(GateRef bitfield);
4024514f5e3Sopenharmony_ci    GateRef IsClassConstructor(GateRef object);
4034514f5e3Sopenharmony_ci    GateRef IsClassPrototype(GateRef object);
4044514f5e3Sopenharmony_ci    GateRef IsExtensible(GateRef object);
4054514f5e3Sopenharmony_ci    GateRef TaggedObjectIsEcmaObject(GateRef obj);
4064514f5e3Sopenharmony_ci    GateRef IsEcmaObject(GateRef obj);
4074514f5e3Sopenharmony_ci    GateRef IsDataView(GateRef obj);
4084514f5e3Sopenharmony_ci    GateRef IsSymbol(GateRef obj);
4094514f5e3Sopenharmony_ci    GateRef IsString(GateRef obj);
4104514f5e3Sopenharmony_ci    GateRef IsLineString(GateRef obj);
4114514f5e3Sopenharmony_ci    GateRef IsSlicedString(GateRef obj);
4124514f5e3Sopenharmony_ci    GateRef IsConstantString(GateRef obj);
4134514f5e3Sopenharmony_ci    GateRef IsLiteralString(GateRef obj);
4144514f5e3Sopenharmony_ci    GateRef IsTreeString(GateRef obj);
4154514f5e3Sopenharmony_ci    GateRef TreeStringIsFlat(GateRef string);
4164514f5e3Sopenharmony_ci    GateRef TaggedIsBigInt(GateRef obj);
4174514f5e3Sopenharmony_ci    GateRef TaggedIsPropertyBox(GateRef obj);
4184514f5e3Sopenharmony_ci    GateRef TaggedObjectIsBigInt(GateRef obj);
4194514f5e3Sopenharmony_ci    GateRef IsJsProxy(GateRef obj);
4204514f5e3Sopenharmony_ci    GateRef IsJSShared(GateRef obj);
4214514f5e3Sopenharmony_ci    GateRef IsProfileTypeInfoCell0(GateRef obj);
4224514f5e3Sopenharmony_ci    GateRef IsJSGlobalObject(GateRef obj);
4234514f5e3Sopenharmony_ci    GateRef IsNativeModuleFailureInfo(GateRef obj);
4244514f5e3Sopenharmony_ci    GateRef IsModuleNamespace(GateRef obj);
4254514f5e3Sopenharmony_ci    GateRef IsSourceTextModule(GateRef obj);
4264514f5e3Sopenharmony_ci    GateRef ObjIsSpecialContainer(GateRef obj);
4274514f5e3Sopenharmony_ci    GateRef IsJSPrimitiveRef(GateRef obj);
4284514f5e3Sopenharmony_ci    GateRef IsJSFunctionBase(GateRef obj);
4294514f5e3Sopenharmony_ci    GateRef IsConstructor(GateRef object);
4304514f5e3Sopenharmony_ci    GateRef IsBase(GateRef func);
4314514f5e3Sopenharmony_ci    GateRef IsDerived(GateRef func);
4324514f5e3Sopenharmony_ci    GateRef IsJsArray(GateRef obj);
4334514f5e3Sopenharmony_ci    GateRef IsJsSArray(GateRef obj);
4344514f5e3Sopenharmony_ci    GateRef IsByteArray(GateRef obj);
4354514f5e3Sopenharmony_ci    GateRef IsJsCOWArray(GateRef obj);
4364514f5e3Sopenharmony_ci    GateRef IsCOWArray(GateRef obj);
4374514f5e3Sopenharmony_ci    GateRef IsMutantTaggedArray(GateRef elements);
4384514f5e3Sopenharmony_ci    GateRef IsJSObject(GateRef obj);
4394514f5e3Sopenharmony_ci    GateRef IsEnumerable(GateRef attr);
4404514f5e3Sopenharmony_ci    GateRef IsWritable(GateRef attr);
4414514f5e3Sopenharmony_ci    GateRef IsConfigable(GateRef attr);
4424514f5e3Sopenharmony_ci    GateRef IsDefaultAttribute(GateRef attr);
4434514f5e3Sopenharmony_ci    GateRef IsArrayLengthWritable(GateRef glue, GateRef receiver);
4444514f5e3Sopenharmony_ci    GateRef IsAccessor(GateRef attr);
4454514f5e3Sopenharmony_ci    GateRef IsInlinedProperty(GateRef attr);
4464514f5e3Sopenharmony_ci    GateRef IsField(GateRef attr);
4474514f5e3Sopenharmony_ci    GateRef IsNonSharedStoreField(GateRef attr);
4484514f5e3Sopenharmony_ci    GateRef IsStoreShared(GateRef attr);
4494514f5e3Sopenharmony_ci    GateRef IsElement(GateRef attr);
4504514f5e3Sopenharmony_ci    GateRef IsStringElement(GateRef attr);
4514514f5e3Sopenharmony_ci    GateRef IsNumber(GateRef attr);
4524514f5e3Sopenharmony_ci    GateRef IsStringLength(GateRef attr);
4534514f5e3Sopenharmony_ci    GateRef IsTypedArrayElement(GateRef attr);
4544514f5e3Sopenharmony_ci    GateRef IsNonExist(GateRef attr);
4554514f5e3Sopenharmony_ci    GateRef IsJSAPIVector(GateRef attr);
4564514f5e3Sopenharmony_ci    GateRef IsJSAPIStack(GateRef obj);
4574514f5e3Sopenharmony_ci    GateRef IsJSAPIPlainArray(GateRef obj);
4584514f5e3Sopenharmony_ci    GateRef IsJSAPIQueue(GateRef obj);
4594514f5e3Sopenharmony_ci    GateRef IsJSAPIDeque(GateRef obj);
4604514f5e3Sopenharmony_ci    GateRef IsJSAPILightWeightMap(GateRef obj);
4614514f5e3Sopenharmony_ci    GateRef IsJSAPILightWeightSet(GateRef obj);
4624514f5e3Sopenharmony_ci    GateRef IsLinkedNode(GateRef obj);
4634514f5e3Sopenharmony_ci    GateRef IsJSAPIHashMap(GateRef obj);
4644514f5e3Sopenharmony_ci    GateRef IsJSAPIHashSet(GateRef obj);
4654514f5e3Sopenharmony_ci    GateRef IsJSAPILinkedList(GateRef obj);
4664514f5e3Sopenharmony_ci    GateRef IsJSAPIList(GateRef obj);
4674514f5e3Sopenharmony_ci    GateRef IsJSAPIArrayList(GateRef obj);
4684514f5e3Sopenharmony_ci    GateRef IsJSCollator(GateRef obj);
4694514f5e3Sopenharmony_ci    GateRef IsJSObjectType(GateRef obj, JSType jsType);
4704514f5e3Sopenharmony_ci    GateRef IsJSRegExp(GateRef obj);
4714514f5e3Sopenharmony_ci    GateRef GetTarget(GateRef proxyObj);
4724514f5e3Sopenharmony_ci    GateRef HandlerBaseIsAccessor(GateRef attr);
4734514f5e3Sopenharmony_ci    GateRef HandlerBaseIsJSArray(GateRef attr);
4744514f5e3Sopenharmony_ci    GateRef HandlerBaseIsInlinedProperty(GateRef attr);
4754514f5e3Sopenharmony_ci    GateRef HandlerBaseGetOffset(GateRef attr);
4764514f5e3Sopenharmony_ci    GateRef HandlerBaseGetAttrIndex(GateRef attr);
4774514f5e3Sopenharmony_ci    GateRef HandlerBaseGetRep(GateRef attr);
4784514f5e3Sopenharmony_ci    GateRef IsInvalidPropertyBox(GateRef obj);
4794514f5e3Sopenharmony_ci    GateRef IsAccessorPropertyBox(GateRef obj);
4804514f5e3Sopenharmony_ci    GateRef GetValueFromPropertyBox(GateRef obj);
4814514f5e3Sopenharmony_ci    void SetValueToPropertyBox(GateRef glue, GateRef obj, GateRef value);
4824514f5e3Sopenharmony_ci    GateRef GetTransitionHClass(GateRef obj);
4834514f5e3Sopenharmony_ci    GateRef GetTransitionHandlerInfo(GateRef obj);
4844514f5e3Sopenharmony_ci    GateRef GetTransWithProtoHClass(GateRef obj);
4854514f5e3Sopenharmony_ci    GateRef GetTransWithProtoHandlerInfo(GateRef obj);
4864514f5e3Sopenharmony_ci    GateRef GetProtoCell(GateRef object);
4874514f5e3Sopenharmony_ci    GateRef GetPrototypeHandlerHolder(GateRef object);
4884514f5e3Sopenharmony_ci    GateRef GetPrototypeHandlerHandlerInfo(GateRef object);
4894514f5e3Sopenharmony_ci    GateRef GetStoreTSHandlerHolder(GateRef object);
4904514f5e3Sopenharmony_ci    GateRef GetStoreTSHandlerHandlerInfo(GateRef object);
4914514f5e3Sopenharmony_ci    inline GateRef GetLengthOfJSArray(GateRef array);
4924514f5e3Sopenharmony_ci    inline GateRef GetPrototype(GateRef glue, GateRef object);
4934514f5e3Sopenharmony_ci    GateRef GetHasChanged(GateRef object);
4944514f5e3Sopenharmony_ci    GateRef HclassIsPrototypeHandler(GateRef hClass);
4954514f5e3Sopenharmony_ci    GateRef HclassIsTransitionHandler(GateRef hClass);
4964514f5e3Sopenharmony_ci    GateRef HclassIsPropertyBox(GateRef hClass);
4974514f5e3Sopenharmony_ci    GateRef PropAttrGetOffset(GateRef attr);
4984514f5e3Sopenharmony_ci    GateRef GetCtorPrototype(GateRef ctor);
4994514f5e3Sopenharmony_ci    GateRef HasFunctionPrototype(GateRef ctor);
5004514f5e3Sopenharmony_ci    GateRef InstanceOf(GateRef glue, GateRef object, GateRef target, GateRef profileTypeInfo, GateRef slotId,
5014514f5e3Sopenharmony_ci        ProfileOperation callback);
5024514f5e3Sopenharmony_ci    GateRef OrdinaryHasInstance(GateRef glue, GateRef target, GateRef obj);
5034514f5e3Sopenharmony_ci    void TryFastHasInstance(GateRef glue, GateRef instof, GateRef target, GateRef object, Label *fastPath,
5044514f5e3Sopenharmony_ci                            Label *exit, Variable *result, ProfileOperation callback);
5054514f5e3Sopenharmony_ci    GateRef ConvertTaggedValueWithElementsKind(GateRef glue, GateRef value, GateRef extraKind);
5064514f5e3Sopenharmony_ci    GateRef SameValue(GateRef glue, GateRef left, GateRef right);
5074514f5e3Sopenharmony_ci    GateRef SameValueZero(GateRef glue, GateRef left, GateRef right);
5084514f5e3Sopenharmony_ci    GateRef HasStableElements(GateRef glue, GateRef obj);
5094514f5e3Sopenharmony_ci    GateRef IsStableJSArguments(GateRef glue, GateRef obj);
5104514f5e3Sopenharmony_ci    GateRef IsStableJSArray(GateRef glue, GateRef obj);
5114514f5e3Sopenharmony_ci    GateRef IsTypedArray(GateRef obj);
5124514f5e3Sopenharmony_ci    GateRef IsStableArguments(GateRef hClass);
5134514f5e3Sopenharmony_ci    GateRef IsStableArray(GateRef hClass);
5144514f5e3Sopenharmony_ci    GateRef GetProfileTypeInfo(GateRef jsFunc);
5154514f5e3Sopenharmony_ci    GateRef UpdateProfileTypeInfo(GateRef glue, GateRef jsFunc);
5164514f5e3Sopenharmony_ci    // SetDictionaryOrder func in property_attribute.h
5174514f5e3Sopenharmony_ci    GateRef SetDictionaryOrderFieldInPropAttr(GateRef attr, GateRef value);
5184514f5e3Sopenharmony_ci    GateRef GetPrototypeFromHClass(GateRef hClass);
5194514f5e3Sopenharmony_ci    GateRef GetEnumCacheFromHClass(GateRef hClass);
5204514f5e3Sopenharmony_ci    GateRef GetProtoChangeMarkerFromHClass(GateRef hClass);
5214514f5e3Sopenharmony_ci    GateRef GetLayoutFromHClass(GateRef hClass);
5224514f5e3Sopenharmony_ci    GateRef GetBitFieldFromHClass(GateRef hClass);
5234514f5e3Sopenharmony_ci    GateRef GetLengthFromString(GateRef value);
5244514f5e3Sopenharmony_ci    GateRef CalcHashcodeForInt(GateRef value);
5254514f5e3Sopenharmony_ci    void CalcHashcodeForDouble(GateRef value, Variable *res, Label *exit);
5264514f5e3Sopenharmony_ci    void CalcHashcodeForObject(GateRef glue, GateRef value, Variable *res, Label *exit);
5274514f5e3Sopenharmony_ci    GateRef GetHashcodeFromString(GateRef glue, GateRef value, GateRef hir = Circuit::NullGate());
5284514f5e3Sopenharmony_ci    inline GateRef IsIntegerString(GateRef string);
5294514f5e3Sopenharmony_ci    inline void SetRawHashcode(GateRef glue, GateRef str, GateRef rawHashcode, GateRef isInteger);
5304514f5e3Sopenharmony_ci    inline GateRef GetRawHashFromString(GateRef value);
5314514f5e3Sopenharmony_ci    GateRef TryGetHashcodeFromString(GateRef string);
5324514f5e3Sopenharmony_ci    inline GateRef GetMixHashcode(GateRef string);
5334514f5e3Sopenharmony_ci    GateRef GetFirstFromTreeString(GateRef string);
5344514f5e3Sopenharmony_ci    GateRef GetSecondFromTreeString(GateRef string);
5354514f5e3Sopenharmony_ci    GateRef GetIsAllTaggedPropFromHClass(GateRef hclass);
5364514f5e3Sopenharmony_ci    void SetBitFieldToHClass(GateRef glue, GateRef hClass, GateRef bitfield);
5374514f5e3Sopenharmony_ci    void SetIsAllTaggedProp(GateRef glue, GateRef hclass, GateRef hasRep);
5384514f5e3Sopenharmony_ci    void SetPrototypeToHClass(VariableType type, GateRef glue, GateRef hClass, GateRef proto);
5394514f5e3Sopenharmony_ci    void SetProtoChangeDetailsToHClass(VariableType type, GateRef glue, GateRef hClass,
5404514f5e3Sopenharmony_ci                                       GateRef protoChange);
5414514f5e3Sopenharmony_ci    void SetLayoutToHClass(VariableType type, GateRef glue, GateRef hClass, GateRef attr,
5424514f5e3Sopenharmony_ci                           MemoryAttribute mAttr = MemoryAttribute::Default());
5434514f5e3Sopenharmony_ci    void SetHClassTypeIDToHClass(GateRef glue, GateRef hClass, GateRef id);
5444514f5e3Sopenharmony_ci    void SetEnumCacheToHClass(VariableType type, GateRef glue, GateRef hClass, GateRef key);
5454514f5e3Sopenharmony_ci    void SetTransitionsToHClass(VariableType type, GateRef glue, GateRef hClass, GateRef transition);
5464514f5e3Sopenharmony_ci    void SetParentToHClass(VariableType type, GateRef glue, GateRef hClass, GateRef parent);
5474514f5e3Sopenharmony_ci    void SetIsProtoTypeToHClass(GateRef glue, GateRef hClass, GateRef value);
5484514f5e3Sopenharmony_ci    inline void SetIsTS(GateRef glue, GateRef hClass, GateRef value);
5494514f5e3Sopenharmony_ci    GateRef IsProtoTypeHClass(GateRef hClass);
5504514f5e3Sopenharmony_ci    void SetPropertyInlinedProps(GateRef glue, GateRef obj, GateRef hClass,
5514514f5e3Sopenharmony_ci                                 GateRef value, GateRef attrOffset, VariableType type = VariableType::JS_ANY(),
5524514f5e3Sopenharmony_ci                                 MemoryAttribute mAttr = MemoryAttribute::Default());
5534514f5e3Sopenharmony_ci    GateRef GetPropertyInlinedProps(GateRef obj, GateRef hClass,
5544514f5e3Sopenharmony_ci        GateRef index);
5554514f5e3Sopenharmony_ci    GateRef GetInlinedPropOffsetFromHClass(GateRef hclass, GateRef attrOffset);
5564514f5e3Sopenharmony_ci
5574514f5e3Sopenharmony_ci    void IncNumberOfProps(GateRef glue, GateRef hClass);
5584514f5e3Sopenharmony_ci    GateRef GetNumberOfPropsFromHClass(GateRef hClass);
5594514f5e3Sopenharmony_ci    GateRef HasDeleteProperty(GateRef hClass);
5604514f5e3Sopenharmony_ci    GateRef IsTSHClass(GateRef hClass);
5614514f5e3Sopenharmony_ci    void SetNumberOfPropsToHClass(GateRef glue, GateRef hClass, GateRef value);
5624514f5e3Sopenharmony_ci    void SetElementsKindToTrackInfo(GateRef glue, GateRef trackInfo, GateRef elementsKind);
5634514f5e3Sopenharmony_ci    void SetSpaceFlagToTrackInfo(GateRef glue, GateRef trackInfo, GateRef spaceFlag);
5644514f5e3Sopenharmony_ci    GateRef GetElementsKindFromHClass(GateRef hClass);
5654514f5e3Sopenharmony_ci    GateRef GetObjectSizeFromHClass(GateRef hClass);
5664514f5e3Sopenharmony_ci    GateRef GetInlinedPropsStartFromHClass(GateRef hClass);
5674514f5e3Sopenharmony_ci    GateRef GetInlinedPropertiesFromHClass(GateRef hClass);
5684514f5e3Sopenharmony_ci    void ThrowTypeAndReturn(GateRef glue, int messageId, GateRef val);
5694514f5e3Sopenharmony_ci    GateRef GetValueFromTaggedArray(GateRef elements, GateRef index);
5704514f5e3Sopenharmony_ci    GateRef GetDataPtrInTaggedArray(GateRef array);
5714514f5e3Sopenharmony_ci    GateRef GetUnsharedConstpoolIndex(GateRef constpool);
5724514f5e3Sopenharmony_ci    GateRef GetUnsharedConstpoolFromGlue(GateRef glue, GateRef constpool);
5734514f5e3Sopenharmony_ci    GateRef GetUnsharedConstpool(GateRef array, GateRef index);
5744514f5e3Sopenharmony_ci    GateRef GetValueFromMutantTaggedArray(GateRef elements, GateRef index);
5754514f5e3Sopenharmony_ci    void CheckUpdateSharedType(bool isDicMode, Variable *result, GateRef glue, GateRef receiver, GateRef attr,
5764514f5e3Sopenharmony_ci                               GateRef value, Label *executeSetProp, Label *exit);
5774514f5e3Sopenharmony_ci    void CheckUpdateSharedType(bool isDicMode, Variable *result, GateRef glue, GateRef receiver, GateRef attr,
5784514f5e3Sopenharmony_ci                               GateRef value, Label *executeSetProp, Label *exit, GateRef SCheckModelIsCHECK);
5794514f5e3Sopenharmony_ci    void MatchFieldType(Variable *result, GateRef glue, GateRef fieldType, GateRef value, Label *executeSetProp,
5804514f5e3Sopenharmony_ci                               Label *exit);
5814514f5e3Sopenharmony_ci    GateRef GetFieldTypeFromHandler(GateRef attr);
5824514f5e3Sopenharmony_ci    GateRef ClearSharedStoreKind(GateRef handlerInfo);
5834514f5e3Sopenharmony_ci    GateRef UpdateSOutOfBoundsForHandler(GateRef handlerInfo);
5844514f5e3Sopenharmony_ci    void RestoreElementsKindToGeneric(GateRef glue, GateRef jsHClass);
5854514f5e3Sopenharmony_ci    GateRef GetTaggedValueWithElementsKind(GateRef receiver, GateRef index);
5864514f5e3Sopenharmony_ci    void FastSetValueWithElementsKind(GateRef glue, GateRef elements, GateRef rawValue,
5874514f5e3Sopenharmony_ci                                      GateRef index, ElementsKind kind);
5884514f5e3Sopenharmony_ci    GateRef SetValueWithElementsKind(GateRef glue, GateRef receiver, GateRef rawValue, GateRef index,
5894514f5e3Sopenharmony_ci                                     GateRef needTransition, GateRef extraKind);
5904514f5e3Sopenharmony_ci    GateRef CopyJSArrayToTaggedArrayArgs(GateRef glue, GateRef srcObj);
5914514f5e3Sopenharmony_ci    void SetValueToTaggedArrayWithAttr(
5924514f5e3Sopenharmony_ci        GateRef glue, GateRef array, GateRef index, GateRef key, GateRef val, GateRef attr);
5934514f5e3Sopenharmony_ci    void SetValueToTaggedArrayWithRep(
5944514f5e3Sopenharmony_ci        GateRef glue, GateRef array, GateRef index, GateRef val, GateRef rep, Label *repChange);
5954514f5e3Sopenharmony_ci
5964514f5e3Sopenharmony_ci    void SetValueToTaggedArray(VariableType valType, GateRef glue, GateRef array, GateRef index, GateRef val,
5974514f5e3Sopenharmony_ci                               MemoryAttribute mAttr = MemoryAttribute::Default());
5984514f5e3Sopenharmony_ci    void UpdateValueAndAttributes(GateRef glue, GateRef elements, GateRef index, GateRef value, GateRef attr);
5994514f5e3Sopenharmony_ci    GateRef IsSpecialIndexedObj(GateRef jsType);
6004514f5e3Sopenharmony_ci    GateRef IsSpecialContainer(GateRef jsType);
6014514f5e3Sopenharmony_ci    GateRef IsSharedArray(GateRef jsType);
6024514f5e3Sopenharmony_ci    GateRef IsAccessorInternal(GateRef value);
6034514f5e3Sopenharmony_ci    template<typename DictionaryT>
6044514f5e3Sopenharmony_ci    GateRef GetAttributesFromDictionary(GateRef elements, GateRef entry);
6054514f5e3Sopenharmony_ci    template<typename DictionaryT>
6064514f5e3Sopenharmony_ci    GateRef GetValueFromDictionary(GateRef elements, GateRef entry);
6074514f5e3Sopenharmony_ci    template<typename DictionaryT>
6084514f5e3Sopenharmony_ci    GateRef GetKeyFromDictionary(GateRef elements, GateRef entry);
6094514f5e3Sopenharmony_ci    GateRef GetPropAttrFromLayoutInfo(GateRef layout, GateRef entry);
6104514f5e3Sopenharmony_ci    void UpdateFieldType(GateRef glue, GateRef hclass, GateRef attr);
6114514f5e3Sopenharmony_ci    GateRef GetPropertiesAddrFromLayoutInfo(GateRef layout);
6124514f5e3Sopenharmony_ci    GateRef GetPropertyMetaDataFromAttr(GateRef attr);
6134514f5e3Sopenharmony_ci    GateRef TranslateToRep(GateRef value);
6144514f5e3Sopenharmony_ci    GateRef GetKeyFromLayoutInfo(GateRef layout, GateRef entry);
6154514f5e3Sopenharmony_ci    void MatchFieldType(GateRef glue, GateRef fieldType, GateRef value, Label *executeSetProp, Label *typeMismatch);
6164514f5e3Sopenharmony_ci    GateRef FindElementWithCache(GateRef glue, GateRef layoutInfo, GateRef hClass,
6174514f5e3Sopenharmony_ci        GateRef key, GateRef propsNum, GateRef hir = Circuit::NullGate());
6184514f5e3Sopenharmony_ci    GateRef FindElementFromNumberDictionary(GateRef glue, GateRef elements, GateRef index);
6194514f5e3Sopenharmony_ci    GateRef FindEntryFromNameDictionary(GateRef glue, GateRef elements, GateRef key, GateRef hir = Circuit::NullGate());
6204514f5e3Sopenharmony_ci    GateRef IsMatchInTransitionDictionary(GateRef element, GateRef key, GateRef metaData, GateRef attr);
6214514f5e3Sopenharmony_ci    GateRef FindEntryFromTransitionDictionary(GateRef glue, GateRef elements, GateRef key, GateRef metaData);
6224514f5e3Sopenharmony_ci    GateRef JSObjectGetProperty(GateRef obj, GateRef hClass, GateRef propAttr);
6234514f5e3Sopenharmony_ci    void JSObjectSetProperty(GateRef glue, GateRef obj, GateRef hClass, GateRef attr, GateRef key, GateRef value);
6244514f5e3Sopenharmony_ci    GateRef ShouldCallSetter(GateRef receiver, GateRef holder, GateRef accessor, GateRef attr);
6254514f5e3Sopenharmony_ci    GateRef CallSetterHelper(GateRef glue, GateRef holder, GateRef accessor,  GateRef value, ProfileOperation callback);
6264514f5e3Sopenharmony_ci    GateRef SetHasConstructorCondition(GateRef glue, GateRef receiver, GateRef key);
6274514f5e3Sopenharmony_ci    GateRef AddPropertyByName(GateRef glue, GateRef receiver, GateRef key, GateRef value, GateRef propertyAttributes,
6284514f5e3Sopenharmony_ci        ProfileOperation callback);
6294514f5e3Sopenharmony_ci    GateRef IsUtf16String(GateRef string);
6304514f5e3Sopenharmony_ci    GateRef IsUtf8String(GateRef string);
6314514f5e3Sopenharmony_ci    GateRef IsInternalString(GateRef string);
6324514f5e3Sopenharmony_ci    GateRef IsDigit(GateRef ch);
6334514f5e3Sopenharmony_ci    void TryToGetInteger(GateRef string, Variable *num, Label *success, Label *failed);
6344514f5e3Sopenharmony_ci    GateRef StringToElementIndex(GateRef glue, GateRef string);
6354514f5e3Sopenharmony_ci    GateRef ComputeElementCapacity(GateRef oldLength);
6364514f5e3Sopenharmony_ci    GateRef ComputeNonInlinedFastPropsCapacity(GateRef glue, GateRef oldLength,
6374514f5e3Sopenharmony_ci                                               GateRef maxNonInlinedFastPropsCapacity);
6384514f5e3Sopenharmony_ci    GateRef FindTransitions(GateRef glue, GateRef hClass, GateRef key, GateRef attr, GateRef value);
6394514f5e3Sopenharmony_ci    GateRef CheckHClassForRep(GateRef hClass, GateRef rep);
6404514f5e3Sopenharmony_ci    void TransitionForRepChange(GateRef glue, GateRef receiver, GateRef key, GateRef attr);
6414514f5e3Sopenharmony_ci    void TransitToElementsKind(GateRef glue, GateRef receiver, GateRef value, GateRef kind);
6424514f5e3Sopenharmony_ci    void TryMigrateToGenericKindForJSObject(GateRef glue, GateRef receiver, GateRef oldKind);
6434514f5e3Sopenharmony_ci    GateRef TaggedToRepresentation(GateRef value);
6444514f5e3Sopenharmony_ci    GateRef TaggedToElementKind(GateRef value);
6454514f5e3Sopenharmony_ci    GateRef LdGlobalRecord(GateRef glue, GateRef key);
6464514f5e3Sopenharmony_ci    GateRef LoadFromField(GateRef receiver, GateRef handlerInfo);
6474514f5e3Sopenharmony_ci    GateRef LoadGlobal(GateRef cell);
6484514f5e3Sopenharmony_ci    GateRef LoadElement(GateRef glue, GateRef receiver, GateRef key);
6494514f5e3Sopenharmony_ci    GateRef LoadStringElement(GateRef glue, GateRef receiver, GateRef key);
6504514f5e3Sopenharmony_ci    GateRef TryToElementsIndex(GateRef glue, GateRef key);
6514514f5e3Sopenharmony_ci    GateRef CheckPolyHClass(GateRef cachedValue, GateRef hClass);
6524514f5e3Sopenharmony_ci    GateRef LoadICWithHandler(
6534514f5e3Sopenharmony_ci        GateRef glue, GateRef receiver, GateRef holder, GateRef handler, ProfileOperation callback);
6544514f5e3Sopenharmony_ci    GateRef StoreICWithHandler(GateRef glue, GateRef receiver, GateRef holder,
6554514f5e3Sopenharmony_ci                               GateRef value, GateRef handler, ProfileOperation callback = ProfileOperation());
6564514f5e3Sopenharmony_ci    GateRef TaggedArraySetValue(GateRef glue, GateRef receiver, GateRef value, GateRef index, GateRef capacity);
6574514f5e3Sopenharmony_ci    GateRef ICStoreElement(GateRef glue, GateRef receiver, GateRef key, GateRef value, GateRef handlerInfo,
6584514f5e3Sopenharmony_ci                           bool updateHandler = false, GateRef profileTypeInfo = Gate::InvalidGateRef,
6594514f5e3Sopenharmony_ci                           GateRef slotId = Gate::InvalidGateRef);
6604514f5e3Sopenharmony_ci    GateRef GetArrayLength(GateRef object);
6614514f5e3Sopenharmony_ci    GateRef DoubleToInt(GateRef glue, GateRef x, size_t bits = base::INT32_BITS);
6624514f5e3Sopenharmony_ci    void SetArrayLength(GateRef glue, GateRef object, GateRef len);
6634514f5e3Sopenharmony_ci    GateRef StoreField(GateRef glue, GateRef receiver, GateRef value, GateRef handler, ProfileOperation callback);
6644514f5e3Sopenharmony_ci    GateRef StoreWithTransition(GateRef glue, GateRef receiver, GateRef value, GateRef handler,
6654514f5e3Sopenharmony_ci                             ProfileOperation callback, bool withPrototype = false);
6664514f5e3Sopenharmony_ci    GateRef StoreGlobal(GateRef glue, GateRef value, GateRef cell);
6674514f5e3Sopenharmony_ci    void JSHClassAddProperty(GateRef glue, GateRef receiver, GateRef key, GateRef attr, GateRef value);
6684514f5e3Sopenharmony_ci    void NotifyHClassChanged(GateRef glue, GateRef oldHClass, GateRef newHClass);
6694514f5e3Sopenharmony_ci    GateRef GetInt64OfTInt(GateRef x);
6704514f5e3Sopenharmony_ci    GateRef GetInt32OfTInt(GateRef x);
6714514f5e3Sopenharmony_ci    GateRef GetDoubleOfTInt(GateRef x);
6724514f5e3Sopenharmony_ci    GateRef GetDoubleOfTDouble(GateRef x);
6734514f5e3Sopenharmony_ci    GateRef GetInt32OfTNumber(GateRef x);
6744514f5e3Sopenharmony_ci    GateRef GetDoubleOfTNumber(GateRef x);
6754514f5e3Sopenharmony_ci    GateRef LoadObjectFromWeakRef(GateRef x);
6764514f5e3Sopenharmony_ci    GateRef ExtFloat32ToDouble(GateRef x);
6774514f5e3Sopenharmony_ci    GateRef ChangeInt32ToFloat32(GateRef x);
6784514f5e3Sopenharmony_ci    GateRef ChangeInt32ToFloat64(GateRef x);
6794514f5e3Sopenharmony_ci    GateRef ChangeUInt32ToFloat64(GateRef x);
6804514f5e3Sopenharmony_ci    GateRef ChangeFloat64ToInt32(GateRef x);
6814514f5e3Sopenharmony_ci    GateRef TruncDoubleToFloat32(GateRef x);
6824514f5e3Sopenharmony_ci    GateRef DeletePropertyOrThrow(GateRef glue, GateRef obj, GateRef value);
6834514f5e3Sopenharmony_ci    inline GateRef ToObject(GateRef glue, GateRef obj);
6844514f5e3Sopenharmony_ci    GateRef DeleteProperty(GateRef glue, GateRef obj, GateRef value);
6854514f5e3Sopenharmony_ci    inline GateRef OrdinaryNewJSObjectCreate(GateRef glue, GateRef proto);
6864514f5e3Sopenharmony_ci    inline GateRef NewJSPrimitiveRef(GateRef glue, size_t index, GateRef obj);
6874514f5e3Sopenharmony_ci    GateRef ModuleNamespaceDeleteProperty(GateRef glue, GateRef obj, GateRef value);
6884514f5e3Sopenharmony_ci    GateRef Int64ToTaggedPtr(GateRef x);
6894514f5e3Sopenharmony_ci    GateRef TruncInt16ToInt8(GateRef x);
6904514f5e3Sopenharmony_ci    GateRef TruncInt32ToInt16(GateRef x);
6914514f5e3Sopenharmony_ci    GateRef TruncInt32ToInt8(GateRef x);
6924514f5e3Sopenharmony_ci    GateRef TruncFloatToInt64(GateRef x);
6934514f5e3Sopenharmony_ci    GateRef CastInt32ToFloat32(GateRef x);
6944514f5e3Sopenharmony_ci    GateRef CastInt64ToFloat64(GateRef x);
6954514f5e3Sopenharmony_ci    GateRef SExtInt32ToInt64(GateRef x);
6964514f5e3Sopenharmony_ci    GateRef SExtInt16ToInt64(GateRef x);
6974514f5e3Sopenharmony_ci    GateRef SExtInt16ToInt32(GateRef x);
6984514f5e3Sopenharmony_ci    GateRef SExtInt8ToInt64(GateRef x);
6994514f5e3Sopenharmony_ci    GateRef SExtInt8ToInt32(GateRef x);
7004514f5e3Sopenharmony_ci    GateRef SExtInt1ToInt64(GateRef x);
7014514f5e3Sopenharmony_ci    GateRef SExtInt1ToInt32(GateRef x);
7024514f5e3Sopenharmony_ci    GateRef ZExtInt8ToInt16(GateRef x);
7034514f5e3Sopenharmony_ci    GateRef ZExtInt32ToInt64(GateRef x);
7044514f5e3Sopenharmony_ci    GateRef ZExtInt1ToInt64(GateRef x);
7054514f5e3Sopenharmony_ci    GateRef ZExtInt1ToInt32(GateRef x);
7064514f5e3Sopenharmony_ci    GateRef ZExtInt8ToInt32(GateRef x);
7074514f5e3Sopenharmony_ci    GateRef ZExtInt8ToInt64(GateRef x);
7084514f5e3Sopenharmony_ci    GateRef ZExtInt8ToPtr(GateRef x);
7094514f5e3Sopenharmony_ci    GateRef ZExtInt16ToPtr(GateRef x);
7104514f5e3Sopenharmony_ci    GateRef SExtInt32ToPtr(GateRef x);
7114514f5e3Sopenharmony_ci    GateRef ZExtInt16ToInt32(GateRef x);
7124514f5e3Sopenharmony_ci    GateRef ZExtInt16ToInt64(GateRef x);
7134514f5e3Sopenharmony_ci    GateRef TruncInt64ToInt32(GateRef x);
7144514f5e3Sopenharmony_ci    GateRef TruncPtrToInt32(GateRef x);
7154514f5e3Sopenharmony_ci    GateRef TruncInt64ToInt1(GateRef x);
7164514f5e3Sopenharmony_ci    GateRef TruncInt32ToInt1(GateRef x);
7174514f5e3Sopenharmony_ci    GateRef GetGlobalConstantAddr(GateRef index);
7184514f5e3Sopenharmony_ci    GateRef GetGlobalConstantOffset(ConstantIndex index);
7194514f5e3Sopenharmony_ci    GateRef IsCallableFromBitField(GateRef bitfield);
7204514f5e3Sopenharmony_ci    GateRef IsCallable(GateRef obj);
7214514f5e3Sopenharmony_ci    GateRef GetOffsetFieldInPropAttr(GateRef attr);
7224514f5e3Sopenharmony_ci    GateRef SetOffsetFieldInPropAttr(GateRef attr, GateRef value);
7234514f5e3Sopenharmony_ci    GateRef SetIsInlinePropsFieldInPropAttr(GateRef attr, GateRef value);
7244514f5e3Sopenharmony_ci    GateRef SetTrackTypeInPropAttr(GateRef attr, GateRef type);
7254514f5e3Sopenharmony_ci    GateRef GetTrackTypeInPropAttr(GateRef attr);
7264514f5e3Sopenharmony_ci    GateRef GetSharedFieldTypeInPropAttr(GateRef attr);
7274514f5e3Sopenharmony_ci    GateRef GetDictSharedFieldTypeInPropAttr(GateRef attr);
7284514f5e3Sopenharmony_ci    GateRef GetRepInPropAttr(GateRef attr);
7294514f5e3Sopenharmony_ci    GateRef IsIntRepInPropAttr(GateRef attr);
7304514f5e3Sopenharmony_ci    GateRef IsDoubleRepInPropAttr(GateRef attr);
7314514f5e3Sopenharmony_ci    GateRef IsTaggedRepInPropAttr(GateRef attr);
7324514f5e3Sopenharmony_ci    GateRef SetTaggedRepInPropAttr(GateRef attr);
7334514f5e3Sopenharmony_ci    template<class T>
7344514f5e3Sopenharmony_ci    void SetHClassBit(GateRef glue, GateRef hClass, GateRef value);
7354514f5e3Sopenharmony_ci    template<typename DictionaryT>
7364514f5e3Sopenharmony_ci    void UpdateValueInDict(GateRef glue, GateRef elements, GateRef index, GateRef value);
7374514f5e3Sopenharmony_ci    GateRef GetBitMask(GateRef bitoffset);
7384514f5e3Sopenharmony_ci    GateRef IntPtrEuqal(GateRef x, GateRef y);
7394514f5e3Sopenharmony_ci    GateRef IntPtrNotEqual(GateRef x, GateRef y);
7404514f5e3Sopenharmony_ci    void SetValueWithAttr(GateRef glue, GateRef obj, GateRef offset, GateRef key, GateRef value, GateRef attr);
7414514f5e3Sopenharmony_ci    void SetValueWithRep(GateRef glue, GateRef obj, GateRef offset, GateRef value, GateRef rep, Label *repChange);
7424514f5e3Sopenharmony_ci    void VerifyBarrier(GateRef glue, GateRef obj, GateRef offset, GateRef value);
7434514f5e3Sopenharmony_ci    void SetValueWithBarrier(GateRef glue, GateRef obj, GateRef offset, GateRef value, bool withEden = false,
7444514f5e3Sopenharmony_ci                             MemoryAttribute::ShareFlag share = MemoryAttribute::UNKNOWN);
7454514f5e3Sopenharmony_ci    GateRef GetPropertyByIndex(GateRef glue, GateRef receiver, GateRef index,
7464514f5e3Sopenharmony_ci                               ProfileOperation callback, GateRef hir = Circuit::NullGate());
7474514f5e3Sopenharmony_ci    GateRef GetPropertyByName(GateRef glue, GateRef receiver, GateRef key,
7484514f5e3Sopenharmony_ci                              ProfileOperation callback, GateRef isInternal, bool canUseIsInternal = false);
7494514f5e3Sopenharmony_ci    GateRef FastGetPropertyByName(GateRef glue, GateRef obj, GateRef key, ProfileOperation callback);
7504514f5e3Sopenharmony_ci    GateRef FastGetPropertyByIndex(GateRef glue, GateRef obj, GateRef index,
7514514f5e3Sopenharmony_ci                                   ProfileOperation callback, GateRef hir = Circuit::NullGate());
7524514f5e3Sopenharmony_ci    GateRef GetPropertyByValue(GateRef glue, GateRef receiver, GateRef keyValue, ProfileOperation callback);
7534514f5e3Sopenharmony_ci    void FastSetPropertyByName(GateRef glue, GateRef obj, GateRef key, GateRef value,
7544514f5e3Sopenharmony_ci        ProfileOperation callback = ProfileOperation());
7554514f5e3Sopenharmony_ci    void FastSetPropertyByIndex(GateRef glue, GateRef obj, GateRef index, GateRef value);
7564514f5e3Sopenharmony_ci    GateRef SetPropertyByIndex(GateRef glue, GateRef receiver, GateRef index,
7574514f5e3Sopenharmony_ci        GateRef value, bool useOwn, ProfileOperation callback = ProfileOperation(), bool defineSemantics = false);
7584514f5e3Sopenharmony_ci    GateRef DefinePropertyByIndex(GateRef glue, GateRef receiver, GateRef index, GateRef value);
7594514f5e3Sopenharmony_ci    GateRef SetPropertyByName(GateRef glue, GateRef receiver, GateRef key,
7604514f5e3Sopenharmony_ci        GateRef value, bool useOwn, GateRef isInternal, ProfileOperation callback = ProfileOperation(),
7614514f5e3Sopenharmony_ci        bool canUseIsInternal = false, bool defineSemantics = false); // Crawl prototype chain
7624514f5e3Sopenharmony_ci    GateRef DefinePropertyByName(GateRef glue, GateRef receiver, GateRef key,
7634514f5e3Sopenharmony_ci        GateRef value, GateRef isInternal, GateRef SCheckModelIsCHECK,
7644514f5e3Sopenharmony_ci        ProfileOperation callback = ProfileOperation());
7654514f5e3Sopenharmony_ci    GateRef SetPropertyByValue(GateRef glue, GateRef receiver, GateRef key, GateRef value, bool useOwn,
7664514f5e3Sopenharmony_ci        ProfileOperation callback = ProfileOperation(), bool defineSemantics = false);
7674514f5e3Sopenharmony_ci    GateRef DefinePropertyByValue(GateRef glue, GateRef receiver, GateRef key, GateRef value,
7684514f5e3Sopenharmony_ci        GateRef SCheckModelIsCHECK, ProfileOperation callback = ProfileOperation());
7694514f5e3Sopenharmony_ci    GateRef GetParentEnv(GateRef object);
7704514f5e3Sopenharmony_ci    GateRef GetSendableParentEnv(GateRef object);
7714514f5e3Sopenharmony_ci    GateRef GetPropertiesFromLexicalEnv(GateRef object, GateRef index);
7724514f5e3Sopenharmony_ci    GateRef GetPropertiesFromSendableEnv(GateRef object, GateRef index);
7734514f5e3Sopenharmony_ci    GateRef GetKeyFromLexivalEnv(GateRef lexicalEnv, GateRef levelIndex, GateRef slotIndex);
7744514f5e3Sopenharmony_ci    void SetPropertiesToLexicalEnv(GateRef glue, GateRef object, GateRef index, GateRef value);
7754514f5e3Sopenharmony_ci    void SetPropertiesToSendableEnv(GateRef glue, GateRef object, GateRef index, GateRef value);
7764514f5e3Sopenharmony_ci    GateRef GetHomeObjectFromJSFunction(GateRef object);
7774514f5e3Sopenharmony_ci    GateRef GetCallFieldFromMethod(GateRef method);
7784514f5e3Sopenharmony_ci    GateRef GetSendableEnvFromModule(GateRef module);
7794514f5e3Sopenharmony_ci    GateRef GetProtoOrHClass(GateRef function);
7804514f5e3Sopenharmony_ci    GateRef IsSendableFunctionModule(GateRef module);
7814514f5e3Sopenharmony_ci    inline GateRef GetBuiltinId(GateRef method);
7824514f5e3Sopenharmony_ci    void SetLexicalEnvToFunction(GateRef glue, GateRef object, GateRef lexicalEnv,
7834514f5e3Sopenharmony_ci                                 MemoryAttribute mAttr = MemoryAttribute::Default());
7844514f5e3Sopenharmony_ci    void SetProtoTransRootHClassToFunction(GateRef glue, GateRef object, GateRef hclass,
7854514f5e3Sopenharmony_ci                                           MemoryAttribute mAttr = MemoryAttribute::Default());
7864514f5e3Sopenharmony_ci    void SetProtoOrHClassToFunction(GateRef glue, GateRef function, GateRef value,
7874514f5e3Sopenharmony_ci                                    MemoryAttribute mAttr = MemoryAttribute::Default());
7884514f5e3Sopenharmony_ci    void SetWorkNodePointerToFunction(GateRef glue, GateRef function, GateRef value,
7894514f5e3Sopenharmony_ci                                      MemoryAttribute mAttr = MemoryAttribute::Default());
7904514f5e3Sopenharmony_ci    void SetHomeObjectToFunction(GateRef glue, GateRef function, GateRef value,
7914514f5e3Sopenharmony_ci                                 MemoryAttribute mAttr = MemoryAttribute::Default());
7924514f5e3Sopenharmony_ci    void SetModuleToFunction(GateRef glue, GateRef function, GateRef value,
7934514f5e3Sopenharmony_ci                             MemoryAttribute mAttr = MemoryAttribute::Default());
7944514f5e3Sopenharmony_ci    void SetMethodToFunction(GateRef glue, GateRef function, GateRef value,
7954514f5e3Sopenharmony_ci                             MemoryAttribute mAttr = MemoryAttribute::Default());
7964514f5e3Sopenharmony_ci    void SetCodeEntryToFunctionFromMethod(GateRef glue, GateRef function, GateRef value);
7974514f5e3Sopenharmony_ci    void SetCodeEntryToFunctionFromFuncEntry(GateRef glue, GateRef function, GateRef value);
7984514f5e3Sopenharmony_ci    void SetCompiledCodeFlagToFunctionFromMethod(GateRef glue, GateRef function, GateRef value);
7994514f5e3Sopenharmony_ci    void SetLengthToFunction(GateRef glue, GateRef function, GateRef value);
8004514f5e3Sopenharmony_ci    void SetRawProfileTypeInfoToFunction(GateRef glue, GateRef function, GateRef value,
8014514f5e3Sopenharmony_ci                                         MemoryAttribute mAttr = MemoryAttribute::Default());
8024514f5e3Sopenharmony_ci    void SetValueToProfileTypeInfoCell(GateRef glue, GateRef profileTypeInfoCell, GateRef value);
8034514f5e3Sopenharmony_ci    void UpdateProfileTypeInfoCellType(GateRef glue, GateRef profileTypeInfoCell);
8044514f5e3Sopenharmony_ci    void SetJSObjectTaggedField(GateRef glue, GateRef object, size_t offset, GateRef value);
8054514f5e3Sopenharmony_ci    void SetSendableEnvToModule(GateRef glue, GateRef module, GateRef value,
8064514f5e3Sopenharmony_ci                                MemoryAttribute mAttr = MemoryAttribute::Default());
8074514f5e3Sopenharmony_ci    void SetCompiledCodeFlagToFunction(GateRef glue, GateRef function, GateRef value);
8084514f5e3Sopenharmony_ci    void SetCompiledFastCallFlagToFunction(GateRef glue, GateRef function, GateRef value);
8094514f5e3Sopenharmony_ci    void SetCompiledFuncEntry(GateRef glue, GateRef jsFunc, GateRef codeEntry, GateRef isFastCall);
8104514f5e3Sopenharmony_ci    GateRef GetFuncEntryDes(GateRef glue, GateRef machineCode, GateRef codeAddr);
8114514f5e3Sopenharmony_ci    GateRef GetFuncEntryDesAddress(GateRef machineCode);
8124514f5e3Sopenharmony_ci    GateRef IsAlign(GateRef address, GateRef alignByte);
8134514f5e3Sopenharmony_ci    void SetTaskConcurrentFuncFlagToFunction(GateRef glue, GateRef function, GateRef value);
8144514f5e3Sopenharmony_ci    void SetBitFieldToFunction(GateRef glue, GateRef function, GateRef value);
8154514f5e3Sopenharmony_ci    void SetMachineCodeToFunction(GateRef glue, GateRef function, GateRef value,
8164514f5e3Sopenharmony_ci                                  MemoryAttribute mAttr = MemoryAttribute::Default());
8174514f5e3Sopenharmony_ci    void SetTypedArrayName(GateRef glue, GateRef typedArray, GateRef name,
8184514f5e3Sopenharmony_ci                           MemoryAttribute mAttr = MemoryAttribute::Default());
8194514f5e3Sopenharmony_ci    void SetContentType(GateRef glue, GateRef typedArray, GateRef type);
8204514f5e3Sopenharmony_ci    void SetViewedArrayBufferOrByteArray(GateRef glue, GateRef typedArray, GateRef data,
8214514f5e3Sopenharmony_ci                                         MemoryAttribute mAttr = MemoryAttribute::Default());
8224514f5e3Sopenharmony_ci    void SetByteLength(GateRef glue, GateRef typedArray, GateRef byteLength);
8234514f5e3Sopenharmony_ci    void SetByteOffset(GateRef glue, GateRef typedArray, GateRef offset);
8244514f5e3Sopenharmony_ci    void SetTypedArrayLength(GateRef glue, GateRef typedArray, GateRef arrayLength);
8254514f5e3Sopenharmony_ci    GateRef GetGlobalObject(GateRef glue);
8264514f5e3Sopenharmony_ci    GateRef GetMethodFromFunction(GateRef function);
8274514f5e3Sopenharmony_ci    GateRef GetModuleFromFunction(GateRef function);
8284514f5e3Sopenharmony_ci    GateRef GetLengthFromFunction(GateRef function);
8294514f5e3Sopenharmony_ci    GateRef GetHomeObjectFromFunction(GateRef function);
8304514f5e3Sopenharmony_ci    GateRef GetEntryIndexOfGlobalDictionary(GateRef entry);
8314514f5e3Sopenharmony_ci    GateRef GetBoxFromGlobalDictionary(GateRef object, GateRef entry);
8324514f5e3Sopenharmony_ci    GateRef GetValueFromGlobalDictionary(GateRef object, GateRef entry);
8334514f5e3Sopenharmony_ci    GateRef GetPropertiesFromJSObject(GateRef object);
8344514f5e3Sopenharmony_ci    template<OpCode Op, MachineType Type>
8354514f5e3Sopenharmony_ci    GateRef BinaryOp(GateRef x, GateRef y);
8364514f5e3Sopenharmony_ci    template<OpCode Op, MachineType Type>
8374514f5e3Sopenharmony_ci    GateRef BinaryOpWithOverflow(GateRef x, GateRef y);
8384514f5e3Sopenharmony_ci    GateRef GetGlobalOwnProperty(GateRef glue, GateRef receiver, GateRef key, ProfileOperation callback);
8394514f5e3Sopenharmony_ci    GateRef AddElementInternal(GateRef glue, GateRef receiver, GateRef index, GateRef value, GateRef attr);
8404514f5e3Sopenharmony_ci    GateRef ShouldTransToDict(GateRef capcity, GateRef index);
8414514f5e3Sopenharmony_ci    void NotifyStableArrayElementsGuardians(GateRef glue, GateRef receiver);
8424514f5e3Sopenharmony_ci    GateRef GrowElementsCapacity(GateRef glue, GateRef receiver, GateRef capacity);
8434514f5e3Sopenharmony_ci
8444514f5e3Sopenharmony_ci    inline GateRef GetObjectFromConstPool(GateRef constpool, GateRef index);
8454514f5e3Sopenharmony_ci    GateRef GetConstPoolFromFunction(GateRef jsFunc);
8464514f5e3Sopenharmony_ci    GateRef GetStringFromConstPool(GateRef glue, GateRef constpool, GateRef index);
8474514f5e3Sopenharmony_ci    GateRef GetMethodFromConstPool(GateRef glue, GateRef constpool, GateRef index);
8484514f5e3Sopenharmony_ci    GateRef GetArrayLiteralFromConstPool(GateRef glue, GateRef constpool, GateRef index, GateRef module);
8494514f5e3Sopenharmony_ci    GateRef GetObjectLiteralFromConstPool(GateRef glue, GateRef constpool, GateRef index, GateRef module);
8504514f5e3Sopenharmony_ci    void SetElementsKindToJSHClass(GateRef glue, GateRef jsHclass, GateRef elementsKind);
8514514f5e3Sopenharmony_ci    void SetExtensibleToBitfield(GateRef glue, GateRef obj, bool isExtensible);
8524514f5e3Sopenharmony_ci    void SetCallableToBitfield(GateRef glue, GateRef obj, bool isCallable);
8534514f5e3Sopenharmony_ci
8544514f5e3Sopenharmony_ci    // fast path
8554514f5e3Sopenharmony_ci    GateRef FastEqual(GateRef glue, GateRef left, GateRef right, ProfileOperation callback);
8564514f5e3Sopenharmony_ci    GateRef FastStrictEqual(GateRef glue, GateRef left, GateRef right, ProfileOperation callback);
8574514f5e3Sopenharmony_ci    GateRef FastStringEqual(GateRef glue, GateRef left, GateRef right);
8584514f5e3Sopenharmony_ci    GateRef FastMod(GateRef gule, GateRef left, GateRef right, ProfileOperation callback);
8594514f5e3Sopenharmony_ci    GateRef FastTypeOf(GateRef left, GateRef right);
8604514f5e3Sopenharmony_ci    GateRef FastMul(GateRef glue, GateRef left, GateRef right, ProfileOperation callback);
8614514f5e3Sopenharmony_ci    GateRef FastDiv(GateRef left, GateRef right, ProfileOperation callback);
8624514f5e3Sopenharmony_ci    GateRef FastAdd(GateRef glue, GateRef left, GateRef right, ProfileOperation callback);
8634514f5e3Sopenharmony_ci    GateRef FastSub(GateRef glue, GateRef left, GateRef right, ProfileOperation callback);
8644514f5e3Sopenharmony_ci    GateRef FastToBoolean(GateRef value, bool flag = true);
8654514f5e3Sopenharmony_ci    GateRef FastToBooleanWithProfile(GateRef value, ProfileOperation callback, bool flag = true);
8664514f5e3Sopenharmony_ci    GateRef FastToBooleanWithProfileBaseline(GateRef value, ProfileOperation callback, bool flag = true);
8674514f5e3Sopenharmony_ci
8684514f5e3Sopenharmony_ci    // Add SpecialContainer
8694514f5e3Sopenharmony_ci    GateRef GetContainerProperty(GateRef glue, GateRef receiver, GateRef index, GateRef jsType);
8704514f5e3Sopenharmony_ci    GateRef JSAPIContainerGet(GateRef glue, GateRef receiver, GateRef index);
8714514f5e3Sopenharmony_ci
8724514f5e3Sopenharmony_ci    // for-in
8734514f5e3Sopenharmony_ci    GateRef NextInternal(GateRef glue, GateRef iter);
8744514f5e3Sopenharmony_ci    GateRef GetLengthFromForInIterator(GateRef iter);
8754514f5e3Sopenharmony_ci    GateRef GetIndexFromForInIterator(GateRef iter);
8764514f5e3Sopenharmony_ci    GateRef GetKeysFromForInIterator(GateRef iter);
8774514f5e3Sopenharmony_ci    GateRef GetObjectFromForInIterator(GateRef iter);
8784514f5e3Sopenharmony_ci    GateRef GetCachedHclassFromForInIterator(GateRef iter);
8794514f5e3Sopenharmony_ci    void SetLengthOfForInIterator(GateRef glue, GateRef iter, GateRef length);
8804514f5e3Sopenharmony_ci    void SetIndexOfForInIterator(GateRef glue, GateRef iter, GateRef index);
8814514f5e3Sopenharmony_ci    void SetKeysOfForInIterator(GateRef glue, GateRef iter, GateRef keys);
8824514f5e3Sopenharmony_ci    void SetObjectOfForInIterator(GateRef glue, GateRef iter, GateRef object);
8834514f5e3Sopenharmony_ci    void SetCachedHclassOfForInIterator(GateRef glue, GateRef iter, GateRef hclass);
8844514f5e3Sopenharmony_ci    void IncreaseInteratorIndex(GateRef glue, GateRef iter, GateRef index);
8854514f5e3Sopenharmony_ci    void SetNextIndexOfArrayIterator(GateRef glue, GateRef iter, GateRef nextIndex);
8864514f5e3Sopenharmony_ci    void SetIteratedArrayOfArrayIterator(GateRef glue, GateRef iter, GateRef iteratedArray);
8874514f5e3Sopenharmony_ci    void SetBitFieldOfArrayIterator(GateRef glue, GateRef iter, GateRef kind);
8884514f5e3Sopenharmony_ci    GateRef GetEnumCacheKind(GateRef glue, GateRef enumCache);
8894514f5e3Sopenharmony_ci    GateRef GetEmptyArray(GateRef glue);
8904514f5e3Sopenharmony_ci    GateRef IsEnumCacheValid(GateRef receiver, GateRef cachedHclass, GateRef kind);
8914514f5e3Sopenharmony_ci    GateRef NeedCheckProperty(GateRef receiver);
8924514f5e3Sopenharmony_ci
8934514f5e3Sopenharmony_ci    GateRef EnumerateObjectProperties(GateRef glue, GateRef obj);
8944514f5e3Sopenharmony_ci    GateRef GetFunctionPrototype(GateRef glue, size_t index);
8954514f5e3Sopenharmony_ci    GateRef ToPrototypeOrObj(GateRef glue, GateRef obj);
8964514f5e3Sopenharmony_ci    GateRef IsSpecialKeysObject(GateRef obj);
8974514f5e3Sopenharmony_ci    GateRef IsSlowKeysObject(GateRef obj);
8984514f5e3Sopenharmony_ci    GateRef TryGetEnumCache(GateRef glue, GateRef obj);
8994514f5e3Sopenharmony_ci    GateRef GetNumberOfElements(GateRef obj);
9004514f5e3Sopenharmony_ci    GateRef IsSimpleEnumCacheValid(GateRef obj);
9014514f5e3Sopenharmony_ci    GateRef IsEnumCacheWithProtoChainInfoValid(GateRef obj);
9024514f5e3Sopenharmony_ci
9034514f5e3Sopenharmony_ci    // Exception handle
9044514f5e3Sopenharmony_ci    GateRef HasPendingException(GateRef glue);
9054514f5e3Sopenharmony_ci    void ReturnExceptionIfAbruptCompletion(GateRef glue);
9064514f5e3Sopenharmony_ci
9074514f5e3Sopenharmony_ci    // ElementsKind Operations
9084514f5e3Sopenharmony_ci    GateRef ValueIsSpecialHole(GateRef x);
9094514f5e3Sopenharmony_ci    GateRef ElementsKindIsIntOrHoleInt(GateRef kind);
9104514f5e3Sopenharmony_ci    GateRef ElementsKindIsNumOrHoleNum(GateRef kind);
9114514f5e3Sopenharmony_ci    GateRef ElementsKindIsHeapKind(GateRef kind);
9124514f5e3Sopenharmony_ci    GateRef ElementsKindHasHole(GateRef kind);
9134514f5e3Sopenharmony_ci    void MigrateArrayWithKind(GateRef glue, GateRef object, GateRef oldKind, GateRef newKind);
9144514f5e3Sopenharmony_ci    GateRef MigrateFromRawValueToHeapValues(GateRef glue, GateRef object, GateRef needCOW, GateRef isIntKind);
9154514f5e3Sopenharmony_ci    GateRef MigrateFromHeapValueToRawValue(GateRef glue, GateRef object, GateRef needCOW, GateRef isIntKind);
9164514f5e3Sopenharmony_ci    void MigrateFromHoleIntToHoleNumber(GateRef glue, GateRef object);
9174514f5e3Sopenharmony_ci    void MigrateFromHoleNumberToHoleInt(GateRef glue, GateRef object);
9184514f5e3Sopenharmony_ci
9194514f5e3Sopenharmony_ci    // method operator
9204514f5e3Sopenharmony_ci    GateRef IsJSFunction(GateRef obj);
9214514f5e3Sopenharmony_ci    GateRef IsBoundFunction(GateRef obj);
9224514f5e3Sopenharmony_ci    GateRef IsJSOrBoundFunction(GateRef obj);
9234514f5e3Sopenharmony_ci    GateRef GetMethodFromJSFunctionOrProxy(GateRef jsfunc);
9244514f5e3Sopenharmony_ci    GateRef IsNativeMethod(GateRef method);
9254514f5e3Sopenharmony_ci    GateRef GetFuncKind(GateRef method);
9264514f5e3Sopenharmony_ci    GateRef HasPrototype(GateRef kind);
9274514f5e3Sopenharmony_ci    GateRef HasAccessor(GateRef kind);
9284514f5e3Sopenharmony_ci    GateRef IsClassConstructorKind(GateRef kind);
9294514f5e3Sopenharmony_ci    GateRef IsGeneratorKind(GateRef kind);
9304514f5e3Sopenharmony_ci    GateRef IsBaseKind(GateRef kind);
9314514f5e3Sopenharmony_ci    GateRef IsBaseConstructorKind(GateRef kind);
9324514f5e3Sopenharmony_ci    GateRef IsSendableFunction(GateRef method);
9334514f5e3Sopenharmony_ci
9344514f5e3Sopenharmony_ci    GateRef IsAOTLiteralInfo(GateRef info);
9354514f5e3Sopenharmony_ci    GateRef GetIhcFromAOTLiteralInfo(GateRef info);
9364514f5e3Sopenharmony_ci    GateRef IsAotWithCallField(GateRef method);
9374514f5e3Sopenharmony_ci    GateRef IsFastCall(GateRef method);
9384514f5e3Sopenharmony_ci    GateRef JudgeAotAndFastCall(GateRef jsFunc, CircuitBuilder::JudgeMethodType type);
9394514f5e3Sopenharmony_ci    GateRef GetInternalString(GateRef glue, GateRef key);
9404514f5e3Sopenharmony_ci    GateRef GetExpectedNumOfArgs(GateRef method);
9414514f5e3Sopenharmony_ci    GateRef GetMethod(GateRef glue, GateRef obj, GateRef key, GateRef profileTypeInfo, GateRef slotId);
9424514f5e3Sopenharmony_ci    // proxy operator
9434514f5e3Sopenharmony_ci    GateRef GetMethodFromJSProxy(GateRef proxy);
9444514f5e3Sopenharmony_ci    GateRef GetHandlerFromJSProxy(GateRef proxy);
9454514f5e3Sopenharmony_ci    GateRef GetTargetFromJSProxy(GateRef proxy);
9464514f5e3Sopenharmony_ci    inline void SetHotnessCounter(GateRef glue, GateRef method, GateRef value);
9474514f5e3Sopenharmony_ci    inline void SaveHotnessCounterIfNeeded(GateRef glue, GateRef sp, GateRef hotnessCounter, JSCallMode mode);
9484514f5e3Sopenharmony_ci    inline void SavePcIfNeeded(GateRef glue);
9494514f5e3Sopenharmony_ci    inline void SaveJumpSizeIfNeeded(GateRef glue, GateRef jumpSize);
9504514f5e3Sopenharmony_ci    inline GateRef ComputeTaggedArraySize(GateRef length);
9514514f5e3Sopenharmony_ci    inline GateRef GetGlobalConstantValue(
9524514f5e3Sopenharmony_ci        VariableType type, GateRef glue, ConstantIndex index);
9534514f5e3Sopenharmony_ci    inline GateRef GetSingleCharTable(GateRef glue);
9544514f5e3Sopenharmony_ci    inline GateRef IsEnableElementsKind(GateRef glue);
9554514f5e3Sopenharmony_ci    inline GateRef GetGlobalEnvValue(VariableType type, GateRef env, size_t index);
9564514f5e3Sopenharmony_ci    GateRef CallGetterHelper(GateRef glue, GateRef receiver, GateRef holder,
9574514f5e3Sopenharmony_ci                             GateRef accessor, ProfileOperation callback, GateRef hir = Circuit::NullGate());
9584514f5e3Sopenharmony_ci    GateRef ConstructorCheck(GateRef glue, GateRef ctor, GateRef outPut, GateRef thisObj);
9594514f5e3Sopenharmony_ci    GateRef GetCallSpreadArgs(GateRef glue, GateRef array, ProfileOperation callBack);
9604514f5e3Sopenharmony_ci    GateRef GetIterator(GateRef glue, GateRef obj, ProfileOperation callback);
9614514f5e3Sopenharmony_ci    // For BaselineJIT
9624514f5e3Sopenharmony_ci    GateRef FastToBooleanBaseline(GateRef value, bool flag = true);
9634514f5e3Sopenharmony_ci    GateRef GetBaselineCodeAddr(GateRef baselineCode);
9644514f5e3Sopenharmony_ci
9654514f5e3Sopenharmony_ci    GateRef IsFastTypeArray(GateRef jsType);
9664514f5e3Sopenharmony_ci    GateRef GetTypeArrayPropertyByName(GateRef glue, GateRef receiver, GateRef holder, GateRef key, GateRef jsType);
9674514f5e3Sopenharmony_ci    GateRef SetTypeArrayPropertyByName(GateRef glue, GateRef receiver, GateRef holder, GateRef key, GateRef value,
9684514f5e3Sopenharmony_ci                                       GateRef jsType);
9694514f5e3Sopenharmony_ci    GateRef TryStringOrSymbolToElementIndex(GateRef glue, GateRef key);
9704514f5e3Sopenharmony_ci    inline GateRef DispatchBuiltins(GateRef glue, GateRef builtinsId, const std::vector<GateRef>& args);
9714514f5e3Sopenharmony_ci    inline GateRef DispatchBuiltinsWithArgv(GateRef glue, GateRef builtinsId, const std::vector<GateRef>& args);
9724514f5e3Sopenharmony_ci    GateRef ComputeSizeUtf8(GateRef length);
9734514f5e3Sopenharmony_ci    GateRef ComputeSizeUtf16(GateRef length);
9744514f5e3Sopenharmony_ci    GateRef AlignUp(GateRef x, GateRef alignment);
9754514f5e3Sopenharmony_ci    inline void SetLength(GateRef glue, GateRef str, GateRef length, bool compressed);
9764514f5e3Sopenharmony_ci    inline void SetLength(GateRef glue, GateRef str, GateRef length, GateRef isCompressed);
9774514f5e3Sopenharmony_ci    void Assert(int messageId, int line, GateRef glue, GateRef condition, Label *nextLabel);
9784514f5e3Sopenharmony_ci
9794514f5e3Sopenharmony_ci    GateRef GetNormalStringData(const StringInfoGateRef &stringInfoGate);
9804514f5e3Sopenharmony_ci
9814514f5e3Sopenharmony_ci    void Comment(GateRef glue, const std::string &str);
9824514f5e3Sopenharmony_ci    GateRef ToNumber(GateRef glue, GateRef tagged);
9834514f5e3Sopenharmony_ci    inline GateRef LoadPfHeaderFromConstPool(GateRef jsFunc);
9844514f5e3Sopenharmony_ci    GateRef RemoveTaggedWeakTag(GateRef weak);
9854514f5e3Sopenharmony_ci    inline GateRef LoadHCIndexFromConstPool(GateRef cachedArray, GateRef cachedLength, GateRef traceId, Label *miss);
9864514f5e3Sopenharmony_ci    inline GateRef LoadHCIndexInfosFromConstPool(GateRef jsFunc);
9874514f5e3Sopenharmony_ci    inline GateRef GetAttrIndex(GateRef index);
9884514f5e3Sopenharmony_ci    inline GateRef GetAttr(GateRef layoutInfo, GateRef index);
9894514f5e3Sopenharmony_ci    inline GateRef GetKey(GateRef layoutInfo, GateRef index);
9904514f5e3Sopenharmony_ci    inline GateRef GetKeyIndex(GateRef index);
9914514f5e3Sopenharmony_ci    GateRef CalArrayRelativePos(GateRef index, GateRef arrayLen);
9924514f5e3Sopenharmony_ci    GateRef AppendSkipHole(GateRef glue, GateRef first, GateRef second, GateRef copyLength);
9934514f5e3Sopenharmony_ci    GateRef IntToEcmaString(GateRef glue, GateRef number);
9944514f5e3Sopenharmony_ci    GateRef ToCharCode(GateRef number);
9954514f5e3Sopenharmony_ci    GateRef NumberToString(GateRef glue, GateRef number);
9964514f5e3Sopenharmony_ci    inline GateRef GetViewedArrayBuffer(GateRef dataView);
9974514f5e3Sopenharmony_ci    inline GateRef GetByteOffset(GateRef dataView);
9984514f5e3Sopenharmony_ci    inline GateRef GetByteLength(GateRef dataView);
9994514f5e3Sopenharmony_ci    inline GateRef GetArrayBufferData(GateRef buffer);
10004514f5e3Sopenharmony_ci    inline GateRef GetArrayBufferByteLength(GateRef buffer);
10014514f5e3Sopenharmony_ci    inline void SetArrayBufferByteLength(GateRef glue, GateRef buffer, GateRef length);
10024514f5e3Sopenharmony_ci    GateRef IsDetachedBuffer(GateRef buffer);
10034514f5e3Sopenharmony_ci    inline GateRef IsMarkerCellValid(GateRef cell);
10044514f5e3Sopenharmony_ci    inline GateRef GetAccessorHasChanged(GateRef obj);
10054514f5e3Sopenharmony_ci    inline GateRef ComputeTaggedTypedArraySize(GateRef elementSize, GateRef length);
10064514f5e3Sopenharmony_ci    GateRef ChangeTaggedPointerToInt64(GateRef x);
10074514f5e3Sopenharmony_ci    GateRef GetLastLeaveFrame(GateRef glue);
10084514f5e3Sopenharmony_ci    inline GateRef GetPropertiesCache(GateRef glue);
10094514f5e3Sopenharmony_ci    GateRef GetIndexFromPropertiesCache(GateRef glue, GateRef cache, GateRef cls, GateRef key,
10104514f5e3Sopenharmony_ci                                        GateRef hir = Circuit::NullGate());
10114514f5e3Sopenharmony_ci    inline void SetToPropertiesCache(GateRef glue, GateRef cache, GateRef cls, GateRef key, GateRef result,
10124514f5e3Sopenharmony_ci                                     GateRef hir = Circuit::NullGate());
10134514f5e3Sopenharmony_ci    GateRef HashFromHclassAndKey(GateRef glue, GateRef cls, GateRef key, GateRef hir = Circuit::NullGate());
10144514f5e3Sopenharmony_ci    GateRef GetKeyHashCode(GateRef glue, GateRef key, GateRef hir = Circuit::NullGate());
10154514f5e3Sopenharmony_ci    inline GateRef GetSortedKey(GateRef layoutInfo, GateRef index);
10164514f5e3Sopenharmony_ci    inline GateRef GetSortedIndex(GateRef layoutInfo, GateRef index);
10174514f5e3Sopenharmony_ci    inline GateRef GetSortedIndex(GateRef attr);
10184514f5e3Sopenharmony_ci    inline void StoreWithoutBarrier(VariableType type, GateRef base, GateRef offset, GateRef value);
10194514f5e3Sopenharmony_ci    GateRef DefineFunc(GateRef glue, GateRef constpool, GateRef index,
10204514f5e3Sopenharmony_ci                       FunctionKind targetKind = FunctionKind::LAST_FUNCTION_KIND);
10214514f5e3Sopenharmony_ci    GateRef BinarySearch(GateRef glue, GateRef layoutInfo, GateRef key, GateRef propsNum,
10224514f5e3Sopenharmony_ci                         GateRef hir = Circuit::NullGate());
10234514f5e3Sopenharmony_ci    void UpdateProfileTypeInfoCellToFunction(GateRef glue, GateRef function,
10244514f5e3Sopenharmony_ci                                             GateRef profileTypeInfo, GateRef slotId);
10254514f5e3Sopenharmony_ci    GateRef Loadlocalmodulevar(GateRef glue, GateRef index, GateRef module);
10264514f5e3Sopenharmony_ci    GateRef GetArgumentsElements(GateRef glue, GateRef argvTaggedArray, GateRef argv);
10274514f5e3Sopenharmony_ci    void TryToJitReuseCompiledFunc(GateRef glue, GateRef jsFunc, GateRef profileTypeInfoCell);
10284514f5e3Sopenharmony_ci    GateRef GetIsFastCall(GateRef machineCode);
10294514f5e3Sopenharmony_ci
10304514f5e3Sopenharmony_ci    enum OverlapKind {
10314514f5e3Sopenharmony_ci        // NotOverlap means the source and destination memory are not overlap,
10324514f5e3Sopenharmony_ci        // or overlap but the start of source is larger than destination.
10334514f5e3Sopenharmony_ci        // then we will copy the memory from left to right.
10344514f5e3Sopenharmony_ci        NotOverlap,
10354514f5e3Sopenharmony_ci        // MustOverlap mean the source and destination memory are overlap,
10364514f5e3Sopenharmony_ci        // and the start of source is lesser than destination.
10374514f5e3Sopenharmony_ci        // then we will copy the memory from right to left.
10384514f5e3Sopenharmony_ci        MustOverlap,
10394514f5e3Sopenharmony_ci        // Unknown means all the kinds above are possible, it will select the suitable one in runtime.
10404514f5e3Sopenharmony_ci        Unknown,
10414514f5e3Sopenharmony_ci    };
10424514f5e3Sopenharmony_ci    template <OverlapKind kind>
10434514f5e3Sopenharmony_ci    void ArrayCopy(GateRef glue, GateRef src, GateRef dst, GateRef length,
10444514f5e3Sopenharmony_ci                   MemoryAttribute mAttr = MemoryAttribute::Default());
10454514f5e3Sopenharmony_ciprotected:
10464514f5e3Sopenharmony_ci    static constexpr int LOOP_UNROLL_FACTOR = 2;
10474514f5e3Sopenharmony_ciprivate:
10484514f5e3Sopenharmony_ci    using BinaryOperation = std::function<GateRef(Environment*, GateRef, GateRef)>;
10494514f5e3Sopenharmony_ci    template<OpCode Op>
10504514f5e3Sopenharmony_ci    GateRef FastAddSubAndMul(GateRef glue, GateRef left, GateRef right, ProfileOperation callback);
10514514f5e3Sopenharmony_ci    GateRef FastIntDiv(GateRef left, GateRef right, Label *bailout, ProfileOperation callback);
10524514f5e3Sopenharmony_ci    template<OpCode Op>
10534514f5e3Sopenharmony_ci    GateRef FastBinaryOp(GateRef glue, GateRef left, GateRef right,
10544514f5e3Sopenharmony_ci                         const BinaryOperation& intOp, const BinaryOperation& floatOp, ProfileOperation callback);
10554514f5e3Sopenharmony_ci    GateRef TryStringAdd(Environment *env, GateRef glue, GateRef left, GateRef right,
10564514f5e3Sopenharmony_ci                         const BinaryOperation& intOp, const BinaryOperation& floatOp, ProfileOperation callback);
10574514f5e3Sopenharmony_ci    GateRef NumberOperation(Environment *env, GateRef left, GateRef right,
10584514f5e3Sopenharmony_ci                            const BinaryOperation& intOp,
10594514f5e3Sopenharmony_ci                            const BinaryOperation& floatOp,
10604514f5e3Sopenharmony_ci                            ProfileOperation callback);
10614514f5e3Sopenharmony_ci    void SetSValueWithBarrier(GateRef glue, GateRef obj, GateRef offset, GateRef value, GateRef objectRegion,
10624514f5e3Sopenharmony_ci                                      GateRef valueRegion);
10634514f5e3Sopenharmony_ci
10644514f5e3Sopenharmony_ci    void SetNonSValueWithBarrier(GateRef glue, GateRef obj, GateRef offset, GateRef value, GateRef objectRegion,
10654514f5e3Sopenharmony_ci                                     GateRef valueRegion, bool withEden);
10664514f5e3Sopenharmony_ci    void InitializeArguments();
10674514f5e3Sopenharmony_ci    void CheckDetectorName(GateRef glue, GateRef key, Label *fallthrough, Label *slow);
10684514f5e3Sopenharmony_ci    GateRef CanDoubleRepresentInt(GateRef exp, GateRef expBits, GateRef fractionBits);
10694514f5e3Sopenharmony_ci    GateRef CalIteratorKey(GateRef glue);
10704514f5e3Sopenharmony_ci
10714514f5e3Sopenharmony_ci    CallSignature *callSignature_ {nullptr};
10724514f5e3Sopenharmony_ci    Environment *env_;
10734514f5e3Sopenharmony_ci};
10744514f5e3Sopenharmony_ci}  // namespace panda::ecmascript::kungfu
10754514f5e3Sopenharmony_ci#endif  // ECMASCRIPT_COMPILER_STUB_BUILDER_H
1076