]> git.kaiwu.me - quickjs.git/log
quickjs.git
4 weeks agocompilation fixes
Fabrice Bellard [Tue, 13 Oct 2026 16:40:10 +0000 (18:40 +0200)]
compilation fixes

4 weeks agoadded Promise.allKeyed and Promise.allSettledKeyed)
Fabrice Bellard [Tue, 13 Oct 2026 16:32:27 +0000 (18:32 +0200)]
added Promise.allKeyed and Promise.allSettledKeyed)

4 weeks agoadded iterator chunking (initial patch by saghul)
Fabrice Bellard [Tue, 13 Oct 2026 16:09:44 +0000 (18:09 +0200)]
added iterator chunking (initial patch by saghul)

4 weeks agoadded Iterator.prototype.includes (saghul)
Fabrice Bellard [Tue, 13 Oct 2026 15:39:02 +0000 (17:39 +0200)]
added Iterator.prototype.includes (saghul)

4 weeks agoadded Iterator.prototype.join (saghul)
Fabrice Bellard [Tue, 13 Oct 2026 15:34:25 +0000 (17:34 +0200)]
added Iterator.prototype.join (saghul)

4 weeks agoadded Array.fromAsync
Fabrice Bellard [Tue, 13 Oct 2026 14:47:12 +0000 (16:47 +0200)]
added Array.fromAsync

4 weeks agouse correct helper for Iterator.concat
Fabrice Bellard [Tue, 13 Oct 2026 13:51:24 +0000 (15:51 +0200)]
use correct helper for Iterator.concat

4 weeks agoadded Iterator.zip and Iterator.zipKeyed - factorized js_get_iterator_flattenable()
Fabrice Bellard [Tue, 13 Oct 2026 13:43:28 +0000 (15:43 +0200)]
added Iterator.zip and Iterator.zipKeyed - factorized js_get_iterator_flattenable()

4 weeks agoremoved memory leak
Fabrice Bellard [Tue, 13 Oct 2026 12:40:18 +0000 (14:40 +0200)]
removed memory leak

4 weeks agoCI: disable CONFIG_TEMPORAL_INTL on linux/arm/v6 and linux/arm/v7
Fabrice Bellard [Tue, 13 Oct 2026 11:33:20 +0000 (13:33 +0200)]
CI: disable CONFIG_TEMPORAL_INTL on linux/arm/v6 and linux/arm/v7

4 weeks agofixed bad rounding in duration computation
Fabrice Bellard [Mon, 12 Oct 2026 11:49:56 +0000 (13:49 +0200)]
fixed bad rounding in duration computation

4 weeks agofixed bad rounding in duration computation
Fabrice Bellard [Mon, 12 Oct 2026 10:53:31 +0000 (12:53 +0200)]
fixed bad rounding in duration computation

4 weeks agodisable Temporal and Intl on 32 bit hosts because int128 is not always supported...
Fabrice Bellard [Mon, 12 Oct 2026 10:07:55 +0000 (12:07 +0200)]
disable Temporal and Intl on 32 bit hosts because int128 is not always supported in this case - avoid depending on float128 for duration division - simplified some int128 code

4 weeks agoremoved some warnings - fixed win32 compilation
Fabrice Bellard [Sat, 10 Oct 2026 16:47:01 +0000 (18:47 +0200)]
removed some warnings - fixed win32 compilation

4 weeks agoundo Makefile change
Fabrice Bellard [Sat, 10 Oct 2026 16:05:17 +0000 (18:05 +0200)]
undo Makefile change

4 weeks agoadded missing file
Fabrice Bellard [Sat, 10 Oct 2026 16:00:29 +0000 (18:00 +0200)]
added missing file

4 weeks agoadded experimental AI coded Temporal and Intl support. There is no external dependenc...
Fabrice Bellard [Sat, 10 Oct 2026 15:53:37 +0000 (17:53 +0200)]
added experimental AI coded Temporal and Intl support. There is no external dependency. Intl includes its own locale data (can be manually updated from the CLDR) and Temporal includes the calendar algorithms and a timezone database (can be manually updated from the system TZif files)

4 weeks agoexported JS_NewCConstructor()
Fabrice Bellard [Sat, 10 Oct 2026 14:49:45 +0000 (16:49 +0200)]
exported JS_NewCConstructor()

4 weeks agoexported iterator helpers
Fabrice Bellard [Sat, 10 Oct 2026 14:46:08 +0000 (16:46 +0200)]
exported iterator helpers

4 weeks agoadded JS_CFUNC_constructor_or_func_flags
Fabrice Bellard [Sat, 10 Oct 2026 14:42:02 +0000 (16:42 +0200)]
added JS_CFUNC_constructor_or_func_flags

4 weeks agoexport JS_OrdinaryIsInstanceOf()
Fabrice Bellard [Sat, 10 Oct 2026 14:39:27 +0000 (16:39 +0200)]
export JS_OrdinaryIsInstanceOf()

4 weeks agoexport JS_ThisDateValue()
Fabrice Bellard [Sat, 10 Oct 2026 14:37:36 +0000 (16:37 +0200)]
export JS_ThisDateValue()

4 weeks agoexported JS_CreateFromConstructor()
Fabrice Bellard [Sat, 10 Oct 2026 14:32:04 +0000 (16:32 +0200)]
exported JS_CreateFromConstructor()

4 weeks agoadded JS_ToCStringNZ() and exported JS_ToUTF32String()
Fabrice Bellard [Sat, 10 Oct 2026 14:26:23 +0000 (16:26 +0200)]
added JS_ToCStringNZ() and exported JS_ToUTF32String()

4 weeks agoexported JS_ToPrimitive(), JS_ToObject() and JS_ToInt32Sat()
Fabrice Bellard [Sat, 10 Oct 2026 14:23:33 +0000 (16:23 +0200)]
exported JS_ToPrimitive(), JS_ToObject() and JS_ToInt32Sat()

4 weeks agolibunicode: added lre_is_soft_dotted() and exported unicode_get_cc()
Fabrice Bellard [Sat, 10 Oct 2026 14:13:11 +0000 (16:13 +0200)]
libunicode: added lre_is_soft_dotted() and exported unicode_get_cc()

4 weeks agoremoved unused arguments of JS_IteratorNext()
Fabrice Bellard [Sat, 10 Oct 2026 12:14:21 +0000 (14:14 +0200)]
removed unused arguments of JS_IteratorNext()

4 weeks agofixed class elements parsing after a line terminator following get, set or static...
Fabrice Bellard [Sat, 10 Oct 2026 08:26:13 +0000 (10:26 +0200)]
fixed class elements parsing after a line terminator following get, set or static (#567)

6 weeks agorepect the spec operation order in Object.defineProperties
Fabrice Bellard [Tue, 29 Sep 2026 13:16:59 +0000 (15:16 +0200)]
repect the spec operation order in Object.defineProperties

6 weeks agofix Proxy getOwnPropertyDescriptor invariant check for values and accessors
Fabrice Bellard [Tue, 29 Sep 2026 12:55:55 +0000 (14:55 +0200)]
fix Proxy getOwnPropertyDescriptor invariant check for values and accessors

6 weeks agoexclude more tests we don't need to fix
Fabrice Bellard [Tue, 29 Sep 2026 12:06:59 +0000 (14:06 +0200)]
exclude more tests we don't need to fix

6 weeks agofixed Function.prototype.bind prototype inheritance
Fabrice Bellard [Tue, 29 Sep 2026 12:00:18 +0000 (14:00 +0200)]
fixed Function.prototype.bind prototype inheritance

6 weeks agofix anonymous function name inference in for-in loop initializers
Fabrice Bellard [Tue, 29 Sep 2026 10:21:26 +0000 (12:21 +0200)]
fix anonymous function name inference in for-in loop initializers

6 weeks agofix super property assignment on non-extensible receiver with existing property
Fabrice Bellard [Tue, 29 Sep 2026 10:10:31 +0000 (12:10 +0200)]
fix super property assignment on non-extensible receiver with existing property

6 weeks agofixed module ambiguous export test
Fabrice Bellard [Tue, 29 Sep 2026 10:03:16 +0000 (12:03 +0200)]
fixed module ambiguous export test

6 weeks agospec update for Promise.try
Fabrice Bellard [Tue, 29 Sep 2026 08:30:40 +0000 (10:30 +0200)]
spec update for Promise.try

6 weeks agoexclude the test: test262/test/language/identifier-resolution/assign-to-global-undefi...
Fabrice Bellard [Mon, 28 Sep 2026 16:17:46 +0000 (18:17 +0200)]
exclude the test: test262/test/language/identifier-resolution/assign-to-global-undefined.js

6 weeks agoAnnex B: allow call expression as assignment target in non-strict mode, but throw...
Fabrice Bellard [Mon, 28 Sep 2026 15:36:29 +0000 (17:36 +0200)]
Annex B: allow call expression as assignment target in non-strict mode, but throw ReferenceError at runtime.

6 weeks agosimplified and fixed yield/await identifier parsing
Fabrice Bellard [Mon, 28 Sep 2026 14:56:47 +0000 (16:56 +0200)]
simplified and fixed yield/await identifier parsing

6 weeks agofixed returned value of empty catch blocks
Fabrice Bellard [Mon, 28 Sep 2026 12:16:33 +0000 (14:16 +0200)]
fixed returned value of empty catch blocks

6 weeks agofixed TypedArray.prototype.at
Fabrice Bellard [Mon, 28 Sep 2026 11:57:18 +0000 (13:57 +0200)]
fixed TypedArray.prototype.at

6 weeks agofixed 'return' invocation in Iterator helpers - fixed 'next' method get in Iterator...
Fabrice Bellard [Mon, 28 Sep 2026 11:35:05 +0000 (13:35 +0200)]
fixed 'return' invocation in Iterator helpers - fixed 'next' method get in Iterator.prototype.flatMap (#539)

6 weeks agoadded clarification for the JS_PrintValue callback (#558)
Fabrice Bellard [Mon, 28 Sep 2026 10:31:48 +0000 (12:31 +0200)]
added clarification for the JS_PrintValue callback (#558)

6 weeks agofixed ArrayBuffer.prototype.resize
Fabrice Bellard [Mon, 28 Sep 2026 10:07:30 +0000 (12:07 +0200)]
fixed ArrayBuffer.prototype.resize

6 weeks agoadded JS_ToBigInt128(), JS_ToBigInt128Sat() and JS_NewBigInt128()
Fabrice Bellard [Mon, 28 Sep 2026 10:00:54 +0000 (12:00 +0200)]
added JS_ToBigInt128(), JS_ToBigInt128Sat() and JS_NewBigInt128()

6 weeks agofixed potential bug in 32 bit JS_ToBigInt64() (cannot happen with canonicalized bigints)
Fabrice Bellard [Mon, 28 Sep 2026 09:29:38 +0000 (11:29 +0200)]
fixed potential bug in 32 bit JS_ToBigInt64() (cannot happen with canonicalized bigints)

6 weeks agorun-test2: don't increment the test number for strict mode - fixed print_error()...
Fabrice Bellard [Sat, 26 Sep 2026 14:44:20 +0000 (16:44 +0200)]
run-test2: don't increment the test number for strict mode - fixed print_error() for large error messages - don't return an exit code different from 0 if there are errors when updating the error file - added -q option to disable progress output and also disable it when not outputting to a tty

6 weeks agoadded JS_ToInt64SatF() and fixed String.prototype.repeat with it. Modify Iterator...
Fabrice Bellard [Sat, 26 Sep 2026 14:10:20 +0000 (16:10 +0200)]
added JS_ToInt64SatF() and fixed String.prototype.repeat with it. Modify Iterator.prototype.drop/take to use it even if it is not strictly compliant as it avoids converting to double when the argument is a short integer value

6 weeks agofixed memory leak in Atomics.store (#537)
Fabrice Bellard [Sat, 26 Sep 2026 13:12:07 +0000 (15:12 +0200)]
fixed memory leak in Atomics.store (#537)

6 weeks ago Reject out-of-range limits in Iterator.prototype.take/drop
Fabrice Bellard [Sat, 26 Sep 2026 13:01:46 +0000 (15:01 +0200)]
 Reject out-of-range limits in Iterator.prototype.take/drop

6 weeks agofixed BigInt.AsUintN() and added corresponding regression tests from quickjs-ng
Fabrice Bellard [Sat, 26 Sep 2026 12:39:43 +0000 (14:39 +0200)]
fixed BigInt.AsUintN() and added corresponding regression tests from quickjs-ng

6 weeks agofixed regexp unicode set parsing (#520)
Fabrice Bellard [Sat, 26 Sep 2026 11:01:30 +0000 (13:01 +0200)]
fixed regexp unicode set parsing (#520)

6 weeks agoadded JS_NewSymbol()
Fabrice Bellard [Sat, 26 Sep 2026 10:46:23 +0000 (12:46 +0200)]
added JS_NewSymbol()

6 weeks agotest262 update
Fabrice Bellard [Sat, 26 Sep 2026 10:41:54 +0000 (12:41 +0200)]
test262 update

4 months agorun-test262: when updating errors, sort them so that it gives the same result with...
Fabrice Bellard [Tue, 16 Jun 2026 11:34:49 +0000 (13:34 +0200)]
run-test262: when updating errors, sort them so that it gives the same result with several threads

4 months agooptimized Array.prototype.slice and Array.prototype.splice
Fabrice Bellard [Sat, 13 Jun 2026 16:03:49 +0000 (18:03 +0200)]
optimized Array.prototype.slice and Array.prototype.splice

4 months agofixed typo in commit 445624b
Fabrice Bellard [Sat, 13 Jun 2026 15:54:54 +0000 (17:54 +0200)]
fixed typo in commit 445624b

4 months agoinlined the float case in relational operators
Fabrice Bellard [Sat, 13 Jun 2026 10:21:10 +0000 (12:21 +0200)]
inlined the float case in relational operators

4 months agouse JSValueConst arguments for js_strict_eq2()
Fabrice Bellard [Sat, 13 Jun 2026 10:12:23 +0000 (12:12 +0200)]
use JSValueConst arguments for js_strict_eq2()

4 months agoinlined more cases for equality operators
Fabrice Bellard [Sat, 13 Jun 2026 09:53:58 +0000 (11:53 +0200)]
inlined more cases for equality operators

5 months agonew release
Fabrice Bellard [Thu, 4 Jun 2026 12:53:29 +0000 (14:53 +0200)]
new release

5 months agoCheck return values of fallible functions (#518)
bptato [Thu, 4 Jun 2026 09:58:49 +0000 (11:58 +0200)]
Check return values of fallible functions (#518)

Port of https://github.com/quickjs-ng/quickjs/pull/1409 (bnoordhuis).
I modified it to prevent an atom leak in js_parse_statement_or_decl,
otherwise it's the same.

5 months agoAdd fuzz targets for ES6 modules, JSON, RegExp, and bytecode (#512)
Molefi Ramontseng [Thu, 4 Jun 2026 09:50:35 +0000 (11:50 +0200)]
Add fuzz targets for ES6 modules, JSON, RegExp, and bytecode (#512)

* Add fuzz targets for ES6 modules, JSON, RegExp, and bytecode

Adds 4 new fuzzers targeting high-complexity, low-coverage functions:

- fuzz_module_export: Tests ES6 module export/import parsing (complexity 6727)

- fuzz_json: Tests JSON stringify/parse (complexity ~5000)

- fuzz_regexp_compile: Tests RegExp compilation (complexity 5528)

- fuzz_bytecode: Tests bytecode execution (complexity 5383)

Identified by Fuzz Introspector as having 0% runtime coverage.

Build integration for fuzz/Makefile and build.sh included.

* Convert fuzz targets from C++ to C and use standard C headers

5 months agodoc update
Fabrice Bellard [Thu, 4 Jun 2026 09:31:14 +0000 (11:31 +0200)]
doc update

5 months agokeep more generic cpu_count() for non Linux systems
Fabrice Bellard [Thu, 4 Jun 2026 09:08:15 +0000 (11:08 +0200)]
keep more generic cpu_count() for non Linux systems

5 months agofixed microbench with d8
Fabrice Bellard [Thu, 4 Jun 2026 09:03:10 +0000 (11:03 +0200)]
fixed microbench with d8

5 months agofaster add, sub and mul for mixed integer floating point operands
Fabrice Bellard [Wed, 3 Jun 2026 15:25:16 +0000 (17:25 +0200)]
faster add, sub and mul for mixed integer floating point operands

5 months agoexclude few very slow and currently useless test262 tests
Fabrice Bellard [Wed, 3 Jun 2026 14:18:26 +0000 (16:18 +0200)]
exclude few very slow and currently useless test262 tests

5 months agofixed large performance regression with recent GCC versions
Fabrice Bellard [Wed, 3 Jun 2026 13:48:17 +0000 (15:48 +0200)]
fixed large performance regression with recent GCC versions

5 months agoadd optional define to add asm labels for each opcode to ease code inspection and...
Fabrice Bellard [Wed, 3 Jun 2026 13:19:05 +0000 (15:19 +0200)]
add optional define to add asm labels for each opcode to ease code inspection and profiling

5 months agoadded multi-threading support in run-test262 (initial patch by bnoordhuis) - fixed...
Fabrice Bellard [Tue, 2 Jun 2026 16:12:02 +0000 (18:12 +0200)]
added multi-threading support in run-test262 (initial patch by bnoordhuis) - fixed unsafe thread termination in show_progress() - use the number of physical cores by default - added -T option to force the number of threads - avoid hardcoding the maximum number of threads

5 months agoremoved CONFIG_AGENT
Fabrice Bellard [Tue, 2 Jun 2026 12:42:27 +0000 (14:42 +0200)]
removed CONFIG_AGENT

5 months agofixed win32 compilation
Fabrice Bellard [Tue, 2 Jun 2026 12:17:40 +0000 (14:17 +0200)]
fixed win32 compilation

5 months agoArrayBuffer.prototype.transfer: avoid destroying the old array buffer in case the...
Fabrice Bellard [Tue, 2 Jun 2026 12:08:19 +0000 (14:08 +0200)]
ArrayBuffer.prototype.transfer: avoid destroying the old array buffer in case the allocation of the new array buffer fails. Also avoid setting opaque = NULL for the custom array buffer free function

5 months agoadd line number info in variable initialization (#458)
Fabrice Bellard [Tue, 2 Jun 2026 10:14:13 +0000 (12:14 +0200)]
add line number info in variable initialization (#458)

5 months agouse the host malloc() for all allocations when ASAN is enabled
Fabrice Bellard [Tue, 2 Jun 2026 08:29:05 +0000 (10:29 +0200)]
use the host malloc() for all allocations when ASAN is enabled

5 months agofixed setuid() / setgid() ordering (#517)
Fabrice Bellard [Mon, 1 Jun 2026 16:47:42 +0000 (18:47 +0200)]
fixed setuid() / setgid() ordering (#517)

5 months agodisable inlining of malloc() wrappers to avoid problems with LTO (#515)
Fabrice Bellard [Mon, 1 Jun 2026 16:43:57 +0000 (18:43 +0200)]
disable inlining of malloc() wrappers to avoid problems with LTO (#515)

5 months agoadded poll() support so that the number of file handles is not limited (#502)
Fabrice Bellard [Mon, 1 Jun 2026 16:24:48 +0000 (18:24 +0200)]
added poll() support so that the number of file handles is not limited (#502)

5 months agoAdd run-test262 --no-can-block flag (#505)
Ivan Krasilnikov [Tue, 2 Jun 2026 08:39:16 +0000 (16:39 +0800)]
Add run-test262 --no-can-block flag (#505)

The flag is needed to pass the two CanBlockIsFalse tests from test262
when running individual preprocessed tests via run-test262 -N.

5 months agofixed compilation with clang
Fabrice Bellard [Thu, 21 May 2026 17:02:15 +0000 (19:02 +0200)]
fixed compilation with clang

5 months agoadded custom malloc for small blocks (11% faster on bench-v8)
Fabrice Bellard [Thu, 21 May 2026 16:37:42 +0000 (18:37 +0200)]
added custom malloc for small blocks (11% faster on bench-v8)

5 months agoAdd Uint8Array base64/hex methods (initial patch by saghul)
Fabrice Bellard [Thu, 14 May 2026 17:11:10 +0000 (19:11 +0200)]
Add Uint8Array base64/hex methods (initial patch by saghul)

5 months agomemcpy() (currently) has undefined behavior if a pointer is NULL with zero size ...
Fabrice Bellard [Thu, 14 May 2026 14:21:10 +0000 (16:21 +0200)]
memcpy() (currently) has undefined behavior if a pointer is NULL with zero size (#500)

5 months agofixed error handling in os.exec() (#503)
Fabrice Bellard [Thu, 14 May 2026 13:51:22 +0000 (15:51 +0200)]
fixed error handling in os.exec() (#503)

5 months agoadded missing NULL pointer check (#504)
Fabrice Bellard [Thu, 14 May 2026 13:43:42 +0000 (15:43 +0200)]
added missing NULL pointer check (#504)

5 months agouse __EMSCRIPTEN__ define instead of EMSCRIPTEN
Fabrice Bellard [Thu, 14 May 2026 13:41:29 +0000 (15:41 +0200)]
use __EMSCRIPTEN__ define instead of EMSCRIPTEN

5 months agofixed (again) JS atomics in case of typed array resizing - use same function name...
Fabrice Bellard [Thu, 14 May 2026 13:39:06 +0000 (15:39 +0200)]
fixed (again) JS atomics in case of typed array resizing - use same function name as quickjs-ng for js_atomics_get_buf() (#508)

5 months agoadded libunicode unicode version (#509)
Fabrice Bellard [Thu, 14 May 2026 12:57:49 +0000 (14:57 +0200)]
added libunicode unicode version (#509)

5 months agoMerge pull request #496 from bptato/fix-hex-access
bellard [Thu, 14 May 2026 14:34:46 +0000 (16:34 +0200)]
Merge pull request #496 from bptato/fix-hex-access

Fix member access on non-decimal numeric literals

5 months agoMerge pull request #495 from nickva/fix-initializer-string-warning
bellard [Thu, 14 May 2026 14:25:01 +0000 (16:25 +0200)]
Merge pull request #495 from nickva/fix-initializer-string-warning

Avoid initializer-string warning for the digits array

7 months agoFix member access on non-decimal numeric literals
bptato [Tue, 24 Mar 2026 18:44:11 +0000 (19:44 +0100)]
Fix member access on non-decimal numeric literals

In other engines, 0x0.toString() returns '0', but QJS would try to parse it
as a float and then throw.
Also removes remnants of hex float parsing which is no longer supported
anyway.

(Port of https://github.com/quickjs-ng/quickjs/pull/377)

7 months agoAvoid initializer-string warning for the digits array
Nick Vatamaniuc [Tue, 24 Mar 2026 04:46:16 +0000 (00:46 -0400)]
Avoid initializer-string warning for the digits array

Some newer compilers emit this warning:

```
warning: initializer-string for character array is too long, array size is 36
     but initializer has size 37 (including the null terminating character);
     did you mean to use the 'nonstring' attribute? [-Wunterminated-string-initialization]
 12146 | static char const digits[36] = "0123456789abcdefghijklmnopqrstuvwxyz";
       |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

To avoid the warning initialize the array as individual characters

7 months agoadded JSON.parse source text access
Fabrice Bellard [Mon, 23 Mar 2026 17:45:52 +0000 (18:45 +0100)]
added JSON.parse source text access

7 months agoadded basic protection against too large function in serialized bytecode
Fabrice Bellard [Sat, 21 Mar 2026 16:49:40 +0000 (17:49 +0100)]
added basic protection against too large function in serialized bytecode

7 months agofixed use-after-free via re-entrant GC in FinalizationRegistry weak reference cleanup...
Fabrice Bellard [Sat, 21 Mar 2026 16:39:27 +0000 (17:39 +0100)]
fixed use-after-free via re-entrant GC in FinalizationRegistry weak reference cleanup (#494)

7 months agoFix async generator lifecycle bug (bnoordhuis) (quickjs-ng/quickjs#1355)
Fabrice Bellard [Sat, 21 Mar 2026 15:34:37 +0000 (16:34 +0100)]
Fix async generator lifecycle bug (bnoordhuis) (quickjs-ng/quickjs#1355)

7 months agofixed RegExp.escape
Fabrice Bellard [Sat, 21 Mar 2026 14:53:25 +0000 (15:53 +0100)]
fixed RegExp.escape

7 months agofixed buffer overflow in Atomics with resizable typed arrays
Fabrice Bellard [Sat, 21 Mar 2026 14:35:03 +0000 (15:35 +0100)]
fixed buffer overflow in Atomics with resizable typed arrays

7 months agotypo
Fabrice Bellard [Sat, 21 Mar 2026 13:31:19 +0000 (14:31 +0100)]
typo