340 Commits

Author SHA1 Message Date
openharmony_ci 6462b1e03c !1510 Add two HIRs RESTORE_REGISTER, SAVE_REGISTER to support generator command
Merge pull request !1510 from wanyanglan/master
2022-07-09 15:16:12 +00:00
wengchangcheng 439ff56091 delete some unused log
1. add VERBOSE level log, default not print
2. modify some DEBUGE level log to VERBOSE

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I1fba38346d55fb633c7a0ec018848653137d4009
2022-07-09 18:43:58 +08:00
wanyanglan a2ec8c761d Add two HIRs RESTORE_REGISTER, SAVE_REGISTER to support generator command
Context is not saved when processing SUSPENDGENERATOR and RESUMEGENERASTOR
instructions, and contextual execution cannot be restored.
1、Add SAVE_REGISTER HIR for saving context
2、RESTORE_REGISTER HIR for restoring context

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

Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I16b73390c6f7ae7c295f0aa1a9c9df538c2a4fec
2022-07-09 16:22:55 +08:00
openharmony_ci 429537fa9c !1752 fix codex warning
Merge pull request !1752 from hjzhangcm/master
2022-07-07 11:41:25 +00:00
openharmony_ci 3509588b40 !1751 decrease ark log
Merge pull request !1751 from weng-changcheng/ark_hilog_decrease
2022-07-07 11:27:19 +00:00
guobingbing de5847146a Fix CodeCheck
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: I23358a6b12584fe4e3a583d0fad5e7f81875e977
2022-07-07 18:43:05 +08:00
hjzhangcm 976b9c38c7 fix codex warning
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-07-07 17:33:05 +08:00
wengchangcheng bae857fd90 Descriptor: decrease ark debug log
details: dont print interpreter log
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5FZNJ

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I8c362cb1359db77e994d510df17bbda4ce3ab0b5
2022-07-07 15:54:12 +08:00
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
g00416891 f11810349e New EcmaRuntimeCallInfo in stack pointer
Signed-off-by: g00416891 <guobingbing3@huawei.com>
Change-Id: I466a4107e6e073ffecea12e6986c112731d2d3bf
2022-07-05 14:54:43 +08:00
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 923ce2cc8b !1626 proxy debug 262 失败问题
Merge pull request !1626 from xiongluo/fix_debug_262
2022-06-30 13:07:42 +00:00
xiongluo abc82bddfb Fix Proxy fail Debug 262
issue:https://gitee.com/openharmony/ark_js_runtime/pulls/1626

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-06-30 20:34:21 +08:00
openharmony_ci cc2e18da3a !1397 Support lexenv in TSAOT
Merge pull request !1397 from 许杰/env_support
2022-06-30 08:39:15 +00:00
xujie 690ca22d2a Support Lexenv In TSAOT
1. Support lexical env when running tsaot
2. fix getunmappedargs and copyrestargs bugs

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

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: Ia78ea4d89654d6924c0dee6f491cdf1e4fe718ee
2022-06-30 14:01:26 +08:00
hjzhangcm dfe246418d fix codex warning issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5EP42
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-06-29 15:51:01 +08:00
huangfeijie a5f34993ee fix incorrect column number when exceptions happen
add SAVE_PC() to avoid incorrect offset
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5E0HV

Signed-off-by: huangfeijie <huangfeijie@huawei.com>
2022-06-27 22:13:21 +08:00
openharmony_ci 55a35312b2 !1658 Refactor Entry frame
Merge pull request !1658 from 孙哲/master
2022-06-24 06:21:00 +00:00
sunzhe23 3021c79a4b Refactor Entry Frame
description:
use js common entry refactor entry frame
align 16 for aarch64

issue: #I5DR75

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-06-24 10:44:28 +08:00
getingke 9f179d07e6 fixed for aarch64 aot test case
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I04c74548641655d66fcb0f10041ab87d7b4bf868
2022-06-23 16:46:13 +08:00
getingke 014d16dbec fixed for review by wuzhefeng
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I17859729a2fc2f2e951312e5cd4a21210e3a9024
2022-06-23 10:08:12 +08:00
getingke 39943ece43 fixed for aarch64 aot test case
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I17fe5a44b06d351d11fb02b77e375f9c9d54df17
2022-06-22 15:09:18 +08:00
wengchangcheng 6468341c72 Descriptor: delete some internal unused code
details: delete unused code
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5COHE

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I5fe62c58353839d4aac1144fc99e2cf87f4374eb
2022-06-17 23:03:42 +08:00
songzhengchao 8975897bb1 Merge remote-tracking branch 'szc/FrameHandler2'
Change-Id: Icd0e4b9895cf1ecba52d1a6e39566fe0c93a3ae9
2022-06-16 16:52:49 +08:00
songzhengchao 621329220d Frame Handler refactor
Frame Handler directly operate frame(set
callsitesp/returnAddr/getPrevFrame,etc) which is hard to maintain.
Frames are operated by FrameIterator.
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5CKVR?from=project-issue

Change-Id: Iba1c44c1ab1afec8b5bea0111f4e986b47cc8bc4
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
2022-06-16 14:41:44 +08:00
openharmony_ci 37f2cdbfcd !1587 modify newobjDynrange to remove the flag "IsBuiltinsConstructor"
Merge pull request !1587 from fanshengli/newObj
2022-06-16 04:08:06 +00:00
lifansheng b62679e3d9 issue:I5C5EG
modify newobjDynrange to remove the flag "IsBuiltinsConstructor"

Signed-off-by: lifansheng <lifansheng1@huawei.com>
Change-Id: Ic94b8ba77a0ebaf121f2942238435a9da5917287
2022-06-15 14:54:18 +08:00
yingguofeng@huawei.com 1dd62cf68f Description:Native Memory Leak or error
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5C883?from=project-issue
Change-Id: I3cdf41f9292fccb9a7e1164babc30cf77e6ac163
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-06-15 10:59:47 +08:00
openharmony_ci 54da079ea6 !1560 Refactor Frame Iterator
Merge pull request !1560 from songzhengchao/FrameHandler
2022-06-14 13:55:33 +00: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 0ea2b9cb3c Merge branch 'master' of gitee.com:openharmony/ark_js_runtime
Change-Id: I92c67c8e0c106177b9ae2ec3ea2aa31247c35023
2022-06-14 11:04:48 +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
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
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
songzhengchao b4b4482475 refactor frameHandler
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: Ieb408a2334098043e504a8527aac008b8d0181a1
2022-06-11 20:47:30 +08:00
xujie 6430e8f31e TSAOT Exception Handler
1. Throw JS exception in tsaot
2. Print bcoffset when occur JS exception

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

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: I046d76c092a399354ddcdedd859f0c1e622387c2
2022-06-11 16:36:16 +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
songzhengchao 7918b740d1 Refactor FrameHandler Iterator
1 FrameHandler Ietrator only visit current Frame stackmap

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5BSW4?from=project-issue
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: Id05e57d9dd8c00ff91c596fc2cbb1feabe3aa4da
2022-06-11 11:40:04 +08:00
openharmony_ci a6f3b2b8a6 !1177 Require function realization
Merge pull request !1177 from DaiHN/require
2022-06-09 12:51:21 +00: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
DaiH eee606c334 Support CommonJS's module export function
------------------------------------------
    1. Support CommonJS's module export function
    2. Related test cases
    issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5590V

Signed-off-by: DaiH <daihuina1@huawei.com>
Change-Id: I18968f6a6b971fbe833d91ef98813964cc8292c9
2022-06-08 10:59:06 +08:00
openharmony_ci cabfe1a62e !1345 Implement Prologue refactor and Add mulitple Optimized Frame In LLVM 12.0.1
Merge pull request !1345 from songzhengchao/optimizedjsfunction
2022-06-07 13:49:24 +00:00
songzhengchao dfb9eeaa92 Revert "debug"
This reverts commit dd4c6e829b.

Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: Iafb4e81981e7b3eef79672684aa4dfc8e75f791a
2022-06-07 15:57:19 +08:00
Rtangyu 8ca37dcb29 JS stack printing supports native method pointer printing
Implement JS stack printing and support native method pointer printing

issue:https://gitee.com/openharmony/arkui_napi/issues/I5AOZC

Signed-off-by: Rtangyu <rentangyu@huawei.com>
2022-06-07 14:33:17 +08:00
songzhengchao e189c888a0 Merge remote-tracking branch 'szc/optimizedjsfunction'
Change-Id: I3451ce3ba039c43f4cebedbc6d5636bbf70d234c
2022-06-07 14:22:34 +08:00
songzhengchao dd4c6e829b debug
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: Ie19553066c5f038237c2f06b42dd2b2a64721a8e
2022-06-06 10:05:14 +08:00
openharmony_ci 7048cbf1ef !1409 Add Containers List And LinkedList
Merge pull request !1409 from chenqi/list1
2022-06-05 04:05:38 +00:00
songzhengchao ea9f7cc660 bug fix framehander should update optimizedReturnAddr_
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I78c1b054ca527f5fa3dd5f15a699114be9352ad3
2022-06-03 19:59:09 +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