Commit Graph

76 Commits

Author SHA1 Message Date
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
songzhengchao 56477d35de bug fix compile bc/common stub vm setup load stub
rename glue type POINTER TO NATIVE_POINTER

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

Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: Ic50466ef1afd931268a649227458642f933b2360
2022-04-16 17:20:27 +08:00
guobingbing c01691c0bb entry frame adapter asm
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: Ied740af77e0f770e01f948c86b5f13d4877672ad
2022-04-15 18:23:40 +08:00
openharmony_ci 97102d5750 !986 modify shr and ashr handle
Merge pull request !986 from wanghuan2022/master
2022-04-13 03:51:13 +00:00
wanghuan 9afe77f11c modify shr and ashr handle
desc: shr should be unsigned right shift, and ashr should be signed right shift. But they are reversed. So modify them.

solu:
1. reverse shr and ashr handle
2. delete unused frameHandle

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5292O
Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: Ia329da8bf0ceaa80560601614b592bb448595a29
2022-04-12 16:44:41 +08:00
openharmony_ci 9213c20372 !953 fix setpropertyby*** stub error
Merge pull request !953 from wanghuan2022/master
2022-04-11 07:13:22 +00:00
wanghuan 541d798d35 fix setpropertyby*** stub error
desc: fix setpropertyby*** stub error

solu:
1.add useown stub and not useown stub in common stub
2.Unit useown stub and not useown by using bool value in stub

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

Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I7a0f68d065cb5b27f60db91af8a87216c47a1f6f
2022-04-09 18:30:26 +08:00
zhangyukun 9139ca09c7 Add dispatch of call of x64 and construct frame with rsp in .S
1. use stub to dispatch fast,slow and native paths
2. use rsp to construct frame of x64
https://gitee.com/openharmony/ark_js_runtime/issues/I51G9L?from=project-issue
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: Ib80540df5dbe531f155e5dd9fce556a207171494

Change-Id: I31e6705dd5555a0c2a9070a7ce73b26f77caef80
2022-04-07 14:32:38 +08:00
openharmony_ci 5772f2683b !946 Enable Call Stub
Merge pull request !946 from 李晨帅/master
2022-04-06 14:28:26 +00:00
lichenshuai 53a4daf2ef Enable Call Stub
Fixed Call Stub bug, Enable Call Stub and synchronize new stackless to interpreter_assembly.

Issue: #I51E2F

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: I2116850e55bc651acc71bc1baa99aa2c4e1b578c
2022-04-06 20:00:22 +08:00
sunzhe23 edd58632f4 Implement FastToBoolean for asm interpreter
Issue: #I51BQ5

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-04-06 02:32:09 -07:00
wanghuan 6c4e4e4406 fix expdyn stub handle error in bigint
desc: fix expdyn stub handle error in bigint

solution:
1. Slowruntime expdyn need adaption to bigint, but stub's slowruntime doesn't modify. So fill up modification.

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

Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I46e4b11f3ed54239becdb3f80b5cea94d93f505b
2022-04-02 17:05:10 +08:00
wanghuan acf9a67d89 fix suspend generator stub handle error
des: fix suspend generator stub handle error

solution: 1.acc has changed, so setacc should be varacc, not acc.

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

Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I82490ca8050f4f565e9513e99a2e7e74861f6918
2022-04-02 15:26:30 +08:00
wuzhefeng 1e2aa2a487 Refactor Code
Because there are some redundant/unused/improper functions, this PR
remove them and improve the readability.

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

Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: Ifa08f33a2819f3113234fdbf3ee2bb0e976d4071
2022-03-31 16:16:31 -07:00
sunzhe23 3b08d469f4 Refactor CallStub/CallNoGCRuntime
Delete the call signature paramter of the function

Issue: #I50DB3

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-03-30 00:33:18 -07:00
lichenshuai fcda5bb413 Add AsmInterpreterFrame
Add AsmInterpreterFrame for ASM.

Issue: #I4YF9X

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: I4efc781a9fca90de4a0aed5b6a91a8122cfa16ab
2022-03-30 10:51:05 +08:00
songzhengchao ede3113e23 Implement CallingConv to compatible with Fast-Stub/ASM-INT/AOT
1 Current ASM-INT(GHCC)/Fast-Stub(WebKit_jscc) set different FrameType to distinguish with CallingConv.It's more friendly to add callingConv flag in CallSignature class.
2 Fast-Stub/Aot CallingConv is WebKit_jscc while LLVM Backend don't support it on arm32. we'll add padding paramets to JS-Relative paramter is placed on stack.

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

Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I93df6c1d605692941b1aa362ad4e07a202d76241
2022-03-29 11:51:39 +08:00
openharmony_ci 5f8c98c023 !897 fix compiler bug in arm32
Merge pull request !897 from wpy111/master
2022-03-28 13:58:03 +00:00
wupengyong db5398aa3d reason:interpreterAsm compiler failure arm32
descripter:fix compiler bug

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

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: Ia3a80d901cf99f11ed4f311a7a6df1742cfb1eaf
2022-03-28 15:41:14 +08:00
openharmony_ci 874f77a680 !898 fix getresumemode stub handle error
Merge pull request !898 from wanghuan2022/master
2022-03-26 09:23:55 +00:00
wanghuan d5d35f373c fix getresumemode stub handle error
description: fix getresumemode stub handle error

solution:
1.load offset error, should be GetIntptr;
2.get value from bitfield error because of lack of lsr;
3.set acc value error, should be build tagged.

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

Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I96a35d134d5441f040cbf42d4e8ab2be208f166f
2022-03-26 12:04:56 +08:00
wengchangcheng 4f169b31a5 add -Werror -Wextra gn flag for 'compiler'
1. ignore llvm warning
2. fix warning of compiler module

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I09774e431743a26ea366ed28e3276ff027ae0d31
2022-03-25 15:31:59 +08:00
wanghuan a78a0e9f15 fix asm definefunc stub module error
description: fix asm definefunc stub module error

solution: Due to missing action to update module in definefunc stub, it makes a problem in StoreModuleValue. So add updating module to asm definefunc stub.

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

Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: Ifbe8daf4541210f77317898cfd40170fef7dd060
2022-03-24 14:30:33 +08:00
wanghuan 95effa4674 [feature]add ldbigint and newlexenvwithname stub handle
description: add ldbigint and newlexenvwithname stub handle

reason: add ldbigint and newlexenvwithname stub handle

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

Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I301e7041939f189158058b371a34633bb6c133c2
2022-03-22 21:46:48 +08:00
openharmony_ci 795ee8e74b !790 fix try catch fail in Asminterpreter
Merge pull request !790 from wpy111/master
2022-03-22 07:08:07 +00:00