Commit Graph

9 Commits

Author SHA1 Message Date
xliu 1893bbfbe6 Fix UT test and json parser
Description
  1. Fix UT test
  2. Fix mem_map_allocator
  3. Fix json parser
Issue:
  #I55S8H:Fix UT test and json parser

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: I1e5107a1f119eb1422a40f2275d961b366dda46b
2022-05-05 11:36:33 +08:00
scw 836a15ce64 Fix JSON parse for four bytes u16string
read four bytes when construct a four bytes u16string

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

Signed-off-by: scw <suchongwei@huawei.com>
2022-04-25 20:13:43 +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
xujie ec6b838c94 fix jsonparse bug while parsing number
When parsing numbers in arrays or objects, consider this a normal
situation if the end of the number is followed by whitespace characters.

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

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: Id71f48cc1b2acc4a4b486d38d0036a144a595e54
2022-02-26 12:01:54 +08:00
xujie 9363104c8a fix JSON bug with string \u0000
1. In Json stringify, convert \u0000 to unique identifier C080 for processing.
By identifying C080, return '"\\u0000"'
2. In Json parse, fix the bug that cannot output strings smaller than 0x20.

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

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: Ia6114427d06396476a316da2d3c87c3aab8324c4
2022-02-24 15:54:41 +08:00
xujie c7ed414099 optimize json parse
Signed-off-by: xujie <xujie101@huawei.com>
2021-09-24 10:36:25 +08:00
zhangyukun 7ffcc4b20f Sync js_runtime to openharmony
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
2021-09-08 09:20:53 +08:00
wanyanglan 86cfe52253 add ark js_runtime
Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: Iac7851492f10c0ef1303c621febb65e5fdd22e41
2021-09-05 16:05:06 +08:00