mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
Add bytecode tests verifying identifier resolution produces correct register-backed locals, global lookups, argument indices, and environment lookups for eval/with/captured cases. Add runtime tests for destructuring assignment patterns with expression defaults: class expressions (named/anonymous), function expressions, arrow functions, nested destructuring, eval in defaults, MemberExpression targets with setter functions, and class name scoping.
14 lines
244 B
JavaScript
14 lines
244 B
JavaScript
// Test that simple function parameters are promoted to register-backed
|
|
// arguments. The bytecode should use argN registers directly.
|
|
|
|
function identity(x) {
|
|
return x;
|
|
}
|
|
|
|
function swap(a, b) {
|
|
return b + a;
|
|
}
|
|
|
|
identity(1);
|
|
swap(1, 2);
|