Andreas Kling
18c40a1328
LibJS/Rust: Fix has_parameter_expressions and TDZ checks for arguments
...
Fix two bugs in the Rust bytecode codegen:
1. has_parameter_expressions incorrectly treated any destructuring
parameter as a "parameter expression", when it should only do so
for patterns that contain expressions (defaults or computed keys).
This caused an unnecessary CreateLexicalEnvironment for simple
destructuring like `function f({a, b}) {}`. The same bug existed
in both codegen.rs and lib.rs (SFD metadata computation).
2. emit_set_variable used is_local_lexically_declared(index) for
argument locals, but that function indexes into the local_variables
array using the argument's index, checking the wrong variable.
This caused spurious ThrowIfTDZ instructions when assigning to
function arguments that happened to share an index with an
uninitialized let/const variable.
2026-03-01 21:20:54 +01:00
..
2026-02-09 16:35:39 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-10 02:05:20 +01:00
2026-02-17 20:44:57 +01:00
2026-03-01 21:20:54 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-24 09:39:42 +01:00
2026-02-24 09:39:42 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-19 02:45:37 +01:00
2026-02-09 16:35:39 +01:00
2026-02-17 20:44:57 +01:00
2026-02-10 02:05:20 +01:00
2026-02-24 09:39:42 +01:00
2026-02-15 23:21:46 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-09 16:35:39 +01:00
2026-02-17 20:44:57 +01:00
2026-02-11 23:57:41 +01:00
2026-02-17 20:44:57 +01:00
2026-02-15 23:21:46 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-01-31 18:22:40 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-01-31 18:24:02 +01:00
2026-02-24 09:39:42 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-10 02:05:20 +01:00
2026-02-17 20:44:57 +01:00
2026-03-01 21:20:54 +01:00
2026-02-17 20:44:57 +01:00
2026-02-10 02:05:20 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-24 09:39:42 +01:00
2026-02-17 20:44:57 +01:00
2026-02-24 09:39:42 +01:00
2026-02-17 20:44:57 +01:00
2026-02-09 16:35:39 +01:00
2026-02-17 20:44:57 +01:00
2026-02-12 11:37:43 +01:00
2026-02-24 09:39:42 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-10 02:05:20 +01:00
2026-02-17 20:44:57 +01:00
2026-02-24 09:39:42 +01:00
2026-02-10 02:05:20 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-01-27 10:58:39 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-24 09:39:42 +01:00
2026-02-17 20:44:57 +01:00
2026-02-24 09:39:42 +01:00
2026-02-17 20:44:57 +01:00
2026-02-09 16:35:39 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-19 12:02:50 +01:00
2026-02-24 09:39:42 +01:00
2026-02-09 16:35:39 +01:00
2026-02-17 20:44:57 +01:00
2026-02-24 09:39:42 +01:00
2026-02-15 23:21:46 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-09 16:35:39 +01:00
2026-02-17 20:44:57 +01:00
2026-02-09 16:35:39 +01:00
2026-02-09 08:51:12 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-19 02:45:37 +01:00
2026-02-17 20:44:57 +01:00
2026-02-09 16:35:39 +01:00