mirror of
https://gitee.com/openharmony/arkcompiler_runtime_core
synced 2024-11-23 06:40:32 +00:00
Update runtime core README docs
Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/I5SL4P Signed-off-by: huangyu <huangyu76@huawei.com> Change-Id: I81a4f4dce6b82baef00dad1b0eeda69d7735ccd0
This commit is contained in:
parent
57c169cbc5
commit
bcfc6c4834
178
README.md
178
README.md
@ -3,138 +3,120 @@
|
||||
- [Runtime Core<a name="EN-US_TOPIC_0000001138850082"></a>](#runtime-core)
|
||||
- [Introduction<a name="section11660541593"></a>](#introduction)
|
||||
- [Directory Structure<a name="section161941989596"></a>](#directory-structure)
|
||||
- [Usage Guidelines<a name="section1312121216216"></a>](#usage-guidelines)
|
||||
- [Assembler ark\_asm](#assembler-ark_asm)
|
||||
- [Disassembler ark\_disasm](#disassembler-ark_disasm)
|
||||
- [Building](#building)
|
||||
- [Guidelines](#guidelines)
|
||||
- [Usage Guidelines<a name="section1312121216216"></a>](#usage-guidelines)
|
||||
- [Assembler ark\_asm](#assembler-ark_asm)
|
||||
- [Disassembler ark\_disasm](#disassembler-ark_disasm)
|
||||
- [Repositories Involved<a name="section1371113476307"></a>](#repositories-involved)
|
||||
|
||||
## Introduction<a name="section11660541593"></a>
|
||||
|
||||
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.
|
||||
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](docs/images/runtime_core_arch.png)
|
||||
|
||||
For more information, see: [ARK Runtime Subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/ARK-Runtime-Subsystem.md).
|
||||
|
||||
## Directory Structure<a name="section161941989596"></a>
|
||||
|
||||
```
|
||||
/arkcompiler/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.
|
||||
|
||||
├── 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.
|
||||
```
|
||||
|
||||
## Usage Guidelines<a name="section1312121216216"></a>
|
||||
## Building
|
||||
|
||||
### Assembler ark\_asm
|
||||
**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<a name="section1312121216216"></a>
|
||||
|
||||
#### 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
|
||||
ark_asm [Options] Input file Output file
|
||||
```
|
||||
|
||||
<a name="table11141827153017"></a>
|
||||
<table><thead align="left"><tr id="row101462717303"><th class="cellrowborder" valign="top" width="50%" id="mcps1.1.3.1.1"><p id="p51552743010"><a name="p51552743010"></a><a name="p51552743010"></a>Option</p>
|
||||
</th>
|
||||
<th class="cellrowborder" valign="top" width="50%" id="mcps1.1.3.1.2"><p id="p11592710304"><a name="p11592710304"></a><a name="p11592710304"></a>Description</p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr id="row2015172763014"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p171592710306"><a name="p171592710306"></a><a name="p171592710306"></a>--dump-scopes</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p13151527133011"><a name="p13151527133011"></a><a name="p13151527133011"></a>Saves the result to a JSON file to support the debug mode in Visual Studio Code.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row1015527173015"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1615182712308"><a name="p1615182712308"></a><a name="p1615182712308"></a>--help</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p9556101593120"><a name="p9556101593120"></a><a name="p9556101593120"></a>Displays help information.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row1015112763020"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1815182733012"><a name="p1815182733012"></a><a name="p1815182733012"></a>--log-file</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1615627173019"><a name="p1615627173019"></a><a name="p1615627173019"></a>Specifies the log file output path after log printing is enabled.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row131515277307"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p111572716304"><a name="p111572716304"></a><a name="p111572716304"></a>--optimize</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p25842312319"><a name="p25842312319"></a><a name="p25842312319"></a>Enables compilation optimization.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row1815112753020"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p2151927193015"><a name="p2151927193015"></a><a name="p2151927193015"></a>--size-stat</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1715312588115"><a name="p1715312588115"></a><a name="p1715312588115"></a>Collects statistics on and prints ARK bytecode information after conversion.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row1915182703012"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p17151527133017"><a name="p17151527133017"></a><a name="p17151527133017"></a>--verbose</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p15761152983113"><a name="p15761152983113"></a><a name="p15761152983113"></a>Enables log printing.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
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
|
||||
#### Disassembler ark\_disasm
|
||||
|
||||
The ark\_disasm disassembler converts binary ARK bytecodes into readable text ARK bytecodes.
|
||||
|
||||
Command:
|
||||
|
||||
```
|
||||
ark_disasm [Option] Input file Output file
|
||||
ark_disasm [Options] Input file Output file
|
||||
```
|
||||
|
||||
<a name="table125062517328"></a>
|
||||
<table><thead align="left"><tr id="row125182553217"><th class="cellrowborder" valign="top" width="50%" id="mcps1.1.3.1.1"><p id="p175162514327"><a name="p175162514327"></a><a name="p175162514327"></a>Option</p>
|
||||
</th>
|
||||
<th class="cellrowborder" valign="top" width="50%" id="mcps1.1.3.1.2"><p id="p6512255324"><a name="p6512255324"></a><a name="p6512255324"></a>Description</p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr id="row5511825103218"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p45172513326"><a name="p45172513326"></a><a name="p45172513326"></a>--debug</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1245695053215"><a name="p1245695053215"></a><a name="p1245695053215"></a>Enables the function for printing debug information.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row951112515321"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p451192515323"><a name="p451192515323"></a><a name="p451192515323"></a>--debug-file</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p175142583210"><a name="p175142583210"></a><a name="p175142583210"></a>Specifies the path of the debug information output file. The default value is <strong id="b1486165094613"><a name="b1486165094613"></a><a name="b1486165094613"></a>std::cout</strong>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row45116253325"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p85116259328"><a name="p85116259328"></a><a name="p85116259328"></a>--help</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1348135833214"><a name="p1348135833214"></a><a name="p1348135833214"></a>Displays help information.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row194197407327"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p154205401325"><a name="p154205401325"></a><a name="p154205401325"></a>--verbose</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p369871173312"><a name="p369871173312"></a><a name="p369871173312"></a>Outputs the comments of the output file.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
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
|
||||
|
||||
|
167
README_zh.md
167
README_zh.md
@ -3,14 +3,20 @@
|
||||
- [方舟运行时公共组件<a name="ZH-CN_TOPIC_0000001138850082"></a>](#方舟运行时公共组件)
|
||||
- [简介<a name="section11660541593"></a>](#简介)
|
||||
- [目录<a name="section161941989596"></a>](#目录)
|
||||
- [使用说明<a name="section1312121216216"></a>](#使用说明)
|
||||
- [汇编器工具概述](#汇编器工具概述)
|
||||
- [反汇编器工具概述](#反汇编器工具概述)
|
||||
- [编译构建](#编译构建)
|
||||
- [说明](#说明)
|
||||
- [使用说明<a name="section1312121216216"></a>](#使用说明)
|
||||
- [汇编器工具概述](#汇编器工具概述)
|
||||
- [反汇编器工具概述](#反汇编器工具概述)
|
||||
- [相关仓<a name="section1371113476307"></a>](#相关仓)
|
||||
|
||||
## 简介<a name="section11660541593"></a>
|
||||
|
||||
Runtime Core组件是方舟运行时的公共组件,主要包括一些语言无关的基础运行库,包含承载字节码以及执行字节码所需要相关信息的ARK File、支持Debugger的Tooling、负责系统平台公共基础接口的ARK Base等。
|
||||
方舟编译器运行时公共组件(ArkCompiler Runtime Core)是OpenHarmony中语言运行时的公共组件。主要由与语言无关的基础运行库组成,包含承载字节码以及执行字节码所需要相关信息的ArkCompiler File文件组件、支持运行时调试的Debugger Tooling工具组件、提供不同系统平台公共接口的ArkCompiler Base基础库组件、以及与语言无关的公共指令集体系结构ISA等。
|
||||
|
||||
**图1** 方舟编译器运行时公共组件架构图:
|
||||
|
||||
![方舟编译器运行时公共组件架构图](docs/images/runtime_core_arch.png)
|
||||
|
||||
更多信息请参考:[方舟运行时子系统](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/ARK-Runtime-Subsystem-zh.md)
|
||||
|
||||
@ -18,31 +24,52 @@ Runtime Core组件是方舟运行时的公共组件,主要包括一些语言
|
||||
|
||||
```
|
||||
/arkcompiler/runtime_core
|
||||
├── assembler # 汇编器,将文本格式的方舟字节码文件(*.pa)转换为二进制格式的字节码文件(*.abc),具体格式见:docs/assembly_format.md和docs/file_format.md
|
||||
├── cmake # cmake脚本,包含工具链文件和用于定义构建和测试目标的常用cmake函数
|
||||
├── CMakeLists.txt # cmake主入口文件
|
||||
├── disassembler # 反汇编器,将二进制格式的方舟字节码文件(*.abc)转换为文本格式的方舟字节码文件(*.pa)
|
||||
├── docs # 包含语言前端、方舟文件格式和运行时的设计文档
|
||||
├── dprof # 用于ARK运行时搜集profile数据
|
||||
├── gn # GN模板和配置文件
|
||||
├── isa # 字节码ISA描述文件YAML,和ruby脚本和模板
|
||||
├── ldscripts # 包含链接器脚本,用于在非PIE可执行文件中放置4GB以上的ELF section
|
||||
├── libpandabase # ARK运行时基本库,包含:日志、同步原语、公共数据结构等
|
||||
├── libpandafile # 二进制格式的方舟字节码文件(*.abc)源码仓
|
||||
├── libziparchive # 提供读取和使用miniz的ZIP压缩文件的API
|
||||
├── panda # CLI工具,用于执行方舟字节码文件(*.abc)
|
||||
├── pandastdlib # 通过方舟汇编编写的标准库
|
||||
├── runtime # ARK运行时公共组件
|
||||
├── scripts # CI脚本
|
||||
├── templates # ruby模板和脚本,处理包括:命令行选项、记录器组件、错误消息、事件等
|
||||
├── tests # UT用例
|
||||
└── verification # 字节码验证器,具体可以参考 docs/bc_verification
|
||||
|
||||
├── assembler # 汇编器,将文本格式的方舟字节码文件(*.pa)转换为二进制格式的字节码文件(*.abc),具体格式见:docs/assembly_format.md和docs/file_format.md
|
||||
├── bytecode_optimizer # 字节码优化器,对方舟字节码进行进一步优化生成带优化的字节码文件(*.abc)
|
||||
├── cmake # Cmake脚本,包含工具链文件和用于定义构建和测试目标的常用cmake函数
|
||||
├── compiler # 编译器,主要包含用于字节码优化的IR和passes等,更多信息可参:docs/ir_format.md
|
||||
├── cross_values # 交叉值生成器
|
||||
├── disassembler # 反汇编器,将二进制格式的方舟字节码文件(*.abc)转换为文本格式的方舟字节码文件(*.pa)
|
||||
├── docs # 包含语言前端、方舟文件格式和运行时的设计文档
|
||||
├── dprof # 用于ArkCompiler运行时收集profile数据
|
||||
├── gn # GN模板和配置文件
|
||||
├── irtoc # IR to code工具,将手工创建的IR编译为目标代码,具体可以参考:docs/irtoc.md
|
||||
├── isa # 字节码ISA描述文件YAML,ruby脚本和模板
|
||||
├── ldscripts # 包含链接器脚本,用于在非PIE可执行文件中放置4GB以上的ELF section
|
||||
├── libark_defect_scan_aux # 提供二进制格式方舟字节码文件(*.abc)的漏洞扫描接口
|
||||
├── libpandabase # ArkCompiler运行时基本库,包含:日志、同步原语、公共数据结构等
|
||||
├── libpandafile # 二进制格式的方舟字节码文件(*.abc)源码仓
|
||||
├── libziparchive # 提供基于zlib库实现的读写压缩文件接口
|
||||
├── panda # CLI工具,用于执行方舟字节码文件(*.abc)
|
||||
├── pandastdlib # 通过方舟汇编语言编写的标准库
|
||||
├── platforms # 与系统平台相关的基础接口实现
|
||||
├── plugins # 部分与语言相关的插件
|
||||
├── quickener # 加速器
|
||||
├── runtime # ArkCompiler运行时公共组件
|
||||
├── scripts # CI脚本
|
||||
├── templates # ruby模板和脚本,处理包括:命令行选项、日志组件、错误消息、事件等
|
||||
├── tests # 测试用例
|
||||
└── verification # 字节码验证器,具体可以参考:docs/bc_verification
|
||||
```
|
||||
|
||||
## 使用说明<a name="section1312121216216"></a>
|
||||
## 编译构建
|
||||
**Linux平台**
|
||||
```
|
||||
$ ./build.sh --product-name hispark_taurus_standard --build-target ark_host_linux_tools_packages
|
||||
```
|
||||
**Windows平台**
|
||||
```
|
||||
$ ./build.sh --product-name hispark_taurus_standard --build-target ark_host_windows_tools_packages
|
||||
```
|
||||
**Mac平台**
|
||||
```
|
||||
$ ./build.sh --product-name hispark_taurus_standard --build-target ark_host_mac_tools_packages
|
||||
```
|
||||
|
||||
### 汇编器工具概述
|
||||
## 说明
|
||||
### 使用说明<a name="section1312121216216"></a>
|
||||
|
||||
#### 汇编器工具概述
|
||||
|
||||
工具名称为ark\_asm,用于将文本格式的方舟字节码文件转换为二进制格式的方舟字节码文件。
|
||||
|
||||
@ -52,51 +79,21 @@ Runtime Core组件是方舟运行时的公共组件,主要包括一些语言
|
||||
ark_asm [选项] 输入文件 输出文件
|
||||
```
|
||||
|
||||
<a name="table11141827153017"></a>
|
||||
<table><thead align="left"><tr id="row101462717303"><th class="cellrowborder" valign="top" width="50%" id="mcps1.1.3.1.1"><p id="p51552743010"><a name="p51552743010"></a><a name="p51552743010"></a>选项</p>
|
||||
</th>
|
||||
<th class="cellrowborder" valign="top" width="50%" id="mcps1.1.3.1.2"><p id="p11592710304"><a name="p11592710304"></a><a name="p11592710304"></a>描述</p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr id="row2015172763014"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p171592710306"><a name="p171592710306"></a><a name="p171592710306"></a>--dump-scopes</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p13151527133011"><a name="p13151527133011"></a><a name="p13151527133011"></a>将结果保存到json文件中,以支持在VS Code中的debug模式</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row1015527173015"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1615182712308"><a name="p1615182712308"></a><a name="p1615182712308"></a>--help</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p9556101593120"><a name="p9556101593120"></a><a name="p9556101593120"></a>帮助提示</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row1015112763020"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1815182733012"><a name="p1815182733012"></a><a name="p1815182733012"></a>--log-file</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1615627173019"><a name="p1615627173019"></a><a name="p1615627173019"></a>使能log打印后,指定log文件输出路径</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row131515277307"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p111572716304"><a name="p111572716304"></a><a name="p111572716304"></a>--optimize</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p25842312319"><a name="p25842312319"></a><a name="p25842312319"></a>使能编译优化</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row1815112753020"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p2151927193015"><a name="p2151927193015"></a><a name="p2151927193015"></a>--size-stat</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1715312588115"><a name="p1715312588115"></a><a name="p1715312588115"></a>统计并打印出转换后方舟字节码信息</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row1915182703012"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p17151527133017"><a name="p17151527133017"></a><a name="p17151527133017"></a>--verbose</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p15761152983113"><a name="p15761152983113"></a><a name="p15761152983113"></a>使能log打印</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
| 选项 | 描述 |
|
||||
|---------------|------------------------------------------------|
|
||||
| --dump-scopes | 将结果保存到json文件中,以支持在VS Code中的debug模式 |
|
||||
| --help | 帮助提示 |
|
||||
| --log-file | 使能log打印后,指定log文件输出路径 |
|
||||
| --optimize | 使能编译优化 |
|
||||
| --size-stat | 统计并打印出转换后方舟字节码信息 |
|
||||
| --verbose | 使能log打印 |
|
||||
| --version | 打印版本信息,包括当前和所支持的最低的文件格式版本 |
|
||||
|
||||
输入文件:文本格式的方舟字节码
|
||||
|
||||
输出文件:二进制格式的方舟字节码
|
||||
|
||||
### 反汇编器工具概述
|
||||
#### 反汇编器工具概述
|
||||
|
||||
工具名称为ark\_disasm,用于将二进制格式的方舟字节码文件转换为文本格式的方舟字节码文件。
|
||||
|
||||
@ -106,35 +103,15 @@ ark_asm [选项] 输入文件 输出文件
|
||||
ark_disasm [选项] 输入文件 输出文件
|
||||
```
|
||||
|
||||
<a name="table125062517328"></a>
|
||||
<table><thead align="left"><tr id="row125182553217"><th class="cellrowborder" valign="top" width="50%" id="mcps1.1.3.1.1"><p id="p175162514327"><a name="p175162514327"></a><a name="p175162514327"></a>选项</p>
|
||||
</th>
|
||||
<th class="cellrowborder" valign="top" width="50%" id="mcps1.1.3.1.2"><p id="p6512255324"><a name="p6512255324"></a><a name="p6512255324"></a>描述</p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr id="row5511825103218"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p45172513326"><a name="p45172513326"></a><a name="p45172513326"></a>--debug</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1245695053215"><a name="p1245695053215"></a><a name="p1245695053215"></a>使能调试信息</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row951112515321"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p451192515323"><a name="p451192515323"></a><a name="p451192515323"></a>--debug-file</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p175142583210"><a name="p175142583210"></a><a name="p175142583210"></a>调试信息输出文件路径,默认为std::cout</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row45116253325"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p85116259328"><a name="p85116259328"></a><a name="p85116259328"></a>--help</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1348135833214"><a name="p1348135833214"></a><a name="p1348135833214"></a>帮助提示</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="row194197407327"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p154205401325"><a name="p154205401325"></a><a name="p154205401325"></a>--verbose</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p369871173312"><a name="p369871173312"></a><a name="p369871173312"></a>增加输出文件的注释信息</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
| 选项 | 描述 |
|
||||
|------------------------|----------------------------------|
|
||||
| --debug | 使能调试信息 |
|
||||
| --debug-file | 调试信息输出文件路径,默认为std::cout |
|
||||
| --help | 帮助提示 |
|
||||
| --quiet | 使能所有"--skip-\*"选项 |
|
||||
| --skip-string-literals | 跳过对字符串字面量的反汇编 |
|
||||
| --verbose | 增加输出文件的注释信息 |
|
||||
| --version | 打印版本信息,包括当前和所支持的最低的文件格式版本 |
|
||||
|
||||
输入文件:二进制格式的方舟字节码
|
||||
|
||||
|
BIN
docs/images/runtime_core_arch.png
Normal file
BIN
docs/images/runtime_core_arch.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
Loading…
Reference in New Issue
Block a user