100 Commits

Author SHA1 Message Date
zhangyukun8 c041e23892 CpuProfiler adapt assembly-interpreter
1. lookup traces when a frame has not been constructed totally
2. update rbp before exit current frame
3. update leaveFrame_ before callngcruntime
4. fix bigint

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

Signed-off-by: zhangyukun8 <zhangyukun8@huawei.com>
Change-Id: I85bedde971436df9775d49fefd84b7375a65f564
2022-07-04 09:43:35 +08:00
openharmony_ci e0acde7a42 !1690 Put bcStubEntries as offset 0 of glueData
Merge pull request !1690 from 孙哲/master
2022-07-01 09:03:58 +00:00
sunzhe23 1dc1ca0b72 Put bcStubEntries as Offset 0 of glueData
description:
optimize arm performance, interpreter bc dispatch can reduce one instruction

Issue: #I5EM5W

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-07-01 16:21:10 +08:00
wupengyong 7fcd4f36e2 reason:fix IntBuildTaggedWithNoGC
description:use SExtInt32ToInt64
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5EITG?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I8374ffd008013bcfb9ed3d0b4030b7a0c9327720
2022-06-28 16:16:35 +08:00
openharmony_ci 37c0da1e8f !1621 AsmInterpreter call Aot JSFunction
Merge pull request !1621 from getingke/asm_call_aot
2022-06-21 07:35:49 +00:00
xliu f9c09fc846 fix LdGlobaleVar and TryLdGlobalByName
1.Adjust the logic of IC for LdGlobalVar
2.Adjust the logic of IC for TryLdGlobalByName
3.Add set as SetAsMega for LoadMiss and StoreMiss
4.Container test case refactoring
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5CJO2

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: I3c531d072c5f2e4b6508544d9420ad4817943c24
2022-06-20 10:13:02 +08:00
getingke efac360ce9 fixed for asm interpreter call aot code
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I93f24a015a058cbfe4453717bb80f2c31f63aa48
2022-06-17 18:26:05 +08:00
zhangyukun8 307ae93910 Fix return value of resume uncaught exception
1. acc is changed when call resumeuncaughtandreturn

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

Signed-off-by: zhangyukun8 <zhangyukun8@huawei.com>
Change-Id: Icd470fcd6e04da9f5f437804620643b2c109a19b
2022-06-17 16:02:23 +08:00
openharmony_ci 2d071c8548 !1595 fix SetPropertyByValueWithOwn handler
Merge pull request !1595 from wpy111/master
2022-06-16 02:57:01 +00:00
wupengyong 8cd3fc683f reason:fix SetPropertyByValueWithOwn handler
description:add InterpreterSetPropertyByValueWithOwn GHCcall
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5CACE?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: Ifdf8695f3318a67ddb3d2d10e859b5f55c2486a8
2022-06-16 10:15:29 +08:00
zhangyukun8 72a127e175 Fix newobjdynrange
1. add is heap object check
2. use assembler to deal with newobjreturn

Signed-off-by: zhangyukun8 <zhangyukun8@huawei.com>
Change-Id: I9fc6d4b3e3b7af8a916d7059a8eff6a3c9a2086a
2022-06-15 14:28:32 +08:00
lichenshuai 581dc52613 Fix SingleStepDebugging Bug
Correct the offset of SingleStepDebugging. Return sp in JumpToCInterpreter instead of pc.

Issue: #I5BIJG

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: I1dcfab10b8244a874838434df8c1ea8935d71d84
2022-06-14 11:02:41 +08:00
wupengyong ba04fb60b1 reason:fix HandleNewObjDynRangePrefImm16V8 exception
description:fix HandleNewObjDynRangePrefImm16V8 exception
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5C1CY?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I7e3a58f0116b04015b98cdb2681c92554b99d600
2022-06-13 16:41:33 +08:00
zhangyukun 78b91bf542 adapt newobjdynrange on arm64
1. fix getthis on x64
2. adapt optimization of newobjdynrange on arm64
3. add bridge frame to support GC of setter and getter

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

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I09c5fc89b2486d0b9988d9bef0af65f77dc2f684
2022-06-12 16:54:24 +08:00
openharmony_ci dedf332ab5 !1568 fix exception for aarch64 rsp
Merge pull request !1568 from wpy111/master
2022-06-11 02:47:35 +00:00
wupengyong 34275bafe3 reason:fix rsp aarch64 exception handler
description:resume x30 when return
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5BSGW?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I23a6aa431220b4e5a9cbadf395141a48ec17fdf8
2022-06-11 10:00:32 +08:00
sunzhe23 7eb24e8b94 Support new this object call inline new
description:
add NewJSObject stub for fast new JSObject

issue: #I5BPKF

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-06-10 15:35:16 +08:00
sunzhe23 4c5952a90f Fix some performance issue for asm interpreter
description:
1 reuse ic slot for ic slot overflow case
2 Replace CallStub with (tail call) bytecode handler for GetPropertyByName
3 add fast path for call new return handler

issue: I5BFu2

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-06-09 10:30:14 +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
lichenshuai a724508c73 Delete RSP macro and .S file
Rsp is used in future work, therefore .S file should be deleted.

Issue: #I5AGW3

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ib1fb140d40d259bc4519fbf547857e5f80e9ee0c
2022-06-02 10:32:46 +08:00
sunzhe23 372df16bd4 Refactor JSCall Dispatcher and implments asm getter/setter
description:
1 Refactor Call Dispatcher, and Regactor common call
2 use circuit IR implments getter/setter

issue: I59POB

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-05-30 16:14:30 +08:00
sunzhe23 b492ef605f Fix some asm interpreter bug
description:
1 add align up for rodata section, incase movdqa crash
2 set gc leaf function attribute for no gc all
3 fix mega ic run slowpath bug for asm interpreter
4 remove trampoline unused code

issue: #I58VFA

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-05-24 19:36:38 +08:00
zhangyukun 9f15b59632 Fix 262 of rsp on x64
1. skip builtin frame and asm interpreter entry frame when upframe
2. skip push args when argc is 0
3. check thread exception, rather not ret value
4. deal with fp when entry Execute
5. deal with call class Constructor
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I58I4H?from=project-issue

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I874f1437d5d21a8cf50a8d9ca73d7a92007f1bab
2022-05-23 18:42:48 +08:00
sunzhe23 e0bd313831 Support inline new for new lexical env
description:
1 implements new lexical by inline new
2 add rodata for aot code

issue: I57XRY

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-05-19 15:07:16 +08:00
lichenshuai cc9a22605c Fix asyncAsmAction TDD
The TDD asyncAsmAction will fail when run. It needs to be fixed.

Issue: #I57UY6

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ie80755f9bc13d4fe1dd83d413ac71323c753b7f7
2022-05-17 15:41:23 +08:00
openharmony_ci 0dd65000d6 !1325 Fix rsp frame callnative and generator
Merge pull request !1325 from zhangyukun8/master
2022-05-16 13:57:03 +00:00
zhangyukun 6e0a576021 Fix rsp frame callnative and generator
1. adaptor GetNumArgs
2. fix callnative irange
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I57PDZ?from=project-issue

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: Ib9a07e2e05fae93eb169e69e79f0c91acca37600
2022-05-16 21:08:38 +08:00
zhaozhibo c04fbfa226 Complete JSAPIArrayList test case、fix unittest case bug、fix NewJSAPIArrayList bug、fix codex warnings
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-05-16 20:02:48 +08:00
linxiang b9171f83de Fix assembly interpreter bug: Call native passes in the wrong parameter
Signed-off-by: linxiang <linxiang8@huawei.com>
Change-Id: I165754a55f72c95038d9ad694ad072aacfe53f4d
2022-05-16 14:42:32 +08:00
zhangyukun a65fb615bb Impl rsp frame of generator
1. Resume rsp of SuspendGenerator
2. Remove duplicated stack frame switching of ChangeGenContext and
ResumeContext
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I57IXJ?from=project-issue

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I3a86c645864ec73f5dd351882125b4ee721b5468
2022-05-16 09:18:47 +08:00
sunzhe23 1984b8f251 Refactor asm interpreter call native
description:
use builtin frame refactor call native

issue: #I573S8

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-05-13 05:12:06 -07:00
zhangyukun ae2a7e5d9b exception handler supports rsp frame
1.add lastFp_ into GlueData to restore rsp in exception handler
2.add AsmInterpreterEntryFrame to exit Execute when use rsp
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5733D?from=project-issue
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>

Change-Id: Ia3c9301f3854b7d9cfb46dabbae82186b86348a3
2022-05-12 20:44:21 +08:00
lichenshuai 7b9a1aa1f7 Add new stackless stub
Add new stackless stub to syncronize asm interpreter with C interpreter.

Issue: #I54DXV

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ie6bef96e4ecd692d5a32a13eaa719859424c4b24
2022-05-11 09:09:09 +08:00
sunzhe23 c874c75894 Refactor asm interpreted frame
description:
1 remove macro ECMASCRIPT_COMPILE_ASM_INTERPRETER
2 add asm native frame type

issue: I569XH

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-05-08 20:40:24 -07:00
zhangyukun 25daaf26ef constuct entry frame of execute with rsp
1. add fp to support discontinuous frame gc and resume rsp
2. assemble execute and impl entry frame with rsp
3. use assembler to refactor .s
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I52BQE?from=project-issue

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I6966672dc065d63144fe7fa145ab76571189d540
2022-05-07 14:13:50 +08:00
guobingbing 129ebdbf25 refactor class FrameHandler
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: I9f3ff0c04d34a31a34f21da637689eb61d4166f1
2022-05-04 10:36:44 +08:00
openharmony_ci 89d3fb3d0b !1182 fix ic_mega
Merge pull request !1182 from wpy111/master
2022-04-29 07:29:58 +00:00
wupengyong 95808e46e8 reason:ic bugfix in asm interpreter
description:use tryfastpath replace slowpath
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I55CQB?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: If2843d6d971c1af39d7b1f5c78ed7e18b5e9fc7f
2022-04-29 14:16:16 +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
xiongluo d8b0be85b3 refactor the uint fileds in jsmethod
1. make bytecodeArraySize, hotnessCounter, methodId, slotSize into one field methodField.
2. change the interpreter_stub to fit the hotness counter in jsmethod.
3. fix the fail problem of mem controller test.
4. Adjust the timeout value of uinittest

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-04-27 02:43:40 -10:00
openharmony_ci 87a2cee24e !1085 add asmInter Debugger
Merge pull request !1085 from wanghuan2022/master
2022-04-26 08:06:13 +00:00
wanghuan 4d249dcb87 add asmInter Debugger
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
2022-04-25 21:38:27 +08:00
zhaozhibo e0ad13d0c4 fix codex warning
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-04-25 14:33:01 +08:00
openharmony_ci de8dd32c29 !1093 Delete useless code dependencies.
Merge pull request !1093 from yingguofeng/mmap
2022-04-24 16:26:56 +00:00
yingguofeng@huawei.com 6c5808fc28 Delete useless code dependencies
To reduce 'libark_ jsruntime.so' ROM size, delete useless code dependencies.

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

Profit: libark_jsruntime.so size reduce from 3455(kb) to 2001(kb)

Change-Id: Ie7430fca6f539c9baff1f4aae7942da6fc9ef135
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-04-24 18:02:32 +08:00
sunzhe23 528db23a05 Refactor leave&entry frame
issue: #I541LG

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-04-23 23:35:51 -07:00
songzhengchao ecf5fd6eb0 Refactor Logical shift operation
the logical shift does't care signed/unsigned.sometime using UINTxx/Intxx, which is very confusing.

logical operation don't distinguish with int/uint and remove Archxx function

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

Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: Idaf71b46227917d2cb08c35118e71c2a66b79fd3
2022-04-21 20:08:23 +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
sunzhe23 57ee6a7312 Optimize some runtime stub for asm interpreter
1 Set FindElementWithCache and Float as no GC runtime
2 Add SavePC for RuntimeCall if needed

issue: #I53PT7

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-04-20 03:10:30 -07:00