blob: a45bdccb8d9f91ecfe8379d3879461e98a78e12b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// deoptimize `arguments` in the arrow's closest enclosing non-arrow-function
// non-arrow-function -> arrow function
a = 0;
(function() {
a = (() => eval("arguments"))();
})(1, 2, 3, 4);
assertEq(a.length, 4);
// non-arrow-function -> arrow function -> arrow function
a = 0;
(function() {
(() => {
a = (() => eval("arguments"))();
})();
})(1, 2, 3, 4);
assertEq(a.length, 4);
// non-arrow-function -> arrow function -> non-arrow-function -> arrow function
a = 0;
(function() {
(() => {
(function () {
a = (() => eval("arguments"))();
})(1, 2, 3, 4);
})();
})();
assertEq(a.length, 4);
|