34 Commits

Author SHA1 Message Date
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
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
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
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
hjzhangcm c297d91027 add test case for JSAPIDequeIterator and delete useless code
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-05-09 14:25:06 +08: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
xiongluo 2e3d07b336 Fix long gc duration problem in photos app
Add handle scope to avoid the large number of root nodes.

Remove unnecessary handles in the critical path.

Adjust the parameters in gc to avoid multiple consecutive Old GCs.

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-04-10 20:45:15 -10:00
xliu 4fb9fcc443 ObjectFactory New Ecmastring Rectification
Description
  1. There are many kinds of interfaces to construct ecmastring from objectfactory
     in the virtual machine, and the name is not clear, so it is complex to use;
  2. Some of the unchecked interfaces are prone to errors during use. If there is
     no compression where compression is required, unpredictable errors will occur.
Issue:
  #I4ZL7X: ObjectFactory New Ecmastring Rectification

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: I856f4e2e1df62823d928d738fa35affa97dbd3ed
2022-04-09 10:34:11 +08:00
guobingbing 589234007e FFI optimization for call params
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: I61b820e91b85364e4f41d35ca0172ad059a1b916
2022-04-07 21:13:46 +08:00
wengchangcheng 4e08cec6ee [part-1] delete "*-inl.h" of newest codex rule
move the definition to the declare head file

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ieeb0ec96281cda51d0bebd6a2e771fc8d4078306
2022-04-07 14:14:49 +08:00
openharmony_ci a6c607db04 !910 Added builtins typedarray and array Added interface test case and BigInt64Array 、BigUint64Array construction of typedarray adapted to napi
Merge pull request !910 from 王犇/master
2022-03-30 08:17:59 +00:00
wangben 79fc257ebd Added builtins typedarray and array Added interface test case and BigInt64Array and BigUint64Array construction of typedarray adapted to napi
Signed-off-by: wangben <wangben15@huawei.com>
2022-03-30 10:49:55 +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
hjzhangcm 5e6b4af16a Modify the symbol types of two variables in the assertion to make them consistent
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-03-24 10:17:34 +08:00
zhaozhibo 753ac0fe7f fix type error of test cases
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-03-23 19:08:33 +08:00
openharmony_ci 9614384797 !815 Fix code review from issue
Merge pull request !815 from songzhengchao/reviewcode0321
2022-03-22 08:36:13 +00:00
songzhengchao 718b37beb0 Fix code review from issue
bool variable shoule assign value;
code delete reduant ";" and " ";
class construct function signal parameter shoule add explicit;
function declare return void when caller don't need return value;
and etc

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4YXYH?from=project-issue
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I59e26d49f94e98a4cced7a5852df3029a5544d47
2022-03-22 14:25:18 +08:00
wanyanglan b6e56d3c3f Clean Code For CodeHub Issues
Modified file permissions, word spelling errors, and
programming specifications suggesting EXPECT_EQ instead
of EXPECT_TRUE

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

Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I00eb9be48d481ce2bdaa4a621246ff6c405abecf
2022-03-22 11:34:13 +08:00
xiongluo 82b0916295 GC name is unclear and confused. class_ in object factory are redundant.
Modify gc name and delete class_ in object factory.

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

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-02-16 01:10:53 -10:00
songzhengchao 9ec2857775 Merge branch 'master' of gitee.com:openharmony/ark_js_runtime
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: Ia32bcdd74782f4a39df7b198d832ec8cc54d940b
2022-01-14 16:30:27 +08:00
hjzhangcm 5471d03046 add jsnapi_test.cpp test case
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-01-14 11:15:47 +08:00
wuzhefeng 5720a01a3a Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: Ic990c5f11caeb3075033719a13e759baaf6dfefb
2022-01-13 00:26:00 -08:00
zhangyukun8 412bac6906 Use macro to control the thread_check testcase
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
2021-12-29 10:36:19 +00:00
ding c4ffd76fd3 template class
Signed-off-by: ding <dingding5@huawei.com>
2021-12-25 09:51:43 +08:00
panzhenyu1 ee7da79043 Add Inherit Api for FFI
Signed-off-by: panzhenyu1 <panzhenyu1@huawei.com>
2021-12-23 17:33:08 +08:00
zhangyukun a97747fe18 Description:sync from code from wgr_master to ohos
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: Ic66a9e649de8c0ce530483296fe323b8f50621fb
2021-12-21 09:36:03 +08:00
wengchangcheng 96a03dc5e5 fix length error of Chainese char
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2021-10-14 21:36:56 +08:00
wengchangcheng e0b5422f50 enable run ark unittest and use dynamic link
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I6e8e5165b5a4087c6fba45ed4eb11d5c1a5e4000
2021-09-28 10:30:21 +08:00
zhangyukun 0e97463207 Add thread check of ecmascript
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>

Change-Id: I6b954f23e79c0fb98091dc25bc772047489d35bc
2021-09-26 11:42:05 +08:00
wengchangcheng 7251d98f50 support build single testcase
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2021-09-22 16:52:51 +08:00
zhangyukun 7ffcc4b20f Sync js_runtime to openharmony
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
2021-09-08 09:20:53 +08:00
wanyanglan 6960106b6b fix gn format
Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: Iab79e850be3b63cd1898cc83cdd03b9448e6b3cf
2021-09-06 12:23:19 +08:00
wanyanglan 86cfe52253 add ark js_runtime
Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: Iac7851492f10c0ef1303c621febb65e5fdd22e41
2021-09-05 16:05:06 +08:00