27 Commits

Author SHA1 Message Date
wengchangcheng cd90e396a7 Descriptor: ark hilog refactor
details:
1. use hilog in ohos device
2. use panda logger in host
issue:  https://gitee.com/openharmony/ark_js_runtime/issues/I5FR5J

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I6f5de00751154bdb6aac3101515961a3a4432e80
2022-07-06 22:55:49 +08:00
lukai 2a7a4390ee 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
wengchangcheng 6468341c72 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
xliu 001bd92d0f fix string trim
Description
  fix string trim of empty string.
Issue:
  #I5B6S0:fix string trim

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: Ia1b6274252536ecc8ffd62d2459f8ab6f5ba8335
2022-06-07 20:14:54 +08:00
xliu 35b22ca998 [Optimization] String Trim
Description
  1. String trim interface optimization.
  2. Change the implementation of using regular to a simpler and more
  efficient way.
Issue:
  #I5AH4Z:[Optimization] String Trim

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: I9dd0d923344ebd3c571ff8cd6cb244d9c01444fa
2022-06-06 09:15:32 +08:00
yingguofeng@huawei.com 73689999ed Add jsnapi interface CopyableGlobal
issue:https://gitee.com/openharmony/arkui_ace_engine/pulls/2628

Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
Change-Id: I28bcfa69f47d9b239d1cd37f8bbd34c82a0c8da9
2022-05-31 22:14:22 +08:00
yaoyuan cfdfd3e1b9 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
yaoyuan 0598fc3e61 Fix issues on string overflow when BufferSize = 1
关联:I57C0W

Signed-off-by: yaoyuan <yuanyao14@huawei.com>
Change-Id: I6255909235e1a3e43766338015a3cd932bf3542d
2022-05-13 16:54:09 +08:00
yaoyuan 70839d1f6c Fix utf16 string writing to buffer
关联Issue: #I569XL

Signed-off-by: yaoyuan <yuanyao14@huawei.com>
Change-Id: I77b996c5ca0e8775083f62f0c9a064c765c82c90
2022-05-07 18:39:07 +08:00
yaoyuan 90d20770f4 Consider different cases for maxLength greater than, equal to and smaller than length.
For napi only

关联的Issue: #I54T7E

Signed-off-by: yaoyuan <yuanyao14@huawei.com>
Change-Id: I94c5e335a43aac937616e5aa3a217cc0b034ade7
Signed-off-by: yaoyuan <yuanyao14@huawei.com>
2022-05-05 11:16:56 +08:00
zhangyukun 5632b517c9 optimize asm interpreter performance
Description:
1. add runtime stat scope to get the data of time-consuming-points
2. use stub to impl these runtime time-consuming-points
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I552ZB?from=project-issue

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I242b3ef8b4235d952aa32fda0d3d5b8ed2f8f776
2022-04-28 18:43:32 +08:00
xliu 9f2b94c6f1 fix EcmaString::FastSubString
Description
  In the FastSubString interface of EcmaString, which is a fast path,
  there is a logical error in judging whether characters are compressible
Issue:
  #I53HR7:fix EcmaString::FastSubString

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: If8d93fadbae5805bb2c8a674f3fc7725a562c032
2022-04-20 10:08:40 +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
luochuhao c705ce054b 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
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
wengchangcheng 9a2b7d04e8 optimize primitive type ACCESSORS
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2022-01-25 18:05:12 +08:00
openharmony_ci acd198cc23 !419 add 'utf8Len' parameter for 'CanBeCompressed()'
Merge pull request !419 from zhaozhibo/master
2022-01-20 11:06:03 +00:00
zhaozhibo e01f55e69e add 'utf8Len' parameter for 'CanBeCompressed()'
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-01-18 14:57:19 +08:00
openharmony_ci c22e2930d1 !410 modify ACCESSOR for EcmaString and TaggedArray
Merge pull request !410 from changcheng/master
2022-01-17 10:34:20 +00:00
zhaozhibo 676f7df823 add 'utf8Len' parameter for 'CanBeCompressed()'
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-01-17 15:13:00 +08:00
zhaozhibo 8bfeb11554 add 'utf8Len' parameter for 'CanBeCompressed()'
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-01-17 12:30:13 +08:00
wengchangcheng 2bfd68c01a modify ACCESSOR for EcmaString and TaggedArray
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I2995dc75ed34e8eb2bf249f2cced62ec9d91250e
2022-01-17 11:51:50 +08:00
zhaozhibo 1065502409 fix conversion function bug in 'utf_helper' when utf8 characters do not end with '\0' and reconstruct ecmastring
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-01-13 12:02:17 +08:00
getingke b35952f22a fixed for Set/GetPropertyByValue & test262 case verify
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I06214f39ebff93754edb3d275be4d4d76c1dba0c
2021-10-27 16:09:49 +08:00
wengchangcheng 96a03dc5e5 fix length error of Chainese char
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2021-10-14 21:36:56 +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