Commit Graph

67 Commits

Author SHA1 Message Date
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
openharmony_ci a6f3b2b8a6 !1177 Require function realization
Merge pull request !1177 from DaiHN/require
2022-06-09 12:51:21 +00:00
ding 8bfd16debf Refactor GateType
1.Change the implementation of gateType from enum to class.
2.Add some base type opeartions between GateType and GlobalTSTypeRef to simplify the code.
3.Delete class GateTypeCoder
4.Extract GlobalTSTypeRef as an independent file.

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

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: I3d80595ebccc9ac942af9b9bcc67c0974bb9b712
2022-06-09 17:32:43 +08:00
DaiH eee606c334 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 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
openharmony_ci d34f4d889c !1438 Add atomics project and modify code errors
Merge pull request !1438 from jiangkai43/master
2022-06-06 01:39:53 +00:00
jiangkai43 99f06bae64 Merge branch 'master' of gitee.com:openharmony/ark_js_runtime into master 2022-06-02 11:17:00 +00:00
jiangkai43 d50c83dc69 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 666eb6b8bd 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 7e3af05fb1 !1442 Add WeakRef and FinalizationRegistry interfaces
Merge pull request !1442 from 小马奔腾/master
2022-06-01 15:07:08 +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
ding b34b0a3e40 Refactor TS Types
1.Re-write union type mechanism, store gt in components.
2.Refactor module tabale, now builtins type table and global infer table set in fixed index of 0 and 1.
3.Integrate some interfaces and logic.

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: Ie709705798b21206f1f272fc5cacafb3781ed940
2022-05-31 20:08:49 +08:00
shisan_forwork 5adb25b225 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
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
openharmony_ci 31ec8e87dd !1313 Add regExp.matchAll interface and symbol.matchAll and regExp iterator related functions
Merge pull request !1313 from 王犇/master
2022-05-18 11:04:47 +00:00
wangben 0ae45e4df7 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
yaoyuan 5ee2aa23c2 Description:
When runing debug tests, there are too many dump test logs printing on console which affect developers to spot errors quickly.

Solution:
Instead of printing to std::out, we print to a string stream.

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

Signed-off-by: yaoyuan <yuanyao14@huawei.com>
Change-Id: I4ddd71cb6687013278940dcd9822c452faa1c491
2022-05-16 15:31:54 +08:00
guobingbing 129ebdbf25 refactor class FrameHandler
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: I9f3ff0c04d34a31a34f21da637689eb61d4166f1
2022-05-04 10:36:44 +08:00
liu-qiang12 474420fba7 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
zhaozhibo e0ad13d0c4 fix codex warning
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-04-25 14:33:01 +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
openharmony_ci 4126b18aa8 !972 Add Container Plainarray
Merge pull request !972 from zhangjixing/container_plainarray
2022-04-15 06:54:59 +00:00
zhangjixing 9af120fc9c 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
zhaozhibo aaf776aab5 fix code warning for codeDex
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-04-12 14:27:50 +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 78c38d9a2b !918 add SharedArrayBuffer
Merge pull request !918 from 赵杜炜/master
2022-04-02 11:58:42 +00: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 f8b36e6882 !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 219dd0bd8d 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 abef083f7f 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 18:23:12 +08:00
liu-qiang12 4bc727a885 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:59:28 +08:00
liu-qiang12 91649cfe9e 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 2b48dab678 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
wengchangcheng 4804cd80d3 add Wextra and Werror in gn args
1. add -Wextra and -Werror to check code format error
2. modify all compiler error

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: If5fdd1980494269b4c06bf1bb38a8eba7952adea
2022-03-24 21:45:19 +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
changjiaxing 5e225e01ca Improve the efficiency of roller execution
Description:
    Optimize the efficiency of bigint to number and uint32_t, uint64_t, int64_t to bigint
issue:
    https://gitee.com/openharmony/ark_js_runtime/issues/I4YU8Y?from=project-issue

Signed-off-by: changjiaxing <changjiaxing1@huawei.com>
2022-03-22 12:33:08 +08:00
openharmony_ci 5f0c650259 !703 modify transitions to weak reference
Merge pull request !703 from dingding/waek_transitions
2022-03-14 12:11:31 +00:00
ding e0b8620c6c modify transitions to weak reference
1.modify transitions to weak reference and delete parent field in JSHClass.
2.add targeted test case to intercept the issue.
3.fix weak ref in parallel gc
4.fix TaggedCastToWeakReferentUnChecked() in stub

Change-Id: I118d293a04390fba6c21179a0a8ac7993dae5e96
Signed-off-by: ding <dingding5@huawei.com>
2022-03-14 11:02:43 +08:00
zhangyouyou 66dec69743 Add bigint type, add related instructions and Napi
Signed-off-by: zhangyouyou <zhangyouyou2@huawei.com>
2022-03-10 21:25:06 +08:00
y00576111 a1796a573e 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
lifansheng 506c1538e1 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 5788c64ffb 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
openharmony_ci 159a75d982 !671 Modify Containers
Merge pull request !671 from chenqi/fixContainers
2022-03-04 10:24:04 +00:00
lifansheng 8ed6cd9ef7 issue:#I4VX1Q
reason: so far there are some problems include the bad codes and the code architecture in the ts type system

    solution:modify ts type system code inculde refactor the function and class

Signed-off-by: lifansheng <lifansheng1@huawei.com>
2022-03-03 17:25:07 +08:00
chenqi 7b32a7885f Modify ArrayList, TreeMap And TreeSet
Description
  1.fix arrayList GC bug
  2.add other containers case in lazy loading
  3.change containers Iterator ACCESSORS() to ACCESSORS_PRIMITIVE_FIELD()
Related issue
  #I4W3P3:Modify Containers

Signed-off-by: chenqi <chenqi151@huawei.com>
2022-03-03 17:02:21 +08:00
y00576111 9eeef5be33 js pandafile refactor, support actor function
When the worker thread is started
the part shared by the virtual machine is not recreated
only the part that cannot be shared is created

issue:https://gitee.com/openharmony/js_worker_module/issues/I4SMW8

Signed-off-by: y00576111 <yaojian16@huawei.com>
Change-Id: I3c01588bb8449bd9cd8b410cfd13ff55205f41c1
2022-03-02 15:33:19 +08:00
lifansheng 2964efc6b9 issue:#I4V1ZG
add macro PUBLIC_API and refactor the bad code, avoid some interfaces being optimized by the compiler

Signed-off-by: lifansheng <lifansheng1@huawei.com>
2022-02-24 14:21:31 +08:00
lifansheng b39418de15 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