Go to file
wangyantian 3fe4238952 Fix serious codecheck warnings(generated by OpenHarmony CI on December 24, 2021)
Signed-off-by: wangyantian <wangyantian@huawei.com>
2021-12-24 14:56:13 +08:00
assembler Fix serious codecheck warnings(generated by OpenHarmony CI on December 24, 2021) 2021-12-24 14:56:13 +08:00
cmake upload runtime_core 2021-09-07 21:51:18 +08:00
disassembler Fix serious codecheck warnings(generated by OpenHarmony CI on December 24, 2021) 2021-12-24 14:56:13 +08:00
docs update runtime_core code 2021-09-08 10:01:07 +08:00
dprof add ark runtime_core 2021-09-05 20:53:43 +08:00
gn fix gn format 2021-09-05 23:07:25 +08:00
isa Fix code&scripts static checking warnings 2021-09-27 16:22:44 +08:00
ldscripts upload runtime_core 2021-09-07 21:51:18 +08:00
libpandabase Fix serious codecheck warnings(generated by OpenHarmony CI on December 24, 2021) 2021-12-24 14:56:13 +08:00
libpandafile Fix serious codecheck warnings(generated by OpenHarmony CI on December 24, 2021) 2021-12-24 14:56:13 +08:00
libziparchive Fix serious codecheck warnings(generated by OpenHarmony CI on December 24, 2021) 2021-12-24 14:56:13 +08:00
panda add ark runtime_core 2021-09-05 20:53:43 +08:00
pandastdlib add ark runtime_core 2021-09-05 20:53:43 +08:00
runtime Fix serious codecheck warnings(generated by OpenHarmony CI on December 24, 2021) 2021-12-24 14:56:13 +08:00
scripts Fix code&scripts static checking warnings 2021-09-27 16:22:44 +08:00
templates add ark runtime_core 2021-09-05 20:53:43 +08:00
tests upload runtime_core 2021-09-07 21:51:18 +08:00
verification Fix serious codecheck warnings(generated by OpenHarmony CI on December 24, 2021) 2021-12-24 14:56:13 +08:00
.clang-format add ark runtime_core 2021-09-05 20:53:43 +08:00
.clang-tidy add ark runtime_core 2021-09-05 20:53:43 +08:00
.gitattributes add ark runtime_core 2021-09-05 20:53:43 +08:00
.gitignore add ark runtime_core 2021-09-05 20:53:43 +08:00
.standalone_gn Rename .gn -> .standalone_gn 2021-11-25 12:23:14 +03:00
ark_config.gni format gni 2021-09-08 11:56:04 +08:00
AUTHORS add ark runtime_core 2021-09-05 20:53:43 +08:00
BUILD.gn Fixed macos build 2021-09-10 14:51:34 +03:00
CMakeLists.txt add ark runtime_core 2021-09-05 20:53:43 +08:00
LICENSE add ark runtime_core 2021-09-05 20:53:43 +08:00
OAT.xml Add binary file filters into OAT.xml 2021-09-27 21:36:52 +08:00
ohos.build delete build for linux host 2021-09-22 17:03:15 +08:00
README_zh.md fix docs issue 2021-09-14 14:53:07 +08:00
README.md fix docs issue 2021-09-14 14:53:07 +08:00

Runtime Core

Introduction

As a common module of ARK runtime, Runtime Core consists of some basic language-irrelevant runtime libraries, including ARK File, Tooling, and ARK Base. ARK File provides bytecodes and information required for executing bytecodes. Tooling supports Debugger. ARK Base is responsible for implementing platform related utilities.

For more infomation, see: ARK Runtime Subsystem.

Directory Structure

/ark/runtime_core
├── assembler             # Assembler that converts an ARK bytecode file (*.pa) in text format into a bytecode file (*.abc) in binary format. For details about the format, see docs/assembly_format.md and docs/file_format.md.
├── cmake                 # cmake script that contains the toolchain files and common cmake functions used to define the build and test targets.
├── CMakeLists.txt        # cmake main entry file.
├── disassembler          # Disassembler that converts an ARK bytecode file (*.abc) in binary format into an ARK bytecode file (*.pa) in text format.
├── docs                  # Language frontend, ARK file format, and runtime design documents.
├── dprof                 # Data used to collect the profiling data for ARK runtime.
├── gn                    # GN templates and configuration files.
├── isa                   # Bytecode ISA description file YAML, and Ruby scripts and templates.
├── ldscripts             # Linker scripts used to place ELF sections larger than 4 GB in a non-PIE executable file.
├── libpandabase          # Basic ARK runtime library, including logs, synchronization primitives, and common data structure.
├── libpandafile          # Source code repository of ARK bytecode files (*.abc) in binary format.
├── libziparchive         # provides APIs for reading and using zip files implemented by miniz.
├── panda                 # CLI tool used to execute ARK bytecode files (*.abc).
├── pandastdlib           # Standard libraries wrote by the ARK assembler.
├── runtime               # ARK runtime command module.
├── scripts               # CI scripts.
├── templates             # Ruby templates and scripts used to process command line options, loggers, error messages, and events.
├── tests                 # UT test cases.
└── verification          # Bytecode verifier. See docs/bc_verification.

Usage Guidelines

Assembler ark_asm

The ark_asm assembler converts the text ARK bytecode file into a bytecode file in binary format.

Command:

ark_asm [Option] Input file Output file

Option

Description

--dump-scopes

Saves the result to a JSON file to support the debug mode in Visual Studio Code.

--help

Displays help information.

--log-file

Specifies the log file output path after log printing is enabled.

--optimize

Enables compilation optimization.

--size-stat

Collects statistics on and prints ARK bytecode information after conversion.

--verbose

Enables log printing.

Input file: ARK bytecodes in text format

Output file: ARK bytecodes in binary format

Disassembler ark_disasm

The ark_disasm disassembler converts binary ARK bytecodes into readable text ARK bytecodes.

Command:

ark_disasm [Option] Input file Output file

Option

Description

--debug

Enables the function for printing debug information.

--debug-file

Specifies the path of the debug information output file. The default value is std::cout.

--help

Displays help information.

--verbose

Outputs the comments of the output file.

Input file: ARK bytecodes in binary format

Output file: ARK bytecodes in text format

For more infomation, please see: ARK Runtime Usage Guide.

Repositories Involved

ark_runtime_core

ark_js_runtime

ark_ts2abc