ladybird/Tests/LibJS/Bytecode/expected
Andreas Kling 6cdfbd01a6 LibJS: Add alternative source-to-bytecode pipeline in Rust
Implement a complete Rust reimplementation of the LibJS frontend:
lexer, parser, AST, scope collector, and bytecode code generator.

The Rust pipeline is built via Corrosion (CMake-Cargo bridge) and
linked into LibJS as a static library. It is gated behind a build
flag (ENABLE_RUST, on by default except on Windows) and two runtime
environment variables:

- LIBJS_CPP: Use the C++ pipeline instead of Rust
- LIBJS_COMPARE_PIPELINES=1: Run both pipelines in lockstep,
  aborting on any difference in AST or bytecode generated.

The C++ side communicates with Rust through a C FFI layer
(RustIntegration.cpp/h) that passes source text to Rust and receives
a populated Executable back via a BytecodeFactory interface.
2026-02-24 09:39:42 +01:00
..
annex-b-function-in-if.txt LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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 LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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
bigint-large-constant-folding.txt Tests/LibJS: Import various tests developed alongside Rust pipeline 2026-02-24 09:39:42 +01:00
bigint-truthiness.txt Tests/LibJS: Import various tests developed alongside Rust pipeline 2026-02-24 09:39:42 +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: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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
catch-scope-boundary.txt Tests/LibJS: Import various tests developed alongside Rust pipeline 2026-02-24 09:39:42 +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 LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +01:00
computed-compound-assign-register-reuse.txt LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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 LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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-large-string-to-number.txt Tests/LibJS: Import various tests developed alongside Rust pipeline 2026-02-24 09:39:42 +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 LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +01:00
delete-super-property.txt LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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-of-lhs-patterns.txt Tests/LibJS: Import various tests developed alongside Rust pipeline 2026-02-24 09:39:42 +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-in-var-function-lhs-name.txt Tests/LibJS: Import various tests developed alongside Rust pipeline 2026-02-24 09:39:42 +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: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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-of-rhs-precedence.txt Tests/LibJS: Import various tests developed alongside Rust pipeline 2026-02-24 09:39:42 +01:00
for-try-finally-continue.txt LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +01:00
generator-yield-call.txt LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +01:00
generator-yield-finally.txt LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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 LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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 LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +01:00
lexical-env-teardown.txt Tests/LibJS: Import various tests developed alongside Rust pipeline 2026-02-24 09:39:42 +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 LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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 LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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 LibJS: Add alternative source-to-bytecode pipeline in Rust 2026-02-24 09:39:42 +01:00
private-identifier-access-patterns.txt Tests/LibJS: Import various tests developed alongside Rust pipeline 2026-02-24 09:39:42 +01:00
private-method-call-description.txt LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +01:00
regex-literals.txt Tests/LibJS: Import various tests developed alongside Rust pipeline 2026-02-24 09:39:42 +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 LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +01:00
super-constructor-call.txt LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +01:00
super-evaluation-order.txt LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +01:00
super-method-call-order.txt LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +01:00
super-optional-call-this.txt LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +01:00
switch-completion-value.txt LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +01:00
switch-local-only-let.txt Tests/LibJS: Import various tests developed alongside Rust pipeline 2026-02-24 09:39:42 +01:00
switch-scoping.txt LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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
tagged-template-if-register-order.txt Tests/LibJS: Import various tests developed alongside Rust pipeline 2026-02-24 09:39:42 +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 LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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 LibJS: Ensure deterministic ordering in scope analysis and codegen 2026-02-24 09:39:42 +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