Go to file
openharmony_ci c113fecb92
!166 c++工具链适配m1平台
Merge pull request !166 from yinchuang/m1_adapter_core
2022-07-05 06:09:56 +00:00
assembler Use a simple way to implement SetOrAddElementByIndex 2022-07-01 17:39:42 +08:00
cmake Fix Method::GetLineNumFromBytecodeOffset 2022-04-06 16:55:35 +03:00
disassembler Disable static linking for disassembler on MAC platform 2022-06-16 13:38:41 +08:00
docs codehub issues fix 2022-03-28 17:20:15 +03:00
dprof Add source_set 2022-05-05 15:16:29 +08:00
gn copyright update 2022-03-25 13:17:51 +03:00
isa !114 ISA/ISAPI minor fixes 2022-03-30 10:58:53 +00:00
ldscripts copyright update 2022-03-25 13:17:51 +03:00
libpandabase ARK WINDOWS run test262 case failed when reading abc file 2022-06-28 17:20:12 +08:00
libpandafile File items codedx fixing 2022-06-16 19:42:35 +08:00
libziparchive Enable compile shared library on MacOS 2022-05-19 10:34:24 +08:00
panda copyright update 2022-03-25 13:17:51 +03:00
pandastdlib issue 232 2022-03-29 18:28:52 +03:00
runtime Refactor mutex, library loader and complement Windows thread API 2022-06-10 16:25:49 +08:00
scripts Fix Method::GetLineNumFromBytecodeOffset 2022-04-06 16:55:35 +03:00
templates copyright update 2022-03-25 13:17:51 +03:00
tests Merge branch 'master' of gitee.com:openharmony/ark_runtime_core into master 2022-05-27 16:12:32 +00:00
verification Fix codex warnings 2022-04-24 12:34:56 +08:00
.clang-format copyright update 2022-03-25 13:17:51 +03:00
.clang-tidy copyright update 2022-03-25 13:17:51 +03: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 copyright update 2022-03-25 13:17:51 +03:00
ark_config.gni copyright update 2022-03-25 13:17:51 +03:00
AUTHORS add ark runtime_core 2021-09-05 20:53:43 +08:00
BUILD.gn adapter for m1 chip 2022-07-04 19:26:10 +08:00
bundle.json Add fuzztest 2022-05-27 20:42:44 +08:00
CMakeLists.txt Fix Method::GetLineNumFromBytecodeOffset 2022-04-06 16:55:35 +03:00
LICENSE codehub issues fix 2022-03-22 17:28:04 +03:00
OAT.xml issues 206-229 2022-03-29 16:46:04 +03:00
README_zh.md fix docs issue 2021-09-14 14:53:07 +08:00
README.md misprints fix 2022-03-15 14:49:59 +03: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 information, 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 information, please see: ARK Runtime Usage Guide.

Repositories Involved

ark_runtime_core

ark_js_runtime

ark_ts2abc