Go to file
zhuoli 880c809a8b Remove static linkage for ark binaries
ISSUE:I630JA

Signed-off-by: zhuoli <pengzhuoli@huawei.com>
Change-Id: Id1b9a1cd8a265cd01a13bf0575832659f83aff4e
2022-11-24 20:40:59 +08:00
assembler Fix running error of TDD test cases on the device 2022-11-23 05:27:25 +00:00
bytecode_optimizer Add TDD test cases 2022-11-24 06:33:39 +00:00
cmake Update runtime_core code 2022-07-17 10:20:32 +08:00
compiler Update typeinfo of instruction which has no accumulator as out after optimization 2022-11-22 09:58:55 +00:00
cross_values Fix build for x86_64 target 2022-07-27 21:54:46 +08:00
disassembler Remove static linkage for ark binaries 2022-11-24 20:40:59 +08:00
docs Remove unused code 2022-11-20 18:55:21 +08:00
dprof Descriptor: Fix standalone build error 2022-10-25 00:00:41 +08:00
gn Descriptor: Modify for ark standalone build 2022-11-16 09:40:31 +08:00
irtoc Descriptor: Modify for ark standalone build 2022-11-16 09:40:31 +08:00
isa Fix typo of isa "poplexenv" description 2022-11-15 21:03:37 +08:00
ldscripts Update runtime_core code 2022-07-17 10:20:32 +08:00
libark_defect_scan_aux Adapt unittest of defect scan lib to the commit of merge abc 2022-10-28 17:35:57 +08:00
libpandabase Add TDD test cases 2022-11-24 06:33:39 +00:00
libpandafile Add TDD test cases 2022-11-24 06:33:39 +00:00
libziparchive Fix running error of TDD test cases on the device 2022-11-23 05:27:25 +00:00
panda Descriptor: Modify for ark standalone build 2022-11-16 09:40:31 +08:00
pandastdlib Update runtime_core code 2022-07-17 10:20:32 +08:00
platforms Remove unused module pipe and signal_handeler in libpandabase 2022-11-17 10:39:46 +08:00
plugins Descriptor: Modify for ark standalone build 2022-11-16 09:40:31 +08:00
quickener Update runtime_core code 2022-07-17 10:20:32 +08:00
runtime Fix running error of TDD test cases on the device 2022-11-23 05:27:25 +00:00
scripts Update runtime_core code 2022-07-17 10:20:32 +08:00
templates Update runtime_core code 2022-07-17 10:20:32 +08:00
tests Fix running error of TDD test cases on the device 2022-11-23 05:27:25 +00:00
verification Add TDD test cases 2022-11-19 10:04:53 +00: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 Descriptor: Fix standalone build error 2022-10-25 00:00:41 +08:00
ark_root.gni Descriptor: Fix standalone build error 2022-10-25 00:00:41 +08:00
AUTHORS Update runtime_core code 2022-07-17 10:20:32 +08:00
BUILD.gn Add TDD test cases 2022-11-24 06:33:39 +00:00
bundle.json Add TDD test cases 2022-11-19 10:04:53 +00:00
CMakeLists.txt Update runtime_core code 2022-07-17 10:20:32 +08:00
LICENSE Fix codecheck warnings 2022-08-01 10:18:19 +08:00
OAT.xml Fix codecheck warnings 2022-08-01 10:18:19 +08:00
README_zh.md Update runtime core README docs 2022-10-08 20:42:08 +08:00
README.md Update runtime core README docs 2022-10-08 20:42:08 +08:00

Runtime Core

Introduction

As a common module of language runtime in OpenHarmony, ArkCompiler Runtime Core consists of language-independent basic runtime libraries, including ArkCompiler File, Tooling, Base and ISA. ArkCompiler File provides bytecodes and information required for executing bytecodes. Tooling supports runtime debugger. Base is responsible for implementing platform related utilities. ISA provides common instruction set architecture that is language-independent.

Figure 1 ArkCompiler Runtime Core architecture diagram

ArkCompiler Runtime Core Arch

For more information, see: ARK Runtime Subsystem.

Directory Structure

├── assembler               # Assembler that converts an ARK bytecode file in text format (*.pa) into a bytecode file in binary format (*.abc). For details about the format, see docs/assembly_format.md and docs/file_format.md.
├── bytecode_optimizer      # Bytecode optimizer, further optimize the ARK bytecode to generate optimized bytecode file in binary format (*.abc).
├── cmake                   # Cmake script that contains the toolchain files and common cmake functions used to define the build and test targets.
├── compiler                # Compiler including IR(intermediate representation) and passes for bytecode optimization. See docs/ir_format.md.
├── cross_values            # Cross values generator.
├── disassembler            # Disassembler that converts an ARK bytecode file in binary format (*.abc) into an ARK bytecode file in text format (*.pa).
├── 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.
├── irtoc                   # IR to code tool, aims to compile a manually created IR to the target code.
├── isa                     # Bytecode ISA description file YAML, Ruby scripts and templates.
├── ldscripts               # Linker scripts used to place ELF sections larger than 4 GB in a non-PIE executable file.
├── libark_defect_scan_aux  # Vulnerability defect scanning tool for ARK bytecode file in binary format (*.abc).
├── libpandabase            # Basic ArkCompiler 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 zlib.
├── panda                   # CLI tool used to execute ARK bytecode files in binary format(*.abc).
├── pandastdlib             # Standard libraries wrote by the ARK assembler.
├── platforms               # Platform related utilities.
├── plugins                 # Language-dependent plugins.
├── quickener               # Quickener tool.
├── 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                   # Test cases.
└── verification            # Bytecode verifier. See docs/bc_verification.

Building

Linux platform

$ ./build.sh --product-name hispark_taurus_standard --build-target ark_host_linux_tools_packages

Windows platform

$ ./build.sh --product-name hispark_taurus_standard --build-target ark_host_windows_tools_packages

Mac platform

$ ./build.sh --product-name hispark_taurus_standard --build-target ark_host_mac_tools_packages

Guidelines

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 [Options] Input file Output file

Supported options:

Option Description
--dump-scopes Save the result to a JSON file to support the debug mode in Visual Studio Code.
--help Display help information.
--log-file Specify the log file output path after log printing is enabled.
--optimize Enable compilation optimization.
--size-stat Collect statistics and print ARK bytecode information after conversion.
--verbose Enable log printing.
--version Print version info, including file format version and minimum supported file format version.

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 [Options] Input file Output file

Supported options:

Option Description
--debug Enable the function for printing debug information.
--debug-file Specify the path of the debug information output file. The default is std::cout.
--help Display help information.
--quiet Enable all of the "--skip-*" flags.
--skip-string-literals Replace string literals with their respective id's, thus shortening emitted code size.
--verbose Enable log printing.
--version Print version info, including file format version and minimum supported file format version.

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

arkcompiler_runtime_core

arkcompiler_ets_runtime

arkcompiler_ets_frontend