Commit Graph

55 Commits

Author SHA1 Message Date
openharmony_ci
0618a06957
!1636 string.replaceAll and regexp groupname
Merge pull request !1636 from zhangyouyou/master
2022-06-29 08:33:54 +00:00
zhangyouyou
f5fa3d6f20 https://gitee.com/openharmony/ark_js_runtime/issues/I5DDMT
Signed-off-by: zhangyouyou <zhangyouyou2@huawei.com>
2022-06-29 11:31:55 +08:00
shisan_forwork
4c2859d80b Add Container LightWeightMap and LightWeightSet
Description
    To ensure the high performance of container classes, lightweight map
    and lightweightset are provided in ark.
Related issues
    #I566FV:Add Container LightWeightMap And LightWeightSet

Signed-off-by: shisan_forwork <chengjunxiong@huawei.com>
2022-06-21 10:02:29 +08:00
openharmony_ci
cd4a20eb8b
!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
9056a89901 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
dingwen
e49e448f77 Snapshot support reusing global const and builtins object
Description:Before serializing, cache all global const and builtins objects in a map. When serialzing object taggged field, firstly searching the field object in the map, if exist, record the index. Then when deserializing, we can quickly find the object by index.
ISSUE:https://gitee.com/openharmony/ark_js_runtime/issues/I5CA56

Signed-off-by: dingwen <dingwen6@huawei.com>
Change-Id: I935cc445d50a1e5854b88a7d01445aaa87da2cbc
2022-06-17 12:33:26 +08:00
openharmony_ci
ca95915302
!1584 Reuse of Object.Create()'s hclass
Merge pull request !1584 from DaiHN/require
2022-06-14 06:44:37 +00:00
DaiH
999d810736 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
dingwen
d4a0e9b089 Snapshot support serialize builtins object independently
description:Add SerializeBuiltins interface, support create EcmaVM by deserializing builtins.snapshot file
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5B3QM
Signed-off-by: dingwen <dingwen6@huawei.com>

Change-Id: I0d19efe34826bdb58366df9eed571285afbcccca
2022-06-09 21:21:44 +08:00
DaiH
b41df503a1 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
03a929528e
!1438 Add atomics project and modify code errors
Merge pull request !1438 from jiangkai43/master
2022-06-06 01:39:53 +00:00
jiangkai43
a03dcebfb7 Merge branch 'master' of gitee.com:openharmony/ark_js_runtime into master 2022-06-02 11:17:00 +00:00
jiangkai43
b13fb03d17 Add atomics project and modify code errors
Signed-off-by: jiangkai43 <jiangkai43@huawei.com>
https://gitee.com/openharmony/ark_js_runtime/issues/I599WU
2022-06-02 19:09:01 +08:00
chenqi
3bc6dcb731 Add Containers List And LinkedList
Description
    1.To ensure the high performance of container classes, List and LinkedList is provided in ark.
    2.modify Copyright 2021->2022.
    3.fix containers.
Related issue
    #I58XA9:Add Containers List And LinkedList.

Signed-off-by: chenqi <chenqi151@huawei.com>
2022-06-02 17:02:40 +08:00
openharmony_ci
b2a0837d93
!1442 Add WeakRef and FinalizationRegistry interfaces
Merge pull request !1442 from 小马奔腾/master
2022-06-01 15:07:08 +00:00
xdmal
86bda19980 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
yaoyuan
b80c0196ca Description:
Reduce redundant code by using predefined global constants instead of creating new constant strings
Move all global constant strings into nonmovable space to improve code efficiency.

Issues: https://gitee.com/openharmony/ark_js_runtime/issues/I588TY

Signed-off-by: yaoyuan <yuanyao14@huawei.com>
Change-Id: I1f92188175c3129c5d8cec72a0396f11ce17c1c7
2022-05-31 17:38:54 +08:00
shisan_forwork
63d3929b97 Add Container Vector
Description
   To ensure the high performance of container classes, vector is
   provided in ark.
Related issue
   #I4XCD9:add container vector

Signed-off-by: shisan_forwork <chengjunxiong@huawei.com>
2022-05-23 20:40:25 +08:00
wangben
d12e80870f Add regExp.matchAll interface and symbol.matchAll and regExp iterator related functions
Signed-off-by: wangben <wangben15@huawei.com>
2022-05-18 18:02:39 +08:00
dingwen
01d74f025f Snapshot code optimization
Description:Snapshot code optimization include modify class name SnapShotSerialize to SnapShotHandler, delete some magic number, add interface to acquire global env and global const object index.
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I55CQ3

Signed-off-by: dingwen <dingwen6@huawei.com>
Change-Id: I338028c5cfd4f992095f2bded2956e33f275bb1b
2022-05-07 09:23:06 +08:00
zhaozhibo
2c7f6ff4fa delete object_xray-inl.h, move into object_xray.h and create visitor.h
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-04-28 21:25:51 +08:00
openharmony_ci
3c86e2ccae
!1131 Support constpool serialize, global const and global env object reuse, string deduplication
Merge pull request !1131 from dingwen/master
2022-04-28 01:55:14 +00:00
dingwen
fa7262a133 Support constpool serialize, global const and global env object reuse, string deduplication
Description:1.Support constpool serialize 2.Global const and global env
object reuse 3.String deduplication
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I54NF5

Signed-off-by: dingwen <dingwen6@huawei.com>
Change-Id: Ia05fb055b8e846a5437ff49d97e0141f72ee112e
2022-04-27 21:16:00 +08:00
liu-qiang12
26cca58d46 According to the 2021 internationalization specification add international specification module listformat class code
Signed-off-by: liu-qiang12 <liuqiang187@huawei.com>
https://gitee.com/openharmony/ark_js_runtime/issues/I54WWJ
2022-04-27 10:24:14 +08:00
openharmony_ci
6bcf45865a
!972 Add Container Plainarray
Merge pull request !972 from zhangjixing/container_plainarray
2022-04-15 06:54:59 +00:00
zhangjixing
eafc261ff6 Add Container Plainarray
Description
  To ensure the high performance of container classes, Plainarray is
   provided in ark.
Related issue
   #I4XXYA:Add Container Plainarray

Signed-off-by: zhangjixing <zhangjixing4@huawei.com>
2022-04-15 13:11:55 +08:00
openharmony_ci
7613feada9
!966 Set/Map ForEach Optimization
Merge pull request !966 from yingguofeng/for_each
2022-04-13 11:32:14 +00:00
luochuhao
7c0fde4c57 Modify for helloworld demo on AOT framework
Adaptation on serialization and deserialization of snapshot file is needed,
for providing string constant table.

Tweak on callarg1dyn runtime stub.

Adjust initialization sequence of tsloader and global constant to cope with snapshot
deserilization.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I527BJ
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: I20a82dd0dbeec368b4ff93db4cca8d0ffbdb6717
2022-04-12 13:50:09 +08:00
yingguofeng@huawei.com
8d04461654 Refactor the funtion of foreach for set/map
The implementation of foreach does not comply with the specification, resulting in poor performance

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

Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
Change-Id: Ibe5682f1354f2e7fa6e7f565321f47ef197c8d08
2022-04-11 12:49:43 +08:00
dingwen
861d97bb87 SnapShot serialize and deserialize by using ObjectXray visit object
field
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4ZOXH

Signed-off-by: dingwen <dingwen6@huawei.com>
Change-Id: I6e03cfb4f7b89786b612b56adc0877f8b178058e
2022-04-10 12:32:07 +08:00
openharmony_ci
1789e38335
!738 Add Container Deque And Container Stack
Merge pull request !738 from zhangjixing/deque_and_stack
2022-03-30 02:13:32 +00:00
zhangjixing
c6be465406 Add Container Deque And Stack
Description
  To ensure the high performance of container classes, Deque and Stack
  is provided in ark.
Related issue
  #I4X8GV:Add Container Deque And Stack

Signed-off-by: zhangjixing <zhangjixing4@huawei.com>
2022-03-29 18:13:38 +08:00
liu-qiang12
88871216d1 Add international specification module displaynames class code
Signed-off-by: liu-qiang12 <liuqiang187@huawei.com>

https://gitee.com/openharmony/ark_js_runtime/issues/I4ZYTA
2022-03-28 17:29:53 +08:00
yingguofeng@huawei.com
37c3d5c2a4 EmptyArray、EmptyTaggedQueue、EmptyLayoutInfo Move to GloblaEnvConstant.
When New class,It depends on EmptyLayoutInfo.So it must new EmptyLayoutInfo first.

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

Change-Id: I654ec61e7f3dc1ab55539dd64acba24489983107
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-03-25 11:05:13 +08:00
openharmony_ci
c5ac3e084f
!788 Add typedArray and array extensions
Merge pull request !788 from 王犇/master
2022-03-24 08:26:01 +00:00
wangben
9139aaa1d2 Add typedArray and array extensions
Signed-off-by: wangben <wangben15@huawei.com>
2022-03-24 10:24:32 +08:00
yingguofeng@huawei.com
c9538b676f reuse hclass
Descriptor:Some hclass are not reused. Resulting in unnecessary memory and performance overhead

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

Change-Id: I414a9183d1453cba1e2452432d0a654e252477b5
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-03-22 14:39:05 +08:00
xujie
a2a5f2ad63 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
zhangyouyou
b744a006be Add bigint type, add related instructions and Napi
Signed-off-by: zhangyouyou <zhangyouyou2@huawei.com>
2022-03-10 21:25:06 +08:00
y00576111
6dc6688270 EcmaScript Standard Module Implementation
Delete the existing module implementation and
re implement the module function according to the ECMA 2018 specification

issue: #I4NZQT [https://gitee.com/openharmony/ark_ts2abc/issues/I4NZQT]

Signed-off-by: y00576111 <yaojian16@huawei.com>
Change-Id: I8d381db7f8bf2f3d6b2a5c21cbc3cbab1aef0b9b
2022-03-10 19:10:42 +08:00
wuzhefeng
ab93e17d09 Refactor JSThread layout and introduce macro for debugging
This PR refactors the design of JSThread by introducing aligned struct,
which is more friendly for ASM-Interpreter and Compiler IRs. Meanwhile,
to facilitate debugging, a macro enable_bytrace is introduced to control
the lib dependencies of ark-js-runtime.

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

Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: I56835deec5d372d7c827ded26544a87766f29002
2022-03-10 00:25:35 -08:00
lifansheng
927b378b85 issue:I4WLER
description: supplement the Array, Object and Function type resolution for type system

add TDD test

Signed-off-by: lifansheng <lifansheng1@huawei.com>
2022-03-08 14:51:24 +08:00
chenqi
20726efef7 Add Container Queue
Description
  To ensure the high performance of container classes, Queue is provided in ark.
Related issue
  #I4TKAU:Add Container Queue

Signed-off-by: chenqi <chenqi151@huawei.com>
2022-03-05 16:55:38 +08:00
lifansheng
9efea35541 issue:#I4P7EY
Reason: To support AOT compilation, add ts type system to provide some
    interfaces and struct to wrap ts type and help type infer

    Description: create the global class TSLoader to expose the external
    interfaces, create the TSType and it's derived class, TSClassType,
    TSClassInstanceType, TSImportType and so on to wrap ts type in runtime.

    Add TDD unitest.

Signed-off-by: lifansheng <lifansheng1@huawei.com>
2022-02-22 16:50:20 +08:00
liuganlin
3f93f046c1 Add container ArrayList
Description
  To ensure the high performance of container classes, ArrayList is provided in ark.
Related issue
  #I4T65T:Add Container ArrayList

Signed-off-by: liuganlin <liuganlin@huawei.com>
2022-02-18 10:37:31 +08:00
xliu
384e954045 Description
To ensure the high performance of container classes, TreeMap and
  TreeSet is provided in ark.
  Add test cases for TaggedTree.
Related issue
  #I4PQ1G:add TreeMap and TreeSet

Change-Id: I5cda72d06a71380711374109a87e971af6a8c5b7
Signed-off-by: xliu <liuxin259@huawei.com>
2022-02-10 11:28:34 +08:00
wengchangcheng
9a907ba3c3 optimize primitive type ACCESSORS
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2022-01-25 18:05:12 +08:00
ding
c4ffd76fd3 template class
Signed-off-by: ding <dingding5@huawei.com>
2021-12-25 09:51:43 +08:00
yingguofeng@huawei.com
1d9b2ac3dd nativePointer optimization
Change-Id: I97b58375c2ec30f33778d7f11fb40a9cf0ed346b
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2021-12-23 19:40:54 +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