Commit Graph

239 Commits

Author SHA1 Message Date
openharmony_ci
b98a4f3547
!1029 Support watch expression and condtional breakpoint
Merge pull request !1029 from Gymee/feature_watch
2022-04-18 14:13:30 +00:00
Gymee
69094056b8 support watch expression and conditional breakpoint
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I794a5ee770f251e6fea4de5058575519ff0490e6
2022-04-18 20:04:33 +08:00
songzhengchao
a979a3cff0 1 bug fix compile bc/common stub vm setup load stub
2 rename glue type POINTER TO NATIVE_POINTER
3 when function need call another js function, it will lowering to call "JSCall" trampoline function
JSCall trampoline function will check calltarget function, then correct the arguments, finally jump
the native or optimized code address of the target function.

JSCall(glue, argc, calltarget, ....)
then proxy call(glue, argc, callTarget, argv[])
        if proxy->GetHandler is function
            tail call JSCall(glue, argc, callTarget, argv); // consider performance
        else
            //Call(trap, handler, «target, thisArgument, argArray»)
            call CreateArrayFromList(glue, argc, argv[]) ---> arrHandle  // maybe trigger GC, construct OptimizedWithArgvLeaveFrame, visitor argv[0]..argv[argc-1]
            call JSCall(glue, argc, method, argv[])
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I52T6B?from=project-issue

Change-Id: I650ff10b35bc085ec81e7734ce35501ee23fbb62
2022-04-18 11:36:41 +08:00
songzhengchao
fe2aebc9af refactor llvm_ir_builder.cpp call
bug fix OptimizedWithArgvLeaveFrameHandler::Iterate bug

issue:https://gitee.com/openharmony/ark_js_runtime/issues/I52T6B?from=project-issue
Signed-off-by: songzhengchao <surpassgoodchao@qq.com>
2022-04-17 22:32:54 +08:00
zhaozhibo
4c106a7632 Merge branch 'master' of gitee.com:openharmony/ark_js_runtime into master 2022-04-17 07:24:50 +00:00
zhaozhibo
c239b44d80 fix codeDex warning(3)
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-04-17 15:23:43 +08:00
wengchangcheng
d9c9d6789f Descriptor: debugger refactor
details:
1. debugger refactor, don't use runtime debugger
2. fix debugger crash

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I08e3c86bf659b9e0a44d014d13b11462d50218b3
2022-04-17 01:16:26 +08:00
songzhengchao
4036b0598e Merge remote-tracking branch 'szc/proxy0413'
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I2a370b8803299c88109cbeb0f799acbdda53c2e9
2022-04-16 10:59:11 +08:00
guobingbing
aeacc821fa entry frame adapter asm
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: Ied740af77e0f770e01f948c86b5f13d4877672ad
2022-04-15 18:23:40 +08:00
songzhengchao
2eb673cbff Implement Proxy Lowering on x86
when function need call another js function, it will lowering to call "JSCall" trampoline function
JSCall trampoline function will check calltarget function, then correct the arguments, finally jump
the native or optimized code address of the target function.

JSCall(glue, argc, calltarget, ....)
then proxy call(glue, argc, callTarget, argv[])
        if proxy->GetHandler is function
            tail call JSCall(glue, argc, callTarget, argv); // consider performance
        else
            //Call(trap, handler, «target, thisArgument, argArray»)
            call CreateArrayFromList(glue, argc, argv[]) ---> arrHandle  // maybe trigger GC, construct OptimizedWithArgvLeaveFrame, visitor argv[0]..argv[argc-1]
            call JSCall(glue, argc, method, argv[])
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I52T6B?from=project-issue

Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I994aae1eb9cbf51982348ae6e203c24c326f617e
2022-04-15 16:39:42 +08:00
openharmony_ci
6bcf45865a
!972 Add Container Plainarray
Merge pull request !972 from zhangjixing/container_plainarray
2022-04-15 06:54:59 +00:00
zhangjixing
eafc261ff6 Add Container Plainarray
Description
  To ensure the high performance of container classes, Plainarray is
   provided in ark.
Related issue
   #I4XXYA:Add Container Plainarray

Signed-off-by: zhangjixing <zhangjixing4@huawei.com>
2022-04-15 13:11:55 +08:00
ding
b018a9b0f2 Control whether to print compiler logs through JSRuntime Options
Add option log-compiled-methods to print the compiler(both stub and aot) in units of methods.

Add class CompilerLog.

Refactor some compiler logs.

Unie the log invoked way(COMPILER_LOG or COMPILER_OPTIONAL_LOG).

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: I43ce61d0ba9d453713ab3e6349d07f6d9cde3e5e
2022-04-14 16:14:34 +08:00
openharmony_ci
f49d93278d
!988 fix codeDex warning.
Merge pull request !988 from zhaozhibo/master
2022-04-14 07:39:17 +00:00
zhaozhibo
34649fc073 Merge branch 'master' of gitee.com:openharmony/ark_js_runtime into master 2022-04-14 02:57:27 +00:00
zhaozhibo
cc222126ad fix codeDex warning.
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-04-14 10:56:51 +08:00
g00416891
e26de83f8b bugfix of two entry frame when have exception.
Signed-off-by: g00416891 <guobingbing3@huawei.com>
Change-Id: I904162cc60003bc28c59b7aca4c168ad88e55594
2022-04-13 19:53:15 +08:00
openharmony_ci
19634500ab
!986 modify shr and ashr handle
Merge pull request !986 from wanghuan2022/master
2022-04-13 03:51:13 +00:00
wengchangcheng
ec936d57e4 Descriptor: fix stack overflow
details:
1. increase stack size
2. modify check stack overflow error
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I52EUX

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ic5a3cf880288de8eb98b081f839679b8acef3026
2022-04-12 23:57:04 +08:00
wanghuan
6f545e31a7 modify shr and ashr handle
desc: shr should be unsigned right shift, and ashr should be signed right shift. But they are reversed. So modify them.

solu:
1. reverse shr and ashr handle
2. delete unused frameHandle

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5292O
Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: Ia329da8bf0ceaa80560601614b592bb448595a29
2022-04-12 16:44:41 +08:00
openharmony_ci
c92e6a6e19
!958 JSFunctionCall Trampoline
Merge pull request !958 from getingke/js_function_call_stub_formal
2022-04-11 14:03:09 +00:00
openharmony_ci
5f071a4724
!930 Fix long gc problem (18ms) in photos app
Merge pull request !930 from xiongluo/fix_long_gc_problem
2022-04-11 07:56:54 +00: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
xiongluo
f421f14e23 Fix long gc duration problem in photos app
Add handle scope to avoid the large number of root nodes.

Remove unnecessary handles in the critical path.

Adjust the parameters in gc to avoid multiple consecutive Old GCs.

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-04-10 20:45:15 -10:00
dingwen
1a2fdbb738 Add snapshot generation step for aot compiler and testing entry of aot compiled function.
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4ZOXH
Signed-off-by: dingwen <dingwen6@huawei.com>

Change-Id: I2a52b06453f48407c418e57b3ce62e710042768b
2022-04-10 14:59:33 +08:00
Hailiang Hu
1dc39ca357 Add AOT Slowpath Lowering
Lowering for NEWLEXENVDYN, NEWLEXENVWITHNAMEDYN, POPLEXENVDYN.

Issue: I51VGS

Signed-off-by: Hailiang Hu <allenpas@huawei.com>
Change-Id: I001c7bd23c03d2dbc0a1647a652c289204a8dc92
2022-04-09 19:35:17 +08:00
xliu
bddb55c976 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
96190e252b FFI optimization for call params
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: I61b820e91b85364e4f41d35ca0172ad059a1b916
2022-04-07 21:13:46 +08:00
openharmony_ci
a6277d8a38
!948 [part-1] delete inl.h, move the definition to the declare head file
Merge pull request !948 from changcheng/fix_inl_head_files_part1
2022-04-07 11:30:16 +00:00
zhangyukun
8c65a79097 Add dispatch of call of x64 and construct frame with rsp in .S
1. use stub to dispatch fast,slow and native paths
2. use rsp to construct frame of x64
https://gitee.com/openharmony/ark_js_runtime/issues/I51G9L?from=project-issue
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: Ib80540df5dbe531f155e5dd9fce556a207171494

Change-Id: I31e6705dd5555a0c2a9070a7ce73b26f77caef80
2022-04-07 14:32:38 +08:00
wengchangcheng
8faa5f9abc [part-1] delete "*-inl.h" of newest codex rule
move the definition to the declare head file

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ieeb0ec96281cda51d0bebd6a2e771fc8d4078306
2022-04-07 14:14:49 +08:00
lichenshuai
2dd61d1d0d Enable Call Stub
Fixed Call Stub bug, Enable Call Stub and synchronize new stackless to interpreter_assembly.

Issue: #I51E2F

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: I2116850e55bc651acc71bc1baa99aa2c4e1b578c
2022-04-06 20:00:22 +08:00
lichenshuai
cfc0b0b12f Add AsmInterpreterFrame
Add AsmInterpreterFrame for ASM.

Issue: #I4YF9X

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: I4efc781a9fca90de4a0aed5b6a91a8122cfa16ab
2022-03-30 10:51:05 +08:00
openharmony_ci
1789e38335
!738 Add Container Deque And Container Stack
Merge pull request !738 from zhangjixing/deque_and_stack
2022-03-30 02:13:32 +00:00
zhangjixing
c6be465406 Add Container Deque And Stack
Description
  To ensure the high performance of container classes, Deque and Stack
  is provided in ark.
Related issue
  #I4X8GV:Add Container Deque And Stack

Signed-off-by: zhangjixing <zhangjixing4@huawei.com>
2022-03-29 18:13:38 +08:00
openharmony_ci
6761eb08d3
!883 Modify the JSHandle of ToNumeric function package
Merge pull request !883 from zhangyouyou/master
2022-03-29 06:41:14 +00:00
zhangyouyou
6df91bba00 add another version directly returning JSHandle to replace this JSTaggedValue::ToNumeric() in these callsites
issues: https://gitee.com/openharmony/ark_js_runtime/issues/I4ZIBP

Signed-off-by: zhangyouyou <zhangyouyou2@huawei.com>
2022-03-29 10:03:49 +08:00
openharmony_ci
38c11aa7d7
!882 add a unit-test for BuiltinsPluralRules and fix icu path
Merge pull request !882 from hjzhangcm/master
2022-03-28 14:53:13 +00:00
wanghuan
1f51d06e85 refactor load stub in jsthread
description: refactor load stub in jsthread

solution:
1.change bcstub、costub、rtstub's name;
2.refactor load stub code, encapsulate adjust bcstub function according define or option

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

Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I8ff0192ff2c20f1625b4dea124532e8b9a0aa3e0
2022-03-28 18:02:36 +08:00
hjzhangcm
1de87f4cf5 add test case for BuiltinsPluralRules
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-03-28 14:43:57 +08:00
openharmony_ci
ace85da215
!879 add Wextra and Werror in gn args
Merge pull request !879 from changcheng/add_gn_arg
2022-03-24 15:36:55 +00: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
openharmony_ci
22103da85d
!871 Instruction interpreter codedex
Merge pull request !871 from zhangyouyou/master
2022-03-24 12:26:54 +00:00
zhangyouyou
c65542e984 https://gitee.com/openharmony/ark_js_runtime/issues/I4ZD8T
Signed-off-by: zhangyouyou <zhangyouyou2@huawei.com>
2022-03-24 15:50:18 +08:00
luochuhao
aa2ef1d5b5 Implement aot file generated step for aot compiler
Implement llvmIRGeneration Pass in aot compiler pipeline.

Rename and reconstruct LLVMStubModule and LLVMModuleAssembler class. Move aot code infos
related to describe current (code size, begin addr, entry offset of each func etc.)  AOT
snippet and corresponding serialization/deserialization func to NEW class called AotCodeInfo.
Move functions related to file reading/writing to NEW class called AotFileManager.

Add new call opcode in circuit IR to differentiate call into common stubs and call into
runtime interfaces without GC.

Adapt js runtime option for above changes.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4ZDY5
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: If0ab5927ad2551fe5567d1c7b18540fbcc38bc15
2022-03-24 15:44:26 +08:00
zhangyouyou
c14868b51e https://gitee.com/openharmony/ark_js_runtime/issues/I4ZD8T
Signed-off-by: zhangyouyou <zhangyouyou2@huawei.com>
2022-03-24 14:39:30 +08:00
zhangyouyou
16423adf11 Bigint adaptation ExpDyn
issues: https://gitee.com/openharmony/ark_js_runtime/issues/I4Z7JK

Signed-off-by: zhangyouyou <zhangyouyou2@huawei.com>
2022-03-23 18:23:45 +08:00
wanghuan
61361a7c3e [feature]add ldbigint and newlexenvwithname stub handle
description: add ldbigint and newlexenvwithname stub handle

reason: add ldbigint and newlexenvwithname stub handle

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

Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I301e7041939f189158058b371a34633bb6c133c2
2022-03-22 21:46:48 +08:00
openharmony_ci
5896b01d50
!790 fix try catch fail in Asminterpreter
Merge pull request !790 from wpy111/master
2022-03-22 07:08:07 +00:00
openharmony_ci
60f850978d
!835 Clean Code For CodeHub Issues
Merge pull request !835 from wanyanglan/master
2022-03-22 04:42:20 +00:00
wanyanglan
bb6022bffc Clean Code For CodeHub Issues
Modified file permissions, word spelling errors, and
programming specifications suggesting EXPECT_EQ instead
of EXPECT_TRUE

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

Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I00eb9be48d481ce2bdaa4a621246ff6c405abecf
2022-03-22 11:34:13 +08:00
wupengyong
3b4fca1521 reason:try catch fail
description:fix try catch fail in AsmInterpreter

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

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: Iac9ae06b46091950c8d93c14201b05a7a9492421
2022-03-22 11:30:26 +08:00
openharmony_ci
1f6c66ef1c
!762 share constpool, and fix some codestyle
Merge pull request !762 from changcheng/fix_codestyle
2022-03-21 15:01:23 +00:00
wengchangcheng
43f23f8eb3 share constpool, and modify some code refactor
1. cache constpool in ecma vm
2. use JSPandaFile instead of panda_file::File
3. make GenerateProgram as a static function
4. add a singleton of JSPandaFileManager::GetInstance()

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ic7ccd66764c3a020e575d4046e1792475d45be6b
2022-03-21 21:46:25 +08:00
xujie
a2a5f2ad63 Clean Code For CodeHub Issues #96-#123 And #250-#264
According to the problems pointed out by the issuer and the
specifications compiled by Huawei, modify the non-compliant
parts of jsruntime.

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

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: Iceb771dfd9f3aa9017205068fc50ab1a63aae08b
2022-03-21 17:09:19 +08:00
sunzhe23
e05044b20e Fix some binary option handlers bug for c-interpreter and asm-interpreter
Description:
1 Fix and/or/xor CastToUint32 bug
2 Fix asm interpreter shr overflow bug

Issues: I4YPC6

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-03-20 20:03:59 -07: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
changjiaxing
29e36e48c8 The bigint instruction is moved backward, and the sdk is compatible with the yellow zone
Signed-off-by: changjiaxing <changjiaxing1@huawei.com>
2022-03-16 17:46:59 +08:00
wanghuan
e4703206fc feature:add asm handle disable range by option
description:add an option to control asm interpreter stub handle disable range in debug mode

reason:add an option to control asm interpreter stub handle disable range in debug mode

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

Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: Ie573a11be453f036cefb9d2eb000b84bb5007e6b
2022-03-16 14:32:47 +08:00
openharmony_ci
f1af474f0e
!748 Add Call Stub
Merge pull request !748 from 李晨帅/master
2022-03-16 04:57:48 +00: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
openharmony_ci
c0406cd2d2
!749 fix ark js stack message
Merge pull request !749 from changcheng/fix_js_stack_message
2022-03-13 10:14:32 +00:00
wengchangcheng
1a9dff9a72 modify exception stack message
https://gitee.com/openharmony/ace_ace_engine/issues/I4XKDL

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I6569cba9cdf0312b88406cd7654a9b71ba015672
2022-03-12 22:57:39 +08:00
sunzhe23
8aa1664de5 refactor runtime trampoline id
Description:
add runtime_trace for runtime trampoline
mov runtime_trampolines.cpp info cmascript/trampoline/
rename FAST_STUB_ID as RUNTIME_CALL_ID

issue: #I4XBC9

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-03-11 02:17:24 -08:00
wupengyong
db0aa88cac reason:enable interpreterAsm Gc
Description:save leaveframe on thread leaveframe and save pc before callruntime

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

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I770f18facaeb7e62f5dc02f280828a8f6a420b6f
2022-03-11 12:46:57 +08:00
zhangyouyou
b744a006be Add bigint type, add related instructions and Napi
Signed-off-by: zhangyouyou <zhangyouyou2@huawei.com>
2022-03-10 21:25:06 +08:00
y00576111
6dc6688270 EcmaScript Standard Module Implementation
Delete the existing module implementation and
re implement the module function according to the ECMA 2018 specification

issue: #I4NZQT [https://gitee.com/openharmony/ark_ts2abc/issues/I4NZQT]

Signed-off-by: y00576111 <yaojian16@huawei.com>
Change-Id: I8d381db7f8bf2f3d6b2a5c21cbc3cbab1aef0b9b
2022-03-10 19:10:42 +08:00
wuzhefeng
ab93e17d09 Refactor JSThread layout and introduce macro for debugging
This PR refactors the design of JSThread by introducing aligned struct,
which is more friendly for ASM-Interpreter and Compiler IRs. Meanwhile,
to facilitate debugging, a macro enable_bytrace is introduced to control
the lib dependencies of ark-js-runtime.

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

Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: I56835deec5d372d7c827ded26544a87766f29002
2022-03-10 00:25:35 -08:00
songzhengchao
79af82d668 delete patchpointid replace with return address
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I1a92f226571273e9ecdd713a378ad977a2f4667f
2022-03-08 17:28:21 +08:00
getingke
7ed9a3fbea fixed for debug js_frame ok and revert test code
issue:[Add JSFunction EntryFrame & LeaveFrame for arm32](https://gitee.com/openharmony/ark_js_runtime/issues/I4WRJP?from=project-issue)

Signed-off-by: getingke <getingke@huawei.com>
Change-Id: Ia688bbec9825ec9ebe0e7dcd7da47af1317f1fb8
2022-03-08 11:11:46 +08:00
getingke
e8dfcaca06 fixed for get stackmap with returnaddress
issue:[Add JSFunction EntryFrame & LeaveFrame for arm32](https://gitee.com/openharmony/ark_js_runtime/issues/I4WRJP?from=project-issue)

Signed-off-by: getingke <getingke@huawei.com>
Change-Id: Ie034eebf3e1f3c461dc35168756564aaa708602d
2022-03-08 11:09:05 +08:00
getingke
02d27c76bb fixed for arm32 js frame
issue:[Add JSFunction EntryFrame & LeaveFrame for arm32](https://gitee.com/openharmony/ark_js_runtime/issues/I4WRJP?from=project-issue)
Signed-off-by: getingke <getingke@huawei.com>

Change-Id: If65fd5064fa3c626f8f0ae3bae550465414af5e7
2022-03-08 11:01:20 +08:00
chenqi
20726efef7 Add Container Queue
Description
  To ensure the high performance of container classes, Queue is provided in ark.
Related issue
  #I4TKAU:Add Container Queue

Signed-off-by: chenqi <chenqi151@huawei.com>
2022-03-05 16:55:38 +08:00
scw
f7b97b27b0 move dfx feature to dfx dir
ISSUE:https://gitee.com/openharmony/ark_js_runtime/issues/I4SXXS

Signed-off-by: scw <suchongwei@huawei.com>
Change-Id: Ie5ae6a70f5b561b7578702db591affb26a0057d9
2022-03-04 10:52:47 +08:00
sunzhe23
4737a4f59e Related issue: #I4W0C0
Modifications:
* Fix write barrier stub bug
* Adapt HandleNewLexEnvWithNameDynPrefImm16Imm16 for asm interpreter

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-03-02 01:52:51 -08:00
panzhenyu1
56bb730cba Adapt for windows platform
related issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4VDA4
Change-Id: I4560cf0ec4c05ccd855debb51b6d0190b4f1ccfa
Signed-off-by: panzhenyu1 <panzhenyu1@huawei.com>
2022-03-02 11:22:58 +08:00
openharmony_ci
5df4c81591
!640 fix problems concerning lexicalEnv
Merge pull request !640 from huangfeijie/master
2022-03-01 15:37:57 +00:00
ding
96b342e46e Stackless optimalize new operation, including BuiltinsConstructor new and the most common new with callType is HAVE_THIS
Signed-off-by: ding <dingding5@huawei.com>
2022-03-01 20:10:20 +08:00
openharmony_ci
6b336b7884
!648 IC performance optimization by remove redundant code
Merge pull request !648 from DaiHN/master
2022-03-01 08:18:17 +00:00
DaiH
fc1915fc8e IC performance optimization by remove redundant code
Signed-off-by: DaiH <daihuina1@huawei.com>
==-------------------------------------------==
IC performance optimization by remove redundant code
 1. remove redundant function FixSpOnEntry
 2. remove logically redundant code of IC
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4VNHF?from=project-issue
==-------------------------------------------==
Change-Id: If78c3b1b8bc88a48907fd168e795ca48bffe8ec2
2022-03-01 15:09:17 +08:00
h00611971
b97fd87841 issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4VE0E
fix problems concerning lexicalEnv

Signed-off-by: h00611971 <huangfeijie@huawei.com>
2022-03-01 11:16:43 +08:00
songzhengchao
b2ef46bebe CallRuntimeTrampoline brige support aarch64
Description:
a Use two Bridge function, "InvokeJSFunctionEntry" and "CallRuntimeTrampoline" to Adapter the calling convention of Aot JSFunction & Runtime Stub, then Construct the Entry Frame in "InvokeJSFunctionEntry", Leave Frame in "CallRuntimeTrampoline"
b modify LLVM Calling Conversion, prologue push callee-saved gpr registers --> callee-saved fp/simd/SVE regs --> prev_fp, prev_lr .finally update x29 pointer to prev_fp

issue:https://gitee.com/openharmony/ark_js_runtime/pulls/630

Change-Id: I1df498f411e03c9887c4cad97bf82371c0b5f01a
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
2022-03-01 11:07:25 +08:00
lichenshuai
7b33f4bfe8 Fix asm compile error.
Related issue: #I4VGTI

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ib85c15af4c0bd6c48c319217684fc80df086c744
2022-02-28 15:35:26 +08:00
lichenshuai
82739075da Optimize call
Currently, in the TSBenchmark of call, ark is still not as good as v8. So it needs to be optimized.

The way to set call frame is mainly optimized. After the optimization, fast path is executed when actual args is equal
to declared args. Call type, numVregs, numArgs, native flag are all stored in one field for further stub.

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
2022-02-26 11:53:40 +08:00
zhangyukun
3b881fa018 Sync code from c_asm_interpreter to master
Use Stub to impl handlers of bytecodes and use tail call to impl
dispatch of handlers of bytecodes

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I7afabdc40ddfa11345aa1029059514aa4f55b9f8
2022-02-22 17:01:18 +08:00
openharmony_ci
cf3ee3ab96
!577 Add JS Function Entry frame & LeaveFrame
Merge pull request !577 from getingke/js_function_entry_frame
2022-02-21 12:44:08 +00:00
getingke
5e376b0121 fixed for compile error
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: Ia0a640d5dceb07faf18e8b383fde76fd272948f3
2022-02-21 17:13:33 +08:00
getingke
0d0203e742 fixed for rewrite patch id for runtime call
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: Ie4a76fb481a548d356450b79c55ed5d3c28b86b0
2022-02-21 15:32:29 +08:00
getingke
88429808d5 fixed for revert test code
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I725d9f53d3666b74b9430857e3ac0c8c33b3892c
2022-02-19 13:32:14 +08:00
getingke
deab3fbbbc fixed for gc test
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I358802cfacd4c592abe6fedbb571194b4d85d5d4
2022-02-19 09:54:46 +08:00
songzhengchao
8717c48154 fixed for arm64 test mod.abc slowpath ok
add set thread current sp when leave aot frame

Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I18813879c9512a91f7f38ae07b211190d2e6daed
2022-02-18 17:58:06 +08:00
openharmony_ci
74d4f0e409
!526 Add Container ArrayList
Merge pull request !526 from 刘甘霖/container_arraylist
2022-02-18 09:53:09 +00:00
getingke
76734dd503 fixed for x86 test double mod ok
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I347316cfbbdc8e2ca15b222e1149a41712b35fca
2022-02-18 14:03:24 +08:00
getingke
2d8d1e4347 fixed for x86 test mod.abc ok
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I3fd6a16ee7cbc1ad23774bef1948bfb391a2378e
2022-02-18 10:52:10 +08:00
liuganlin
3f93f046c1 Add container ArrayList
Description
  To ensure the high performance of container classes, ArrayList is provided in ark.
Related issue
  #I4T65T:Add Container ArrayList

Signed-off-by: liuganlin <liuganlin@huawei.com>
2022-02-18 10:37:31 +08:00
xliu
1bce193604 fix TryLdGlobalByName and LookupPropertyInlinedProps
Description
  fix bugs of TryLdGlobalByName and LookupPropertyInlinedProps
  Add test cases for global aeecssor.
Related issue
  #I4TZT1: fix TryLdGlobalByName and LookupPropertyInlinedProps

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: If4b78a136ed2299a1ae1848d8c248f5265996905
2022-02-17 13:00:20 +08:00
zhangyukun
39d782c946 Merge new runtimetrapolines from c_asm into master
Bug: #I4TRQP

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I55b49c3ec9f6c5f91272668ff43ef4147b9ed6c2
2022-02-16 16:49:53 +08:00
yingguofeng@huawei.com
095021b081 GC performance optimization
1、Delete strategy no gc for start up
2、Adapter performance tools: runtime stat
3、Modify freeObjectKind to freeObjectSet

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

Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
Change-Id: I01643755057b6146d1f6b67032256e687873cd07
2022-02-15 14:24:21 +08:00
feng
e0f34edb44 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