Skip to content

Commit

Permalink
更新到2019-08-10版本
Browse files Browse the repository at this point in the history
  • Loading branch information
llgoer committed Aug 10, 2019
1 parent 7c262fb commit 9d5243b
Show file tree
Hide file tree
Showing 25 changed files with 2,246 additions and 518 deletions.
12 changes: 12 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2019-08-10:

- added public class fields and private class fields, methods and
accessors (TC39 proposal)
- changed JS_ToCStringLen() prototype
- qjsc: handle '-' in module names and modules with the same filename
- added std.urlGet
- exported JS_GetOwnPropertyNames() and JS_GetOwnProperty()
- exported some bigint C functions
- added support for eshost in run-test262
- misc bug fixes

2019-07-28:

- added dynamic import
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ QuickJS Javascript引擎
* [2.6 Test262 (ECMAScript测试套件)](#26-test262-ecmascript-测试套件)
* [3 技术规范](#3-技术规范)
* [3.1 语言支持](#31-语言支持)
* [3.1.1 ES2020支持](#311-es2020支持)
* [3.1.1 ES2019支持](#311-es2019支持)
* [3.1.2 JSON](#312-json)
* [3.1.3 ECMA402](#313-ecma402)
* [3.1.4 扩展](#314-扩展)
Expand Down Expand Up @@ -60,7 +60,7 @@ QuickJS Javascript引擎
1 简介
--------------

QuickJS是一个小型并且可嵌入的Javascript引擎,它支持ES2020规范,包括模块,异步生成器和代理器。
QuickJS是一个小型并且可嵌入的Javascript引擎,它支持ES2019规范,包括模块,异步生成器和代理器。

它可选支持数学扩展,例如大整数 (BigInt),大浮点数 (BigFloat) 以及运算符重载。

Expand All @@ -78,7 +78,7 @@ QuickJS QQ群:**598609506**。

* 轻量而且易于嵌入:只需几个C文件,没有外部依赖,一个x86下的简单的“hello world”程序只要180 KiB。
* 具有极低启动时间的快速解释器: 在一台单核的台式PC上,大约在100秒内运行ECMAScript 测试套件[1](#FOOT1) 56000次。运行时实例的完整生命周期在不到300微秒的时间内完成。
* 几乎完整实现ES2020支持,包括: 模块,异步生成器和和完整Annex B支持 (传统的Web兼容性)。
* 几乎完整实现ES2019支持,包括: 模块,异步生成器和和完整Annex B支持 (传统的Web兼容性)。
* 通过100%的ECMAScript Test Suite测试。
* 可以将Javascript源编译为没有外部依赖的可执行文件。
* 使用引用计数(以减少内存使用并具有确定性行为)的垃圾收集与循环删除。
Expand Down Expand Up @@ -262,9 +262,9 @@ make test2

### 3.1 语言支持

#### 3.1.1 ES2020支持
#### 3.1.1 ES2019支持

包含Annex B (遗留Web兼容)和Unicode相关功能的ES2020规范 [2](#FOOT2) 已经基本支持。 目前尚未支持以下功能:
包含Annex B (遗留Web兼容)和Unicode相关功能的ES2019规范 [2](#FOOT2) 已经基本支持。 目前尚未支持以下功能:

* Realms (尽管C API支持不同的运行时和上下文)
* Tail calls[3](#FOOT3)
Expand Down Expand Up @@ -718,7 +718,7 @@ In both cases (32 or 64 bits), JSValue exactly fits two CPU registers, so it can

### 4.4 RegExp

开发了一个特定的正则表达式引擎。它既小又高效,并支持所有ES2020功能,包括Unicode属性。作为Javascript编译器,它直接生成没有解析树的字节码。
开发了一个特定的正则表达式引擎。它既小又高效,并支持所有ES2019功能,包括Unicode属性。作为Javascript编译器,它直接生成没有解析树的字节码。

使用显式堆栈的回溯使得系统堆栈上没有递归。简单的量化器经过专门优化,以避免递归。

Expand Down
10 changes: 5 additions & 5 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ Optimizations:

Extensions:
- support more features in [features] section
- add TC39 stage 3 proposals: String.prototype.matchAll, Symbol.matchAll
- fix preprocessor bug if nested #ifdef in jscompress.c
- add built-in preprocessor in compiler, get rid of jscompress
handle #if, #ifdef, #line, limited support for #define
- limited support for web assembly
Expand All @@ -76,6 +74,8 @@ REPL:
- close all predefined methods in repl.js and jscalc.js

Test262o: 0/11262 errors, 463 excluded
Test262: 33/58145 errors, 785 excluded, 5576 skipped
Test262bn: 39/60250 errors, 718 excluded, 4587 skipped
test262 commit: 2ee3864136747ee69401b2d266e234cdd0a95965
Test262o commit: 7da91bceb9ce7613f87db47ddd1292a2dda58b42 (es5-tests branch)

Test262: 27/66629 errors, 784 excluded, 1406 skipped
Test262bn: 27/68730 errors, 717 excluded, 419 skipped
test262 commit: 8f5f6a1aa1a99640483d067f84fcf7719d9e6c38
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2019-07-28
2019-08-10
105 changes: 83 additions & 22 deletions doc/quickjs.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified doc/quickjs.pdf
Binary file not shown.
82 changes: 67 additions & 15 deletions doc/quickjs.texi
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
@chapter Introduction

QuickJS is a small and embeddable Javascript engine. It supports the
ES2020 specification including modules, asynchronous
generators and proxies.
ES2019 specification
@footnote{@url{https://www.ecma-international.org/ecma-262/10.0}}
including modules, asynchronous generators and proxies.

It optionally supports mathematical extensions such as big integers
(BigInt), big floating point numbers (BigFloat) and operator
Expand All @@ -33,12 +34,14 @@ overloading.

@item Small and easily embeddable: just a few C files, no external dependency, 180 KiB of x86 code for a simple ``hello world'' program.

@item Fast interpreter with very low startup time: runs the 58000 tests of the ECMAScript Test Suite@footnote{@url{https://github.com/tc39/test262}} in about 85 seconds on a single core of a desktop PC. The complete life cycle of a runtime instance completes in less than 300 microseconds.
@item Fast interpreter with very low startup time: runs the 69000 tests of the ECMAScript Test Suite@footnote{@url{https://github.com/tc39/test262}} in about 95 seconds on a single core of a desktop PC. The complete life cycle of a runtime instance completes in less than 300 microseconds.

@item Almost complete ES2020 support including modules, asynchronous
generators and full Annex B support (legacy web compatibility).
@item Almost complete ES2019 support including modules, asynchronous
generators and full Annex B support (legacy web compatibility). Many
features from the upcoming ES2020 specification
@footnote{@url{https://tc39.github.io/ecma262/}} are also supported.

@item Passes nearly 100% of the ECMAScript Test Suite tests.
@item Passes nearly 100% of the ECMAScript Test Suite tests when selecting the ES2019 features.

@item Can compile Javascript sources to executables with no external dependency.

Expand Down Expand Up @@ -221,21 +224,48 @@ The tests can be run with
make test2
@end example

For more information, run @code{./run-test262} to see the options of
the test262 runner. The configuration files @code{test262.conf} and
@code{test262bn.conf} contain the options to run the various tests.
The configuration files @code{test262.conf} (resp
@code{test262bn.conf} for the bignum version, @code{test262o.conf} for
the old ES5.1 tests@footnote{The old ES5.1 tests can be extracted with
@code{git clone --single-branch --branch es5-tests
https://github.com/tc39/test262.git test262o}})) contain the options
to run the various tests. Tests can be excluded based on features or
filename.

The file @code{test262_errors.txt} contains the current list of
errors. The runner displays a message when a new error appears or when
an existing error is corrected or modified. Use the @code{-u} option
to update the current list of errors (or @code{make test2-update}).

The file @code{test262_report.txt} contains the logs of all the
tests. It is useful to have a clearer analysis of a particular
error. In case of crash, the last line corresponds to the failing
test.

Use the syntax @code{./run-test262 -c test262.conf -f filename.js} to
run a single test. Use the syntax @code{./run-test262 -c test262.conf
N} to start testing at test number @code{N}.

For more information, run @code{./run-test262} to see the command line
options of the test262 runner.

@code{run-test262} accepts the @code{-N} option to be invoked from
@code{test262-harness}@footnote{@url{https://github.com/bterlson/test262-harness}}
thru @code{eshost}. Unless you want to compare QuickJS with other
engines under the same conditions, we do not recommend to run the
tests this way as it is much slower (typically more than one hour
instead of about 100 seconds).

@chapter Specifications

@section Language support

@subsection ES2020 support
@subsection ES2019 support

The ES2020 specification
@footnote{@url{https://tc39.github.io/ecma262/}} is almost fully
supported including the Annex B (legacy web compatibility) and the
Unicode related features. The following features are not supported
yet:
The ES2019 specification is almost fully supported including the Annex
B (legacy web compatibility) and the Unicode related features.

The following features are not supported yet:

@itemize

Expand Down Expand Up @@ -399,6 +429,28 @@ useful in case of specific memory constraints or for testing.
Return the value of the environment variable @code{name} or
@code{undefined} if it is not defined.

@item urlGet(url, options = undefined)

Download @code{url} using the @file{curl} command line
utility. @code{options} is an optional object containing the following
optional properties:

@table @code
@item binary
Boolean (default = false). If true, the response is an ArrayBuffer
instead of a string. When a string is returned, the data is assumed
to be UTF-8 encoded.

@item full
Boolean (default = false). If true, return the an object contains
the properties @code{response} (response content),
@code{responseHeaders} (headers separated by CRLF), @code{status}
(status code). If @code{full} is false, only the response is
returned if the status is between 200 and 299. Otherwise an
@code{std.Error} exception is raised.

@end table

@end table

FILE prototype:
Expand Down
Loading

0 comments on commit 9d5243b

Please sign in to comment.