Commit Graph

29 Commits

Author SHA1 Message Date
xliu
82fdca377f fix LdGlobaleVar and TryLdGlobalByName
1.Adjust the logic of IC for LdGlobalVar
2.Adjust the logic of IC for TryLdGlobalByName
3.Add set as SetAsMega for LoadMiss and StoreMiss
4.Container test case refactoring
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5CJO2

Signed-off-by: xliu <liuxin259@huawei.com>
Change-Id: I3c531d072c5f2e4b6508544d9420ad4817943c24
2022-06-20 10:13:02 +08:00
sunzhe23
a392bf6e4e Fix some performance issue for asm interpreter
description:
1 reuse ic slot for ic slot overflow case
2 Replace CallStub with (tail call) bytecode handler for GetPropertyByName
3 add fast path for call new return handler

issue: I5BFu2

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-06-09 10:30:14 +08:00
wengchangcheng
de388d8f61 Descriptor: debugger refactor of independent js_runtime [ part-1 ]
details: using stl instead of js_runtime container ans string
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5AYKS

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I32b4809a4bbd759a562326a59e0cfb0e8e728297
2022-06-07 17:47:53 +08:00
lichenshuai
077f38f689 Delete RSP macro and .S file
Rsp is used in future work, therefore .S file should be deleted.

Issue: #I5AGW3

Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ib1fb140d40d259bc4519fbf547857e5f80e9ee0c
2022-06-02 10:32:46 +08:00
sunzhe23
c18a83dbcc Fix some asm interpreter bug
description:
1 add align up for rodata section, incase movdqa crash
2 set gc leaf function attribute for no gc all
3 fix mega ic run slowpath bug for asm interpreter
4 remove trampoline unused code

issue: #I58VFA

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-05-24 19:36:38 +08:00
zhangyukun
4b39ba412b constuct entry frame of execute with rsp
1. add fp to support discontinuous frame gc and resume rsp
2. assemble execute and impl entry frame with rsp
3. use assembler to refactor .s
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I52BQE?from=project-issue

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I6966672dc065d63144fe7fa145ab76571189d540
2022-05-07 14:13:50 +08:00
openharmony_ci
fc582ec959
!1155 Refactor the GC related components - Part 4
Merge pull request !1155 from klooer/master
2022-04-30 09:45:48 +00:00
ding
3b16eddbda Extend Fast-new with CallType has NewTarget
Extend fast-new with callType has NewTarget, to speed up calendar application.

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: I716c6992cf98e2835b1906c61d872ae3496d6db1
2022-04-29 15:36:02 +08:00
Yuqiang Xian
b9cf0ffccb Merge remote-tracking branch 'oh/master' 2022-04-28 11:24:41 +08:00
xiongluo
6e4af76501 refactor the uint fileds in jsmethod
1. make bytecodeArraySize, hotnessCounter, methodId, slotSize into one field methodField.
2. change the interpreter_stub to fit the hotness counter in jsmethod.
3. fix the fail problem of mem controller test.
4. Adjust the timeout value of uinittest

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-04-27 02:43:40 -10:00
Yuqiang Xian
1d6a48e58e Fix several typos in the code.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I54NZF

Signed-off-by: Yuqiang Xian <xianyuqiang@huawei.com>
Change-Id: I51002ec27cbbb46263a104e6e19c5e354dcbc189
2022-04-27 18:28:18 +08:00
zhaozhibo
21782dfe34 fix codex warning
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-04-26 19:16:21 +08:00
xiongluo
727b20b57e refactor jsMethod
1. Move necessary fileds in jsMethod
2. Make jsMethod inherit aligned struct
3. Change some function names for easy reading

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-04-20 23:17:00 -10: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
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
wengchangcheng
5119c012f8 refactor debugger extractor
1. rename js_pt_extractor
2. move debug_info_extractor to js_runtime
3. use map to store MethodDebug info and LocalVariable info
4. refactor ScopeInfo extractor

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Id64d718aa9360afd53398ee729714c859bd61768
2022-03-30 17:49:11 +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
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
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
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
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
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
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
yingguofeng@huawei.com
1d9b2ac3dd nativePointer optimization
Change-Id: I97b58375c2ec30f33778d7f11fb40a9cf0ed346b
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2021-12-23 19:40:54 +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