Use weak reference instead of strong reference for SetNativePointer.
And in period of gc updating reference, if the related js object is free, "Finalize" callback will be called to release c++ memory.
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5BJPG?from=project-issue
Signed-off-by: lukai <lukai25@huawei.com>
Change-Id: Ibb04cf2efa0c7e1fe719eda5e95cb62938e661e0
In the future, multiple vm may be existed such as multiple worker.each
vm should have one stackmap, while llvm_stackmap_parser is singleton
which is not good.
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5BSW4
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I7501c656f27a2fd34225928079f23a196e7f0bbf
Rsp is used in future work, therefore .S file should be deleted.
Issue: #I5AGW3
Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ib1fb140d40d259bc4519fbf547857e5f80e9ee0c
Add case when ECMASCRIPT_ENABLE_ASM_INTERPRETER_RSP_STACK is true and asm-interpreter is false.
Issue: #I59UEB
Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ib0eb125dfdc7e0cdc34109fe810efd48861d443c
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
desc: move interpreter helper stubs from common stub to bc stub, beacuse these stubs' signatures are the same and need not construct frame pointer like bc stub.
solu:
1. delete old helper stub define in common stub, and add new helper stub define in bc stub.
2. add new targetKind in CallSignature to distinguish helper and normal stub in loading stub.
3. delete argc in stub define.
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I556K1
Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I46224e4568b45794aa1bac97682afc41696d5faa
desc: add asmInter debugger to support ide debug.
solu:
1.add bc debugger stub entry;
2.check is or not debug mode in runInternal and switch release to debug or debug to release.
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I53Z4V
Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I3f61bed8b4e17c43d22b5e6f103fe897cd8b41c1
Description
Cut out most of the initialization logic in Runtime::Create and disconnect the
inheritance relationship of most classes such as JSThread.
Issue:
#I53418: Runtime architecture adjustment
Signed-off-by: lifansheng <lifansheng1@huawei.com>
Change-Id: Ib9c1a40354f77d32e515e23334e7f4b4a4fa3259
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
Implement llvmIRGeneration Pass in aot compiler pipeline.
Rename and reconstruct LLVMStubModule and LLVMModuleAssembler class. Move aot code infos
related to describe current (code size, begin addr, entry offset of each func etc.) AOT
snippet and corresponding serialization/deserialization func to NEW class called AotCodeInfo.
Move functions related to file reading/writing to NEW class called AotFileManager.
Add new call opcode in circuit IR to differentiate call into common stubs and call into
runtime interfaces without GC.
Adapt js runtime option for above changes.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4ZDY5
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: If0ab5927ad2551fe5567d1c7b18540fbcc38bc15
description: fix compile error in js_thread.cpp
reason: The reason is comparison of integers of different signs 'size_t' and 'int'. So change 'size_t' to 'int'.
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4YVD3
Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I350301b7004b7d0a83597c7ac71d986edd2a8f08