QuickJS, the Next Generation: a mighty JavaScript engine
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Use mirror for Alpine GHA (#1705) gitlab.alpinelinux.org is super flaky. jirutka/setup-alpine supposedly supports an apk-tools-url argument but it seems to be ignored. I forked it and hard-coded an alternative URL. This commit still sets the argument but it's for illustrative purposes only. | 15 天前 | |
Move JSClass out of quickjs.h (#1713) No public APIs use JSClass. Move it to quickjs.c. | 9 天前 | |
quickjs.h: Add JS_MODULE_EXTERN macro and use it in examples/ The new macro is a counterpart to JS_EXTERN, but for binary C modules. This commit introduces one more preprocessor define that must be set when building C modules. This commit changes examples/fib.c and examples/point.c to use the new macro, while also removing redundant JS_SHARED_LIBRARY. Additionally, the includes use the angled brackets now since quickjs.h is supposed to be external to the binary modules. meson.build is fixed to properly add the include directory; the manual header copying has also been removed as it is redundant. Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com> | 7 个月前 | |
Report the correct column for an undefined global reference A ReferenceError for an undefined global pointed at column 1 (or the start of the enclosing function) rather than the column of the reference itself, because the OP_get_var_undef opcode was emitted with the surrounding source position. Emit the identifier's own line and column so e.g. `function f(){ return missingGlobal; }` points at `missingGlobal` instead of the function. | 1 个月前 | |
Throw error when converting BigIntArray to Int8Array | 7 天前 | |
Update test262 | 1 个月前 | |
Add Iterator.zip (#1274) | 8 个月前 | |
Update .gitignore | 1 个月前 | |
Don't automatically update test262 submodule | 1 年前 | |
Preserve old interrupt handler in std.evalScript (#1707) std.evalScript installs a handler to make REPL scripts interruptible but did so in a way where it removed and forgot about the old one. Instead chain the handlers and restore the old one when we're done. Fixes: https://github.com/quickjs-ng/quickjs/issues/1673 | 12 天前 | |
Update copyright notices (#1353) | 6 个月前 | |
Conditional BUILD_DIR | 23 天前 | |
Fix broken link in README | 1 年前 | |
Add SECURITY.md Inspired by: - https://lkml.org/lkml/2026/5/17/896 - https://github.com/torvalds/linux/commit/4bf85afb9f3ecd7c3b5d15a85b0902f8e725cd06 | 3 个月前 | |
Fix embedding from other libraries without cutils | 6 个月前 | |
Fix JS_FreeCStringUTF16 on slice strings (#1709) Slice and indirect strings don't own the memory they point to, so copy them in JS_ToCStringLenUTF16. Fixes: https://github.com/quickjs-ng/quickjs/issues/1708 | 11 天前 | |
Make Array.fromAsync elements enumerable Array.fromAsync built its result with Object.defineProperty and no `enumerable` flag, so the elements defaulted to non-enumerable. The spec adds them with CreateDataPropertyOrThrow, which creates enumerable own data properties. As a result Object.keys(), spreads and for-in saw an empty array. Add `enumerable: true` to the property definitions and regenerate the precompiled builtin. | 1 个月前 | |
Make Array.fromAsync elements enumerable Array.fromAsync built its result with Object.defineProperty and no `enumerable` flag, so the elements defaulted to non-enumerable. The spec adds them with CreateDataPropertyOrThrow, which creates enumerable own data properties. As a result Object.keys(), spreads and for-in saw an empty array. Add `enumerable: true` to the property definitions and regenerate the precompiled builtin. | 1 个月前 | |
Port Bellard's register-based regexp engine Replace quickjs-ng's stack-based libregexp with Fabrice Bellard's register-based backtracking engine, which is faster and guarantees linear bytecode size growth. This also brings the regexp implementation to full parity with upstream: v flag, regexp modifiers, duplicate named capture groups, properties of strings, and Script=Unknown. Includes the following upstream commits from bellard/quickjs: 7ab2341 faster and simpler implementation of regexp backtracking a774007 removed buffer overflows introduced in regexp optimizations 371c06e ensure regexp bytecode size grows linearly with the input 47aac8b regexp: a set of registers instead of an auxiliary stack 5907aa6 added missing lre_poll_timeout() f113949 removed alloca() in lre_exec(); \s/\S opcodes; optimized \b/\B 7bd1ae2 \x{N} is a syntax error 24379bf added regexp duplicate named groups; fixed reset of captures f95b8ba added regexp modifiers d7cdfdc regexp: added v flag support; CR_OP_SUB + properties of strings fc524f7 added missing 'Unknown' unicode Script | 2 个月前 | |
Add Iterator.zipKeyed (#1277) | 8 个月前 | |
Port Bellard's register-based regexp engine Replace quickjs-ng's stack-based libregexp with Fabrice Bellard's register-based backtracking engine, which is faster and guarantees linear bytecode size growth. This also brings the regexp implementation to full parity with upstream: v flag, regexp modifiers, duplicate named capture groups, properties of strings, and Script=Unknown. Includes the following upstream commits from bellard/quickjs: 7ab2341 faster and simpler implementation of regexp backtracking a774007 removed buffer overflows introduced in regexp optimizations 371c06e ensure regexp bytecode size grows linearly with the input 47aac8b regexp: a set of registers instead of an auxiliary stack 5907aa6 added missing lre_poll_timeout() f113949 removed alloca() in lre_exec(); \s/\S opcodes; optimized \b/\B 7bd1ae2 \x{N} is a syntax error 24379bf added regexp duplicate named groups; fixed reset of captures f95b8ba added regexp modifiers d7cdfdc regexp: added v flag support; CR_OP_SUB + properties of strings fc524f7 added missing 'Unknown' unicode Script | 2 个月前 | |
Add Iterator.zip (#1274) | 8 个月前 | |
Make quickjs.h -Wall -Wextra -pedantic clean (#628) Fixes: https://github.com/quickjs-ng/quickjs/issues/585 | 1 年前 | |
Fix build with strict C compilers on x86-32 | 2 个月前 | |
Make quickjs.h -Wall -Wextra -pedantic clean (#628) Fixes: https://github.com/quickjs-ng/quickjs/issues/585 | 1 年前 | |
Add n_digits=101 precision boundary tests Addresses dtoa.c TODO item: 'test n_digits=101 instead of 100' | 10 个月前 | |
Add include guards to dtoa.h (#1233) | 10 个月前 | |
Fix native Big Endian build Store bytecode checksum in native endianness. Fixes: https://github.com/quickjs-ng/quickjs/issues/1417 | 5 个月前 | |
Add a GC-stress CI job | 2 个月前 | |
Port Bellard's register-based regexp engine Replace quickjs-ng's stack-based libregexp with Fabrice Bellard's register-based backtracking engine, which is faster and guarantees linear bytecode size growth. This also brings the regexp implementation to full parity with upstream: v flag, regexp modifiers, duplicate named capture groups, properties of strings, and Script=Unknown. Includes the following upstream commits from bellard/quickjs: 7ab2341 faster and simpler implementation of regexp backtracking a774007 removed buffer overflows introduced in regexp optimizations 371c06e ensure regexp bytecode size grows linearly with the input 47aac8b regexp: a set of registers instead of an auxiliary stack 5907aa6 added missing lre_poll_timeout() f113949 removed alloca() in lre_exec(); \s/\S opcodes; optimized \b/\B 7bd1ae2 \x{N} is a syntax error 24379bf added regexp duplicate named groups; fixed reset of captures f95b8ba added regexp modifiers d7cdfdc regexp: added v flag support; CR_OP_SUB + properties of strings fc524f7 added missing 'Unknown' unicode Script | 2 个月前 | |
Fix rejection of escaped reserved punctuators in v-flag \q | 26 天前 | |
Port Bellard's register-based regexp engine Replace quickjs-ng's stack-based libregexp with Fabrice Bellard's register-based backtracking engine, which is faster and guarantees linear bytecode size growth. This also brings the regexp implementation to full parity with upstream: v flag, regexp modifiers, duplicate named capture groups, properties of strings, and Script=Unknown. Includes the following upstream commits from bellard/quickjs: 7ab2341 faster and simpler implementation of regexp backtracking a774007 removed buffer overflows introduced in regexp optimizations 371c06e ensure regexp bytecode size grows linearly with the input 47aac8b regexp: a set of registers instead of an auxiliary stack 5907aa6 added missing lre_poll_timeout() f113949 removed alloca() in lre_exec(); \s/\S opcodes; optimized \b/\B 7bd1ae2 \x{N} is a syntax error 24379bf added regexp duplicate named groups; fixed reset of captures f95b8ba added regexp modifiers d7cdfdc regexp: added v flag support; CR_OP_SUB + properties of strings fc524f7 added missing 'Unknown' unicode Script | 2 个月前 | |
Make libunicode-table.h reproducible from unicode_gen - Port the missing generator support from upstream - Fix CMake build, avoid building libunicode Fixes: https://github.com/quickjs-ng/quickjs/issues/1631 | 1 个月前 | |
Fix UB in String.prototype.normalize() Fix: #1683 | 22 天前 | |
Port Bellard's register-based regexp engine Replace quickjs-ng's stack-based libregexp with Fabrice Bellard's register-based backtracking engine, which is faster and guarantees linear bytecode size growth. This also brings the regexp implementation to full parity with upstream: v flag, regexp modifiers, duplicate named capture groups, properties of strings, and Script=Unknown. Includes the following upstream commits from bellard/quickjs: 7ab2341 faster and simpler implementation of regexp backtracking a774007 removed buffer overflows introduced in regexp optimizations 371c06e ensure regexp bytecode size grows linearly with the input 47aac8b regexp: a set of registers instead of an auxiliary stack 5907aa6 added missing lre_poll_timeout() f113949 removed alloca() in lre_exec(); \s/\S opcodes; optimized \b/\B 7bd1ae2 \x{N} is a syntax error 24379bf added regexp duplicate named groups; fixed reset of captures f95b8ba added regexp modifiers d7cdfdc regexp: added v flag support; CR_OP_SUB + properties of strings fc524f7 added missing 'Unknown' unicode Script | 2 个月前 | |
Add 'extern' statements to public headers for C++ compatibility | 2 年前 | |
Fix OOB write in libregrexp | 1 个月前 | |
Preserve old interrupt handler in std.evalScript (#1707) std.evalScript installs a handler to make REPL scripts interruptible but did so in a way where it removed and forgot about the old one. Instead chain the handlers and restore the old one when we're done. Fixes: https://github.com/quickjs-ng/quickjs/issues/1673 | 12 天前 | |
Update meson.build | 10 个月前 | |
Add WASI reactor build and re-entrant event loop APIs (#1308) | 7 个月前 | |
Disable standalone executable support under WASM/Emscripten | 3 个月前 | |
Add man pages (#1595) | 1 个月前 | |
Fix discarded qualifiers compilation warning with GCC 15.2 | 5 个月前 | |
Add man pages (#1595) | 1 个月前 | |
Implement explicit resource management Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl> Closes: https://github.com/quickjs-ng/quickjs/pull/865 | 3 个月前 | |
Enable support for GCC compler v < 4.9 GCCv4.8 and lower doesn't ship with stdatomic implementation (even though they don't define __STD_NO_ATOMICS__ for c11). If the code is compiled with GCCv4.8 and older, we use builtin GCC atomic operations instead. The patch was initially proposed in quickjs's mailing group: https://www.freelists.org/post/quickjs-devel/PATCH-support-for-older-gcc-versions-whitespace-changes-excluded | 2 年前 | |
Preserve old interrupt handler in std.evalScript (#1707) std.evalScript installs a handler to make REPL scripts interruptible but did so in a way where it removed and forgot about the old one. Instead chain the handlers and restore the old one when we're done. Fixes: https://github.com/quickjs-ng/quickjs/issues/1673 | 12 天前 | |
Add support for text imports The two failing tests are: - a quine (imports itself); needs some more work in the module loader - dynamic imports; the dynamic loader doesn't support attributes at all at the moment | 5 个月前 | |
Implement explicit resource management Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl> Closes: https://github.com/quickjs-ng/quickjs/pull/865 | 3 个月前 | |
Throw error when converting BigIntArray to Int8Array | 7 天前 | |
Move JSClass out of quickjs.h (#1713) No public APIs use JSClass. Move it to quickjs.c. | 9 天前 | |
Tab-complete keywords in REPL (#1267) Make it smart enough to complete: - `wh<TAB>` to `while (` - `tr<TAB>` to `try {` - `th<TAB>` to `this` and then `this<TAB>` to `this.` - etc. But don't complete object properties that way. Fixes: https://github.com/quickjs-ng/quickjs/issues/1265 | 9 个月前 | |
Enable test262 host-gc-required feature (#1696) Expose a gc() method on the built-in $262 object. | 20 天前 | |
Add checksum field to bjson (#1386) Helps protect the wire format against data corruption, where corruption should be understood as bit flips, not adversarial input. Fixes: https://github.com/quickjs-ng/quickjs/issues/1378 | 6 个月前 | |
Add faster test262 test target (#362) * Add faster test262 test target - add test262-fast.conf with lengthy tests disabled - add test262-fast corresponding target - make valgrind use test262-fast | 2 年前 | |
Enable test262 host-gc-required feature (#1696) Expose a gc() method on the built-in $262 object. | 20 天前 | |
Do not coerce the value on a TypedArray out-of-bounds write with a foreign receiver TypedArray [[Set]] (10.4.5.5) only coerces the value, via TypedArraySetElement, when the receiver is the typed array itself (step i). With any other receiver an out-of-bounds or non-canonical integer index is dropped (step ii) and the value is returned without being evaluated. quickjs always evaluated it, so a valueOf/@@toPrimitive on the value ran when it should not have. Only coerce when the receiver object is the typed array (p == p1). | 1 个月前 | |
test: compare re-export error to direct-import error The module path in the SyntaxError is written into a fixed-size atom buffer (ATOM_GET_STR_BUF_SIZE = 64), so on CI's long absolute build paths the fixture filename is truncated before the distinguishing suffix. The substring assertion on "fixture_reexport_source" therefore failed even though the fix was correct. Assert instead that the re-export error message equals the message from a direct import of the same missing binding. Both name the source module and the same looked-up name, so the messages are identical regardless of path length, which is exactly the behavior the fix guarantees. | 1 个月前 | |
Make libunicode-table.h reproducible from unicode_gen - Port the missing generator support from upstream - Fix CMake build, avoid building libunicode Fixes: https://github.com/quickjs-ng/quickjs/issues/1631 | 1 个月前 | |
Make libunicode-table.h reproducible from unicode_gen - Port the missing generator support from upstream - Fix CMake build, avoid building libunicode Fixes: https://github.com/quickjs-ng/quickjs/issues/1631 | 1 个月前 | |
Make libunicode-table.h reproducible from unicode_gen - Port the missing generator support from upstream - Fix CMake build, avoid building libunicode Fixes: https://github.com/quickjs-ng/quickjs/issues/1631 | 1 个月前 | |
Add update-version.sh script So we don't forget to bump the version everywhere. | 6 个月前 |
以下内容由 AI 翻译,如有问题请 点此提交 issue 反馈
⚡️ QuickJS - 强大的 JavaScript 引擎
概览
QuickJS 是一款轻量级且可嵌入的 JavaScript 引擎。它的目标是支持最新的 ECMAScript 规范。
本项目是在 Fabrice Bellard 和 Charlie Gordon 创建的 原始 QuickJS 项目 休眠后进行的 分叉,旨在重启其开发进程。
快速入门
请访问 项目官网 查看如何开始以及更多文档资料。
作者
@bnoordhuis、@saghul 以及众多 贡献者。