haikuwebkit/LayoutTests/js/script-tests/dfg-array-length-dead.js

11 lines
212 B
JavaScript

description(
"Tests that an array length access being dead does not result in register allocation failures."
);
function foo(x) {
var y = x.f.length;
return 42;
}
dfgShouldBe(foo, "foo({f:[]})", "42");