429 Commits

Author SHA1 Message Date
Fabrice Bellard
f1139494d1 regexp: removed alloca() is lre_exec() - added specific opcodes for \s and \S to have a smaller bytecode - optimized \b and \B 2025-12-22 15:12:46 +01:00
Fabrice Bellard
7bd1ae2c76 \x{N} is a syntax error 2025-12-22 15:05:37 +01:00
Fabrice Bellard
31ef02b907 slightly faster lexical variable assignment 2025-12-22 15:03:43 +01:00
Fabrice Bellard
c73a435f36 Don't call well-known Symbol methods for RegExp on primitive values 2025-12-11 19:27:19 +01:00
Fabrice Bellard
1dbba8a88e removed use after free in js_create_module_bytecode_function() (#467) 2025-12-11 19:18:56 +01:00
Fabrice Bellard
fcd33c1afa removed memory leak in case of error in cpool_add() (#468) 2025-12-11 19:17:38 +01:00
Fabrice Bellard
e5fd3918c1 fixed fast array extension optimization when there are multiple realms 2025-12-03 13:36:26 +01:00
Fabrice Bellard
24379bf53c added regexp duplicate named groups - fixed reset of captures with quantizers 2025-12-03 13:30:33 +01:00
Fabrice Bellard
b226856177 updated to unicode 17.0.0 - updated test262 version 2025-11-29 15:14:41 +01:00
Fabrice Bellard
5907aa6d68 added missing lre_poll_timeout() 2025-11-29 13:13:18 +01:00
Fabrice Bellard
47aac8b2a8 regexp: cosmetic: make it clearer that there is now a set of registers instead of an auxiliary stack 2025-11-29 13:04:47 +01:00
Fabrice Bellard
371c06e359 regexp: ensure that the bytecode size grows linearly with respect to
the input regexp.

This way, pathological regexps such as
/(:?(:?(:?(:?(:?(:?(:?(:?(:?(:?(:?(:?(:?(?:a|)+|)+|)+|)+|)+|)+|)+|)+|)+|)+|)+|)+|)+|)+/ are no longer an issue. The generated bytecode is also simpler and
faster.
2025-11-29 12:39:52 +01:00
Fabrice Bellard
a77400796d removed buffer overflows introduced in regexp optimizations 2025-11-22 12:10:55 +01:00
Fabrice Bellard
728ed94889 fixed Worker freeing logic (#462) 2025-11-22 11:03:45 +01:00
Fabrice Bellard
9f11034a5a - optimized Regexp.prototype.exec
- optimized String.prototype.replace
- optimized 'arguments' object creation
- optimized access to non strict 'arguments' elements
2025-11-22 11:00:50 +01:00
Fabrice Bellard
7ab23413b8 faster and simpler implementation of regexp backtracking 2025-11-22 10:44:19 +01:00
Fabrice Bellard
fcbf5ea2a6 fixed BJSON array serialization (#457) 2025-11-15 14:52:50 +01:00
Fabrice Bellard
4bd485d713 - Added Iterator.concat (initial patch by bnoordhuis)
- optimized js_iterator_concat_next()
- added more guards against recursion in Iterator.concat operations
2025-11-15 12:22:50 +01:00
Fabrice Bellard
3d0cc291d4 optimized add/sub int32 overflow 2025-11-15 12:18:18 +01:00
Fabrice Bellard
125b01279c added error checking in JS_InstantiateFunctionListItem() 2025-11-15 12:10:44 +01:00
Fabrice Bellard
ae7219b1a1 - Closure optimization (go from quadratic to linear time when the number
of closure variables is large)
- Separated JSVarDef and JSBytecodeVarDef to simplify the code and save memory
- fixed debug info stripping with global variables
2025-11-15 12:01:20 +01:00
Fabrice Bellard
9688007ccb Restore a mistakenly removed goto on error in js_build_module_ns() (igorburago) 2025-11-05 11:46:20 +01:00
Fabrice Bellard
b07ad11c31 fixed JS_PROP_AUTOINIT handling in js_closure_define_global_var() (#455) 2025-11-05 11:41:18 +01:00
Fabrice Bellard
d10613f8f9 fixed exception handling in put_var operation (regression introduced by commit a6816be) (#454) 2025-11-05 11:29:03 +01:00
Fabrice Bellard
080c01f346 More informative "not a constructor" error message (initial patch by bnoordhuis) (#368) 2025-11-03 18:53:32 +01:00
Fabrice Bellard
c6fe5a98fd Fix length check in ArrayBuffer.prototype.slice (bnoordhuis) (#451) 2025-11-03 18:38:20 +01:00
Fabrice Bellard
7cfddd0664 fixed DataView resizing 2025-11-03 18:29:10 +01:00
Fabrice Bellard
75b5230000 Fix use-after-free in ArrayBuffer.prototype.transfer (bnoordhuis) (#450) - use js_array_buffer_update_typed_arrays() in JS_DetachArrayBuffer() 2025-11-03 18:23:19 +01:00
Fabrice Bellard
baa186fc6e qjs: added --strict option - don't consider included files as modules - allow module and strict code with -e option 2025-11-03 17:22:18 +01:00
Fabrice Bellard
961478d7bb removed duplicate test 2025-11-03 17:14:12 +01:00
Fabrice Bellard
e015918dd8 Much faster destructuring at the expense of a slight incompatibility
with the spec when direct evals are present (v8 behaves the same way).
2025-11-03 17:08:59 +01:00
Fabrice Bellard
a6816be23a optimized global variable access 2025-11-03 16:57:20 +01:00
Fabrice Bellard
eb2c89087d removed uninitialized variable 2025-10-18 12:04:12 +02:00
Fabrice Bellard
eab6945fca updated test results 2025-10-18 11:09:17 +02:00
Fabrice Bellard
c31809e84d fixed operation order in Regexp constructor 2025-10-18 11:05:05 +02:00
Fabrice Bellard
af16a97921 changed module rejection order according to spec change 2025-10-18 10:50:51 +02:00
Fabrice Bellard
9a421b3338 optimized Array.prototype.push 2025-10-16 15:21:24 +02:00
Fabrice Bellard
3e5f2bbe69 inlined the get_length operation 2025-10-16 15:10:58 +02:00
Fabrice Bellard
c720e35d26 added js_string_eq() 2025-10-16 15:00:29 +02:00
Fabrice Bellard
2161640067 stricter year parsing in Date 2025-10-13 14:51:37 +02:00
Fabrice Bellard
7fb994c45d fixed argument evaluation order in Date constructor and Date.UTC() 2025-10-13 14:11:47 +02:00
Fabrice Bellard
0d4cd2d051 faster and safer dbuf functions (#443) 2025-10-13 13:51:25 +02:00
Fabrice Bellard
2a53de04c6 test262 update 2025-10-12 13:28:37 +02:00
Fabrice Bellard
63450099a3 fixed regression in error message display introduced in commit 42eb279 2025-10-12 13:23:50 +02:00
Fabrice Bellard
eb9fa2b8da compilation fix for clang 2025-10-11 11:13:13 +02:00
Fabrice Bellard
42eb2795f0 Faster context creation and exception checks in JS_NewContext (#404)
- simplified internal object init
- check exceptions in JS_NewContext()
- preallocated std object properties
- preallocated more atoms
2025-10-11 10:59:21 +02:00
Fabrice Bellard
7a488f3e0c update 2025-10-08 14:16:51 +02:00
Fabrice Bellard
c8a8cf57c6 faster appending of elements in arrays 2025-10-08 14:11:27 +02:00
Fabrice Bellard
79f3ae2959 optimized string_buffer_putc() 2025-10-08 11:32:17 +02:00
Fabrice Bellard
e5de89fb3f optimized post_inc and post_dec 2025-10-07 19:10:27 +02:00