16 Commits

Author SHA1 Message Date
wengchangcheng cd90e396a7 Descriptor: ark hilog refactor
details:
1. use hilog in ohos device
2. use panda logger in host
issue:  https://gitee.com/openharmony/ark_js_runtime/issues/I5FR5J

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I6f5de00751154bdb6aac3101515961a3a4432e80
2022-07-06 22:55:49 +08:00
openharmony_ci bc33472e36 !1722 add module resolvePath
Merge pull request !1722 from fanshengli/module_resolvePath
2022-07-05 08:31:24 +00:00
lifansheng b975283659 issue:I5F5ZK
add module resolvePath

Signed-off-by: lifansheng <lifansheng1@huawei.com>
Change-Id: I46ff3e6e7a10a14731f3db15b5b674bb7e1d902d
2022-07-05 09:20:21 +08:00
huoqingyi 5905b54c34 Fix bugs in ts aot
Description:
1.Fix the bug that Circuit IR args gates do not match the function args of the abc file.
2.Add class ArgumentAccessor to handle args gates of Circuit IR.
3.Modify to set the AOT function entry when constpool is being parsed.
4.For functions sharing the same instructions, add a map to collect duplicate infomation. The key of the map is the current method and the value is the first method with the same nstructions to be translated.

Issue:
https://gitee.com/openharmony/ark_js_runtime/issues/I5DA6V

Change-Id: I08e48444eb22c4fc2841e1cdae44b90286de84ac
Signed-off-by: huoqingyi <huoqingyi@huawei.com>
2022-07-04 16:19:11 +08:00
luochuhao b57e9810cd Use panda file unique id as file index in aot output file, instead of filehash calculated by file path.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5F2Q4
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: Iff5302a78355f1cb6ebfa476d64a97d0c49ecd09
2022-07-02 10:17:42 +08:00
wanghuan 733093439a stub.m binary file compiled into shared library
desc: stub.m binary file compiled into shared library

solu:
1. ark_stub_compiler executable not depend libark_jsruntime.so and libark_jsoptimizer.so, but depend libark_jsruntime_set and libark_jsoptimizer_set
2. python shell read stub.m binary data, and save to extern array of stub_m.cpp;
3. file_loader.cpp read stub data from array of stub_m.cpp.

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5E4LW
Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I9c95c882b59438370523179dd5949aeca51faa10
2022-06-28 17:25:33 +08:00
songzhengchao 3b27785037 Code review
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5BSW4

Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I7b822d9bf29d5978f3fdaab4f7aee103421319d4
2022-06-14 16:02:10 +08:00
songzhengchao 3b2885585d Refactor Frame and add Iterator
The background of the problems is as follows:
1 Current iterator current Frame, visit previous Frame stackmap, it's hard to understand.
2 refactor llvm_stackmap_parser
3 refactor frameHandler, we should provider iterator to visit frame.

The solution of the problems is as follows:
1 FrameHandler Ietrator only visit current Frame stackmap
2 In the future, multiple vm may be existed such as multiple worker.while llvm_stackmap_parser is singleton which is not good, each vm should have one stackmap.
3. refactor frame add FrameIterator to visit frame

issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5BSW4

Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I65988624ef42a28788a5268d898e37ebf752c901
2022-06-14 10:15:33 +08:00
songzhengchao 867eb5f85b Merge branch 'master' of gitee.com:openharmony/ark_js_runtime
Change-Id: Icab22a5939f3a284f016e147614eb83784a0ec48
2022-06-13 19:12:43 +08:00
luochuhao d8e482f756 Modify enable logic of certain runtime options.
Change condtion for File execution branch to whether file is AOT compiled or not.

Fix bug of setting bc debug handler entry while loading stub file.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5BBFH
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: I5b6d47a1587631849f6c1e746473cb14b1d727a8
2022-06-13 12:15:03 +08:00
songzhengchao 045c51360a refactor llvm_stackmap_parser
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
2022-06-11 14:22:00 +08:00
getingke 8f66d55a80 fixed for reviewed by sunzhe
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I7d26c8127511c39a62e6962e5cdf2c2a19723d4c
2022-06-09 20:01:33 +08:00
sunzhe23 10ebc065d8 Support stackless callnew for asm interpreter
description:
1 use JSCallDispatch implments call new
2 refactor js common call

issue: I5AKJU

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-06-08 13:28:04 +08:00
songzhengchao 69ac5a27a9 Implement Prologue refactor and Add mulitple Optimized Frame In LLVM 12.0.1
1 refactor prologue reserve dynamic slots which is setted by LLVM IR
2 callsiteSp is calculated by current function's callee saved registers size
3 and Add mulitple Optimized Frame:
OPTIMIZED_JS_FUNCTION_FRAME:argv[n-1],..., argv[0], argc, ...., returnaddr, Fp, type. this frame need to visit args and stackmap.
OPTIMIZED_ASM_FRAME: jscall/jsentry construct frame which is implemented by assemble, this frame is only link to previou frame, it don't need to visit args and stackmap

4 stackmap support parse const pool and llvm patch add deopt interface LLVMBuildCall3

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5AJ9U
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: Ie6a0067169805cc6043ea94936dd578489b56c7b
2022-06-03 15:51:19 +08:00
wengchangcheng 419394270f Descriptor: fix proxy bug
details:SetMethod always is nullptr, set right method: CallJsProxy
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5AIBR

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ia0fa992d302b9183a20faafeffbfce31f01cd072
2022-06-02 11:52:38 +08:00
luochuhao 7522f51989 Add multi-abc-file support in stub compiler and aot compiler and related adaptation.
Use methodId of func in pandafile as index for each aot func in llvmModule.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I598P5
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: I9646d6a80c8138744ebbd617837550b4661f27d3
2022-05-29 16:59:27 +08:00