Commit Graph

74 Commits

Author SHA1 Message Date
zhangyouyou
4a5a0511f7 修改startWith处理utf16结果异常问题
Signed-off-by: zhangyouyou <zhangyouyou2@huawei.com>
2024-04-24 10:09:09 +08:00
zhaojunxia
5850205dd5 modify ecma_string IsSubStringAtSpan
Signed-off-by: zhaojunxia <zhaojunxia@kaihong.com>
2024-04-12 16:53:29 +08:00
wengchangcheng
cd9a13a65a Merge remote-tracking branch 'openharmony/master' into dev_shareheap
Change-Id: I8ce481ad36b98b1db52a131c433bf1bcb54bc3e0
2024-03-15 11:04:25 +08:00
Panferov Ivan
fc1ad1d126 Add check for empty strings. Optimize json parse builtin
Change-Id: Ida8d3039fd0a9abb11fa969493a1f6ba3cf3018b
Signed-off-by: Panferov Ivan <panferov.ivan@huawei-partners.com>
2024-03-14 18:14:50 +08:00
wengchangcheng
c1e94f2c5b Merge remote-tracking branch 'openharmony/master' into dev_shareheap
Change-Id: I453d3948421d4327a8d54b5689b1ec21f97f5dce
2024-03-11 22:42:20 +08:00
chenjx-huawei
6d92e411f7 Optimize String.prototype.startsWith
Issue: https://gitee.com/open_harmony/dashboard?issue_id=I948HZ

Signed-off-by: chenjx-huawei <chenjingxiang1@huawei.com>
Change-Id: Ia13d2a47ea7f3c7cad0102680fdad31e6f96485b
2024-03-06 11:50:19 +08:00
wupengyong
c31ef65703 Reason:optimize string substring
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I93NXN?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I24834da373f7d2512ace96e2f863a9d981c84eb9
2024-02-26 10:16:45 +08:00
wengchangcheng
0ed9f00a08 Merge remote-tracking branch 'openharmony/master' into dev_shareheap
Change-Id: I73e06e67e44d7bd2492ba0615c2ac62b4979ef36
2024-02-19 00:14:55 +08:00
hzzhouzebin
a1308124c3 Move EcmaString & StringTable on Shared Heap
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8YVTQ
Signed-off-by: hzzhouzebin <zhouzebin1@huawei.com>
Change-Id: I04d16d68f38be1679f206a782ef76b9d34142589
2024-02-07 23:13:44 +08:00
huangtianzhi
4b7dfad83e Fix Debugger socket disconnects when decoding invalid unicode
Replace invalid codepoint by the replacement code, instead of encoding
it in UTF8

Issue: #I90MM4
Test: Build, Boost & Debug

Signed-off-by: huangtianzhi <huangtianzhi1@huawei.com>
2024-02-02 14:36:27 +08:00
liushitong
8df093dc46 Modify code warning
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8UTG3

Signed-off-by: liushitong <liushitong@huawei.com>
2024-01-09 19:54:37 +08:00
liushitong
8b5794bc50 Modify code warning
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8UTG3

Signed-off-by: liushitong <liushitong@huawei.com>
2024-01-09 16:55:08 +08:00
yanpeng
16dc0d13c0 fix regress-955.js problem
Signed-off-by: yanpeng <yanpeng51@huawei.com>
2023-12-05 19:37:48 +08:00
yanpeng
621fcb9e69 fix some regress test
Signed-off-by: yanpeng <yanpeng51@huawei.com>
Change-Id: Ia0e02941344c67ee4b59459058e9fd8264a0a78d
Signed-off-by: yanpeng <yanpeng51@huawei.com>
2023-11-17 11:24:04 +08:00
DaiHN
c8aa4db942 Optimization of computing short-integer string's hash code
issue : https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I83SNR

Signed-off-by: DaiHN <daihuina1@huawei.com>
Change-Id: I81a050d7f43fb60ce185685433ca9eceafd967d2
2023-11-02 20:01:52 +08:00
hecunmao
8bd96c2e70 BugFix: Number.parseInt(x,10) get an error result if x>=2147483648&&x<=4294697294
modify in EcmaString::ToInt , Modify the condition of return true ,Return true if n is less than the maximum integer value

issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8BH22

Signed-off-by: hecunmao <hecunmao@huawei.com>
Change-Id: I28aeb80b1ef52a1501c1afdf60356f45be36a59a
2023-10-28 11:03:27 +08:00
openharmony_ci
2aae12f134
!4924 Optimize for-in loop
Merge pull request !4924 from zhangyukun8/master
2023-10-13 09:02:55 +00:00
zhangyukun8
eef37db2c3 Optimize for-in loop
1. Add EnumCache for simple properties and no-elements properties
2. Add fastpath for non-special objects
3. Avoid duplicated copy for slowpath
4. Transition hclass when detele prop in TS

Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I84DMO?from=project-issue

Signed-off-by: zhangyukun8 <zhangyukun8@huawei.com>
Change-Id: I81648b44cc83a907c50ec90c9e8de3bbb104cef8
2023-10-12 10:00:43 +08:00
wupengyong
df45bf8b44 Reason:optimize string split and fix slicedString bug
Description:optimize string split and fix slicedString bug
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I84LJG?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I6ff124fb81f6e72384e6df0fe1cbb89836e73c4a
2023-10-12 09:47:01 +08:00
openharmony_ci
0e309bc050
!4834 fix flat string
Merge pull request !4834 from wpy111/master
2023-09-19 04:32:28 +00:00
wupengyong
6485b2a9a8 Reason:fix flat string
Description:fix flat string
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I82DDI?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I8be0a9dd92eaeaa536363c0ec343f19776c9ed76
2023-09-18 19:17:26 +08:00
hwx1163501
feb2838f86 Modifying Code Alarms
Signed-off-by: hwx1163501 <hanjing35@huawei.com>
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I827RQ
2023-09-18 16:20:29 +08:00
openharmony_ci
98c9446759
!4732 优化Number.parseInt函数
Merge pull request !4732 from zhixinaa/ParseInt_StringToElementIndex
2023-09-18 04:02:36 +00:00
wupengyong
8d6b209dee Reason:fix js_stackInfo.cpp compile
Description: fix js_stackInfo.cpp compile
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I823GI?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: Icd6e5343bf473995a63c471be09f32286ea1f473
2023-09-18 10:28:43 +08:00
zhixinaa
80beec904c Optimise Number.parseInt
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7XSO8

Change-Id: I9947a357b4a83277e618b1834a11c27afc87aa46
Signed-off-by: zhixinaa <1696730989@qq.com>
2023-09-18 09:10:44 +08:00
wupengyong
101d458e5f Reason:Add string fromCharCode ir
Description:add string fromCharCode ir
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I81HYS?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: If65c4ff2b1f2f23dd3bd8e6220a714590c574b23
2023-09-16 11:38:34 +08:00
wupengyong
cb258789b8 Reason:Fix bug for slicedString
Description:Fix bug for slicedString
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7ZHTB?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: If18961f4910af5800d8deb722532cc8e66ce75b8
2023-09-10 22:23:43 +08:00
wupengyong
fa4b637a68 Reason:Add SlicedString to optimize string.substring
Description:Add SlicedString to optimize string.substring
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7XUDH?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I4bb78eb5f66c480e160567704bca53c200dde74c
2023-09-05 19:45:47 +08:00
rentangyu
d49eac3009 运行ABC文件过程中,函数panda::ecmascript::EcmaString::FlattenNoGC存在空指针异常拒绝服务漏洞
issues:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7VZER

Signed-off-by: rentangyu <rentangyu@huawei.com>
2023-08-26 11:37:27 +08:00
xwcai98
bc6dfeff11 EcmaString::Concat bug fix
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7VF5X

Signed-off-by: xwcai98 <xwcai98@gmail.com>
Change-Id: I401abcd5a477c61911b9af04c3da80679f2f692b
2023-08-23 17:52:43 +08:00
hwx1163501
47d704f25f Optimize string-related function
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7V3ZK

Signed-off-by: xwcai98 <xwcai98@gmail.com>
Change-Id: Iab38c79b7cfc49a4d02e03226f2bf8634ff8b1a3
2023-08-23 11:14:22 +08:00
hwx1163501
b59da810e0 Modifying Code Alarms
Signed-off-by: hwx1163501 <hanjing35@huawei.com>
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7S5SX
2023-08-10 17:35:58 +08:00
xiongluo
d622c14fca opt string table
Signed-off-by: xiongluo <xiongluo@huawei.com>
Change-Id: I6f10e8fcb0f9120c2cdba929b9731e4286a6ab8a
2023-08-01 22:05:57 +08:00
openharmony_ci
43bfd3480f
!4100 deregister module through dynamic import
Merge pull request !4100 from DaiHN/register
2023-07-10 03:20:26 +00:00
openharmony_ci
3545040542
!4369 Rectification of safety problems
Merge pull request !4369 from 韩靖/master
2023-07-10 02:55:47 +00:00
DaiHN
835ed2bb26 deregister module through dynamic import
issue: #I77Q59

Signed-off-by: DaiHN <daihuina1@huawei.com>
Change-Id: I83f5825c2003923a3ad1b5dcc011c350ff470df4
2023-07-09 21:31:21 +08:00
yaochaonan
0e846f3aa1 Bugfix memcmp size is wrongly set in stringEqual function.
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7J6CA?from=project-issue
Signed-off-by: yaochaonan <yaochaonan@huawei.com>

Change-Id: I034cbb0e2b4d9e3497d8fd20e9a368f4385e7c7f
2023-07-07 10:28:10 +08:00
hwx1163501
54510590fc Rectification of safety problems
Signed-off-by: hwx1163501 <hanjing35@huawei.com>
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7IC7Y
2023-07-06 17:24:49 +08:00
yaochaonan
6f54fefe44 Bugfix: TrimRight
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7E8AV?from=project-issue

Signed-off-by: yaochaonan <yaochaonan@huawei.com>
Change-Id: Ia0486402792189353f8d335a1ef7ee520f6d8e46
2023-06-20 14:20:22 +08:00
yaochaonan
e0ae1b1c59 Bugfix TrimRight
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7E8AV?from=project-issue

Signed-off-by: yaochaonan <yaochaonan@huawei.com>
Change-Id: Ic240d904d32dd5f3375254f7a65405f0af10051d
2023-06-19 21:11:06 +08:00
xiongluo
cf451e377d constant string optimization
Signed-off-by: xiongluo <xiongluo@huawei.com>
Change-Id: Ieabea29874752fed615b0a911cf4118e791663eb
2023-05-08 17:07:03 +08:00
Gymee
0500527db8 Remove leading spaces at empty line
Issue: #I67PO6
Signed-off-by: Gymee <yumeijie@huawei.com>
2022-12-27 17:59:06 +08:00
quiet-thought
7e6984c0f3 optimize ToLocalLowerCase and ToLocaleUpperCase
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I624TN

Signed-off-by: quiet-thought <chenjingxiang1@huawei.com>
Change-Id: I9a355d8f063267c720b72c9d78275439635bce8b
2022-11-29 17:14:19 +08:00
Gymee
45bbb6cbf5 remove redundant spaces between operator
Issue: #I63MCO
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: Ifd1d4768a2f96d618e991e07fc0b7a516c5965af
2022-11-29 11:47:32 +08:00
g00416891
1c48c69e10 Fix code check
Signed-off-by: g00416891 <guobingbing3@huawei.com>
Change-Id: I16dadaad8aecb184e034fd9aff7d3fcb2189a9b7
2022-11-28 14:53:17 +08:00
wanghuan
1d29a3a825 add TreeString and LineString
desc: add TreeString and LineString

solu:
1. add TreeString and LineString
2. all string fucntions fit new construction

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5X82Y
Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I6c6ded38ee67741b5c0f17f19b72e68a4375b303
2022-11-25 16:39:45 +08:00
zhaozhibo
96778b140c fix codex and codeCheck warnings
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-10-13 20:08:24 +08:00
zhaozhibo
48537bc995 fix codex and codeCheck warnings
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-09-26 20:26:14 +08:00
wanghuan
fb87d25973 ecmastring interface refractor
desc: ecmastring interface refractor

solu:
1.add EcmaStringAccessor to provide interfaces outer;
2.package interfaces to not expose internal implementation.

issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5NYV4
Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I3d9da61068e6374372d75fecfb144e82d4fc4eb6
2022-09-23 16:29:26 +08:00
yuan-yao14
866e566b23 Optimize Builitin-string Replace And fix Ecmastring Bugs
Description:
 1. Optimize Builtin-string according to perf data
 2. Fix Ecmastring bugs when copying strings

Issues: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5LJ5C

Signed-off-by: yuan-yao14 <yuanyao14@huawei.com>
Change-Id: I0435387713e8069e9e82a831ddf0e38ff77cbe02
2022-08-10 09:08:42 +08:00