• Home
Name Date Size #Lines LOC

..--

README-zh.mdD06-May-20251.4 KiB8752

README.mdD06-May-20251.6 KiB8752

parse_command.pyD06-May-202514.8 KiB385305

skip_tests.jsonD06-May-20252 KiB3737

README-zh.md

1# 简介
2
3生成 ES2ABC 和 V8 生成的字节码指令数量差异报告。
4
5# 准备V8
6
7## 1. 安装 depot_tools
8
9
10```sh
11git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
12export PATH=/path/to/depot_tools:$PATH
13```
14
15
16## 2. fetch v8 代码
17
18在任意目录下创建一个 V8 源代码目录并切换到该目录:
19
20```sh
21mkdir ~/v8
22cd ~/v8
23```
24
25使用 fetch 命令获取 V8 源代码及其所有分支和依赖项。
26
27```sh
28fetch v8
29cd v8
30```
31
32
33## 3. 安装依赖项
34
35在 V8 源代码目录下执行以下命令,提取最新更改并安装任何新生成的依赖项。
36
37```sh
38git pull
39gclient sync
40```
41
42接下来,安装其它依赖。
43
44```sh
45./build/install-build-deps.sh
46```
47
48
49## 4. 编译 V8
50
51使用 gm 工具编译构建V8。
52
53```sh
54tools/dev/gm.py x64.release
55```
56
57编译好的v8可执行程序d8的路径如下
58
59```sh
60out/x64.release/d8
61```
62
63
64# 运行脚本
65
66## 使用说明
67
68```sh
69python3 parse_command.py -es2abc ES2ABC_PATH -v8 D8_PATH [arguments]
70```
71
72### 参数
73
74+ `-es2abc`: 可执行程序 es2abc 的路径。
75+ `-v8`: V8可执行程序 d8 的路径。
76
77### 可选参数
78
79+ `--add_case`: 添加单个待执行测试用例的文件路径。
80+ `--add_case_dir`: 添加待执行测试用例所在的目录,脚本将自动搜索该目录中的所有测试用例 (默认筛选.js后缀的测试用例)。
81+ `--timeout`: 用例执行的时间限制 (单位: 秒)。
82
83
84# 测试结果
85
86指令数差异报告: `./discrepancy_report.html`
87

README.md

1# Introduction
2
3Generate a discrepancy report on the number of bytecode instructions generated by ES2ABC and V8.
4
5# Prepare V8
6
7## 1. Install depot_tools
8
9
10```sh
11git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
12export PATH=/path/to/depot_tools:$PATH
13```
14
15
16## 2. fetch v8 code
17
18Create a V8 source code directory in any directory and switch to it:
19
20```sh
21mkdir ~/v8
22cd ~/v8
23```
24
25Get the V8 source code and all its branches and dependencies using the fetch command
26
27```sh
28fetch v8
29cd v8
30```
31
32
33## 3. Installing dependencies
34
35Execute the following commands in the V8 source directory to pull the latest changes and install any new generated dependencies.
36
37```sh
38git pull
39gclient sync
40```
41
42Next, install the other build dependencies:
43
44```sh
45./build/install-build-deps.sh
46```
47
48
49## 4. compile V8
50
51Use the gm tool for V8 build.
52
53```sh
54tools/dev/gm.py x64.release
55```
56
57The path of the compiled V8 executable program d8 is as follows:
58
59```sh
60out/x64.release/d8
61```
62
63
64# Running the Script
65
66## Usage
67
68```sh
69python3 parse_command.py -es2abc ES2ABC_PATH -v8 D8_PATH [arguments]
70```
71
72### Tail arguments
73
74+ `-es2abc`: path to the executable program es2abc.
75+ `-v8`: path to the V8 executable d8.
76
77### Optional arguments
78
79+ `--add_case`: Add the file path of a single test case to be executed.
80+ `--add_case_dir`: Add the directory where the test cases are to be executed and the script will automatically search for all cases in that directory (By default it filters cases with .js extension).
81+ `--timeout`: Time limits for use case execution (In seconds).
82
83
84# Test Result
85
86Instruction number discrepancy report: `./discrepancy_report.html`
87