mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
This adds a test case for array destructuring assignment inside a logical AND expression, e.g. `t && ([a, b] = t(e))`. The C++ pipeline allocates a separate register for the RHS and copies it to the result register after destructuring, while the Rust pipeline evaluates the RHS directly into the preferred destination, omitting the copy.
6 lines
73 B
JavaScript
6 lines
73 B
JavaScript
function f(t, e) {
|
|
let a, b;
|
|
t && ([a, b] = t(e));
|
|
}
|
|
f(null, 0);
|