You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go to interactive mode (it is not the default when files are provided on the command line).
144
+
转到交互模式 (在命令行上提供文件时,它不是默认模式).
145
145
146
146
`-m`
147
147
148
148
`--module`
149
149
150
-
Load as ES6 module (default if .mjs file extension).
150
+
加载为ES6模块(默认为.mjs文件扩展名)。
151
151
152
-
Advanced options are:
152
+
高级选项包括:
153
153
154
154
`-d`
155
155
156
156
`--dump`
157
157
158
-
Dump the memory usage stats.
158
+
转存内存使用情况统计信息。
159
159
160
160
`-q`
161
161
162
162
`--quit`
163
163
164
-
just instantiate the interpreter and quit.
164
+
只是实例化解释器并退出。
165
165
166
166
#### 2.3.2 `qjsc` 编译器
167
167
168
-
usage: qjsc \[options\]\[files\]
168
+
用法: qjsc \[options\]\[files\]
169
169
170
-
Options are:
170
+
选项:
171
171
172
172
`-c`
173
173
174
-
Only output bytecode in a C file. The default is to output an executable file.
174
+
仅输出C文件中的字节码,默认是输出可执行文件。
175
175
176
176
`-e`
177
177
178
-
Output`main()`and bytecode in a C file. The default is to output an executable file.
178
+
`main()`C文件中的输出和字节码,默认是输出可执行文件。
179
179
180
180
`-o output`
181
181
182
-
Set the output filename (default = out.c or a.out).
182
+
设置输出文件名(默认= out.c或a.out)。
183
183
184
184
`-N cname`
185
185
186
-
Set the C name of the generated data.
186
+
设置生成数据的C名称。
187
187
188
188
`-m`
189
189
190
-
Compile as Javascript module (default if .mjs extension).
190
+
编译为Javascript模块(默认为.mjs扩展名)。
191
191
192
192
`-M module_name[,cname]`
193
193
194
-
Add initialization code for an external C module. See the `c_module` example.
194
+
添加外部C模块的初始化代码。查看`c_module`示例。
195
195
196
196
`-x`
197
197
198
-
Byte swapped output (only used for cross compilation).
198
+
字节交换输出(仅用于交叉编译)。
199
199
200
200
`-flto`
201
201
202
-
Use link time optimization. The compilation is slower but the executable is smaller and faster. This option is automatically set when the `-fno-x` options are used.
Disable selected language features to produce a smaller executable file.
206
+
禁用所选语言功能以生成较小的可执行文件。
207
207
208
208
### 2.4 `qjscalc` 应用程序
209
209
210
-
The `qjscalc` application is a superset of the `qjsbn` command line interpreter implementing a Javascript calculator with arbitrarily large integer and floating point numbers, fractions, complex numbers, polynomials and matrices. The source code is in qjscalc.js. More documentation and a web version are available at [http://numcalc.com](http://numcalc.com).
Run `make test` to run the few built-in tests included in the QuickJS archive.
214
+
运行`make test`以运行QuickJS存档中包含的一些内置测试。
215
215
216
216
### 2.6 Test262 (ECMAScript 测试套件))
217
217
218
-
A test262 runner is included in the QuickJS archive.
218
+
QuickJS存档中包含test262运行程序。
219
219
220
-
For reference, the full test262 tests are provided in the archive qjs-tests-yyyy-mm-dd.tar.xz. You just need to untar it into the QuickJS source code directory.
The patch adds the implementation specific `harness` functions and optimizes the inefficient RegExp character classes and Unicode property escapes tests (the tests themselves are not modified, only a slow string initialization function is optimized).
For more information, run `./run-test262` to see the options of the test262 runner. The configuration files `test262.conf` and `test262bn.conf` contain the options to run the various tests.
0 commit comments