348 Commits

Author SHA1 Message Date
Jieke
c34c932a2b
Merge 83fa0503121a1363bc3586fe02cb31115b54f06f into 20d2b404af65edc5d66ee6f11a59f930ea3d1b88 2025-08-29 18:05:41 +08:00
Fabrice Bellard
20d2b404af qjsc: handle C name conflicts between scripts and modules (#432) 2025-08-27 16:07:05 +02:00
Fabrice Bellard
a4e4b43fd8 run-test262: added --count_skipped_features option 2025-08-27 15:19:45 +02:00
Fabrice Bellard
0b3c73ed9c removed function cast warnings (initial patch by saghul) 2025-08-27 15:16:52 +02:00
Fabrice Bellard
5689f30cd0 fixed handling of 8 bit unicode strings in RegExp (regression introduced by commit a4ac84d) 2025-08-25 18:20:58 +02:00
Fabrice Bellard
a4ac84d993 Adjust lastIndex to leading surrogate when inside a surrogate pair in unicode RegExp (initial patch by auvred) 2025-08-25 17:54:19 +02:00
Fabrice Bellard
d9ec8f102e limit function and regexp bytecode to 1G to avoid buffer overflows (the bytecode generators assume that bytecode offsets can fit a 32 bit signed integer 2025-08-25 17:14:47 +02:00
Fabrice Bellard
4e0d0b7f80 avoid side effects in JS_PrintValue() which may lead to crashes in print() and js_std_promise_rejection_check() 2025-08-25 16:48:36 +02:00
Fabrice Bellard
c927eca49a fixed buffer overflow in TypedArray.prototype.lastIndexOf() 2025-08-25 15:25:41 +02:00
Fabrice Bellard
9ce544289f fixed buffer overflow in js_bigint_to_string1() 2025-08-25 15:06:19 +02:00
Fabrice Bellard
1168c215d1 fixed crash in OP_add_loc if the variable is modified in JS_ToPrimitiveFree() 2025-08-25 14:50:04 +02:00
Fabrice Bellard
e1c18befb8 fixed buffer overflow in js_bigint_from_string() 2025-08-25 14:24:06 +02:00
Fabrice Bellard
c942978927 TypedArray.prototype.subarray: fixed the step at which '[[ByteOffset]]' is read 2025-08-25 14:01:43 +02:00
Fabrice Bellard
bb34e2797f test262 update 2025-08-25 12:05:21 +02:00
Fabrice Bellard
1fdc768fdc removed module leak in js_std_eval_binary() (#425) 2025-07-09 14:39:19 +02:00
Fabrice Bellard
458c34d29d fixed GC logic so that a module can live after a JSContext is destroyed (#280) - update the reference count for the realm in jobs and FinalizationRegistry 2025-06-28 17:41:58 +02:00
Fabrice Bellard
2fd48bf7df fixed module async evaluation logic - added DUMP_MODULE_EXEC 2025-06-28 17:25:54 +02:00
Fabrice Bellard
f1b1c000c2 update test262 2025-06-28 10:43:26 +02:00
Fabrice Bellard
4d9a27c578 update Changelog 2025-06-14 11:51:48 +02:00
Fabrice Bellard
098f221cf3 added Error.isError() (bnoordhuis) 2025-06-14 11:42:54 +02:00
bellard
9b935dba42
Merge pull request #418 from nickva/fix-byteoffset-for-detached-array-buffers
Fix byteOffset for detached array buffers
2025-06-14 11:30:13 +02:00
Nick Vatamaniuc
0f7eadf95c
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
2025-06-07 01:37:54 -04:00
Nick Vatamaniuc
00b1d8d0b2
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
2025-06-07 01:37:54 -04:00
Fabrice Bellard
638ec8ca5e fixed js_bigint_to_string1() (#412) 2025-05-29 20:01:24 +02:00
Fabrice Bellard
bb986e55ff update tests 2025-05-24 15:43:14 +02:00
Fabrice Bellard
fc524f75ee added missing 'Unknown' unicode Script 2025-05-24 15:36:08 +02:00
Fabrice Bellard
dfc254af51 update tests 2025-05-24 13:26:36 +02:00
Fabrice Bellard
3d92a9d30c new keyword cannot be used with an optional chain 2025-05-24 13:01:50 +02:00
Fabrice Bellard
02a2643142 fixed parsing of function definition 2025-05-24 12:47:35 +02:00
Fabrice Bellard
3dc7ef1f7f more robust out of memory handling (#406) 2025-05-24 12:09:46 +02:00
Fabrice Bellard
1572aa8a59 avoid win32 crash in getTimezoneOffset() if time is < 1970 (#238) 2025-05-24 11:32:22 +02:00
Fabrice Bellard
7c487f1c6a support JSON modules in qjsc - added support of JSON5 modules (using type = "json5") 2025-05-24 10:24:01 +02:00
Fabrice Bellard
1dfaa61680 improved compatibility of std.parseExtJSON() with JSON5 2025-05-24 10:16:10 +02:00
Fabrice Bellard
8b2a1249a4 fixed Regexp.prototype[Symbol.match] 2025-05-24 10:12:51 +02:00
Fabrice Bellard
071a4cf986 use Object.is() in tests 2025-05-24 10:02:50 +02:00
Fabrice Bellard
f10ef299a6 added JSON modules and import attributes 2025-05-20 18:27:23 +02:00
Fabrice Bellard
838124580b added JS_AtomToCStringLen() 2025-05-20 18:03:29 +02:00
Fabrice Bellard
2f167bbeeb export JS_FreePropertyEnum() 2025-05-20 17:59:48 +02:00
Fabrice Bellard
9bce51eefd improved JSON parser conformity (chqrlie) (#250) 2025-05-19 17:23:25 +02:00
Fabrice Bellard
aaa9cea6a8 Proxy: fixed prototype comparison in setPrototypeOf() and getPrototypeOf() (#410) 2025-05-19 13:35:06 +02:00
Fabrice Bellard
1021e3c729 compilation fix 2025-05-16 20:48:01 +02:00
Fabrice Bellard
a33610de16 update test results 2025-05-16 20:38:56 +02:00
Fabrice Bellard
f95b8ba1bb added regexp modifiers 2025-05-16 20:34:18 +02:00
Fabrice Bellard
9c973a8923 added Promise.try (saghul) 2025-05-16 18:02:14 +02:00
Fabrice Bellard
3c39307c22 better promise rejection tracker heuristics (#112) 2025-05-16 17:47:41 +02:00
Fabrice Bellard
d7cdfdc8d7 regexp: added v flag support - fixed corner cases of case insensitive matching 2025-05-16 17:43:03 +02:00
Fabrice Bellard
a8b2d7c2b2 added Float16Array (bnoordhuis) - optimized float16 conversion functions 2025-05-05 19:12:32 +02:00
Fabrice Bellard
c95b024d3e added RegExp.escape (bnoordhuis) 2025-05-05 16:46:21 +02:00
Fabrice Bellard
0a6160d7b3 avoid relying on 'FILE *' in JS_PrintValue() API 2025-05-05 15:59:04 +02:00
Fabrice Bellard
11d076fac6 added get_array_el3 opcode - removed to_propkey2 opcode 2025-04-30 14:12:10 +02:00