Commit Graph

115 Commits

Author SHA1 Message Date
yingguofeng@huawei.com
5037c8aac6 Delete useless code dependencies
To reduce 'libark_ jsruntime.so' ROM size, delete useless code dependencies.

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

Profit: libark_jsruntime.so size reduce from 3455(kb) to 2001(kb)

Change-Id: Ie7430fca6f539c9baff1f4aae7942da6fc9ef135
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-04-24 18:02:32 +08:00
yingguofeng@huawei.com
915bb70933 Memory map allocator implementation
Two memory blocks can be allocated: default region size and huge object size

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

Change-Id: I734213cfe43fc04638d4fd97d4cf4c04f7485875
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-04-21 22:32:21 +08:00
openharmony_ci
4978eb99a4
!1036 Runtime architecture adjustment
Merge pull request !1036 from xliu/modif_runtime_core
2022-04-21 09:13:49 +00:00
openharmony_ci
54e6b7f06a
!1068 Refactor redundant code
Merge pull request !1068 from Gargoyle.h/wzfmaster-dev
2022-04-21 08:08:52 +00:00
lifansheng
c9d2334593 Runtime architecture adjustment
Description
  Cut out most of the initialization logic in Runtime::Create and disconnect the
  inheritance relationship of most classes such as JSThread.
Issue:
  #I53418: Runtime architecture adjustment

Signed-off-by: lifansheng <lifansheng1@huawei.com>
Change-Id: Ib9c1a40354f77d32e515e23334e7f4b4a4fa3259
2022-04-21 14:37:31 +08:00
wuzhefeng
bf59add3d3 [Refactor] refactor the code
There are some redundant code, such as runtime_api.h/cpp, which only
contains a method. Therefore, we can merge it to corresponding class and
remove these two files.

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

Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: Ie4ae7c23fbedf15b53e8856d7455aa7c37afd1b3
2022-04-20 01:17:00 -07:00
songzhengchao
1dd4a6a18d delete c-interpreter call common stub
1 delete enable_stub_aot
2 commonstub frmeType modify from OPTIMIZED_ENTRY_FRAME to OPTIMIZED_FRAME

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I53I2Z?from=project-issue
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: Id3142775f8574c87a4659b78a9da8770f5b792bd
2022-04-19 15:51:22 +08:00
getingke
4a4dc2293d fixed for compiler error in wagner master branch
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I0bb8ef0fdc119ba1a958a2cff73d44fc51ccbb54
2022-04-18 17:14:45 +08:00
sunzhe23
c0184b2dfe Generate asm code for AsmInterCallRuntime
issue: #I53761

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-04-17 23:49:48 -07: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
openharmony_ci
b5f74e9076
!984 Add X64 assembler
Merge pull request !984 from 孙哲/master
2022-04-14 05:54:27 +00:00
openharmony_ci
fd464a06af
!999 方舟独立编译构建提取source_set
Merge pull request !999 from 宋宏昊/master
2022-04-14 05:30:56 +00:00
sunzhe23
02853bca68 Add x64 assembler
1 Implements x64 assembler
2 Add Asm code generator framework
3 Generating AsmInterCallRuntime with the x64 assembler

issue: #I52Ak6

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2022-04-13 22:01:24 -07:00
getingke
71e97539ae fixed for jsbound function call
Signed-off-by: getingke <getingke@huawei.com>
Change-Id: I7d543a1784c017746d8afe3cad0d0bb9fc6011b3
2022-04-13 19:24:09 +08:00
zhaoduwei
2caf19f898 Modify sharedmemorymanager filename
Change sharedmemorymanager filename to shared_mm

https://gitee.com/openharmony/ark_js_runtime/issues/I52H3F

Signed-off-by: zhaoduwei <zhaoduwei1@huawei.com>
2022-04-13 11:53:13 +08:00
songhao
0915f30c6a source_set
Signed-off-by: songhao <songhonghao@huawei.com>
2022-04-13 10:56:16 +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
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
dingwen
861d97bb87 SnapShot serialize and deserialize by using ObjectXray visit object
field
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4ZOXH

Signed-off-by: dingwen <dingwen6@huawei.com>
Change-Id: I6e03cfb4f7b89786b612b56adc0877f8b178058e
2022-04-10 12:32:07 +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
e802f8e5e3
!918 add SharedArrayBuffer
Merge pull request !918 from 赵杜炜/master
2022-04-02 11:58:42 +00:00
zhaoduwei
5a9a25830f Added SharedArrayBuffer module code
Added SharedArrayBuffer module code to support ECMA function

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

Signed-off-by: zhaoduwei <zhaoduwei1@huawei.com>
2022-04-02 18:46:20 +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
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
3fb8695a4d
!905 Add international specification module displaynames class code
Merge pull request !905 from 刘强/master
2022-03-29 07:18:30 +00:00
wanyanglan
a47e2e554e Add Aot Testing Framework
Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I9f7bf5fa2e70854901f7931c96df3fbea7311ca7
2022-03-28 19:20:36 +08:00
liu-qiang12
88871216d1 Add international specification module displaynames class code
Signed-off-by: liu-qiang12 <liuqiang187@huawei.com>

https://gitee.com/openharmony/ark_js_runtime/issues/I4ZYTA
2022-03-28 17:29:53 +08:00
wengchangcheng
e64122e200 add -Werror -Wextra gn flag for 'compiler'
1. ignore llvm warning
2. fix warning of compiler module

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

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I09774e431743a26ea366ed28e3276ff027ae0d31
2022-03-25 15:31:59 +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
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
941f01f5e5
!855 Change file folder "platform" to "tastpool"
Merge pull request !855 from DaiHN/docs_revise
2022-03-24 00:50:08 +00:00
DaiH
6efbeeaba1 Change file folder "platform" to "tastpool"
Signed-off-by: DaiH <daihuina1@huawei.com>

1. Change file folder "platform" to "tastpool"
2. Change class "platform" to "tastpool"

https: //gitee.com/openharmony/ark_js_runtime/issues/I4Z7EU
Change-Id: Ife3f2a9e52a02e5046e3ccd936f1993aa225e908
2022-03-23 15:43:38 +08:00
songzhengchao
aa5efb6c1e Add stub compile when trigger start build
current CI only compile group ark_js_packages, stub compile should add ark_js_packages in order to trigger compile

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

Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I98d7416ad99afb839466be17d8bb60c5704a9930
2022-03-23 12:34:32 +08:00
wengchangcheng
522f47338c add build flag '-Wall'
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4YVDY

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I6a4d28ad86f4c99684a6a6b55ed541861bf1a873
2022-03-21 21:18:59 +08: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
zhaozhibo
74c8d071c5 Fix internal issue list problem
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-03-14 17:42:27 +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
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
hjzhangcm
712e034b7b add test case for microjobqueue and pengingjob
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-03-09 11:24:07 +08:00
openharmony_ci
4cb6259281
!694 Undo some native stack function function
Merge pull request !694 from 史凯/master
2022-03-07 15:15:06 +00:00
shikai-123
b0096c90eb The function is not complete. Withdraw the code first
Due to the problem of including the third-party header file, the
function is temporarily cancelled, and the library can be loaded after
debugging

https://gitee.com/openharmony/ark_js_runtime/issues/I4WONE

Signed-off-by: shikai-123 <shikai25@huawei.com>
2022-03-07 21:58:19 +08:00
openharmony_ci
24e8b5fd18
!546 Add Container Queue
Merge pull request !546 from chenqi/container_queue
2022-03-07 11:43:30 +00:00
panzhenyu1
6be09bf81c Bugfix for windows support patch
Description: add output_extension = "so" and fix typo bug about ICU path
related issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4WNRU

Signed-off-by: panzhenyu1 <panzhenyu1@huawei.com>
Change-Id: If8806daf2e99278d3443bd839c0be9a1d9f69e07
Signed-off-by: panzhenyu1 <panzhenyu1@huawei.com>
2022-03-07 16:15:54 +08:00
openharmony_ci
93572851af
!674 Modify and supplement the stack column printing code of DFX module
Merge pull request !674 from 史凯/master
2022-03-06 04:26:05 +00:00
shikai-123
19985e88da Modify and supplement the stack column printing code of DFX module
上传dfx模块代码,增加native栈栈列打印功能

https://gitee.com/openharmony/ark_js_runtime/issues/I4VB5Z

Signed-off-by: shikai-123 <shikai25@huawei.com>
2022-03-06 11:10:56 +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