Commit Graph

2192 Commits

Author SHA1 Message Date
openharmony_ci 07a60dcafe !1589 Deal with the "use after free" error occurs while debugging ark_js_vm executable on windows.
Merge pull request !1589 from Gongyuhang/master
2022-06-14 12:03:48 +00:00
openharmony_ci 41865d03ba !1577 Optimize the finalizationRegistry interface code according to the review
Merge pull request !1577 from 小马奔腾/master
2022-06-14 09:31:04 +00:00
openharmony_ci 80173b7bfb !1549 Use weak reference instead of strong reference for SetNativePointer
Merge pull request !1549 from lukai/master
2022-06-14 08:46:36 +00:00
Gongyuhang 2782c763e7 Desciption: Deal with the "use after free" error
occurs while debugging ark_js_vm executable on
windows.

Details: Enclose the part where the LocalScope
object should take effect with a pair of braces.
Thus, the destructor of the LocalScope object
will be called at the right brace which is above
the JSNApi::DestroyJSVM() function.

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

Signed-off-by: Gongyuhang <gongyuhang5@huawei.com>
2022-06-14 16:13:59 +08:00
openharmony_ci 1f25ba8d11 !1584 Reuse of Object.Create()'s hclass
Merge pull request !1584 from DaiHN/require
2022-06-14 06:44:37 +00:00
openharmony_ci 96ccd81377 !1543 Fix SingleStepDebugging Bug
Merge pull request !1543 from 李晨帅/master
2022-06-14 06:10:05 +00:00
openharmony_ci 701e96e826 !1585 fix codex warning
Merge pull request !1585 from hjzhangcm/master
2022-06-14 04:25:11 +00:00
openharmony_ci e092aa876b !1581 Fix the problem of mixing unsigned and signed numbers
Merge pull request !1581 from jiangkai43/master
2022-06-14 04:00:03 +00:00
openharmony_ci 3fd49e5e61 !1567 modify interface
Merge pull request !1567 from Riachel/master
2022-06-14 03:49:49 +00:00
openharmony_ci fa336bd772 !1583 fix crash problem in dump pdf app
Merge pull request !1583 from xiongluo/fix_dump_crash
2022-06-14 03:47:19 +00: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
hjzhangcm bd009036d8 fix codex warning issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5C3XK
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-06-14 10:38:06 +08:00
xiongluo 953f1644f3 fix crash problem in dump pdf app
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5C4K4

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-06-14 09:55:45 +08:00
Riachel 3b89611dd1 Descriptor: modify interface
details:
1.modify Create interface
2.add Tojson
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5C2KW

Signed-off-by: Riachel <caolili14@huawei.com>
2022-06-14 09:34:55 +08:00
DaiH b3d8df8ad7 Reuse of Object.Create()'s hclass
-----------------------------------
Reuse of Object.Create()'s hclass
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5C3BI?from=project-issue

Signed-off-by: DaiH <daihuina1@huawei.com>
Change-Id: I7c0aa4f4f92dc38dd0a11a106436f9d100b77f32
2022-06-13 22:05:01 +08:00
jiangkai43 e24ac651a1 Fix the problem of mixing unsigned and signed numbers
Description:use the same number type

Issues:https://gitee.com/openharmony/ark_js_runtime/issues/I5C30M:wq

Signed-off-by: jiangkai43 <jiangkai43@huawei.com>
2022-06-13 21:20:08 +08:00
openharmony_ci 8021638db6 !1571 Add UT for NativeObject
Merge pull request !1571 from wangzhaoyong/master
2022-06-13 12:31:07 +00:00
openharmony_ci 3445e05a2e !1573 Fix AOT segfault issue
Merge pull request !1573 from Mingliang Zeng/master
2022-06-13 12:27:47 +00:00
openharmony_ci f5431d7ee7 !1578 fix HandleNewObjDynRangePrefImm16V8 exception
Merge pull request !1578 from wpy111/master
2022-06-13 12:07:15 +00:00
openharmony_ci 40324cf89b !1552 string.padStart/padEnd/trimLeft/trimRight/matchAll
Merge pull request !1552 from zhangyouyou/master
2022-06-13 08:43:48 +00: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
wangzhaoyong d1a23c427c ==-------------------------------------------==
补充NativeObject的UT用例,以及对序列化NativeObject的流程进行优化
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5BPWC
==-------------------------------------------==

Signed-off-by: wangzhaoyong <970691906@qq.com>
Change-Id: Ia9d4686932f55573721d5a69da8ab31bef214e79
2022-06-13 16:36:25 +08:00
xdmal de8cddd1fe Optimize the finalizationRegistry interface code according to the review
Optimize the finalizationRegistry interface code according to the review

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

Signed-off-by: xdmal <maxiaodong16@huawei.com>
2022-06-13 16:08:00 +08:00
openharmony_ci 50bd7644de !1570 Complete the finalizationRegistry interface function and UT use case
Merge pull request !1570 from 小马奔腾/master
2022-06-13 07:31:54 +00:00
openharmony_ci cef9704be0 !1415 Refactor Heap Region class
Merge pull request !1415 from klooer/master
2022-06-13 07:09:57 +00:00
Mingliang Zeng 1b343facdd https://gitee.com/openharmony/ark_js_runtime/issues/I5BUML
Fix AOT segfault issue

Two problems are identified and solved:

1. JS Bytecode to Circuit IR module:
A new bug was introduced from the recent refactoring. The sub-procedure NewPhi should create a new selector gate on the Circuit IR immediately (before calling the function RenameVariable), otherwise, the sub-procedure NewPhi (on the same basic block) could be called again after some recursions while nothing on that basic block is changed, leading to infinite recursion and stack overflow. The bug can be triggered when the CFG of the program to compile has a cycle and meet certain non-trivial conditions.

2. Circuit IR to LLVM IR module:
The signature of a stub function may have parameters with GC-related types (like JS_ANY) but the passed arguments can have not-GC-related types (like JS_NUMBER). The corresponding LLVM types of the passed arguments will be incompatible with the function signature in this case, so bit casts and address space casts should be used to convert the function arguments to match the types of parameters in the function signature.

Signed-off-by: Mingliang Zeng <zengmingliang1@huawei.com>
2022-06-13 15:09:51 +08:00
openharmony_ci f00d33e9c8 !1529 Add Type Infer Test Case
Merge pull request !1529 from huoqingyi/typeinfertests
2022-06-13 07:09:09 +00:00
openharmony_ci b1b63f212c !1574 fix bigint bug
Merge pull request !1574 from 常佳兴/master
2022-06-13 06:25:02 +00:00
openharmony_ci 0de69fad88 !1531 Modify enable logic of certain runtime options.
Merge pull request !1531 from luochuhao/optioncombine
2022-06-13 06:00:29 +00:00
xdmal 7c4291fd4b Complete the finalizationRegistry interface function and UT use case
Complete the finalizationRegistry interface function and UT use case

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

Signed-off-by: xdmal <maxiaodong16@huawei.com>
2022-06-13 12:38:35 +08:00
luochuhao d8e482f756 Modify enable logic of certain runtime options.
Change condtion for File execution branch to whether file is AOT compiled or not.

Fix bug of setting bc debug handler entry while loading stub file.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5BBFH
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: I5b6d47a1587631849f6c1e746473cb14b1d727a8
2022-06-13 12:15:03 +08:00
Yuqiang Xian b600b13b9e Fix typos in comments.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I590Z8

Signed-off-by: Yuqiang Xian <xianyuqiang@huawei.com>
2022-06-13 11:56:25 +08:00
Yuqiang Xian ec35dbada7 Merge remote-tracking branch 'oh/master' 2022-06-13 11:49:01 +08:00
changjiaxing 0ee3cdb252 Solve the problem that bigint division calculation will run in an infinite loop on rk3568
issues: https://gitee.com/chang-jiaxing/ark_js_runtime/issues/I5BXT2

Signed-off-by: changjiaxing <changjiaxing1@huawei.com>
2022-06-13 11:45:50 +08:00
openharmony_ci e6a0cf9fd2 !1557 adapt newobjdynrange on arm64 and add bridge frame to asm interpreter
Merge pull request !1557 from zhangyukun8/master
2022-06-13 02:47:11 +00:00
huoqingyi 1da170f1bd Add Type Infer Test Case
Description:
1.Add type infer test cases for bitwise_op, callfunctions, ldobjbyvalue and logic_op

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

Signed-off-by: huoqingyi <huoqingyi@huawei.com>
Change-Id: I486f6f91a32e1c7caa2446b12b8e6b33db8d47fe
2022-06-13 09:38:51 +08:00
lukai d098277ade Use weak reference instead of strong reference for ArkNativeObject::SetNativePointer
Use weak reference instead of strong reference for SetNativePointer.
And in period of gc updating reference, if the related js object is free, "Finalize" callback will be called to release c++ memory.

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

Signed-off-by: lukai <lukai25@huawei.com>
Change-Id: Ibb04cf2efa0c7e1fe719eda5e95cb62938e661e0
2022-06-12 20:58:51 +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 7685b11b6b !1494 TSAOT Exception Handler
Merge pull request !1494 from 许杰/exception_handler
2022-06-11 09:56:23 +00: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
openharmony_ci c114d95f37 !1569 support update value of old eval function
Merge pull request !1569 from changcheng/modify_update_value
2022-06-11 04:46:12 +00:00
wengchangcheng 4b64683dcf Descriptor: support update value of old eval function
details:
update framehandler before setvalue
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5BSY5

Change-Id: Ib6c576e695f3ddcd4387d01e5f6368641bb0d526
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2022-06-11 12:00:19 +08:00
openharmony_ci 2efa43bb41 !1562 GateAccessor bugfix
Merge pull request !1562 from wanyanglan/info
2022-06-11 03:46:32 +00: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
openharmony_ci 16357345fb !1563 NewThisObject call inline new
Merge pull request !1563 from 孙哲/master
2022-06-10 10:15:45 +00:00
zhangyouyou 7f5f5fd3db https://gitee.com/openharmony/ark_js_runtime/issues/I5BKUG?from=project-issue
Signed-off-by: zhangyouyou <zhangyouyou2@huawei.com>
2022-06-10 17:33:03 +08:00
openharmony_ci b1cd4d6c4b !1558 fix commonjs bug to support load node_module
Merge pull request !1558 from fanshengli/fix_bug
2022-06-10 09:20:42 +00:00
openharmony_ci fb18fa7456 !1565 fix codex warning
Merge pull request !1565 from hjzhangcm/master
2022-06-10 08:37:55 +00:00
hjzhangcm 217a51e1de fix codex warning issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5BPNV
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-06-10 15:51:38 +08:00