blob: 98317e7878e2dba8bad60e09f00b32e64d887bed (
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
|
function foo() {}
function bar(o) {
function nested() {
with (o) {
return Object(...arguments);
}
}
// We need an arbitrary IC before the OSR loop.
foo();
// Trigger on-stack-replacement.
for(let i = 0; i < 100; i++) {}
// Make the call.
return nested();
}
// Trigger OSR compilation.
for (var i = 0; i < 5; i++) {
bar({});
}
// Call passing in the function itself.
print(bar(bar));
|