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
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>
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
1) Separate the space type flags from the GC related flags;
2) the space type flags should be exclusive with each other, hence we shouldn't make them denoted
by specific dedicated bits respectively, because in that way we can't avoid multiple bits being set,
which is not what we expect.
3) the GC related flags are kept using dedicated flag bit for now. Going forward we should continuouslly
improve this, e.g., to check if some of these flags are also exclusive with each other, and to better
separate them from the space type flags with separately declared types, etc.
4) The judgement of whether an object is containted in the heap is _somehow_ improved, but as mentioned
in the code comments, it's still not safe and accurate enough, be careful when using it.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I590Z8
Signed-off-by: Yuqiang Xian <xianyuqiang@huawei.com>
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>
Currently there's an "implicit" assumption wide spread in a lot of places in the code,
that the region object is allocated in the JS heap together with the associated region
memory it manages (i.e., the C++ region object itself is treated as the header of the
associated memory region), but after all, from a normal user's perspective, it's still
a normal C++ object, and thus introduces a lot of confusions and it's very easy to
break the system with usages which are not "implicitly" expected.
This patch tries to relax the assumption / limitation, and the mostly affected usage case
is snapshot serialization / deserialization, which is refactored to not rely on that
implicit assumption.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I590Z8
Signed-off-by: Yuqiang Xian <xianyuqiang@huawei.com>
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>
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