Commit Graph

141 Commits

Author SHA1 Message Date
openharmony_ci
5896b01d50
!790 fix try catch fail in Asminterpreter
Merge pull request !790 from wpy111/master
2022-03-22 07:08:07 +00:00
openharmony_ci
60f850978d
!835 Clean Code For CodeHub Issues
Merge pull request !835 from wanyanglan/master
2022-03-22 04:42:20 +00:00
wanyanglan
bb6022bffc Clean Code For CodeHub Issues
Modified file permissions, word spelling errors, and
programming specifications suggesting EXPECT_EQ instead
of EXPECT_TRUE

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

Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I00eb9be48d481ce2bdaa4a621246ff6c405abecf
2022-03-22 11:34:13 +08:00
wupengyong
3b4fca1521 reason:try catch fail
description:fix try catch fail in AsmInterpreter

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

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: Iac9ae06b46091950c8d93c14201b05a7a9492421
2022-03-22 11:30:26 +08:00
openharmony_ci
1f6c66ef1c
!762 share constpool, and fix some codestyle
Merge pull request !762 from changcheng/fix_codestyle
2022-03-21 15:01:23 +00:00
wengchangcheng
43f23f8eb3 share constpool, and modify some code refactor
1. cache constpool in ecma vm
2. use JSPandaFile instead of panda_file::File
3. make GenerateProgram as a static function
4. add a singleton of JSPandaFileManager::GetInstance()

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ic7ccd66764c3a020e575d4046e1792475d45be6b
2022-03-21 21:46:25 +08:00
xujie
a2a5f2ad63 Clean Code For CodeHub Issues #96-#123 And #250-#264
According to the problems pointed out by the issuer and the
specifications compiled by Huawei, modify the non-compliant
parts of jsruntime.

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

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: Iceb771dfd9f3aa9017205068fc50ab1a63aae08b
2022-03-21 17:09:19 +08:00
sunzhe23
e05044b20e Fix some binary option handlers bug for c-interpreter and asm-interpreter
Description:
1 Fix and/or/xor CastToUint32 bug
2 Fix asm interpreter shr overflow bug

Issues: I4YPC6

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-03-20 20:03:59 -07:00
wuzhefeng
0c64ae9897 Fix compilation errors
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
2022-03-18 18:17:21 -07:00
luochuhao
905d0496dc Refactor ID definition and callSignature initialization mechanism of stubs
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
2022-03-18 22:01:52 +08:00
changjiaxing
29e36e48c8 The bigint instruction is moved backward, and the sdk is compatible with the yellow zone
Signed-off-by: changjiaxing <changjiaxing1@huawei.com>
2022-03-16 17:46:59 +08:00
wanghuan
e4703206fc feature:add asm handle disable range by option
description:add an option to control asm interpreter stub handle disable range in debug mode

reason:add an option to control asm interpreter stub handle disable range in debug mode

issue:https://gitee.com/open_harmony/dashboard?issue_id=I4XAXX

Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: Ie573a11be453f036cefb9d2eb000b84bb5007e6b
2022-03-16 14:32:47 +08:00
openharmony_ci
f1af474f0e
!748 Add Call Stub
Merge pull request !748 from 李晨帅/master
2022-03-16 04:57:48 +00:00
lichenshuai
e6b8f48f69 Add Call Stub
Change several structures for call stub.

Related issue: #I4XK12

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ie7389ff96c619451304a3f0d352b271310c4b73e
2022-03-15 17:36:58 +08:00
openharmony_ci
c0406cd2d2
!749 fix ark js stack message
Merge pull request !749 from changcheng/fix_js_stack_message
2022-03-13 10:14:32 +00:00
wengchangcheng
1a9dff9a72 modify exception stack message
https://gitee.com/openharmony/ace_ace_engine/issues/I4XKDL

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I6569cba9cdf0312b88406cd7654a9b71ba015672
2022-03-12 22:57:39 +08:00
sunzhe23
8aa1664de5 refactor runtime trampoline id
Description:
add runtime_trace for runtime trampoline
mov runtime_trampolines.cpp info cmascript/trampoline/
rename FAST_STUB_ID as RUNTIME_CALL_ID

issue: #I4XBC9

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-03-11 02:17:24 -08:00
wupengyong
db0aa88cac reason:enable interpreterAsm Gc
Description:save leaveframe on thread leaveframe and save pc before callruntime

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

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I770f18facaeb7e62f5dc02f280828a8f6a420b6f
2022-03-11 12:46:57 +08:00
zhangyouyou
b744a006be Add bigint type, add related instructions and Napi
Signed-off-by: zhangyouyou <zhangyouyou2@huawei.com>
2022-03-10 21:25:06 +08:00
y00576111
6dc6688270 EcmaScript Standard Module Implementation
Delete the existing module implementation and
re implement the module function according to the ECMA 2018 specification

issue: #I4NZQT [https://gitee.com/openharmony/ark_ts2abc/issues/I4NZQT]

Signed-off-by: y00576111 <yaojian16@huawei.com>
Change-Id: I8d381db7f8bf2f3d6b2a5c21cbc3cbab1aef0b9b
2022-03-10 19:10:42 +08:00
wuzhefeng
ab93e17d09 Refactor JSThread layout and introduce macro for debugging
This PR refactors the design of JSThread by introducing aligned struct,
which is more friendly for ASM-Interpreter and Compiler IRs. Meanwhile,
to facilitate debugging, a macro enable_bytrace is introduced to control
the lib dependencies of ark-js-runtime.

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

Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: I56835deec5d372d7c827ded26544a87766f29002
2022-03-10 00:25:35 -08:00
songzhengchao
79af82d668 delete patchpointid replace with return address
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I1a92f226571273e9ecdd713a378ad977a2f4667f
2022-03-08 17:28:21 +08:00
getingke
7ed9a3fbea fixed for debug js_frame ok and revert test code
issue:[Add JSFunction EntryFrame & LeaveFrame for arm32](https://gitee.com/openharmony/ark_js_runtime/issues/I4WRJP?from=project-issue)

Signed-off-by: getingke <getingke@huawei.com>
Change-Id: Ia688bbec9825ec9ebe0e7dcd7da47af1317f1fb8
2022-03-08 11:11:46 +08:00
getingke
e8dfcaca06 fixed for get stackmap with returnaddress
issue:[Add JSFunction EntryFrame & LeaveFrame for arm32](https://gitee.com/openharmony/ark_js_runtime/issues/I4WRJP?from=project-issue)

Signed-off-by: getingke <getingke@huawei.com>
Change-Id: Ie034eebf3e1f3c461dc35168756564aaa708602d
2022-03-08 11:09:05 +08:00
getingke
02d27c76bb fixed for arm32 js frame
issue:[Add JSFunction EntryFrame & LeaveFrame for arm32](https://gitee.com/openharmony/ark_js_runtime/issues/I4WRJP?from=project-issue)
Signed-off-by: getingke <getingke@huawei.com>

Change-Id: If65fd5064fa3c626f8f0ae3bae550465414af5e7
2022-03-08 11:01:20 +08:00
chenqi
20726efef7 Add Container Queue
Description
  To ensure the high performance of container classes, Queue is provided in ark.
Related issue
  #I4TKAU:Add Container Queue

Signed-off-by: chenqi <chenqi151@huawei.com>
2022-03-05 16:55:38 +08:00
scw
f7b97b27b0 move dfx feature to dfx dir
ISSUE:https://gitee.com/openharmony/ark_js_runtime/issues/I4SXXS

Signed-off-by: scw <suchongwei@huawei.com>
Change-Id: Ie5ae6a70f5b561b7578702db591affb26a0057d9
2022-03-04 10:52:47 +08:00
sunzhe23
4737a4f59e Related issue: #I4W0C0
Modifications:
* Fix write barrier stub bug
* Adapt HandleNewLexEnvWithNameDynPrefImm16Imm16 for asm interpreter

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-03-02 01:52:51 -08:00
panzhenyu1
56bb730cba Adapt for windows platform
related issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4VDA4
Change-Id: I4560cf0ec4c05ccd855debb51b6d0190b4f1ccfa
Signed-off-by: panzhenyu1 <panzhenyu1@huawei.com>
2022-03-02 11:22:58 +08:00
openharmony_ci
5df4c81591
!640 fix problems concerning lexicalEnv
Merge pull request !640 from huangfeijie/master
2022-03-01 15:37:57 +00:00
ding
96b342e46e Stackless optimalize new operation, including BuiltinsConstructor new and the most common new with callType is HAVE_THIS
Signed-off-by: ding <dingding5@huawei.com>
2022-03-01 20:10:20 +08:00
openharmony_ci
6b336b7884
!648 IC performance optimization by remove redundant code
Merge pull request !648 from DaiHN/master
2022-03-01 08:18:17 +00:00
DaiH
fc1915fc8e IC performance optimization by remove redundant code
Signed-off-by: DaiH <daihuina1@huawei.com>
==-------------------------------------------==
IC performance optimization by remove redundant code
 1. remove redundant function FixSpOnEntry
 2. remove logically redundant code of IC
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4VNHF?from=project-issue
==-------------------------------------------==
Change-Id: If78c3b1b8bc88a48907fd168e795ca48bffe8ec2
2022-03-01 15:09:17 +08:00
h00611971
b97fd87841 issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4VE0E
fix problems concerning lexicalEnv

Signed-off-by: h00611971 <huangfeijie@huawei.com>
2022-03-01 11:16:43 +08:00
songzhengchao
b2ef46bebe CallRuntimeTrampoline brige support aarch64
Description:
a Use two Bridge function, "InvokeJSFunctionEntry" and "CallRuntimeTrampoline" to Adapter the calling convention of Aot JSFunction & Runtime Stub, then Construct the Entry Frame in "InvokeJSFunctionEntry", Leave Frame in "CallRuntimeTrampoline"
b modify LLVM Calling Conversion, prologue push callee-saved gpr registers --> callee-saved fp/simd/SVE regs --> prev_fp, prev_lr .finally update x29 pointer to prev_fp

issue:https://gitee.com/openharmony/ark_js_runtime/pulls/630

Change-Id: I1df498f411e03c9887c4cad97bf82371c0b5f01a
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
2022-03-01 11:07:25 +08:00
lichenshuai
7b33f4bfe8 Fix asm compile error.
Related issue: #I4VGTI

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ib85c15af4c0bd6c48c319217684fc80df086c744
2022-02-28 15:35:26 +08:00
lichenshuai
82739075da Optimize call
Currently, in the TSBenchmark of call, ark is still not as good as v8. So it needs to be optimized.

The way to set call frame is mainly optimized. After the optimization, fast path is executed when actual args is equal
to declared args. Call type, numVregs, numArgs, native flag are all stored in one field for further stub.

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
2022-02-26 11:53:40 +08:00
zhangyukun
3b881fa018 Sync code from c_asm_interpreter to master
Use Stub to impl handlers of bytecodes and use tail call to impl
dispatch of handlers of bytecodes

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I7afabdc40ddfa11345aa1029059514aa4f55b9f8
2022-02-22 17:01:18 +08:00
openharmony_ci
cf3ee3ab96
!577 Add JS Function Entry frame & LeaveFrame
Merge pull request !577 from getingke/js_function_entry_frame
2022-02-21 12:44:08 +00:00
getingke
5e376b0121 fixed for compile error
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: Ia0a640d5dceb07faf18e8b383fde76fd272948f3
2022-02-21 17:13:33 +08:00
getingke
0d0203e742 fixed for rewrite patch id for runtime call
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: Ie4a76fb481a548d356450b79c55ed5d3c28b86b0
2022-02-21 15:32:29 +08:00
getingke
88429808d5 fixed for revert test code
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I725d9f53d3666b74b9430857e3ac0c8c33b3892c
2022-02-19 13:32:14 +08:00
getingke
deab3fbbbc fixed for gc test
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I358802cfacd4c592abe6fedbb571194b4d85d5d4
2022-02-19 09:54:46 +08:00
songzhengchao
8717c48154 fixed for arm64 test mod.abc slowpath ok
add set thread current sp when leave aot frame

Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I18813879c9512a91f7f38ae07b211190d2e6daed
2022-02-18 17:58:06 +08:00
openharmony_ci
74d4f0e409
!526 Add Container ArrayList
Merge pull request !526 from 刘甘霖/container_arraylist
2022-02-18 09:53:09 +00:00
getingke
76734dd503 fixed for x86 test double mod ok
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I347316cfbbdc8e2ca15b222e1149a41712b35fca
2022-02-18 14:03:24 +08:00
getingke
2d8d1e4347 fixed for x86 test mod.abc ok
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I3fd6a16ee7cbc1ad23774bef1948bfb391a2378e
2022-02-18 10:52:10 +08:00
liuganlin
3f93f046c1 Add container ArrayList
Description
  To ensure the high performance of container classes, ArrayList is provided in ark.
Related issue
  #I4T65T:Add Container ArrayList

Signed-off-by: liuganlin <liuganlin@huawei.com>
2022-02-18 10:37:31 +08:00
xliu
1bce193604 fix TryLdGlobalByName and LookupPropertyInlinedProps
Description
  fix bugs of TryLdGlobalByName and LookupPropertyInlinedProps
  Add test cases for global aeecssor.
Related issue
  #I4TZT1: fix TryLdGlobalByName and LookupPropertyInlinedProps

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: If4b78a136ed2299a1ae1848d8c248f5265996905
2022-02-17 13:00:20 +08:00
zhangyukun
39d782c946 Merge new runtimetrapolines from c_asm into master
Bug: #I4TRQP

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I55b49c3ec9f6c5f91272668ff43ef4147b9ed6c2
2022-02-16 16:49:53 +08:00