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>
Share GateAccessor and CircuitBuilder in SlowPathLowering,
clear temporary used label manager after every lowering,
then it can reduce the repeating code.
Add lowering of LDMODULEVAR, GETMODULENAMESPACE, and so on.
Issue: I5003A
Signed-off-by: Hailiang Hu <allenpas@huawei.com>
Change-Id: I3e4021511c72c91c3ad5246a022d230aa3215368
Because there are some macros that trigger compilation errors when
compiling stub-compiler and aot-compiler. The root cause is that several
classes declarations are missing from the associated macros. This PR
fixes the issues via adding the lost classes to the macros. Besides, we
also rename the FastStub to CommonStubs in order to make the stub-arch
more readable.
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4YKBN
Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: I16263fef7deeadf8a9ce4e5252a6e9898a7742bc
Refactor ID definition and callSignature initialization mechanism of runtime stub,
optimizer stub and bytecode handler stub,
reduce amount and complexity of macro used in calling those stubs.
Add stubDes struct to classify stubs both in AOT file generation phase
and AOT file loading phase.
Fix some circular dependency problems in including header files.
Fix certain inline function declaration and definition format problems, which could lead to
compiling errors.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4VMLD?from=project-issue
Test: stubTest(unit test), richards with asm interpreter enabled
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: Ibd5fcd963347b97f8dec227f3245d2064463b0b0
Support GET_EXCEPTION, THROWDYN_PREF, THROWCONSTASSIGNMENT_PREF_V8, and so on.
Issue: I4XZXC
Signed-off-by: Hailiang Hu <allenpas@huawei.com>
Change-Id: Ide2fff6dad1f9d7312db4b6133649a5fb651b14b
lowering HIR related to call, including CallArg0Dyn, CallArg1Dyn, CallArgs2Dyn, CallArgs3Dyn,
CallIThisRangeDyn, CallSpreadDyn,CallIRangeDyn. Currently only native call are supported.
Inline slowpath function in trampoline file.
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4X6S1
Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: I4525f62c5b9307adb5cf323352695e4db98fae1b
The lowering slow path requires not only the vreg information of the
instruction, but also other information such as string id, method id, etc.
For each bytecode instruction, collect the various information stored in
the instruction, and use the information as the input of the gate, and
in the lowering stage, take out the required information from the gate.
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4WQR5
Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I42ef36554b0b88ce3e1cd0f593e8ce9e924b83e0
Add lower hir to condition call, get iterator lower
Issue: I4WKOZ
Signed-off-by: Hailiang Hu <allenpas@huawei.com>
Change-Id: Ieb78a3ef0bebc35f7edd4224b55393c44bbbeee2
Readjustment lowering code style, support CREATEITERRESULTOBJ,
CREATEITERRESULTOBJ, ASYNCFUNCTIONAWAITUNCAUGHT, and so on.
Issue: I4V5YQ
Signed-off-by: Hailiang Hu <allenpas@huawei.com>
Change-Id: I22f9c600ba25a9aa0d78adedd17ef249260b9e01