ladybird/Tests/LibJS/Bytecode/expected
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.txt LibJS: Pre-create SharedFunctionInstanceData in NewFunction 2026-02-11 23:57:41 +01:00
annexb-function-existing-var.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
argument-postfix-self-move.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
argument-variables.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
arguments-with-arguments-fn.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
assign-to-parameter.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
async-await.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
async-generator-yield-await.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
async-generator-yield.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
async-return-bare.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
baseline.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
bigint-binary-literal-fold.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
bigint-constant-folding.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
bitwise-numeric-preconvert.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
block-function-declaration-order.txt 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.txt LibJS: Mark block-scoped function declaration locals as initialized 2026-02-19 02:45:37 +01:00
block-scoping.txt LibJS: Make MemberExpression::to_string_approximation() recursive 2026-02-15 23:21:46 +01:00
call-spread-register-order.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
captured-variables.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
chained-member-call.txt LibJS: Make MemberExpression::to_string_approximation() recursive 2026-02-15 23:21:46 +01:00
class-computed-field-lhs-name.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
class-computed-key.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
class-environment.txt LibJS: Wire NewClass to ClassBlueprint 2026-02-11 23:57:41 +01:00
class-lhs-name-no-createvariable.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
class-literal-fields.txt LibJS: Wire NewClass to ClassBlueprint 2026-02-11 23:57:41 +01:00
computed-compound-assign-register-reuse.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
computed-member-access.txt LibJS: Skip unnecessary Mov in emit_load_from_reference for reads 2026-02-15 23:21:46 +01:00
computed-member-compound-assign.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
computed-string-object-literal.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
computed-string-to-ById.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
computed-update-register-order.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
condition-dead-code-elim.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
conditional-register-order.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
const-fold-exponentiation.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
const-fold-template-literals.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
constant-fold-string-to-number.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
default-param-self-reference.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
delete-expression-register.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
delete-super-property.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
destructure-array-rest.txt LibJS: Remove unused bytecode register allocation in array destructuring 2026-02-17 20:44:57 +01:00
destructuring-assignment.txt LibJS: Remove unused bytecode register allocation in array destructuring 2026-02-17 20:44:57 +01:00
destructuring-no-base-identifier.txt LibJS: Remove unused bytecode register allocation in array destructuring 2026-02-17 20:44:57 +01:00
do-while-register-allocation.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
eval-prevents-locals.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
eval-same-function.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
eval-scope-optimization.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
expression-identifier-number-format.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
for-in-block-order.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
for-in-lexical-scope.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
for-in-register-lifetime.txt 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.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
for-loop-scoping.txt LibJS: Consolidate TDZ check emission into Generator helper 2026-02-17 20:44:57 +01:00
for-of-iteration-env-capacity.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
for-of-iterator-close.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
for-try-finally-continue.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
generator-yield-call.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
generator-yield-finally.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
generator-yield-star.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
generator-yield.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
global-variables.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
if-else-register-lifetime.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
local-variables.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
logical-assignment-register-order.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
logical-constant-folding.txt 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.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
logical-or-preferred-dst.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
named-function-expression.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
nested-for-loop-completion.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
nested-member-base-identifier.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
numeric-class-field-name.txt 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.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
numeric-index-object-literal.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
numeric-property-key.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
object-rest-computed-key.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
optional-chain-base-identifier.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
optional-chain.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
parameter-createvariable-order.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
private-method-call-description.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
resolve-this-caching.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
sequential-try-blocks.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
super-computed-eval-order.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
super-constructor-call.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
super-evaluation-order.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
super-method-call-order.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
super-optional-call-this.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
switch-scoping.txt LibJS: Pre-create SharedFunctionInstanceData in NewFunction 2026-02-11 23:57:41 +01:00
tagged-template-base-identifier.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
this-base-identifier.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
try-catch-completion-ordering.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
try-catch-finally-register.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
try-catch-scoping.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
try-catch-terminated.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
try-finally-continue.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
try-finally.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
update-member-expression.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
var-binding-access.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
var-hoisting-tdz.txt LibJS: Consolidate TDZ check emission into Generator helper 2026-02-17 20:44:57 +01:00
var-init-in-param-body-scope.txt 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.txt LibJS: Don't optimize body vars to locals when referenced in defaults 2026-02-19 02:45:37 +01:00
with-return.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00
with-statement.txt Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests 2026-02-17 20:44:57 +01:00