153 Commits

Author SHA1 Message Date
Fabrice Bellard
949c105aff fixed class field named get or set 2025-04-10 16:01:26 +02:00
Fabrice Bellard
d546fbfdb7 changed js_throw_type_error ES5 workaround to be more compatible with test262 2025-04-10 15:37:19 +02:00
Fabrice Bellard
25ffdb418e fixed the handling of unicode identifiers 2025-04-10 10:34:40 +02:00
Fabrice Bellard
9d3776d0d4 fixed break statement in the presence of labels (bnoordhuis) (#275) 2025-04-07 19:01:30 +02:00
Fabrice Bellard
00e6f29b17 added JS_GetAnyOpaque() (oleavr) 2025-04-07 18:45:11 +02:00
Fabrice Bellard
1eb05e44fa fixed buffer overflow in BJSON String and BigInt reader (#399) 2025-04-07 18:40:49 +02:00
Fabrice Bellard
a151ce19e5 fixed and improved Map/Set hashing 2025-04-07 14:42:07 +02:00
Fabrice Bellard
2b6cf578af removed unused slack in hash_map_resize() (saghul) 2025-04-07 12:05:40 +02:00
Fabrice Bellard
083b7bab01 Fix UB in BigInt left shift (saghul) 2025-04-07 12:02:01 +02:00
Fabrice Bellard
fa706d5622 Fix leak in BigInt unary plus (saghul) 2025-04-07 12:00:08 +02:00
Fabrice Bellard
c805d4f784 fixed weakmap gc (#398) 2025-04-07 11:44:28 +02:00
Fabrice Bellard
159fe289e3 fixed module cyclic imports (#329) 2025-04-05 18:06:08 +02:00
Fabrice Bellard
c1bf4e99db workaround for overflow test in JS_GetOwnPropertyNamesInternal() (#111) 2025-04-05 16:19:25 +02:00
Fabrice Bellard
beeb2725cd 'undefined' is a valid let/const variable name. It gives a SyntaxError at top level because it is already defined (#370) 2025-04-05 15:52:55 +02:00
Fabrice Bellard
f121cbdb5a added forgotten js_weakref_is_live() tests 2025-04-05 15:41:51 +02:00
Fabrice Bellard
b342502a31 avoid freeing an object structure in js_weakref_free() if it is about to be freed in free_zero_refcount() 2025-04-05 15:21:57 +02:00
Fabrice Bellard
8b5b1277ad reworked weak references so that cycles are (hopefully) correctly handled - added Symbol as WeakMap key, WeakRef and FinalizationRegistry 2025-04-05 12:49:29 +02:00
Fabrice Bellard
bf164d640f fixed eval with empty argument scope (#249) 2025-03-31 18:33:22 +02:00
Fabrice Bellard
6ac04e1bf2 removed useless printf() (#257) 2025-03-31 18:00:27 +02:00
Fabrice Bellard
0d7aaed71c ensure that JS_IteratorNext() returns JS_UNDEFINED when done = TRUE (#394) 2025-03-31 13:37:37 +02:00
Fabrice Bellard
56c47f7d2a fixed exception handling in AsyncFromSyncIterator and async for of 2025-03-28 10:11:15 +01:00
Fabrice Bellard
67de495254 fixed typed array set operation when obj != receiver 2025-03-27 17:06:26 +01:00
Fabrice Bellard
b0c1a12196 fixed set_date_field() 2025-03-27 16:28:56 +01:00
Fabrice Bellard
e8cfe8fede removed memory leak in string padding (issue #274) 2025-03-27 14:43:25 +01:00
Fabrice Bellard
6cc02b4421 more use of js_new_string8 - inlined JS_NewString() (initial patch by Charlie Gordon) 2025-03-25 16:33:47 +01:00
Fabrice Bellard
156d981afe added string ropes for faster concatenation of long strings (issue #67) 2025-03-25 16:01:40 +01:00
Fabrice Bellard
d1bb520f29 reduced memory usage of Map hash table 2025-03-22 11:28:23 +01:00
Fabrice Bellard
49413985eb fixed hash_map_resize() - added Map/WeakMap in microbench 2025-03-22 10:54:21 +01:00
Fabrice Bellard
9f65ef1950 simplified and fixed backtrace_barrier (#306) 2025-03-20 13:37:07 +01:00
Fabrice Bellard
993660621a added new dtoa library to print and parse float64 numbers. It is necessary to fix corner cases (e.g. radix != 10) and to have correct behavior regardless of the libc implementation. 2025-03-19 19:07:57 +01:00
Fabrice Bellard
9f1864a268 msan fix (#389) 2025-03-19 14:27:01 +01:00
Fabrice Bellard
131408fa07 simplified js_bigint_from_float64() 2025-03-19 13:56:10 +01:00
Fabrice Bellard
6d6893bfa3 fixed BigInt hashing - removed -fno-bigint in qjsc and JS_AddIntrinsicBigInt() (BigInt is now considered as a base object) 2025-03-19 12:33:54 +01:00
Fabrice Bellard
5a16c0c1eb fixed JS_DumpValue() for BigInt 2025-03-19 11:59:47 +01:00
Fabrice Bellard
6de88859e7 more bignum cleanup 2025-03-19 11:43:31 +01:00
Fabrice Bellard
ee4cd4deac compilation fix 2025-03-18 18:45:21 +01:00
Fabrice Bellard
61e8b94428 removed bignum support and qjscalc - added optimized BigInt implementation 2025-03-18 18:29:10 +01:00
Fabrice Bellard
9bd10d8eb9 simplified the handling of closures 2025-03-13 17:44:55 +01:00
Fabrice Bellard
dfd9c93ab0 added missing stack overflow check in JSON.stringify() 2025-03-13 17:27:38 +01:00
Fabrice Bellard
25aaa77370 allow regexp interruption (e.g. with Ctrl-C in the REPL) 2025-03-13 17:17:51 +01:00
Fabrice Bellard
027f3cb5e4 fix crash when add_property() fails on build arguments (penneryu) 2025-03-13 16:30:02 +01:00
Fabrice Bellard
6474793e38 JS_SetPropertyInternal(): avoid recursing thru the prototypes if the property is found in a prototype 2025-03-13 16:04:38 +01:00
Fabrice Bellard
030333cff6 fixed date parsing in case there is more than nine initial digits (initial patch by nickva) 2025-03-13 15:52:53 +01:00
Pino Toscano
34894936d8 Use malloc_usable_size() on any OS based on GNU libc
malloc_usable_size() is a GNU extension in GNU libc; hence, use it
every time GNU libc is used, rather than only on Linux.
2024-07-21 10:24:01 +02:00
Kasper Isager Dalsgarð
5417ab0159
Fix JS_HasException() when null is thrown (#313)
Use `JS_UNINITIALIZED` instead of `JS_NULL` when no exception is pending, so `null` can be thrown and distinguished from no exception pending.
2024-07-17 13:58:08 +02:00
Dmitry Volyntsev
b3715f7cb1
Fix GC leak in js_proxy_get() (#302)
Fixes #277
2024-07-15 00:08:40 +02:00
Charlie Gordon
97be5a32af
Add js_resolve_proxy (#293)
- simplify `JS_IsArray` for proxy chains
- remove `js_proxy_isArray`
2024-05-09 14:14:50 +02:00
Kasper Isager Dalsgarð
f3f2f42717
Add JS_StrictEq(), JS_SameValue(), and JS_SameValueZero() (#264)
* add `JS_StrictEq()`, `JS_SameValue()`, and `JS_SameValueZero()` all accepting `JSValueConst`
* make `js_strict_eq` accept `JSValueConst`, remove uses of this function internally and replace them with
`js_strict_eq2` instead.
2024-05-09 13:07:40 +02:00
Kasper Isager Dalsgarð
6f9d05fd2b
Expose JS_SetUncatchableError() (#262)
* Expose `JS_SetUncatchableError()`

* Remove unnecessary `JS_SetUncatchableError` declaration
2024-05-09 12:45:47 +02:00
Kasper Isager Dalsgarð
db9dbd0a2b
Add JS_HasException() (#265) 2024-05-08 23:19:15 +02:00