]> git.kaiwu.me - quickjs.git/log
quickjs.git
12 months agoupdate test262
Fabrice Bellard [Sat, 28 Jun 2025 08:43:26 +0000 (10:43 +0200)]
update test262

12 months agoupdate Changelog
Fabrice Bellard [Sat, 14 Jun 2025 09:51:48 +0000 (11:51 +0200)]
update Changelog

12 months agoadded Error.isError() (bnoordhuis)
Fabrice Bellard [Sat, 14 Jun 2025 09:42:54 +0000 (11:42 +0200)]
added Error.isError() (bnoordhuis)

12 months agoMerge pull request #418 from nickva/fix-byteoffset-for-detached-array-buffers
bellard [Sat, 14 Jun 2025 09:30:13 +0000 (11:30 +0200)]
Merge pull request #418 from nickva/fix-byteoffset-for-detached-array-buffers

Fix byteOffset for detached array buffers

12 months agoFix Windows MinGW CI Build
Nick Vatamaniuc [Sat, 7 Jun 2025 05:12:54 +0000 (01:12 -0400)]
Fix Windows MinGW CI Build

```
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Error: Process completed with exit code 100.
```

As the error suggests `apt update` seems to fix it

12 months agoRead byteOffset for detached buffers
Nick Vatamaniuc [Sat, 7 Jun 2025 04:42:50 +0000 (00:42 -0400)]
Read byteOffset for detached buffers

The spec [1] expects to read `byteOffset` even for detached buffers.

Noticed a new test262 test [2] failed and there an an existing one we skipped
as well for the same reason.

[1] https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
[2] https://github.com/tc39/test262/blob/main/test/built-ins/TypedArray/prototype/subarray/byteoffset-with-detached-buffer.js

Fix: https://github.com/bellard/quickjs/issues/417

13 months agofixed js_bigint_to_string1() (#412)
Fabrice Bellard [Thu, 29 May 2025 18:01:24 +0000 (20:01 +0200)]
fixed js_bigint_to_string1() (#412)

13 months agoupdate tests
Fabrice Bellard [Sat, 24 May 2025 13:43:14 +0000 (15:43 +0200)]
update tests

13 months agoadded missing 'Unknown' unicode Script
Fabrice Bellard [Sat, 24 May 2025 13:36:08 +0000 (15:36 +0200)]
added missing 'Unknown' unicode Script

13 months agoupdate tests
Fabrice Bellard [Sat, 24 May 2025 11:26:36 +0000 (13:26 +0200)]
update tests

13 months agonew keyword cannot be used with an optional chain
Fabrice Bellard [Sat, 24 May 2025 11:01:50 +0000 (13:01 +0200)]
new keyword cannot be used with an optional chain

13 months agofixed parsing of function definition
Fabrice Bellard [Sat, 24 May 2025 10:47:35 +0000 (12:47 +0200)]
fixed parsing of function definition

13 months agomore robust out of memory handling (#406)
Fabrice Bellard [Sat, 24 May 2025 10:09:46 +0000 (12:09 +0200)]
more robust out of memory handling (#406)

13 months agoavoid win32 crash in getTimezoneOffset() if time is < 1970 (#238)
Fabrice Bellard [Sat, 24 May 2025 09:32:22 +0000 (11:32 +0200)]
avoid win32 crash in getTimezoneOffset() if time is < 1970 (#238)

13 months agosupport JSON modules in qjsc - added support of JSON5 modules (using type = "json5")
Fabrice Bellard [Sat, 24 May 2025 08:24:01 +0000 (10:24 +0200)]
support JSON modules in qjsc - added support of JSON5 modules (using type = "json5")

13 months agoimproved compatibility of std.parseExtJSON() with JSON5
Fabrice Bellard [Sat, 24 May 2025 08:16:10 +0000 (10:16 +0200)]
improved compatibility of std.parseExtJSON() with JSON5

13 months agofixed Regexp.prototype[Symbol.match]
Fabrice Bellard [Sat, 24 May 2025 08:12:51 +0000 (10:12 +0200)]
fixed Regexp.prototype[Symbol.match]

13 months agouse Object.is() in tests
Fabrice Bellard [Sat, 24 May 2025 08:02:50 +0000 (10:02 +0200)]
use Object.is() in tests

13 months agoadded JSON modules and import attributes
Fabrice Bellard [Tue, 20 May 2025 16:27:23 +0000 (18:27 +0200)]
added JSON modules and import attributes

13 months agoadded JS_AtomToCStringLen()
Fabrice Bellard [Tue, 20 May 2025 16:03:29 +0000 (18:03 +0200)]
added JS_AtomToCStringLen()

13 months agoexport JS_FreePropertyEnum()
Fabrice Bellard [Tue, 20 May 2025 15:59:48 +0000 (17:59 +0200)]
export JS_FreePropertyEnum()

13 months agoimproved JSON parser conformity (chqrlie) (#250)
Fabrice Bellard [Mon, 19 May 2025 15:23:25 +0000 (17:23 +0200)]
improved JSON parser conformity (chqrlie) (#250)

13 months agoProxy: fixed prototype comparison in setPrototypeOf() and getPrototypeOf() (#410)
Fabrice Bellard [Mon, 19 May 2025 11:35:06 +0000 (13:35 +0200)]
Proxy: fixed prototype comparison in setPrototypeOf() and getPrototypeOf() (#410)

13 months agocompilation fix
Fabrice Bellard [Fri, 16 May 2025 18:48:01 +0000 (20:48 +0200)]
compilation fix

13 months agoupdate test results
Fabrice Bellard [Fri, 16 May 2025 18:38:56 +0000 (20:38 +0200)]
update test results

13 months agoadded regexp modifiers
Fabrice Bellard [Fri, 16 May 2025 18:34:18 +0000 (20:34 +0200)]
added regexp modifiers

13 months agoadded Promise.try (saghul)
Fabrice Bellard [Fri, 16 May 2025 16:02:14 +0000 (18:02 +0200)]
added Promise.try (saghul)

13 months agobetter promise rejection tracker heuristics (#112)
Fabrice Bellard [Fri, 16 May 2025 15:47:41 +0000 (17:47 +0200)]
better promise rejection tracker heuristics (#112)

13 months agoregexp: added v flag support - fixed corner cases of case insensitive matching
Fabrice Bellard [Fri, 16 May 2025 15:43:03 +0000 (17:43 +0200)]
regexp: added v flag support - fixed corner cases of case insensitive matching

13 months agoadded Float16Array (bnoordhuis) - optimized float16 conversion functions
Fabrice Bellard [Mon, 5 May 2025 17:12:32 +0000 (19:12 +0200)]
added Float16Array (bnoordhuis) - optimized float16 conversion functions

13 months agoadded RegExp.escape (bnoordhuis)
Fabrice Bellard [Mon, 5 May 2025 14:46:21 +0000 (16:46 +0200)]
added RegExp.escape (bnoordhuis)

13 months agoavoid relying on 'FILE *' in JS_PrintValue() API
Fabrice Bellard [Mon, 5 May 2025 13:59:04 +0000 (15:59 +0200)]
avoid relying on 'FILE *' in JS_PrintValue() API

14 months agoadded get_array_el3 opcode - removed to_propkey2 opcode
Fabrice Bellard [Wed, 30 Apr 2025 12:12:10 +0000 (14:12 +0200)]
added get_array_el3 opcode - removed to_propkey2 opcode

14 months agofixed use of JS_DumpValue()
Fabrice Bellard [Wed, 30 Apr 2025 12:09:31 +0000 (14:09 +0200)]
fixed use of JS_DumpValue()

14 months agoadded JS_PrintValue() and use it in console.log(), print() and the REPL (#256)
Fabrice Bellard [Wed, 30 Apr 2025 11:40:15 +0000 (13:40 +0200)]
added JS_PrintValue() and use it in console.log(), print() and the REPL (#256)

14 months agoObject.prototype has an immutable prototype
Fabrice Bellard [Tue, 29 Apr 2025 17:03:36 +0000 (19:03 +0200)]
Object.prototype has an immutable prototype

14 months agosimplified uncatchable exception handling
Fabrice Bellard [Tue, 29 Apr 2025 16:48:58 +0000 (18:48 +0200)]
simplified uncatchable exception handling

14 months agohandle strings as module import and export names
Fabrice Bellard [Tue, 29 Apr 2025 12:54:57 +0000 (14:54 +0200)]
handle strings as module import and export names

14 months agoupdate tests
Fabrice Bellard [Mon, 28 Apr 2025 14:37:51 +0000 (16:37 +0200)]
update tests

14 months agofixed operation order in js_obj_to_desc()
Fabrice Bellard [Mon, 28 Apr 2025 14:33:14 +0000 (16:33 +0200)]
fixed operation order in js_obj_to_desc()

14 months agofixed the delete operator with global variables
Fabrice Bellard [Mon, 28 Apr 2025 14:32:23 +0000 (16:32 +0200)]
fixed the delete operator with global variables

14 months agofixed js_std_await() so that it behaves the same way as js_std_loop() (#402)
Fabrice Bellard [Mon, 28 Apr 2025 14:28:01 +0000 (16:28 +0200)]
fixed js_std_await() so that it behaves the same way as js_std_loop() (#402)

14 months agonew release
Fabrice Bellard [Sat, 26 Apr 2025 10:30:26 +0000 (12:30 +0200)]
new release

14 months agoadded more C callbacks for exotic objects (#324)
Fabrice Bellard [Sat, 26 Apr 2025 10:25:42 +0000 (12:25 +0200)]
added more C callbacks for exotic objects (#324)

14 months agomore precise error location reporting
Fabrice Bellard [Sat, 26 Apr 2025 10:25:00 +0000 (12:25 +0200)]
more precise error location reporting

14 months agoMerge pull request #393 from nickva/more-ci-targets-and-windows-fixes
bellard [Tue, 22 Apr 2025 17:18:16 +0000 (19:18 +0200)]
Merge pull request #393 from nickva/more-ci-targets-and-windows-fixes

More CI tragets: Linux 32bit, Windows and Cosmopolitan

14 months agoupdate tests
Fabrice Bellard [Tue, 22 Apr 2025 17:16:19 +0000 (19:16 +0200)]
update tests

14 months agorun-test262: added $262.gc()
Fabrice Bellard [Tue, 22 Apr 2025 17:09:26 +0000 (19:09 +0200)]
run-test262: added $262.gc()

14 months agofixed TypedArray.prototype.slice() when the buffers overlap
Fabrice Bellard [Tue, 22 Apr 2025 17:07:47 +0000 (19:07 +0200)]
fixed TypedArray.prototype.slice() when the buffers overlap

14 months agofixed TypedArray.prototype.with with detached ArrayBuffer
Fabrice Bellard [Tue, 22 Apr 2025 17:05:36 +0000 (19:05 +0200)]
fixed TypedArray.prototype.with with detached ArrayBuffer

14 months agofixed GeneratorFunction prototype
Fabrice Bellard [Tue, 22 Apr 2025 17:03:18 +0000 (19:03 +0200)]
fixed GeneratorFunction prototype

14 months agofixed RegExp.prototype[Symbol.split]
Fabrice Bellard [Tue, 22 Apr 2025 17:01:43 +0000 (19:01 +0200)]
fixed RegExp.prototype[Symbol.split]

14 months agofixed operation order in Object.prototype.propertyIsEnumerable()
Fabrice Bellard [Tue, 22 Apr 2025 16:59:21 +0000 (18:59 +0200)]
fixed operation order in Object.prototype.propertyIsEnumerable()

14 months agofix property ordering in the object returned by RegExp.prototype.exec()
Fabrice Bellard [Tue, 22 Apr 2025 16:56:59 +0000 (18:56 +0200)]
fix property ordering in the object returned by RegExp.prototype.exec()

14 months agosetters cannot have rest arguments
Fabrice Bellard [Tue, 22 Apr 2025 16:53:48 +0000 (18:53 +0200)]
setters cannot have rest arguments

14 months agofuture reserved keywords are forbidden in function name and arguments when the functi...
Fabrice Bellard [Tue, 22 Apr 2025 16:51:54 +0000 (18:51 +0200)]
future reserved keywords are forbidden in function name and arguments when the function body is in strict mode

14 months agoMore CI tragets: Linux 32bit, LTO, Windows and Cosmopolitan
Nick Vatamaniuc [Tue, 25 Mar 2025 21:36:09 +0000 (17:36 -0400)]
More CI tragets: Linux 32bit, LTO, Windows and Cosmopolitan

Atomics support in Windows requires libwinpthread*.dll at runtime. One
way to get it is to install it with MinGW package, and copy alongside
the executable.

Update test Makefile targets for windows executables.

Allow running tests with Wine: `make WINE=wine CONFIG_WIN3=y
...`. That's useful when Wine binfmt support cannot be installed such
as on the CI hosts.

Add PPC64LE architecture and try to fix flaky multi-arch CI in gcc:
https://github.com/tonistiigi/binfmt/issues/215

14 months agoadded staging test262 tests
Fabrice Bellard [Mon, 21 Apr 2025 14:23:42 +0000 (16:23 +0200)]
added staging test262 tests

14 months agofixed detached TypedArray handling in Atomics operations
Fabrice Bellard [Mon, 21 Apr 2025 14:14:00 +0000 (16:14 +0200)]
fixed detached TypedArray handling in Atomics operations

14 months agofixed iterator close in Map/Set constructor
Fabrice Bellard [Mon, 21 Apr 2025 14:12:56 +0000 (16:12 +0200)]
fixed iterator close in Map/Set constructor

14 months agodtoa fix for minus zero
Fabrice Bellard [Mon, 21 Apr 2025 13:33:47 +0000 (15:33 +0200)]
dtoa fix for minus zero

14 months agofixed build_arg_list()
Fabrice Bellard [Mon, 21 Apr 2025 12:13:49 +0000 (14:13 +0200)]
fixed build_arg_list()

14 months agofixed checks in Proxy defineProperty
Fabrice Bellard [Mon, 21 Apr 2025 12:00:32 +0000 (14:00 +0200)]
fixed checks in Proxy defineProperty

14 months agofixed Array.from() and TypedArray.from()
Fabrice Bellard [Mon, 21 Apr 2025 10:39:18 +0000 (12:39 +0200)]
fixed Array.from() and TypedArray.from()

14 months agothe %TypedArray% Intrinsic Object should be a constructor
Fabrice Bellard [Mon, 21 Apr 2025 09:52:42 +0000 (11:52 +0200)]
the %TypedArray% Intrinsic Object should be a constructor

14 months agofixed memory leak in String constructor
Fabrice Bellard [Wed, 16 Apr 2025 15:16:10 +0000 (17:16 +0200)]
fixed memory leak in String constructor

14 months agofixed Proxy getOwnPropertyDescriptor with getters and setters
Fabrice Bellard [Wed, 16 Apr 2025 14:51:34 +0000 (16:51 +0200)]
fixed Proxy getOwnPropertyDescriptor with getters and setters

14 months agoremoved atom leak introduced in commit 83530ac9
Fabrice Bellard [Wed, 16 Apr 2025 14:46:41 +0000 (16:46 +0200)]
removed atom leak introduced in commit 83530ac9

14 months agoadded 'at' in Array.prototype[Symbol.unscopables]
Fabrice Bellard [Wed, 16 Apr 2025 13:10:38 +0000 (15:10 +0200)]
added 'at' in Array.prototype[Symbol.unscopables]

14 months agooptimized and fixed JS_AtomIsNumericIndex1(): 'NaN' is also a number
Fabrice Bellard [Wed, 16 Apr 2025 13:04:57 +0000 (15:04 +0200)]
optimized and fixed JS_AtomIsNumericIndex1(): 'NaN' is also a number

14 months agofixed 'with' access by adding HasPropery() calls - removed unused 'with_get_ref_undef...
Fabrice Bellard [Wed, 16 Apr 2025 12:48:12 +0000 (14:48 +0200)]
fixed 'with' access by adding HasPropery() calls - removed unused 'with_get_ref_undef' opcode

14 months agofixed destructuring operation order when defining variables - optimized more cases...
Fabrice Bellard [Wed, 16 Apr 2025 12:23:54 +0000 (14:23 +0200)]
fixed destructuring operation order when defining variables - optimized more cases of variable definition in destructuring

14 months agofixed destructuring parsing: do it only in assignment expressions
Fabrice Bellard [Wed, 16 Apr 2025 12:14:21 +0000 (14:14 +0200)]
fixed destructuring parsing: do it only in assignment expressions

14 months agomore ToPropertyKey ordering changes
Fabrice Bellard [Tue, 15 Apr 2025 09:26:53 +0000 (11:26 +0200)]
more ToPropertyKey ordering changes

14 months agospec update: ToPropertyKey() is now done after the evaluation of the expression in...
Fabrice Bellard [Tue, 15 Apr 2025 08:50:59 +0000 (10:50 +0200)]
spec update: ToPropertyKey() is now done after the evaluation of the expression in assignments

14 months agoenabled os.Worker on Windows (bnoordhuis)
Fabrice Bellard [Mon, 14 Apr 2025 17:13:57 +0000 (19:13 +0200)]
enabled os.Worker on Windows (bnoordhuis)

14 months agoMerge pull request #400 from renatahodovan/fix-regexp
bellard [Mon, 14 Apr 2025 15:54:18 +0000 (17:54 +0200)]
Merge pull request #400 from renatahodovan/fix-regexp

Define lre_check_timeout in fuzz_regexp

14 months agoDefine lre_check_timeout in fuzz_regexp
Renata Hodovan [Thu, 10 Apr 2025 21:09:15 +0000 (23:09 +0200)]
Define lre_check_timeout in fuzz_regexp

Since #25aaa77, lre_check_timeout must be defined by the user. The
patch adds this definition to the regexp fuzzer.

14 months agoString.prototype.localeCompare is added in JS_AddIntrinsicStringNormalize() as it...
Fabrice Bellard [Mon, 14 Apr 2025 13:14:49 +0000 (15:14 +0200)]
String.prototype.localeCompare is added in JS_AddIntrinsicStringNormalize() as it requires unicode normalization

14 months agoqjsc: added missing -fno-weakref
Fabrice Bellard [Mon, 14 Apr 2025 13:05:02 +0000 (15:05 +0200)]
qjsc: added missing -fno-weakref

14 months agoadded column number in error messages - simplified parser
Fabrice Bellard [Mon, 14 Apr 2025 12:46:47 +0000 (14:46 +0200)]
added column number in error messages - simplified parser

14 months agooptimized js_parse_class_default_ctor() (bnoordhuis)
Fabrice Bellard [Sat, 12 Apr 2025 14:04:59 +0000 (16:04 +0200)]
optimized js_parse_class_default_ctor() (bnoordhuis)

14 months agofixed DUMP_BYTECODE
Fabrice Bellard [Sat, 12 Apr 2025 14:02:48 +0000 (16:02 +0200)]
fixed DUMP_BYTECODE

14 months agofixed HTML comments (chqrlie)
Fabrice Bellard [Sat, 12 Apr 2025 10:38:51 +0000 (12:38 +0200)]
fixed HTML comments (chqrlie)

14 months ago- removed the 'use strip' extension
Fabrice Bellard [Sat, 12 Apr 2025 10:14:37 +0000 (12:14 +0200)]
- removed the 'use strip' extension
- removed the JS_EVAL_FLAG_STRIP eval flag and replaced it with JS_SetStripInfo() which has simpler semantics.
- qjs: added the '-s' and '--strip-source' options
- qjsc: added the '-s' and '--keep-source' options

14 months agoindent fix
Fabrice Bellard [Thu, 10 Apr 2025 15:38:44 +0000 (17:38 +0200)]
indent fix

14 months agoworkaround for #282
Fabrice Bellard [Thu, 10 Apr 2025 15:38:28 +0000 (17:38 +0200)]
workaround for #282

14 months agoFix exporting destructured variables (saghul) (#382)
Fabrice Bellard [Thu, 10 Apr 2025 14:23:25 +0000 (16:23 +0200)]
Fix exporting destructured variables (saghul) (#382)

14 months agofixed class field named get or set
Fabrice Bellard [Thu, 10 Apr 2025 14:01:26 +0000 (16:01 +0200)]
fixed class field named get or set

14 months agochanged js_throw_type_error ES5 workaround to be more compatible with test262
Fabrice Bellard [Thu, 10 Apr 2025 13:37:19 +0000 (15:37 +0200)]
changed js_throw_type_error ES5 workaround to be more compatible with test262

14 months agofixed JS_IsString() with ropes
Fabrice Bellard [Thu, 10 Apr 2025 09:51:41 +0000 (11:51 +0200)]
fixed JS_IsString() with ropes

14 months agofixed the handling of unicode identifiers
Fabrice Bellard [Thu, 10 Apr 2025 08:34:40 +0000 (10:34 +0200)]
fixed the handling of unicode identifiers

14 months agofixed break statement in the presence of labels (bnoordhuis) (#275)
Fabrice Bellard [Mon, 7 Apr 2025 17:01:30 +0000 (19:01 +0200)]
fixed break statement in the presence of labels (bnoordhuis) (#275)

14 months agoadded JS_GetAnyOpaque() (oleavr)
Fabrice Bellard [Mon, 7 Apr 2025 16:45:11 +0000 (18:45 +0200)]
added JS_GetAnyOpaque() (oleavr)

14 months agofixed buffer overflow in BJSON String and BigInt reader (#399)
Fabrice Bellard [Mon, 7 Apr 2025 16:40:49 +0000 (18:40 +0200)]
fixed buffer overflow in BJSON String and BigInt reader (#399)

14 months agofixed and improved Map/Set hashing
Fabrice Bellard [Mon, 7 Apr 2025 12:42:07 +0000 (14:42 +0200)]
fixed and improved Map/Set hashing

14 months agoqjs: added performance.now()
Fabrice Bellard [Mon, 7 Apr 2025 12:33:30 +0000 (14:33 +0200)]
qjs: added performance.now()

14 months agoremoved unused slack in hash_map_resize() (saghul)
Fabrice Bellard [Mon, 7 Apr 2025 10:05:40 +0000 (12:05 +0200)]
removed unused slack in hash_map_resize() (saghul)

14 months agoFix UB in BigInt left shift (saghul)
Fabrice Bellard [Mon, 7 Apr 2025 10:02:01 +0000 (12:02 +0200)]
Fix UB in BigInt left shift (saghul)

14 months agoFix leak in BigInt unary plus (saghul)
Fabrice Bellard [Mon, 7 Apr 2025 10:00:08 +0000 (12:00 +0200)]
Fix leak in BigInt unary plus (saghul)