Commit Graph

129 Commits

Author SHA1 Message Date
openharmony_ci
aa2cbd48b4
!4699 修复Array.prototype.with(), Array.prototype.toSpliced(),Array.prototype.toReversed()存在问题
Merge pull request !4699 from shen-zhebei/master
2023-09-01 07:51:07 +00:00
shen-zhebei
4af173b6d8 Fix array problems
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7VXZ8wq

Signed-off-by: shen-zhebei <1246431727@qq.com>
Change-Id: Iae8ed9ab4fa45e8f94e1c6d069585293c442fd73
2023-08-29 10:01:29 +08:00
Onlynagesha
8a41bb695e Optimizes Array.prototype.reverse for stable arrays
Optimizes Array.prototype.reverse for stable arrays by eliminating
unnecessary Get/Set operations, replacing with raw TaggedType data manipulation.
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7VQSX

Signed-off-by: Onlynagesha <orina_zju@163.com>
Change-Id: I2ba6df75e6823a3b4bb5d78315525307fc746eb2
2023-08-29 09:29:23 +08:00
openharmony_ci
dd771f6f1e
!4670 Add ComputeElementCapacityHighGrowth
Merge pull request !4670 from maojunwei/array_opt
2023-08-25 09:40:30 +00:00
maojunwei
1bfe8ae21b Add ComputeElementCapacityHighGrowth
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7VCIP

Signed-off-by: maojunwei <maojunwei1@huawei.com>
Change-Id: I2196d72cf8d7a6fbef481321e7cff562b778c16a
2023-08-25 16:10:00 +08:00
hwx1163501
ba488524b3 Modifying Code Alarms
Signed-off-by: hwx1163501 <hanjing35@huawei.com>
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7VR8O
2023-08-24 20:25:18 +08:00
openharmony_ci
f367dcb23a
!4651 修复Mac环境下js_stable_array.cpp的编译问题
Merge pull request !4651 from Onlynagesha/dev-builtin-2
2023-08-22 02:54:35 +00:00
Onlynagesha
208d39f709 Bugfix: Compilation issue in js_stable_array.cpp
Fixes a compilation bug on Mac platform.
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7UXUJ

Signed-off-by: Onlynagesha <orina_zju@163.com>
Change-Id: Ia5c1bd70a6e36b1e224b7524048c629510d95857
2023-08-22 09:57:37 +08:00
openharmony_ci
2f2e5289a6
!4614 Array.prototype.indexOf与Array.prototype.lastIndexOf实现stable array的性能优化
Merge pull request !4614 from Onlynagesha/dev-builtin-2
2023-08-21 13:04:33 +00:00
Onlynagesha
721d6147fa Optimizes Array.prototype.indexOf and Array.prototype.lastIndexOf
Optimizes the stable array case where elements are stored contiguously
by eliminating redundant type checks during comparison.
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7PE80

Signed-off-by: Onlynagesha <orina_zju@163.com>
Change-Id: I95e3a4d9270f48ce18aff41a252f71c699ef0ce4
2023-08-21 17:37:52 +08:00
openharmony_ci
ae6079d190
!4640 opt array.reverse & bugfix
Merge pull request !4640 from maojunwei/array_opt
2023-08-21 07:39:05 +00:00
dov1s
397d2a06fc opt array.reverse
issue:I7U339

Signed-off-by: dov1s <maojunwei1@huawei.com>
Change-Id: I8f35e19dfcc898039749f19ab9b4b722d6f74f7b
2023-08-21 09:42:49 +08:00
openharmony_ci
1467f8f1fc
!4629 运行ABC文件过程中,函数panda::ecmascript::builtins::BuiltinsTypedArray::Set存在堆越界写漏洞
Merge pull request !4629 from 王笑佳/master
2023-08-19 10:04:13 +00:00
王笑佳
e1affc730c Fix 函数panda::ecmascript::builtins::BuiltinsTypedArray::Set存在堆越界写漏洞
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7TB6W

Signed-off-by: 王笑佳 <wangxiaojia5@huawei.com>
2023-08-18 16:46:17 +08:00
dov1s
dc38dc6647 optimize array.slice
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7TBM5

Signed-off-by: dov1s <maojunwei1@huawei.com>
Change-Id: I7a7af9bc1ad35718bcf55f791d331ca9971fe38b
2023-08-17 19:39:03 +08:00
zha.wei
22ea93f87f description:合并冲突
Signed-off-by: zha.wei <zhawei@kaihong.com>
2023-08-14 11:59:07 +08:00
zha.wei
0d11cd9683 description:解决冲突
Signed-off-by: zha.wei <zhawei@kaihong.com>
2023-08-11 10:49:17 +08:00
wuwenlu
26784cd235 Add findLast and findLastIndex for Array.prototype and %TypedArray%.prototype
Signed-off-by: wuwenlu <wuwenlu@kaihong.com>
2023-08-09 01:16:04 -07:00
zha.wei
10a2fb5037 fix codecheck warnings magic number
Signed-off-by: zha.wei <zhawei@kaihong.com>
2023-08-09 11:39:47 +08:00
查维
f0d930084a Merge branch 'master' of gitee.com:openharmony/arkcompiler_ets_runtime into master
Signed-off-by: 查维 <zhawei@kaihong.com>
2023-08-09 02:29:46 +00:00
查维
8bbbd69fef
update ecmascript/js_stable_array.cpp.
Signed-off-by: 查维 <zhawei@kaihong.com>
2023-08-09 02:23:04 +00:00
查维
ca768d783d Merge branch 'master' of gitee.com:openharmony/arkcompiler_ets_runtime into master
Signed-off-by: 查维 <zhawei@kaihong.com>
2023-08-09 02:21:22 +00:00
查维
162ff9eb9c Merge branch 'master' of gitee.com:openharmony/arkcompiler_ets_runtime into master
Signed-off-by: 查维 <zhawei@kaihong.com>
2023-08-09 02:18:36 +00:00
maojunwei
ef6fd9f3d7 Optimize Array.reduce
issue:I7QMTO

Signed-off-by: maojunwei <maojunwei1@huawei.com>
Change-Id: I536f305d1c7a9b589e6085b476b818a5cc4c49d1
2023-08-08 16:19:40 +08:00
查维
038fe7a550
update ecmascript/js_stable_array.cpp.
Signed-off-by: 查维 <zhawei@kaihong.com>
2023-08-07 08:36:22 +00:00
查维
3fe02da63a
update ecmascript/js_stable_array.cpp.
Signed-off-by: 查维 <zhawei@kaihong.com>
2023-08-07 08:30:42 +00:00
zha.wei
5767287241 description:code review issue fix
Signed-off-by: zha.wei <zhawei@kaihong.com>
2023-07-26 17:51:13 +08:00
zha.wei
be5f97cacf description:add js_stable_array ut test case
Signed-off-by: zha.wei <zhawei@kaihong.com>
2023-07-26 16:41:48 +08:00
zha.wei
9a3ea6233f description:code review error fix
Signed-off-by: zha.wei <zhawei@kaihong.com>
2023-07-26 09:55:09 +08:00
quiet-thought
3442c34d96 Bugfix on JSStableArray::FastCopyFromArrayToTypedArray
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7NUZM

Signed-off-by: quiet-thought <chenjingxiang1@huawei.com>
Change-Id: I0f2f6c8e3c484d62e1bc53594641ca1bda1bd452
2023-07-25 20:44:21 +08:00
zha.wei
def270e6fd description:ECMAScript 2023 支持Array.prototype.toSpliced方法
Signed-off-by: zha.wei <zhawei@kaihong.com>
2023-07-24 09:24:32 -07:00
quiet-thought
88dc8aab97 Bugfix on BuiltinsArray::Join cicular reference problem
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7NB0T

Signed-off-by: quiet-thought <chenjingxiang1@huawei.com>
Change-Id: Ie63a9f76b0dcdee0e9422b6fa8e8886a78256c96
2023-07-24 15:58:59 +08:00
zha.wei
1eecc5aff1 ECMA Script规范2023 array/TaggedArray.prototype.with
Signed-off-by: zha.wei <zhawei@kaihong.com>
2023-07-21 18:01:56 +08:00
hwx1163501
2785546c22 Modifying Code Alarms
Signed-off-by: hwx1163501 <hanjing35@huawei.com>
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7LOU0
2023-07-18 10:01:28 +08:00
zha.wei
ad4e4395f1 description:code check error fix
Signed-off-by: zha.wei <zhawei@kaihong.com>
2023-07-14 10:44:59 +08:00
quiet-thought
f596e410db The caller of NewRuntimeCallInfo fails to promptly return an exception
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7K7L6

Signed-off-by: quiet-thought <chenjingxiang1@huawei.com>
Change-Id: I69a5e2f415a51d7caf5aab5fdf7c2fe1de5da5c4
2023-07-14 10:18:21 +08:00
zha.wei
96483175aa description:ECMA Script 2023规范-支持Array/TaggedArray prototype.toReversed
Signed-off-by: zha.wei <zhawei@kaihong.com>
2023-07-13 19:34:22 +08:00
王笑佳
f2c60fbed0 Fix THROW_TYPE_ERROR_AND_RETURN Part 1
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7JU9Q

Signed-off-by: 王笑佳 <wangxiaojia5@huawei.com>
2023-07-10 10:24:40 +08:00
查维
b8dea93bc9
update ecmascript/js_stable_array.cpp.
Signed-off-by: 查维 <zhawei@kaihong.com>
2023-07-06 05:49:07 +00:00
zha.wei
f8e4c5ea4a description:ECMA 2022规范支持TaggedArray.At
Signed-off-by: zha.wei <zhawei@kaihong.com>
2023-06-28 11:38:24 +08:00
王笑佳
7e3170f617 函数panda::ecmascript::JSStableArray::Pop存在堆内存越界访问漏洞
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7E784

Signed-off-by: 王笑佳 <wangxiaojia5@huawei.com>
2023-06-19 10:39:24 +08:00
openharmony_ci
d6d1854875
!4240 Fix GetPropertyByIndex
Merge pull request !4240 from maojunwei/master
2023-06-16 09:17:30 +00:00
王笑佳
dc86ff3920 函数panda::ecmascript::JSTaggedValue::StrictEqual存在空指针异常拒绝服务漏洞
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7DLDS

Signed-off-by: 王笑佳 <wangxiaojia5@huawei.com>
2023-06-16 10:56:19 +08:00
maojunwei
96136b3428 Fix GetPropertyByIndex
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7D85R

Signed-off-by: maojunwei <maojunwei1@huawei.com>
Change-Id: I87406d35d0fcdb1df15091d0c53dd220c1a5e7ec
2023-06-15 17:17:35 +08:00
openharmony_ci
1ca84d4e0c
!4071 Fix FastCopyElementFromArray
Merge pull request !4071 from maojunwei/array_fix
2023-05-18 09:24:31 +00:00
maojunwei
541596c236 Fix FastCopyElementFromArray
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I73JFA?from=project-issue

Signed-off-by: maojunwei <maojunwei1@huawei.com>
Change-Id: Ie134551661252c238b300a422703096a98ce0bc3
2023-05-18 09:37:07 +08:00
quiet-thought
71219d8972 Bugfix on Array.Join
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6ZEY4

Signed-off-by: quiet-thought <chenjingxiang1@huawei.com>
Change-Id: Ia87b9f9626bf6cdba1ff38cdd1e5a7af4a786a52
2023-04-27 17:25:50 +08:00
yuanyao
f09994eb01 BugFix of Array::Splice
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6UCFA

Signed-off-by: yuanyao <yuanyao14@huawei.com>
Change-Id: If9ff14747ee5918f34cf225c24ee03a819b773c3
2023-04-10 17:34:13 +08:00
wangzhaoyong
b001990839 Modify the variable name and function name for typedarray and bytearray
issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6CVK5

Signed-off-by: wangzhaoyong <wangzhaoyong@huawei.com>
Change-Id: I95967687ededc8654448132baa7a6ca3c4e4f2bf
2023-02-06 19:40:56 +08:00
quiet-thought
859be30072 Fix stable array foreach problem
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I69HXO

Signed-off-by: quiet-thought <chenjingxiang1@huawei.com>
Change-Id: Iff1e90f2e892efda6e1f9e51d9f0d505a9f1c1a1
2023-01-09 17:14:42 +08:00
lichenshuai
e191c329e4 Bugfix for Array Return Hole
Fix JSStableArray::Pop() return Hole bug.

Issue: I65VQI

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: I78241a9cdaf699227172eec07e0f16d0a8dabae6
2022-12-13 15:02:20 +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
Zhenyu Pan
7fb7ec3107 Fix crash caused by uncaught exception
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5XZRO

Signed-off-by: Zhenyu Pan <panzhenyu1@huawei.com>
Change-Id: Id01c15717f6133553abced9c71765569d41f9ef4
2022-10-29 17:55:25 +08:00
xiongluo
1291aa23a9 cow array optimize
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5V3ET?from=project-issue

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-10-26 11:37:49 +08:00
zhaozhibo
efd921e810 fix codex warnings
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-10-10 18:00:13 +08:00
yaochaonan
cf04616373 bugfix TypedArray::Set handle
------------------------------------------
https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5TSX5?from=project-issue
bugfix using element without handle
-----------------------------------------

Signed-off-by: yaochaonan <yaochaonan@huawei.com>
Change-Id: I7e15992e2ba51f478b15ee1e7bbf5486cc4bba7f
2022-09-29 21:46:24 +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
zhaozhibo
840e161b40 fix codex and codeCheck warnings
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-09-15 16:26:32 +08:00
openharmony_ci
2c7dcd65b2
!2330 Modify unreasonable type of double in Array and typeArray
Merge pull request !2330 from huangzhenghua/double2int
2022-09-13 03:12:22 +00:00
huangzhenghua
269bdc5d5e Modify unreasonable double type
issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5QF0H
Signed-off-by: huangzhenghua <huangzhenghua3@huawei.com>

Modify the function of array, arrayHelper, typeArray, typeArrarHelper

Change-Id: Ib0c1c77de232b2d18b983ef0377e550bf513e067
2022-09-09 22:43:01 +08:00
xdmal
eb0ebc0361 Fix Array crash when switching between multiple users.
Fix Array crash when switching between multiple users.

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

Signed-off-by: xdmal <maxiaodong16@huawei.com>
2022-09-06 09:16:22 +08:00
xdmal
46dd7d0add Optimize filter, reverse and sort in Array
Optimize filter, reverse and sort in Array

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

Signed-off-by: xdmal <maxiaodong16@huawei.com>
2022-08-27 20:03:12 +08:00
小马奔腾
54e78290d9 Merge branch 'master' of gitee.com:openharmony/arkcompiler_ets_runtime into master 2022-08-10 08:36:31 +00:00
xdmal
cbf6c98007 Optimize interface in array
Optimize interface in array

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

Signed-off-by: xdmal <maxiaodong16@huawei.com>
2022-08-10 16:34:54 +08:00
lijiamin
970f40e89e Modify numArgs from int32_t to uint32_t
Signed-off-by: lijiamin <lijiamin24@huawei.com>
Change-Id: If92a6b948356799b37987eaa4043b12e9bd72e98
2022-08-05 17:06:00 +08:00
xdmal
b260eedb1b Fix array part 262 use case fail in debug mode
Fix array part 262 use case fail in debug mode

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

Signed-off-by: xdmal <maxiaodong16@huawei.com>
2022-07-26 11:10:49 +08:00
openharmony_ci
c29332c1d9 !1833 fix fuzztest errro and add new fuzztest
Merge pull request !1833 from zhaozhibo/master

Change-Id: I1e83c46e25d0a7c342e5c8e7ca5ff61c745b7582
2022-07-25 08:49:51 +08:00
xliu
4b27184ed7 Constpool object moved to old age
Description
  1.GC is frequent during constpool parsing
  2.Constpool object moved to old age allocation
Issue:
  https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5I8YT

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: I0c88597f56a3ff60337fd21fa2d09d1dac004973
2022-07-23 11:31:35 +08:00
xdmal
8018643d5b Optimize interface in array
Optimize interface in array

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

Signed-off-by: xdmal <maxiaodong16@huawei.com>
2022-07-22 11:05:16 +08:00
hjzhangcm
a5375d8bca fix codex warning
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-07-07 17:33:05 +08:00
Rtangyu
9239bf226e fix json new array join bug
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I5DFL0

Signed-off-by: Rtangyu <rentangyu@huawei.com>
2022-06-23 10:29:49 +08:00
xliu
d364f99e52 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
zhaozhibo
c239b44d80 fix codeDex warning(3)
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-04-17 15:23:43 +08:00
zhaozhibo
cc222126ad fix codeDex warning.
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-04-14 10:56:51 +08:00
wengchangcheng
99934b9037 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
wengchangcheng
839f39e500 modify ACCESSOR for EcmaString and TaggedArray
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I2995dc75ed34e8eb2bf249f2cced62ec9d91250e
2022-01-17 11:51:50 +08:00
zhangyukun
a97747fe18 Description:sync from code from wgr_master to ohos
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: Ic66a9e649de8c0ce530483296fe323b8f50621fb
2021-12-21 09:36:03 +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