Skip to content

Commit acd20e5

Browse files
author
llgoer
committed
Update README.md
1 parent 9ccefbf commit acd20e5

File tree

1 file changed

+28
-29
lines changed

1 file changed

+28
-29
lines changed

README.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -121,105 +121,105 @@ QuickJS是一个小型并且可嵌入的Javascript引擎,它支持ES2019规范
121121

122122
#### 2.3.1 `qjs` 解释器
123123

124-
usage: qjs \[options\] \[files\]
124+
用法: qjs \[options\] \[files\]
125125

126-
Options are:
126+
选项:
127127

128128
`-h`
129129

130130
`--help`
131131

132-
List options.
132+
选项列表。
133133

134134
``-e `EXPR` ``
135135

136136
``--eval `EXPR` ``
137137

138-
Evaluate EXPR.
138+
执行EXPR.
139139

140140
`-i`
141141

142142
`--interactive`
143143

144-
Go to interactive mode (it is not the default when files are provided on the command line).
144+
转到交互模式 (在命令行上提供文件时,它不是默认模式).
145145

146146
`-m`
147147

148148
`--module`
149149

150-
Load as ES6 module (default if .mjs file extension).
150+
加载为ES6模块(默认为.mjs文件扩展名)。
151151

152-
Advanced options are:
152+
高级选项包括:
153153

154154
`-d`
155155

156156
`--dump`
157157

158-
Dump the memory usage stats.
158+
转存内存使用情况统计信息。
159159

160160
`-q`
161161

162162
`--quit`
163163

164-
just instantiate the interpreter and quit.
164+
只是实例化解释器并退出。
165165

166166
#### 2.3.2 `qjsc` 编译器
167167

168-
usage: qjsc \[options\] \[files\]
168+
用法: qjsc \[options\] \[files\]
169169

170-
Options are:
170+
选项:
171171

172172
`-c`
173173

174-
Only output bytecode in a C file. The default is to output an executable file.
174+
仅输出C文件中的字节码,默认是输出可执行文件。
175175

176176
`-e`
177177

178-
Output `main()` and bytecode in a C file. The default is to output an executable file.
178+
`main()` C文件中的输出和字节码,默认是输出可执行文件。
179179

180180
`-o output`
181181

182-
Set the output filename (default = out.c or a.out).
182+
设置输出文件名(默认= out.c或a.out)。
183183

184184
`-N cname`
185185

186-
Set the C name of the generated data.
186+
设置生成数据的C名称。
187187

188188
`-m`
189189

190-
Compile as Javascript module (default if .mjs extension).
190+
编译为Javascript模块(默认为.mjs扩展名)。
191191

192192
`-M module_name[,cname]`
193193

194-
Add initialization code for an external C module. See the `c_module` example.
194+
添加外部C模块的初始化代码。查看`c_module`示例。
195195

196196
`-x`
197197

198-
Byte swapped output (only used for cross compilation).
198+
字节交换输出(仅用于交叉编译)。
199199

200200
`-flto`
201201

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.
202+
使用链接时间优化。编译速度较慢,但可执行文件更小更快。使用选项时会自动设置此选项`-fno-x`
203203

204204
`-fno-[eval|string-normalize|regexp|json|proxy|map|typedarray|promise]`
205205

206-
Disable selected language features to produce a smaller executable file.
206+
禁用所选语言功能以生成较小的可执行文件。
207207

208208
### 2.4 `qjscalc` 应用程序
209209

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).
210+
`qjscalc`应用程序是`qjsbn`命令行解释器的超集,它实现了一个具有任意大整数和浮点数,分数,复数,多项式和矩阵的Javascript计算器。源代码在qjscalc.js中。[http://numcalc.com](http://numcalc.com/)上提供了更多文档和Web版本。
211211

212212
### 2.5 内置测试
213213

214-
Run `make test` to run the few built-in tests included in the QuickJS archive.
214+
运行`make test`以运行QuickJS存档中包含的一些内置测试。
215215

216216
### 2.6 Test262 (ECMAScript 测试套件))
217217

218-
A test262 runner is included in the QuickJS archive.
218+
QuickJS存档中包含test262运行程序。
219219

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.
220+
作为参考,完整的test262测试在档案qjs-tests-yyyy-mm-dd.tar.xz中提供。您只需将其解压缩到QuickJS源代码目录中即可。
221221

222-
Alternatively, the test262 tests can be installed with:
222+
或者,test262测试可以安装:
223223

224224
```
225225
git clone https://github.com/tc39/test262.git test262
@@ -229,15 +229,15 @@ patch -p1 < ../tests/test262.patch
229229
cd ..
230230
```
231231

232-
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).
232+
补丁添加了特定于实现的`harness`函数,并优化了低效的RegExp字符类和Unicode属性转义测试(测试本身不会被修改,只有慢速字符串初始化函数被优化)。
233233

234-
The tests can be run with
234+
测试可以运行
235235

236236
```
237237
make test2
238238
```
239239

240-
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.
240+
有关更多信息,请运行`./run-test262`以查看test262 runner的选项。配置文件`test262.conf``test262bn.conf`包含运行各种测试的选项。
241241

242242
3 技术规范
243243
----------------
@@ -727,7 +727,6 @@ QuickJS is released under the MIT license.
727727

728728
Unless otherwise specified, the QuickJS sources are copyright Fabrice Bellard and Charlie Gordon.
729729

730-
731730
* * *
732731

733732
#### Footnotes

0 commit comments

Comments
 (0)