Commit Graph

52 Commits

Author SHA1 Message Date
Mikhail Ivanov
bf588e5ffa Fix exception message thrown when object is not of type TypedArray
Signed-off-by: Mikhail Ivanov <ivanov.mikhail2@huawei.com>
Change-Id: Id2800b04cac12c73cbfd1354ebfd8260ed08acd3
2024-04-23 14:16:08 +08:00
openharmony_ci
bb808b9973
!6875 CallBuiltinStub bugfix
Merge pull request !6875 from zhangyukun8/master
2024-04-18 01:40:52 +00:00
yang-19970325
f0037defe0 Add UT
Signed-off-by: yang-19970325 <yangyang585@huawei.com>
Change-Id: Ia804f45a24ef70e1cccfc36af785972bf72609a4
2024-04-17 16:39:28 +08:00
zhangyukun8
a805844282 CallBuiltinStub bugfix
1. Fix callsigature of builtincallwithargv
2. Remove call(rather than new) builtin constructor stub
3. AOT tail call builtin stub bugfix
4. Protect argv for AOT calling builtin constructor stub

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I9FZMK?from=project-issue
Signed-off-by: zhangyukun8 <zhangyukun8@huawei.com>
Change-Id: I3f811db07de1ff3589c28af9cc4d18140b623bdb
2024-04-16 09:56:57 +08:00
yang-19970325
d731ec8de3 Signed-off-by: yang-19970325 <yangyang585@huawei.com>
Change-Id: I5e12850f4130d555683cd52dd6aa0665899dd146
2024-04-14 23:11:38 +08:00
lukai
7bcefab90b Bugfix: Sharedobject refers a local object
Sharedobject refers a local object bugfix which causes memory exception.
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I9GE7W?from=project-issue

Signed-off-by: lukai <lukai25@huawei.com>
Change-Id: I1ab098fe0325eb7144175f0d04ce23856f61082a
2024-04-13 21:38:51 +08:00
openharmony_ci
8b376fa97a
!6724 SENDABLE_JSON support parse Sendable objects
Merge pull request !6724 from yangcheng/master
2024-04-09 10:13:38 +00:00
zhangyouyou
cdc56dfbf8 GetCallSpreadArgs 指令IR化修改
Signed-off-by: zhangyouyou <zhangyouyou2@huawei.com>
2024-04-07 16:53:42 +08:00
yangcheng
ee51090484 support SENDABLE_JSON parse return sendable object
Signed-off-by: yangcheng <yangcheng89@huawei.com>
2024-04-06 15:43:22 +08:00
wupengyong
58cf448126 Reason:modify builtins stub frame
Iuuse:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I9BOIJ?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I42c9441148c73928df74457695585ecb8dfe65d8
2024-03-27 17:00:47 +08:00
Malinin Andrey
824d65cce9 Map and Set Constructors IR implementation
Issue: #I95RB9
Change-Id: I1f3f60e4fecbb731008d4e86e054a6f4e1c219b9
Signed-off-by: Malinin Andrey <malinin.andrey@huawei-partners.com>
2024-03-14 19:32:32 +08:00
xiaoweidong
0f4dd9fa1b [JIT] export libark_jsruntime.so symbols for libark_jsoptimizer.so
ISSUE:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8UZN0

Change-Id: If5e76b9da12114f6b8717824427af4a6ceedea5c
Signed-off-by: xiaoweidong <xiaoweidong@huawei.com>
2024-01-25 12:24:36 +08:00
hzzhouzebin
ffb4ea9b5f CheckSendableSubClass
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8VLJY
Signed-off-by: hzzhouzebin <zhouzebin1@huawei.com>
Change-Id: I7a6981df463b5e21be613a043ee5fae196401c36
2024-01-12 11:57:05 +08:00
hzzhouzebin
9484c02ec6 Support Object proto function check
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8S6ZF
Signed-off-by: hzzhouzebin <zhouzebin1@huawei.com>
Change-Id: I321dc81448dbdb188c896c149bf535676dca33b8
2023-12-29 12:28:21 +08:00
hzzhouzebin
85f30d1a11 Add UT for shared checking
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8QUU0
Signed-off-by: hzzhouzebin <zhouzebin1@huawei.com>
Change-Id: I8ac4ca085e95b066543ead9b52ff894395ce2902
2023-12-25 13:52:06 +08:00
hzzhouzebin
444db026e8 Revert Immutable
Signed-off-by: hzzhouzebin <zhouzebin1@huawei.com>
Change-Id: Ic45423dee3c8d54b1e6eb82cfbd8312a95090382
2023-12-24 15:13:16 +08:00
hzzhouzebin
fa9ea682c8 fix code review for shared check
Signed-off-by: hzzhouzebin <zhouzebin1@huawei.com>
Change-Id: I352becaec9fecb9cca5fa00d32274e77a03617b3
2023-12-24 15:12:42 +08:00
Zhenyu Pan
d2ddf80032 Merge remote-tracking branch 'ets_runtime/master' into test2
Signed-off-by: Zhenyu Pan <panzhenyu1@huawei.com>
Change-Id: I93bd738d08e7821daa0d9673e88c6c7415b543e8
2023-12-21 21:30:05 +08:00
hzzhouzebin
af96c3837b Check share-obj's parent
Signed-off-by: hzzhouzebin <zhouzebin1@huawei.com>
Change-Id: I9274c4068bcc0b8e8e6fb4b6f89ee3f8af702722
2023-12-21 20:11:20 +08:00
hzzhouzebin
de7ac06d42 Add Immutable check
Signed-off-by: hzzhouzebin <zhouzebin1@huawei.com>
Change-Id: Idbec4b97ad6374cc89a7f39372b9e95f238e4c88
2023-12-21 20:11:20 +08:00
hzzhouzebin
db88ac8312 Add type checking when update share-obj
Signed-off-by: hzzhouzebin <zhouzebin1@huawei.com>
Change-Id: I5144757bc7fd75ba2bbbabe8f05e53ea11764db2
2023-12-21 20:11:20 +08:00
hzzhouzebin
b2d2469dfc remove share-obj's read check and seal share-obj
Signed-off-by: hzzhouzebin <zhouzebin1@huawei.com>
Change-Id: I3fe3d8a9de08dc2d82998679f97a831b9d8e40fa
2023-12-21 20:11:20 +08:00
hzzhouzebin
5b838d0963 Add shared checking for non-ic secnario
Signed-off-by: hzzhouzebin <zhouzebin1@huawei.com>
Change-Id: I44afc653c23bc8ffef224c7e82d501820ba871a6
2023-12-21 20:11:20 +08:00
K0u1hw
bfeb03a429 Dump ReadOnly Crash As Info Level
Issues: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8OERN
Signed-off-by: K0u1hw <wangchunyang15@huawei.com>

Change-Id: Iebd78e181f9312ce79dd6f96ce05bc156fe7f3e0
2023-12-14 15:08:25 +08:00
K0u1hw
ad17ee80e9 Print Detail For ReadOnly Property JSCrash
Issues: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8NUHZ

Signed-off-by: K0u1hw <wangchunyang15@huawei.com>
Change-Id: I23e2959e2f42dae1e84b4a09b5765fdd9b1ccee2
2023-12-12 20:28:44 +08:00
zhangyouyou
cd94d8214a DeletePropertyOrThrow IR化
Signed-off-by: zhangyouyou <zhangyouyou2@huawei.com>
2023-11-21 11:01:55 +08:00
Han
b4e7d18f21 arraymap没有找原型链上的数据
Signed-off-by: hwx1163501 <hanjing35@huawei.com>
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8FGGJ
2023-11-14 14:23:46 +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
c1aa7ecd82 Reason:add function apply builtins ir
Description:add function apply ir
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6Y5E4?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: Ie5ade286a56c5237175476a6a0b915558b87c454
2023-04-24 21:03:55 +08:00
yingguofeng@huawei.com
a6ddc25b6e feat>(compiler): PGO type profiler
1、PGO Support type profiler for asm interpreter
    2、Optimization function call profiler
    3、ap version promote to 0.0.0.2
    4、Adaptor number speculative phase supporting pgo type

link #I6JPH4

Change-Id: I18043c4f99af93e5ba6eb2e895039fe0edfe5b4e
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2023-03-30 20:39:06 +08:00
xujie
e9f3f18835 Add builtins array constructor stub
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I64K3J
Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: I6ae6adc53b00eb43c9879c46a92fa15c13486ef9
2022-12-06 16:13:35 +08:00
openharmony_ci
5262acdd74
!3136 Add DateConstructor in builtins stubs
Merge pull request !3136 from dingding/ir_DateConstructor
2022-12-05 11:36:51 +00:00
ding
1d0c851fcd Add DateConstructor in builtins stubs
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I649EV

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: I22d1b4f2ec92f45c04b816c3a35e7a43ab6d9922
2022-12-05 15:56:32 +08:00
wupengyong
60b5039d3f reason:add Assert in stub
description:add Assert in stub
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I63R7H?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I9bf81836163f300f8121dc8586c4db741a66b45d
2022-12-02 11:41:58 +08:00
ding
d37f6d4596 AOT and ASM-Interpreter share builtins stub with call and new
1.Support new Builtins Constructor in Builtins Stub framework.
2.Support invoking Builtins Stub both ASM interpreter and AOT.
3.Add BooleanCosntructor implementation in Builtins Stub.
4.Add new log component: builtins
5.Add corresponding test case which can trace builtins execution path.
6.Add iterate stack map handler when entering by assembler.

Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I631G9

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: Ie3a485a0383464ecc0b42be0a21baf50bb35bc21
2022-11-28 19:15:55 +08:00
wupengyong
380c5905ce reason:add assert in asm interpreter
description:add assert in asm interpreter
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I603UA?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: Ib23b1ec3b78af1600e7a34f81ef9bd9836ee5720
2022-11-10 20:07:42 +08:00
songzhengchao
769df90e1f AOT Builtin Math Function Lowering
1 On current AOT Builtin Math is called by c++ runtime trampoline, which is not an efficient solution.
thus we call target math function directly.
2 CallNGCRuntime save bc offset When Aot call cc fucntion

issue:https://gitee.com/open_harmony/dashboard?issue_id=I5Z281

Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I3768bfaf46b15749e37e1eb290e8fb1a3d75ea88
2022-11-10 16:37:28 +08:00
lvfuqing
6751f21ece InstanceOf IR
issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5M5ND
Change-Id: Ib8b5988eefd8a0455fc70b44bab04d6a4c803f3f

Signed-off-by: lvfuqing <lvfuqing1@huawei.com>
Change-Id: I4e80b33e01eb823c3e482eb2451ab71dcc931bbb
2022-09-26 22:00:58 +08:00
sunzhe23
08621335a7 implments new asm interpreter opcode
Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-08-27 15:11:52 +08:00
wupengyong
eef2380567 reason:add buitins stub
description:add buitins stub
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5HCIM?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I4673f7f1443a8a9f6a3c01985f219e50ddb024fa
2022-08-04 17:27:44 +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
wanghuan
59d4874e0b move interpreter helper stubs from common stub to bc stub
desc: move interpreter helper stubs from common stub to bc stub, beacuse these stubs' signatures are the same and need not construct frame pointer like bc stub.

solu:
1. delete old helper stub define in common stub, and add new helper stub define in bc stub.
2. add new targetKind in CallSignature to distinguish helper and normal stub in loading stub.
3. delete argc in stub define.

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I556K1
Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I46224e4568b45794aa1bac97682afc41696d5faa
2022-04-28 21:14:18 +08:00
getingke
937a6af1a6 JSFunction call have 4 scenariso:
1.JSFunction
	call native code when method is native
	jump to compiled code for aot JSFunction
	call asm interpreter entry for BC method
2. JSBoundFunction
	Bind Arguments for Bound target function, then recursive call this trampoline function.
3. JSProxy
	Call proxy's target jsfunction.
4. NonCallable
	Throw typerror exception.

issue https://gitee.com/openharmony/ark_js_runtime/issues/I51OWV?from=project-issue

Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I85917e3cf1ffec0cc1e39de5fc20bd606947c968
2022-04-11 15:49:51 +08:00
zhangyukun
3fe8526362 Refactor bytecode dispatch of bytecode in asm interpreter
1. add HandleOverflow in unused positions of bcHandlers
2. add bytecode helper at the end of bcHandlers
3. Refactor Dispatch
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4YIQG?from=project-issue

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: Id51d1f2cc3c86f8fa1a59f6e79024bef406f7a21
2022-03-21 16:16:51 +08:00
wuzhefeng
0c64ae9897 Fix compilation errors
Because there are some macros that trigger compilation errors when
compiling stub-compiler and aot-compiler. The root cause is that several
classes declarations are missing from the associated macros. This PR
fixes the issues via adding the lost classes to the macros. Besides, we
also rename the FastStub to CommonStubs in order to make the stub-arch
more readable.

Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4YKBN

Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: I16263fef7deeadf8a9ce4e5252a6e9898a7742bc
2022-03-18 18:17:21 -07:00
luochuhao
905d0496dc 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
lichenshuai
e6b8f48f69 Add Call Stub
Change several structures for call stub.

Related issue: #I4XK12

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ie7389ff96c619451304a3f0d352b271310c4b73e
2022-03-15 17:36:58 +08:00
zhangyukun
b981d1ab15 Add stub name log of asm interpreter
In debug mode, print stub name of asm interpreter stub to
help us find which stub exists the problem
Add new DebugPrint format to support print int32 value

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: Iae39213572de99cc4089a172092184399ba8c5d0
2022-03-09 15:16:09 +08:00
xliu
9849598f97 1.add arraylist and ArkPrivate. 2.add special container in stub. 3.fix Switch
Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: I4082326fa075bce0c5c7bf8e6873282086fe5d6e
2022-01-04 19:30:40 +08:00
wupengyong
50ee964a21 add function call and bugfix ThrowTypeAndReturn
Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I085d81d00b00a0b49daa0d28af591b83dc1c9759
2021-10-18 20:57:06 +08:00