Commit Graph

140 Commits

Author SHA1 Message Date
getingke ff439ffc66 Merge branch 'master' of gitee.com:openharmony/ark_js_runtime into gtk_0506
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: Id33a4dc77017b43b332d46e33c042c5114aa602b
2022-05-18 16:02:06 +08:00
openharmony_ci 4179a76a2d !1330 Enable x86 Assembler
Merge pull request !1330 from wanyanglan/master
2022-05-18 03:12:23 +00:00
wanyanglan f0981feee7 Enable x86 Assembler
1. x86 assembler replaces JSCall, JSCallArgV, JSFunctionEntry,
OptimizedCallOptimized, CallNativeTrampoline assembly code of
x86 call.S debugged and enabled to the official code.
2. Delete the relevant code in call.S.

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

Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I69b9aad1f52d486ba6d96248aa1a5a2d0a44f318
2022-05-18 09:42:00 +08:00
dingwen dfe294871d Fix run TSTypeTest fail on RK3568 and snapshot bug
Description:1.Add target in ohos_test.xml 2.Fix deserialize empty string
bug
ISSUE:https://gitee.com/openharmony/ark_js_runtime/issues/I57UBX
Signed-off-by: dingwen <dingwen6@huawei.com>

Change-Id: I00b980f53fdfa9ab9cf00b566aaa65dc3744f1b7
2022-05-17 19:24:15 +08:00
getingke 9caab36572 fixed for aarch64 assembler invoke jsfunction entry
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I844e55a895441fd188c2c2c357907afd0998779c
2022-05-17 10:23:58 +08:00
openharmony_ci bcb29c4004 !1260 replace bytrace key to hitrace_meter for ark_js_runtime
Merge pull request !1260 from wenlong_12/master
2022-05-13 03:33:56 +00:00
luochuhao 1a370607c9 Delete duplicated co stub generation and related conditional code.
Adapt call.S to current EcmaRuntimeCallInfo change.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I56JF1
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: I117c6b088a82b15c2afcb18b4a74f47bfd705545
2022-05-12 17:24:57 +08:00
wenlong12 9041b8f1e8 replace bytrace key to hitrace_meter
Signed-off-by: wenlong12 <wenlong12@huawei.com>

Signed-off-by: wenlong12 <wenlong12@huawei.com>
2022-05-12 16:37:03 +08:00
dingwen 27452f0afe Move load AOT and Snapshot file after builtins initialized
Description:Load AOT and Snapshot file after builtins initialized
ISSUE:https://gitee.com/openharmony/ark_js_runtime/issues/I571GL

Signed-off-by: dingwen <dingwen6@huawei.com>
Change-Id: Icd509469da3b8bad955cbba40bd1b7fe0fcc0a4c
2022-05-12 10:23:24 +08:00
openharmony_ci 42355bd8fb !1262 Refactor Compilation Framework Part-2
Merge pull request !1262 from Gargoyle.h/wzfmaster-dev
2022-05-11 12:29:01 +00:00
wuzhefeng 662f2b78a6 Refactor Compilation Framework Part-2
1. Rename IR builder to improve the readability.
2. Remove redundant Headers to decouple the relationships of components.

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

Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: I0c8da6cd55bb8e7f33421ba846bab89bd5e06c55
2022-05-11 04:28:10 -07:00
Yuqiang Xian d9d281af16 Merge remote-tracking branch 'oh/master' 2022-05-10 19:04:40 +08:00
openharmony_ci 2ba392bb7f !1231 JSNativePointer Optimization
Merge pull request !1231 from yingguofeng/master
2022-05-10 07:55:25 +00:00
openharmony_ci 9075e30fa6 !1220 Link and update JSfunction and constpool info in aot execution phase.
Merge pull request !1220 from luochuhao/method
2022-05-09 08:16:50 +00:00
luochuhao 657e887afd Link and update JSfunction and constpool info in aot execution phase.
Remove unnecessary jsruntime option setting in CreateEcmaVMWithScope.

Tweak llvm lib path in ecmascript/compiler/tests/BUILD.gn.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I563DZ
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: I740db8d7dd6d406adda05333edfff50bbc505cc6
2022-05-09 15:31:18 +08:00
openharmony_ci 87ffbd0d42 !1190 Add support for Mac platfom
Merge pull request !1190 from Pan Zhenyu/master
2022-05-09 06:15:13 +00:00
openharmony_ci 200f7352aa !1210 fix microJobQueue executing bugs
Merge pull request !1210 from lukai/master
2022-05-09 01:33:56 +00:00
ZhenyuPan 78f27c883f for ark_js_vm on mac
related issue: https://gitee.com/openharmony/ark_js_runtime/issues/I55GYU
Change-Id: I3faad1171ed2ef08660c62f0ff6c88b34c5cbcfa
Signed-off-by: panzhenyu1 <panzhenyu1@huawei.com>
2022-05-09 09:06:58 +08:00
openharmony_ci 0c34e47066 !1178 Snapshot code optimization
Merge pull request !1178 from dingwen/master
2022-05-07 12:55:32 +00:00
yingguofeng@huawei.com b07c138cbd The overhead of de duplication operation is too high in function PushToNativePointerList
Make sure there is no repetition where the interface is called

https://gitee.com/openharmony/ark_js_runtime/issues/I56ARS?from=project-issue

Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
Change-Id: Ib9b248beffe62be5c7826782a0f3ab639f7c3d30
2022-05-07 17:21:10 +08:00
dingwen 61b6782b65 Snapshot code optimization
Description:Snapshot code optimization include modify class name SnapShotSerialize to SnapShotHandler, delete some magic number, add interface to acquire global env and global const object index.
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I55CQ3

Signed-off-by: dingwen <dingwen6@huawei.com>
Change-Id: I338028c5cfd4f992095f2bded2956e33f275bb1b
2022-05-07 09:23:06 +08:00
Yuqiang Xian adecfbd30b Merge remote-tracking branch 'oh/master' 2022-05-06 21:25:57 +08:00
yingguofeng@huawei.com 09aaafead4 Setter/Getter Optimization
1、std::array copy construction has high performance overhead,
2、Class is transferred to dictionary after adding getter and setter, resulting in IC failure

https://gitee.com/openharmony/ark_js_runtime/issues/I55EFB?from=project-issue

500000 getter: 170ms > 105ms

Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
Change-Id: Ia08f22df798a3c3a2f6fafb6401c802e3af3c63b
2022-05-06 14:17:02 +08:00
xujie acfb4fba5b Fix Some Aot bugs About Env And GC
1.ify the way to get/set lexicalenv for Aot.
2.oved first interpreter entry frame

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

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: I5fce320bba016d3f0ea71df4668b1e0121bd857f
2022-05-06 11:33:04 +08:00
lukai 9c3be0ea04 fix microJobQueue executing bugs
Calling interface "executePendingJob" nestedly may raise stack overflow

Signed-off-by: lukai <lukai25@huawei.com>
Change-Id: Icdd6f5a8338ff451a09ae5840773277c343cf53a
2022-05-06 10:01:58 +08:00
Yuqiang Xian f17e646f69 Merge remote-tracking branch 'oh/master' 2022-04-30 20:09:00 +08:00
Yuqiang Xian 9e88572f35 Add descriptions to concurrent marking status check.
Don't use IS_STANDARD_SYSTEM config to switch off concurrent marking.
Fix typos and grammar issues.

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

Signed-off-by: Yuqiang Xian <xianyuqiang@huawei.com>
2022-04-30 20:02:19 +08:00
openharmony_ci ff44193d07 !1171 Modify option source of stub compiler
Merge pull request !1171 from luochuhao/modifyoption
2022-04-30 00:57:37 +00:00
luochuhao 86fda0792b Modify option source of stub compiler.
Using options in js runtime option list and delete stub compiler option.

Add path check for stub compiler generation phase.

Load stub file before loading of aot file.

Add runtime option for optimization level configuration.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I557Q2
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: Ifbaa7a2dc4333310c62f1f8e230eefb7a2136ca5
2022-04-29 14:40:18 +08:00
openharmony_ci 913facca1b !1157 optimize asm interpreter performance
Merge pull request !1157 from zhangyukun8/optimize
2022-04-28 12:05:15 +00:00
zhangyukun 5632b517c9 optimize asm interpreter performance
Description:
1. add runtime stat scope to get the data of time-consuming-points
2. use stub to impl these runtime time-consuming-points
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I552ZB?from=project-issue

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I242b3ef8b4235d952aa32fda0d3d5b8ed2f8f776
2022-04-28 18:43:32 +08:00
dingwen 6636896a3e Support constpool serialize, global const and global env object reuse, string deduplication
Description:1.Support constpool serialize 2.Global const and global env
object reuse 3.String deduplication
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I54NF5

Signed-off-by: dingwen <dingwen6@huawei.com>
Change-Id: Ia05fb055b8e846a5437ff49d97e0141f72ee112e
2022-04-27 21:16:00 +08:00
yingguofeng@huawei.com 3379f227fd Bugfix:Launcher application crash caused by large object updating null pointer
Add judgment null pointer

https: //gitee.com/openharmony/ark_js_runtime/issues/I54MFV?from=project-issue
Change-Id: If05f7dc1372d3d56acd59811cef1e51fb507bf94
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-04-26 09:09:59 +08:00
ding 755f336a92 Add TS Aot Test Framework
Add TS Aot test framework: supprot running aot whole process test automatically and throwing error messages at each step.

Add tonumber, not, neg module test.

Fix assembler judement in RunPipeline

Add --snapshot-output-file option.

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: Ica09e907c1f03547c1ba80bf639a53d923c01a16
2022-04-25 21:28:10 +08:00
openharmony_ci 7882238ba9 !1101 First run of an TSAOT-define function Demo.
Merge pull request !1101 from luochuhao/definefunc
2022-04-25 07:14:22 +00:00
luochuhao 90a5373327 First run of an TSAOT-define function Demo.
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
2022-04-25 12:00:12 +08:00
panzhenyu1 a0fb802750 Fix compile problem caused by rebase
related issue: https://gitee.com/openharmony/ark_js_runtime/issues/I543ZG

Change-Id: Ibf11fee9ddb8433ad53a67baccaf40ef1802c5b8
Signed-off-by: panzhenyu1 <panzhenyu1@huawei.com>
2022-04-25 09:28:39 +08:00
openharmony_ci 1e7209b55a !1098 debugger refactor
Merge pull request !1098 from Gymee/perf_tune
2022-04-24 11:02:16 +00:00
songzhengchao 0e00e78a2d Bytecode_circuit_builder SUB2DYN_PREF_V8 bug fix
1 add ts_sub test
2 modify int to taggedvalue

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

Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: Idc51011528bd34c29faf0ffbb36cd225b2b91302
2022-04-24 15:14:09 +08:00
openharmony_ci 120725f877 !1034 Bitmap And MMap Optimization
Merge pull request !1034 from yingguofeng/bitmap
2022-04-24 06:22:56 +00:00
Gymee 909b9081a9 debugger refactor
Change-Id: Idff2f871926a3893b5bd962f13b4a10c39f9f6d9
Signed-off-by: Gymee <yumeijie@huawei.com>
2022-04-24 11:35:13 +08:00
wengchangcheng 3ae043afa5 Descriptor: enable testcase with ecmavm instead of runtime
details:
1. add debugger module testcase in host
2. fix debugger crash when throw exception in interpreter
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I53WBO

Change-Id: Ia7d878b0b81c011d940a9187d39c854f6a592e6d
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2022-04-22 20:42:16 +08:00
yingguofeng@huawei.com 07f3ca8f17 Memory map allocator implementation
Two memory blocks can be allocated: default region size and huge object size

https://gitee.com/openharmony/ark_js_runtime/issues/I534B6?from=project-issue

Change-Id: I734213cfe43fc04638d4fd97d4cf4c04f7485875
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-04-21 22:32:21 +08:00
xiongluo 771d51b546 refactor jsMethod
1. Move necessary fileds in jsMethod
2. Make jsMethod inherit aligned struct
3. Change some function names for easy reading

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-04-20 23:17:00 -10:00
lifansheng a725676a6c Runtime architecture adjustment
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
2022-04-21 14:37:31 +08:00
openharmony_ci 47d32ddc02 !1029 Support watch expression and condtional breakpoint
Merge pull request !1029 from Gymee/feature_watch
2022-04-18 14:13:30 +00:00
Gymee 83048efbf1 support watch expression and conditional breakpoint
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I794a5ee770f251e6fea4de5058575519ff0490e6
2022-04-18 20:04:33 +08:00
songzhengchao e846617c23 1 bug fix compile bc/common stub vm setup load stub
2 rename glue type POINTER TO NATIVE_POINTER
3 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.

JSCall(glue, argc, calltarget, ....)
then proxy call(glue, argc, callTarget, argv[])
        if proxy->GetHandler is function
            tail call JSCall(glue, argc, callTarget, argv); // consider performance
        else
            //Call(trap, handler, «target, thisArgument, argArray»)
            call CreateArrayFromList(glue, argc, argv[]) ---> arrHandle  // maybe trigger GC, construct OptimizedWithArgvLeaveFrame, visitor argv[0]..argv[argc-1]
            call JSCall(glue, argc, method, argv[])
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I52T6B?from=project-issue

Change-Id: I650ff10b35bc085ec81e7734ce35501ee23fbb62
2022-04-18 11:36:41 +08:00
songzhengchao 71dd7f53b9 refactor llvm_ir_builder.cpp call
bug fix OptimizedWithArgvLeaveFrameHandler::Iterate bug

issue:https://gitee.com/openharmony/ark_js_runtime/issues/I52T6B?from=project-issue
Signed-off-by: songzhengchao <surpassgoodchao@qq.com>
2022-04-17 22:32:54 +08:00
openharmony_ci 50bb6b9bc6 !1025 debugger refactor
Merge pull request !1025 from changcheng/debugger_refactor
2022-04-17 01:01:12 +00:00