31 Commits

Author SHA1 Message Date
openharmony_ci a77ae133ba !1739 支持context传递
Merge pull request !1739 from wangzhaoyong/master
2022-07-07 07:56:29 +00:00
wangzhaoyong 857f10b15b support post context
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5FNMI

Signed-off-by: wangzhaoyong <wangzhaoyong@huawei.com>
Change-Id: I18ce8cc5b81a8e3e2c2398bb4934732a6e18f676
2022-07-07 11:52:34 +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
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
ding c80c97bdfa Resolve Compatibility Issues between TSAOT and ECMA spec
1.Add typelowering framework.
2.Add newobjdynrange in typelowering which brings static TS type
  info to runtime phase.
3.Serialize and deserialize hclass table with snapshot, fix minor bugs
  in snapshot by the way.
4.Add IsFormTSTypeBit in HClass to distinguish hclasses which come from
  compile phase.
5.Fix compatibility issues in property operations api and some builints
  api.
6.Add 3 compatibility issues test cases.

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

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: I98626e6eea01f4455ec818ba0ad872b3be98b729
2022-06-28 14:43:16 +08:00
wangzhaoyong 7064d0f025 Optimized for NativeBindingObject
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5CQ11

Signed-off-by: wangzhaoyong <970691906@qq.com>
Change-Id: I173e0dfeb29dfbe8812178f11738fa5b726c028d
2022-06-23 14:18:10 +08: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
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
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
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
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
ZhenyuPan 78f27c883f for ark_js_vm on mac
related issue: https://gitee.com/openharmony/ark_js_runtime/issues/I55GYU
Change-Id: I3faad1171ed2ef08660c62f0ff6c88b34c5cbcfa
Signed-off-by: panzhenyu1 <panzhenyu1@huawei.com>
2022-05-09 09:06:58 +08:00
hjzhangcm 8e768bf429 Rectify template problems
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
Change-Id: I3c156fc6d4b84ec14ec568c1ba36dda9aea34748
2022-04-22 09:44:50 +08:00
zhaoduwei eb3ff30440 Modify sharedmemorymanager filename
Change sharedmemorymanager filename to shared_mm

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

Signed-off-by: zhaoduwei <zhaoduwei1@huawei.com>
2022-04-13 11:53:13 +08:00
zhaoduwei fb0eaa03da Added SharedArrayBuffer module code
Added SharedArrayBuffer module code to support ECMA function

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

Signed-off-by: zhaoduwei <zhaoduwei1@huawei.com>
2022-04-02 18:46:20 +08:00
openharmony_ci 250b779450 !788 Add typedArray and array extensions
Merge pull request !788 from 王犇/master
2022-03-24 08:26:01 +00:00
wangben 69645a86eb Add typedArray and array extensions
Signed-off-by: wangben <wangben15@huawei.com>
2022-03-24 10:24:32 +08:00
panzhenyu1 d950ddc406 Fix bug when Serializing JSObject contains chinese text
Add case for UTF16 encoded EcmaString

related isssue: https://gitee.com/openharmony/ark_js_runtime/issues/I4Z0WB

Signed-off-by: panzhenyu1 <panzhenyu1@huawei.com>
Change-Id: I00d7dfae602247549894459258c662916cbe28a5
2022-03-23 11:27:04 +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
xujie 479b7c3785 Clean Code For CodeHub Issues #96-#123 And #250-#264
According to the problems pointed out by the issuer and the
specifications compiled by Huawei, modify the non-compliant
parts of jsruntime.

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

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: Iceb771dfd9f3aa9017205068fc50ab1a63aae08b
2022-03-21 17:09:19 +08:00
panzhenyu1 03079ffc34 Add objectId++ for special case that deserialize empty EcmaString
related issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4V59S

Signed-off-by: panzhenyu1 <panzhenyu1@huawei.com>
Change-Id: I60860352eb37fe43d5a0aceb3c7f47eaf4db3a3f
2022-02-24 17:27:27 +08:00
hjzhangcm a0380acb53 handling round error reporting
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-02-21 16:28:23 +08:00
panzhenyu1 465d842cf1 Make WriteInt() ReadInt() consistent, fix bug imported in recent PR
related issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4TNBG

Signed-off-by: panzhenyu1 <panzhenyu1@huawei.com>
Change-Id: Idb19a24b0b059d8904d44c182098fd97c6d7c27e
2022-02-14 19:24:43 +08:00
panzhenyu1 ecf0dc2c40 Add special case for empty string in JSSerializer
Add special case for empty EcmaString and testcase at same condition for JSSerialzer Unit Test

Relevant issue:https://e.gitee.com/open_harmony/dashboard?issue=I4SDCF

Signed-off-by: panzhenyu1 <panzhenyu1@huawei.com>
2022-01-28 10:00:17 +08:00
wengchangcheng 9a2b7d04e8 optimize primitive type ACCESSORS
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2022-01-25 18:05:12 +08:00
panzhenyu1 8b86eabd0f Fix JsSerializerTest allocate buffer bug
Signed-off-by: panzhenyu1 <panzhenyu1@huawei.com>
2021-12-30 18:56:48 +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
zhangyukun 7ffcc4b20f Sync js_runtime to openharmony
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
2021-09-08 09:20:53 +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