Commit Graph

72 Commits

Author SHA1 Message Date
wengchangcheng
ab13a0da91 Descriptor: support first level instruction
Details:
1. Add old Opcode defines
2. Add new inst handler of throw & wide & deprecated
3. Modify interpreter for new inst
4. Modify typeinfer for new inst
5. Modify asm interpreter for new inst
6. Modify aot circuit builder for new inst
7. Translate old inst to first level inst

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5LPNL

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: If9e0b60cafc32a662a5fb1676887939d5a2b9ebf
2022-08-24 14:12:42 +08:00
g00416891
e7e344e150 Modify JSMethod to Method
Signed-off-by: g00416891 <guobingbing3@huawei.com>
Change-Id: I2f18e1cd8c163a2839bbf2b3da4e40d385f5094a
2022-08-23 15:23:06 +08:00
lifansheng
2110e9faf0 Rduece SourceTextModule Size
issue: I5MM8C

Signed-off-by: lifansheng <lifansheng1@huawei.com>
Change-Id: Ib7a5ad7787a740dc6c834992fd82458e184b4012
2022-08-18 20:14:15 +08:00
g00416891
9f8cbcc303 Move ConstantPool from JSFunction to JSMethod
Signed-off-by: g00416891 <guobingbing3@huawei.com>
Change-Id: I40dda1e44a831be6682f7fdacac21337af1bcd2d
2022-08-17 18:58:42 +08:00
yingguofeng@huawei.com
ed3d8eb76b perf(memory): Improper use of chunk leads to memory leakage.
The life cycle of the chunk under ECMA is the same as that of VM.
  Temporary objects or objects with a shorter life cycle than VM cannot be allocated through the chunk.

Closes: #I5MNM8

Change-Id: I0ceee15da0045d56c036d9c86f6949fe0db7e5b8
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-08-17 10:59:09 +08:00
linxiang
1e4b7c9dc6 fix issue: return JSTaggedValue::Exception to JS-World, which cause 0xa problem
issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5MF7J

Signed-off-by: linxiang <linxiang8@huawei.com>
Change-Id: Ic004e99bb1b0b604dcb77176340c349845d94f3e
2022-08-15 22:37:14 +08:00
wupengyong
eef2380567 reason:add buitins stub
description:add buitins stub
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5HCIM?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I4673f7f1443a8a9f6a3c01985f219e50ddb024fa
2022-08-04 17:27:44 +08:00
bi-hu
f45e51d61b Added New Code Of Asyncgenrator
Signed-off-by: bi-hu <bihu@huawei.com>
https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5JIGT
2022-08-02 15:42:50 +08:00
xliu
be40cc849f [builtins optimization] Array slice
Description
  Add quick add attribute logic
Issue:
  https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5IP6E

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: Ia6918274ae2ae9cb93b771d3830555280f3c08f2
2022-07-25 15:36:27 +08:00
xliu
4b27184ed7 Constpool object moved to old age
Description
  1.GC is frequent during constpool parsing
  2.Constpool object moved to old age allocation
Issue:
  https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5I8YT

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: I0c88597f56a3ff60337fd21fa2d09d1dac004973
2022-07-23 11:31:35 +08:00
xliu
26ba828698 Revert "Constpool object moved to old age"
This reverts commit 203136be24.

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: I1026b9a8b7e0eef35ed964b94aab2962e7c2b981
2022-07-20 17:40:52 +08:00
openharmony_ci
1c9171e517
!1625 Add Containers HashMap and HashSet
Merge pull request !1625 from 刘甘霖/container_hashmap
2022-07-20 09:02:54 +00:00
liuganlin
6caa813d58 Add Containers HashMap And HashSet
Description
    1.To ensure the high performance of container classes, HashMap and HashSet is provided in ark.
    2.Add test cases for HashMap and HashSet.
Related issue
    #I5D0WV:Add Containers HashMap and HashSet

Signed-off-by: liuganlin <liuganlin@huawei.com>
2022-07-20 11:16:28 +08:00
xliu
203136be24 Constpool object moved to old age
Description
  1.GC is frequent during constpool parsing
  2.Constpool object moved to old age allocation
Issue:
  https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5H2ZN

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: Ie4b54e205c5673705992a370f2af8f9b46e412e3
2022-07-16 17:54:34 +08:00
openharmony_ci
8f525d0d38
!1755 Object Entries and Array Iterator optimization
Merge pull request !1755 from xliu/entries_and_array_iter
2022-07-13 08:34:50 +00:00
zhangyukun8
b789fafc2f Add stackoverflow check of asm interpreter
1. check rsp stackoverflow
2. add calltype testcase

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

Signed-off-by: zhangyukun8 <zhangyukun8@huawei.com>
Change-Id: Ib7f2f32588eaed74e6aff5b9c1ad37c39c81509e
2022-07-13 10:54:53 +08:00
xliu
9da4c63884 Object Entries and Array Iterator optimization
1. Optimize the enumerableownpropertynames interface by adding cache;
2. Remove the number to string conversion of array iterator;
3. Share hclass of iterator result;
4. Share the return result of closeiterator;
5. Fix EnumerableOwnNames bugs.
6. Fix Array IteratorNext bugs.
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5G288

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: Ie03278f0afed3cf7eb967dd92eac13c2fc0eeb4e
2022-07-11 19:38:17 +08:00
DaiHN
b8712b415b Rename Commonjs's Objects
-------------------------------
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5G29Y?from=project-issue
1. "JSCjsModule" -> "CjsModule"
   "JSCjsRequire" -> "CjsRequire"
   "JSCjsExports" -> "CjsExports"
2. builtin_cjs_exports.h -> builtins_cjs_exports.h
   builtin_cjs_exports.cpp -> builtins_cjs_exports.cpp
   builtin_cjs_require.h -> builtins_cjs_require.h
   ...

Signed-off-by: DaiHN <daihuina1@huawei.com>
Change-Id: I582467ef8421e03b7eb123d388d66287a79ce97b
2022-07-07 21:09:56 +08:00
changjiaxing
033e89abcf Optimizing bigint data structures
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5EIYF?from=project-issue

Signed-off-by: changjiaxing <changjiaxing1@huawei.com>
2022-06-28 18:53:08 +08:00
lukai
a2d3403952 add read-only space
realize read-only space to manage read-only object
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5DHA7?from=project-issue

Signed-off-by: lukai <lukai25@huawei.com>
Change-Id: I94007e4a2ad990ca21a182afa182713cae390a76
2022-06-28 09:15:29 +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
wengchangcheng
cc184ba66c 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
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
xujie
81a69cf09f TSAOT Exception Handler
1. Throw JS exception in tsaot
2. Print bcoffset when occur JS exception

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

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: I046d76c092a399354ddcdedd859f0c1e622387c2
2022-06-11 16:36:16 +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
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
openharmony_ci
f00f6533b6
!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
9096c56a58 Fix the mem leak from js method
Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-05-25 10:53:36 +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
wupengyong
faf92259ac 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
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
luochuhao
42e13f263a First run of an TSAOT-define function Demo.
Record idx in const pool of aot function in llvmmodule and aotcodeinfo.

Tweak code in circuit builder for slowpath lowering scenario where
constpool is null.

New JSFunction object for main function in AOT file and new JSFunction object
for each defined function in lowerDefineFuncDyn.

Fix bug in call.S after JSMethod refactor.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I545X0
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: Ie6448f8740caddf79c3b9ed3385ba5739c7eb76b
2022-04-25 12:00:12 +08:00
xiongluo
727b20b57e 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
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
DaiH
ebf8c5b31f Get Object Literal's Hclass From Cache
Signed-off-by: DaiH <daihuina1@huawei.com>

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

Sovle the problem that generate object without sharing Hclass, when object's Hclass have same shape.

Get Object Literal's Hclass From Cache

Change-Id: Ia17d056e32acd3356be138051f273c0cf50d82ee
2022-04-11 21:57:35 +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
xliu
bddb55c976 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
openharmony_ci
e802f8e5e3
!918 add SharedArrayBuffer
Merge pull request !918 from 赵杜炜/master
2022-04-02 11:58:42 +00:00
zhaoduwei
5a9a25830f 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
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
luochuhao
905d0496dc Refactor ID definition and callSignature initialization mechanism of stubs
Refactor ID definition and callSignature initialization mechanism of runtime stub,
optimizer stub and bytecode handler stub,
reduce amount and complexity of macro used in calling those stubs.

Add stubDes struct to classify stubs both in AOT file generation phase
and AOT file loading phase.

Fix some circular dependency problems in including header files.

Fix certain inline function declaration and definition format problems, which could lead to
compiling errors.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4VMLD?from=project-issue
Test: stubTest(unit test), richards with asm interpreter enabled
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: Ibd5fcd963347b97f8dec227f3245d2064463b0b0
2022-03-18 22:01:52 +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