1.Fix aot newobjdynrange by call JSFunction::Construct.
2.Add native new test case(new non-native constructor depends on
`defineclass`).
3.Add StackAssertScope in debug mode.
4.Delete retired `call` code in runtime_stubs.
5.Refactor GetArg from macros to inline function in RuntimeStubs.
Signed-off-by: ding <dingding5@huawei.com>
Change-Id: Ic89b98af11f2e2fc97aaeba1704d27a95d2c0c7b
There are many similar "call" in the CircuitBuilder and most of them can
be merged or removed. Merge the similar ones and remove the redundant
ones to improve the maintainability and readability.
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I57GSO
Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: Ie575580a5d4d3eae67eff49efd8df126d96db48f
1. Add SetCurrentLabel on build loop to fix newlexenv and poplexenv test compile.
2. Add value input on CallRuntime to fix throwundefindeifhole lowering.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I56BND
Signed-off-by: Hailiang Hu <allenpas@huawei.com>
Change-Id: I5a4e9e026b86038153212bc6fa97cad8a54fbaea
1. The unified callruntime parameter type is tagged.
2. Remove the glue parameter contained in callruntime.
3. Add Ldbigint support in bytecode circuitbuilder.
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5640U
Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: If6fb9047dcb6f109e7c2e379415a968d438cb3ff
1. Update depend after CallRuntime to fix RunStateGatesCheck.
2. Remove fast path at ThrowIfNotObject to fix RunStateGatesCheck.
Issue: #I55UCM
Signed-off-by: Hailiang Hu <allenpas@huawei.com>
Change-Id: Id5730022e7f0a5e6c09ffe25b26d1b2a6fb89154
1.Add aot test case: CreateEmptyArray and CreateEmptyObject and add them to Aot UT-Test.
2.fix "thisobj and input args" bug of callIThisRangeDyn.
3.Update LowerLdGlobalVar and LowerLdObjByName in lowering.
4.fix "callruntime" bug in lowering of LowerStObjByIndex.
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I550RE
Signed-off-by: lijincheng <lijincheng13@huawei.com>
Record idx in const pool of aot function in llvmmodule and aotcodeinfo.
Tweak code in circuit builder for slowpath lowering scenario where
constpool is null.
New JSFunction object for main function in AOT file and new JSFunction object
for each defined function in lowerDefineFuncDyn.
Fix bug in call.S after JSMethod refactor.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I545X0
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: Ie6448f8740caddf79c3b9ed3385ba5739c7eb76b
Rename C_VALUE to NJS_VALUE, simplify using of RTSTUB_ID in
GetValueFromConstStringTable, rename LowerHirToMir to
ReplaceHirToSubCfg.
Issue: #I5311R
Signed-off-by: Hailiang Hu <allenpas@huawei.com>
Change-Id: Ib9b8ea04b090c21569e1bffa2b63dd0ebf843ef1
1. Remove low level CircuitBuilder, make flat of this interface.
2. Move some interface of LabelManager to CircuitBuilder, and rename to Environment.
3. Refactor some interface of MergeMirCircuit, LowerHirToCall,
LowerHirToConditionCall and so on.
Issue: #I52VPJ
Signed-off-by: Hailiang Hu <allenpas@huawei.com>
Change-Id: Ib8f20e7137c8006a0735cefea9fe243513744652
1.Fix bugs found in AOT Running Debug
2.Change GetObjectFromConstPool to " callRuntime LoadValueFromConstantStringTable "
in lowering for getting correct string in constpool when in-value-gate in irbuilder is "StringId"
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I52SFH
Signed-off-by: lijincheng <lijincheng13@huawei.com>
Add option log-compiled-methods to print the compiler(both stub and aot) in units of methods.
Add class CompilerLog.
Refactor some compiler logs.
Unie the log invoked way(COMPILER_LOG or COMPILER_OPTIONAL_LOG).
Signed-off-by: ding <dingding5@huawei.com>
Change-Id: I43ce61d0ba9d453713ab3e6349d07f6d9cde3e5e
CALLARG0DYN_PREF_V8
CALLARG1DYN_PREF_V8_V8
CALLARGS2DYN_PREF_V8_V8_V8
CALLARGS3DYN_PREF_V8_V8_V8_V8
CALLITHISRANGEDYN_PREF_IMM16_V8
CALLIRANGEDYN_PREF_IMM16_V8
when function need call another js function, it will lowering to call "JSCall" trampoline function
JSCall trampoline function will check calltarget function, then correct the arguments, finally jump
the native or optimized code address of the target function
https://gitee.com/openharmony/ark_js_runtime/issues/I52KN7?from=project-issue
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I6be3f130b211ca7c51a557f9ace4bd20d46c4d04
Adaptation on serialization and deserialization of snapshot file is needed,
for providing string constant table.
Tweak on callarg1dyn runtime stub.
Adjust initialization sequence of tsloader and global constant to cope with snapshot
deserilization.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I527BJ
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: I20a82dd0dbeec368b4ff93db4cca8d0ffbdb6717
1.lower LDLEXVARDYN_PREF_IMM4_IMM4, LDLEXVARDYN_PREF_IMM8_IMM8, LDLEXVARDYN_PREF_IMM16_IMM16
STLEXVARDYN_PREF_IMM4_IMM4_V8, STLEXVARDYN_PREF_IMM8_IMM8_V8, STLEXVARDYN_PREF_IMM16_IMM16_V8
NEWLEXENVDYN_PREF_IMM16
2.bugfix Fix the adaptation bug of "ARCH" in llvmIrbuilder, and some other lowering bugs found in LLVMCodegen Test.
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I51UNO
Signed-off-by: lijincheng <lijincheng13@huawei.com>