Commit Graph

130 Commits

Author SHA1 Message Date
openharmony_ci 4841cd02a2 !1707 NativeBindingObject adapt to context
Merge pull request !1707 from wangzhaoyong/master
2022-07-05 08:07:02 +00:00
wangzhaoyong 179cfb370a NativeBindingObj adapt to context
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5E81V

Signed-off-by: wangzhaoyong <wangzhaoyong@huawei.com>
Change-Id: Ib60af2299054908f4f0df2dc886f77c30814db5c
2022-07-05 00:21:06 +08:00
hunili 5450162817 Optimize variable-attribute-view problem about error,number,iterator show
1.Optimize Error show info
2.Optimize Number show info
3.Add Set/Map Iterator propertie
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I59VDK

Signed-off-by: hunili <lihucheng1@huawei.com>
Change-Id: I8a8452d08b983e0bb50e87bab18e27dbe3f7968e
2022-06-30 09:06:12 +08:00
yingguofeng@huawei.com fbb243e865 Maybe Handle Leak
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5E0UV?from=project-issue
Change-Id: Ic3ab6d64ef8c314206e80f2023539be65de94383
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-06-24 17:50:07 +08:00
hjzhangcm 53f1e94929 Modify function template issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5DEVS
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
Change-Id: I39ec6bf26f28c8643d670b4d7d6bfdccf9800afb
2022-06-21 18:39:41 +08:00
openharmony_ci 63ed734dd7 !1596 adjust pool size and related vm-memory according to physical memory
Merge pull request !1596 from lukai/master
2022-06-20 13:43:57 +00:00
openharmony_ci b01688101e !1576 Upload finally, any and allsettled codes of promise module
Merge pull request !1576 from 史凯/master
2022-06-20 03:09:24 +00:00
shikai-123 aa6490370f Upload promise code
Upload finally/any/allSettled module of promise code

issues: https://gitee.com/openharmony/ark_js_runtime/issues/I5BFGU

Signed-off-by: shikai-123 <shikai25@huawei.com>
2022-06-20 09:24:17 +08:00
lukai 7b695c2ae5 adjust pool size and related vm-memory according to physical memory
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5CCG0?from=project-issue

Signed-off-by: lukai <lukai25@huawei.com>
Change-Id: I46bf3a11ef509ece55b45edc92bb7cb68c100dfa
2022-06-18 14:38:43 +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
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
openharmony_ci f63f7b5b2e !1454 Support transfer custom native object
Merge pull request !1454 from wangzhaoyong/master
2022-06-07 11:51:17 +00:00
wangzhaoyong 99688fd766 ==-------------------------------------------==
Support transfer custom native object
1. add create object interface for napi
2. support serialize custom native object
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I59GXI
==-------------------------------------------==

Signed-off-by: wangzhaoyong <wangzhaoyong@huawei.com>
Change-Id: I8c033761f0503698e20241407db47bebb533ee43
2022-06-07 14:13:15 +08:00
yingguofeng@huawei.com c0d7f5d528 Description:1、0x06 is judge to forward address.
2、Mem Pool capacity cause oom in multi worker

Resolution:1、Modify INVALID_OBJECT from 0x06 to 0x05
2、Auto adapter mem pool capacity according to physics memory

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5AKVH?from=project-issue
Change-Id: If09a2cc792d27cd14a8e7ed88af192a78bab8356
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-06-06 10:14:54 +08:00
openharmony_ci 7e3af05fb1 !1442 Add WeakRef and FinalizationRegistry interfaces
Merge pull request !1442 from 小马奔腾/master
2022-06-01 15:07:08 +00:00
openharmony_ci 4de1fb7f48 !1433 Optimize mokuai application
Merge pull request !1433 from yingguofeng/master
2022-06-01 13:45:34 +00:00
xdmal a4062881d1 Add WeakRef and FinalizationRegistry interfaces
Add WeakRef and FinalizationRegistry interfaces

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

Signed-off-by: xdmal <maxiaodong16@huawei.com>
2022-06-01 20:59:20 +08:00
openharmony_ci c95c2f92a9 !1469 Enable EcmaModule
Merge pull request !1469 from fanshengli/ecmaModule
2022-06-01 10:54:03 +00:00
lifansheng 27ff46b4dc issue:I5A4L3
Enable EcmaModule

Signed-off-by: lifansheng <lifansheng1@huawei.com>
Change-Id: I45039d0b80fe156aa2de86b15b141f0bcfd231b5
2022-06-01 16:48:53 +08:00
yingguofeng@huawei.com 73689999ed Add jsnapi interface CopyableGlobal
issue:https://gitee.com/openharmony/arkui_ace_engine/pulls/2628

Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
Change-Id: I28bcfa69f47d9b239d1cd37f8bbd34c82a0c8da9
2022-05-31 22:14:22 +08:00
lukai 1a5e085031 support memory parameters configuration
1. heap configuration including heapSize and space capaticity
2. other parameters such as gcThreadNum, longPauseTime.
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I59HYO?from=project-issue

Signed-off-by: lukai <lukai25@huawei.com>
Change-Id: If3bfe7338ae0712809d9750fef3bbbb14017223f
2022-05-30 17:22:08 +08:00
openharmony_ci f5596f01bd !1405 fix mem leak problem from jsmethod
Merge pull request !1405 from xiongluo/mem_leak_from_method
2022-05-25 07:20:21 +00:00
xiongluo 2c14680bc6 Fix the mem leak from js method
Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-05-25 10:53:36 +08:00
linxiang 56d94b906b 1. huge space region reclaim need after weakReference update.
2. thread_local variable should move to ecma_vm instance.

Signed-off-by: linxiang <linxiang8@huawei.com>
Change-Id: Ic22a392c3f385d123880e449533532feb3b135ec
2022-05-23 14:39:33 +08:00
xliu 2b281975ea Js TypeArray optimization
Description
  1. Add number check in CanonicalNumericIndexString;
  2. modif GetProperty, SetProperty, DeleteProperty,
     DefineOwnProperty,GetOwnProperty,HasProperty
  3. Add FastPath in TypeArray.
  4. Refactor TypeArray ArrayLength, ByteOffset, ByteLength
  5. Add test for TypeArray.
Issue:
  #I56S75:Js TypeArray optimization

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: I68dd973269eb0bab284e7b97e0b8bf93e5aee1a2
2022-05-21 18:15:02 +08:00
wupengyong 7c650ba015 reason:performance optimization
description:optimize taggedvalue encode
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I55ZVP?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I747a60f5ea7348d3b0cfc041a3b010c52b1517c0
2022-05-21 09:33:44 +08:00
g00416891 56cd9748b3 Remove data in EcmaRuntimeCallInfo
Signed-off-by: g00416891 <guobingbing3@huawei.com>
Change-Id: I007424009e84cd9d3b93b532ccddc432a196cc89
2022-05-18 14:22:50 +08:00
openharmony_ci e41e922206 !1300 Fix munmap bug on windows platform
Merge pull request !1300 from dingwen/master
2022-05-17 02:07:42 +00:00
lichenshuai 8815ea02a4 Modify Asm TDD Test and Asm Inter Options
Run moduletest both in C interpreter and asm interpreter.
Change asm inter options to --asmInter=true/false.

Issue: #I57B6W

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: I054c1dbd9edd389e25316c66d7a7311cd3be2920
2022-05-16 18:53:24 +08:00
dingwen 4e8493f6d4 Fix munmap bug on windows platform
Description:Only munmap once when MemMapAllocator Finalize
ISSUE:https://gitee.com/openharmony/ark_js_runtime/issues/I57FVJ

Signed-off-by: dingwen <dingwen6@huawei.com>
Change-Id: Idd9d689a1332b2ab60626cc0c5445f2ec3975268
2022-05-16 16:16:10 +08:00
yingguofeng@huawei.com 5cfe5cf07c mem pool size maybe overflow in small memory device
reduce pool size

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I57B9N?from=project-issue
Change-Id: Iebc6f6252425b4a2954828b9c102d4ec9c01d8eb
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-05-13 16:48:37 +08:00
wuzhefeng 662f2b78a6 Refactor Compilation Framework Part-2
1. Rename IR builder to improve the readability.
2. Remove redundant Headers to decouple the relationships of components.

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

Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: I0c8da6cd55bb8e7f33421ba846bab89bd5e06c55
2022-05-11 04:28:10 -07:00
openharmony_ci 1c06dd45fe !1062 [js_runtime]support multi-instance in ark debugger
Merge pull request !1062 from huangfeijie/master
2022-05-05 13:41:29 +00:00
h00611971 24809b8239 support multi-instance in ark debugger
modify the interface in ark debugger
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I53TEF
Signed-off-by: h00611971 <huangfeijie@huawei.com>
2022-05-05 11:31:18 +08:00
yaoyuan 90d20770f4 Consider different cases for maxLength greater than, equal to and smaller than length.
For napi only

关联的Issue: #I54T7E

Signed-off-by: yaoyuan <yuanyao14@huawei.com>
Change-Id: I94c5e335a43aac937616e5aa3a217cc0b034ade7
Signed-off-by: yaoyuan <yuanyao14@huawei.com>
2022-05-05 11:16:56 +08:00
openharmony_ci 272cf6664d !1155 Refactor the GC related components - Part 4
Merge pull request !1155 from klooer/master
2022-04-30 09:45:48 +00:00
openharmony_ci a31029d3f2 !1139 Handling errors when throwing exceptions
Merge pull request !1139 from linxiang8/master
2022-04-28 13:19:06 +00:00
Yuqiang Xian 57c0a4f055 Rename GC types and spaces to make it more consistent and clear.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I54NZF

Signed-off-by: Yuqiang Xian <xianyuqiang@huawei.com>
Change-Id: Ieeb356480fe6767ec6c2c53b6119e8c4b99d9ff9
2022-04-27 18:28:18 +08:00
linxiang 17d8100001 Handling errors when throwing exceptions
When calling a native method and throwing exceptions twice in a row,
a JSTaggedvalue::exception() will be returned for the second time instead of a JS object

Signed-off-by: linxiang <linxiang8@huawei.com>
Change-Id: Ie866f2f4aeeeafb28a2cd79f142e9ded477f08ce
2022-04-26 20:54:34 +08:00
yingguofeng@huawei.com 3379f227fd Bugfix:Launcher application crash caused by large object updating null pointer
Add judgment null pointer

https: //gitee.com/openharmony/ark_js_runtime/issues/I54MFV?from=project-issue
Change-Id: If05f7dc1372d3d56acd59811cef1e51fb507bf94
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-04-26 09:09:59 +08:00
openharmony_ci 70ba7ae0fe !1097 Fix JSNapi::NumberRef
Merge pull request !1097 from xliu/fix_substring
2022-04-25 02:22:58 +00:00
openharmony_ci 1f77bb2f35 !1112 remove prevSp in EcmaRuntimeCallInfo
Merge pull request !1112 from guobingbing/optimize
2022-04-24 11:43:40 +00:00
guobingbing 8747ca5081 remove prevSp in EcmaRuntimeCallInfo
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: I3a3517cc8712baa6eef76f85a9967dd95a085bbc
2022-04-24 19:04:24 +08:00
Gymee 909b9081a9 debugger refactor
Change-Id: Idff2f871926a3893b5bd962f13b4a10c39f9f6d9
Signed-off-by: Gymee <yumeijie@huawei.com>
2022-04-24 11:35:13 +08:00
xliu 97c5a3186c Fix JSNapi::NumberRef
Description
  1. Finding key 1 in Map ([[1, "CC"]]) returns undefined.
  2. Fix the problem in JSNapi::NumberRef, the complete constructor is not defined in this interface.
Issue:
  #I541HH:Fix JSNapi::NumberRef

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: I1679258b8d426b280390e144116fc4326e43c35a
2022-04-22 15:54:47 +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
lifansheng a725676a6c Runtime architecture adjustment
Description
  Cut out most of the initialization logic in Runtime::Create and disconnect the
  inheritance relationship of most classes such as JSThread.
Issue:
  #I53418: Runtime architecture adjustment

Signed-off-by: lifansheng <lifansheng1@huawei.com>
Change-Id: Ib9c1a40354f77d32e515e23334e7f4b4a4fa3259
2022-04-21 14:37:31 +08:00
Gymee 83048efbf1 support watch expression and conditional breakpoint
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I794a5ee770f251e6fea4de5058575519ff0490e6
2022-04-18 20:04:33 +08:00
wengchangcheng d6c835caea Descriptor: debugger refactor
details:
1. debugger refactor, don't use runtime debugger
2. fix debugger crash

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I08e3c86bf659b9e0a44d014d13b11462d50218b3
2022-04-17 01:16:26 +08:00
openharmony_ci 6a1c61d215 !930 Fix long gc problem (18ms) in photos app
Merge pull request !930 from xiongluo/fix_long_gc_problem
2022-04-11 07:56:54 +00:00