ladybird/Tests/LibJS/Bytecode/input
Andreas Kling afae23e270 LibJS: Don't optimize body vars to locals when referenced in defaults
When a function has parameter expressions (default values), body var
declarations that shadow a name referenced in a default parameter
expression must not be optimized to local variables. The default
expression needs to resolve the name from the outer scope via the
environment chain, not read the uninitialized local.

We now mark identifiers referenced during formal parameter parsing
with an IsReferencedInFormalParameters flag, and skip local variable
optimization for body vars that carry both this flag and IsVar (but
not IsForbiddenLexical, which indicates parameter names themselves).
2026-02-19 02:45:37 +01:00
..
annex-b-function-in-if.js LibJS: Replace implicit environment stack with explicit registers 2026-02-09 16:35:39 +01:00
annexb-function-existing-var.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
argument-postfix-self-move.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
argument-variables.js Tests/LibJS: Add tests for scope analysis and destructuring 2026-02-10 02:05:20 +01:00
arguments-with-arguments-fn.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
assign-to-parameter.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
async-await.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
async-generator-yield-await.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
async-generator-yield.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
async-return-bare.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
baseline.js
bigint-binary-literal-fold.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
bigint-constant-folding.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
bitwise-numeric-preconvert.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
block-function-declaration-order.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
block-scoped-function-no-tdz.js LibJS: Mark block-scoped function declaration locals as initialized 2026-02-19 02:45:37 +01:00
block-scoping.js LibJS: Replace implicit environment stack with explicit registers 2026-02-09 16:35:39 +01:00
call-spread-register-order.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
captured-variables.js Tests/LibJS: Add tests for scope analysis and destructuring 2026-02-10 02:05:20 +01:00
chained-member-call.js LibJS: Make MemberExpression::to_string_approximation() recursive 2026-02-15 23:21:46 +01:00
class-computed-field-lhs-name.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
class-computed-key.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
class-environment.js LibJS: Replace implicit environment stack with explicit registers 2026-02-09 16:35:39 +01:00
class-lhs-name-no-createvariable.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
class-literal-fields.js LibJS: Wire NewClass to ClassBlueprint 2026-02-11 23:57:41 +01:00
computed-compound-assign-register-reuse.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
computed-member-access.js LibJS: Skip unnecessary Mov in emit_load_from_reference for reads 2026-02-15 23:21:46 +01:00
computed-member-compound-assign.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
computed-string-object-literal.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
computed-string-to-ById.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
computed-update-register-order.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
condition-dead-code-elim.js LibJS: Dead code elimination for always truthy/falsey conditions 2026-01-31 18:22:40 +01:00
conditional-register-order.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
const-fold-exponentiation.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
const-fold-template-literals.js LibJS: Reduce number of template literal op codes 2026-01-31 18:24:02 +01:00
constant-fold-string-to-number.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
default-param-self-reference.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
delete-expression-register.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
delete-super-property.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
destructure-array-rest.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
destructuring-assignment.js Tests/LibJS: Add tests for scope analysis and destructuring 2026-02-10 02:05:20 +01:00
destructuring-no-base-identifier.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
do-while-register-allocation.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
eval-prevents-locals.js Tests/LibJS: Add tests for scope analysis and destructuring 2026-02-10 02:05:20 +01:00
eval-same-function.js LibJS: Stop propagating is_inside_scope_with_eval across functions 2026-01-27 10:58:39 +01:00
eval-scope-optimization.js LibJS: Stop propagating is_inside_scope_with_eval across functions 2026-01-27 10:58:39 +01:00
expression-identifier-number-format.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
for-in-block-order.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
for-in-lexical-scope.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
for-in-register-lifetime.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
for-loop-break-after-if-continue.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
for-loop-scoping.js LibJS: Replace implicit environment stack with explicit registers 2026-02-09 16:35:39 +01:00
for-of-iteration-env-capacity.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
for-of-iterator-close.js LibJS: Inline AsyncIteratorClose with proper Await in for-await-of 2026-02-12 11:37:43 +01:00
for-try-finally-continue.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
generator-yield-call.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
generator-yield-finally.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
generator-yield-star.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
generator-yield.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
global-variables.js Tests/LibJS: Add tests for scope analysis and destructuring 2026-02-10 02:05:20 +01:00
if-else-register-lifetime.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
local-variables.js Tests/LibJS: Add tests for scope analysis and destructuring 2026-02-10 02:05:20 +01:00
logical-assignment-register-order.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
logical-constant-folding.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
logical-or-in-if-condition.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
logical-or-preferred-dst.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
named-function-expression.js LibJS: Mark named function expression identifiers at individual level 2026-01-27 10:58:39 +01:00
nested-for-loop-completion.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
nested-member-base-identifier.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
numeric-class-field-name.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
numeric-getter-no-lhs-name.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
numeric-index-object-literal.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
numeric-property-key.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
object-rest-computed-key.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
optional-chain-base-identifier.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
optional-chain.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
parameter-createvariable-order.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
private-method-call-description.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
resolve-this-caching.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
sequential-try-blocks.js LibJS: Replace implicit environment stack with explicit registers 2026-02-09 16:35:39 +01:00
super-computed-eval-order.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
super-constructor-call.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
super-evaluation-order.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
super-method-call-order.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
super-optional-call-this.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
switch-scoping.js LibJS: Replace implicit environment stack with explicit registers 2026-02-09 16:35:39 +01:00
tagged-template-base-identifier.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
this-base-identifier.js LibJS: Handle ThisExpression in expression_identifier() 2026-02-15 23:21:46 +01:00
try-catch-completion-ordering.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
try-catch-finally-register.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
try-catch-scoping.js LibJS: Replace implicit environment stack with explicit registers 2026-02-09 16:35:39 +01:00
try-catch-terminated.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
try-finally-continue.js LibJS: Replace implicit environment stack with explicit registers 2026-02-09 16:35:39 +01:00
try-finally.js LibJS: Use explicit completion records for try/finally dispatch 2026-02-09 08:51:12 +01:00
update-member-expression.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
var-binding-access.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
var-hoisting-tdz.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
var-init-in-param-body-scope.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
var-shadow-in-default-param.js LibJS: Don't optimize body vars to locals when referenced in defaults 2026-02-19 02:45:37 +01:00
with-return.js Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
with-statement.js LibJS: Replace implicit environment stack with explicit registers 2026-02-09 16:35:39 +01:00