Debian Codegraph @

js/src/jit-test/tests/ion/bug1931336.js

raw
1 // GVN would alias the second Object.keys(obj).length to the first instance
2 // while the instruction are not supposed to alias due to the delete operation
3 // which exist in between.
4 function foo() {
5 let obj = {a: 1};
6 if (Object.keys(obj).length == 0) {}
7 delete obj.a;
8 assertEq(Object.keys(obj).length, 0);
9 }
10
11 with ({}) {}
12 for (var i = 0; i < 10000; i++) {
13 foo();
14 }
15