Commit Graph

13 Commits

Author SHA1 Message Date
Gongyuhang 2782c763e7 Desciption: Deal with the "use after free" error
occurs while debugging ark_js_vm executable on
windows.

Details: Enclose the part where the LocalScope
object should take effect with a pair of braces.
Thus, the destructor of the LocalScope object
will be called at the right brace which is above
the JSNApi::DestroyJSVM() function.

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

Signed-off-by: Gongyuhang <gongyuhang5@huawei.com>
2022-06-14 16:13:59 +08:00
luochuhao 7522f51989 Add multi-abc-file support in stub compiler and aot compiler and related adaptation.
Use methodId of func in pandafile as index for each aot func in llvmModule.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I598P5
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: I9646d6a80c8138744ebbd617837550b4661f27d3
2022-05-29 16:59:27 +08:00
luochuhao 86fda0792b Modify option source of stub compiler.
Using options in js runtime option list and delete stub compiler option.

Add path check for stub compiler generation phase.

Load stub file before loading of aot file.

Add runtime option for optimization level configuration.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I557Q2
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: Ifbaa7a2dc4333310c62f1f8e230eefb7a2136ca5
2022-04-29 14:40:18 +08:00
ding 755f336a92 Add TS Aot Test Framework
Add TS Aot test framework: supprot running aot whole process test automatically and throwing error messages at each step.

Add tonumber, not, neg module test.

Fix assembler judement in RunPipeline

Add --snapshot-output-file option.

Signed-off-by: ding <dingding5@huawei.com>
Change-Id: Ica09e907c1f03547c1ba80bf639a53d923c01a16
2022-04-25 21:28:10 +08:00
lifansheng a725676a6c 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
luochuhao 08b2c27a2a Add lowering of define function dyn.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I52KRX
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: I3a798b2c4be13bf12eb77806d5a32dc5e83a7416
2022-04-16 14:48:10 +08:00
ding d8f0399789 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
luochuhao 89e18a6381 Modify for helloworld demo on AOT framework
Adaptation on serialization and deserialization of snapshot file is needed,
for providing string constant table.

Tweak on callarg1dyn runtime stub.

Adjust initialization sequence of tsloader and global constant to cope with snapshot
deserilization.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I527BJ
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: I20a82dd0dbeec368b4ff93db4cca8d0ffbdb6717
2022-04-12 13:50:09 +08:00
dingwen 1c70dfbc78 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
lijincheng b9486a89ca add slowpathlowering to 7 bytecodes
Signed-off-by: lijincheng <lijincheng13@huawei.com>
2022-03-28 15:29:41 +08:00
luochuhao 8c6f8ef20d 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
wanyanglan fd4c928922 Add information such as instruction immediate, method_id, string_id, etc.
The lowering slow path requires not only the vreg information of the
instruction, but also other information such as string id, method id, etc.

For each bytecode instruction, collect the various information stored in
the instruction, and use the information as the input of the gate, and
in the lowering stage, take out the required information from the gate.

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

Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: I42ef36554b0b88ce3e1cd0f593e8ce9e924b83e0
2022-03-15 11:02:40 +08:00
Hailiang Hu 44d74f7b9c Add AOT Pass Manager
Modify aot compiler main process to pass manager, as to compile file by
file.

Add PassData to manage data interact between passes, PassRunner to
execute every pass that is registered on specific order.

Issue: I4SW05

Change-Id: I5b83b84880c7375e26e1c47e02c9943bfefc647a
Signed-off-by: Hailiang Hu <allenpas@huawei.com>
2022-02-11 09:35:52 +08:00