Commit Graph

75 Commits

Author SHA1 Message Date
xiongluo 771d51b546 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
linxiang ee14adb949 Bug fix for string length calculate
if string is utf16, length need * sizeof(utf16)

Signed-off-by: linxiang <linxiang8@huawei.com>
Change-Id: I16ac62c9d137aa90bf3c43f1e1d740d97ec03058
2022-04-16 15:11:51 +08:00
guobingbing c01691c0bb entry frame adapter asm
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: Ied740af77e0f770e01f948c86b5f13d4877672ad
2022-04-15 18:23:40 +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 71f2d7e0eb Merge branch 'master' of gitee.com:openharmony/ark_js_runtime into master 2022-04-14 02:57:27 +00:00
zhaozhibo a57029dc79 fix codeDex warning.
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-04-14 10:56:51 +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
DaiH 3bc50421f4 Modification of patch "Get Object Literal's Hclass From Cache"
Signed-off-by: DaiH <daihuina1@huawei.com>
https://gitee.com/openharmony/ark_js_runtime/issues/I52AMU?from=project-issue

Some code formatting issue's modification of patch "Get Object Literal's Hclass From Cache"

1. Variable name : "fieldOrder" -> "fieldOffset"
2. uint32_t -> size_t
3. Extract "newJshclass->SetLayout(thread, layoutInfoHandle);" of the branches

Change-Id: Ib2e396ecbb10cac0b9fb2919c6f60f3633fbc376
2022-04-12 14:40:56 +08:00
DaiH 99f7f4bd0a 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 f7c357a8d4 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 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 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 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
openharmony_ci c100207dd7 !881 fix newlexenv init value error
Merge pull request !881 from wanghuan2022/master
2022-03-25 07:49:47 +00: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
wanghuan e3df80f7a6 fix newlexenv init value error
description: fix newlexenv init value error

solution: Init value should be hole, not undefined. Because some instruction is throwundefinedifhole.

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

Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: Id7e88741469b3399b09006b3bbc79d2cba3c2710
2022-03-24 21:36:45 +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
openharmony_ci d125a7fefb !838 reuse hclass
Merge pull request !838 from yingguofeng/master
2022-03-22 09:39:22 +00:00
yingguofeng@huawei.com c93123c0c7 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
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
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
openharmony_ci 579c3c1729 !546 Add Container Queue
Merge pull request !546 from chenqi/container_queue
2022-03-07 11:43:30 +00:00
openharmony_ci dfbff80e63 !687 fix jspandafile of framework file and aot info
Merge pull request !687 from changcheng/refactor_pandafile_and_nativepointer
2022-03-06 15:57:41 +00: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
wengchangcheng 65ce5ee62d fix jspandafile of framework file and aot info
1. delete unused logic of framework pandafile
2. refactor native pointer callback
3. fix bug of generate aot info

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I3ba318a0bc2c0e95afff6473ff106bc8b5c9dfe4
2022-03-04 15:29:27 +08: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
yingguofeng@huawei.com 12e27e6863 Heap code refactoring
Delete MemManager class. The allocation function move to heap.cpp. The Space
manage Allocator.

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

Change-Id: I03cef52d9a1c86b07323de1e19ead53fe6daaf99
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-02-25 16:03:15 +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
openharmony_ci 7b58a8786f !575 Modify RegionFactory and Chunk
Merge pull request !575 from dingwen/master
2022-02-21 12:06:43 +00:00
dingwen 87e9f4ff3c Modify RegionFactory and Chunk
Description:Divide RegionFactory into HeapRegionAllocator and
NativeAreaAllocator,use ChunkVector replace some unreasonable CVector.
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4TRB8

Signed-off-by: dingwen <dingwen6@huawei.com>
2022-02-21 15:22:01 +08:00
liuganlin 3f3e0162ac 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
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
feng dce8f3ebb4 Performance optimization for String table
concat string table

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

Signed-off-by: feng <yingguofeng@huawei.com>
Change-Id: I1ff7f15246c8d367c8c8a38f0effed9e6ace2bed
2022-02-15 14:23:43 +08:00
xliu 0bb3e25edc 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 9a2b7d04e8 optimize primitive type ACCESSORS
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2022-01-25 18:05:12 +08:00