Commit 8b0cbd23 authored by Paolo Severini's avatar Paolo Severini Committed by V8 LUCI CQ

Fix flaky tests mjsunit/compiler/call-with-arraylike-or-spread*

The tests are not compatible with the --stress-background-compile flag.

Bug: v8:11821
Change-Id: Iecef6a2838109fddc9f0ecc145a9f8971bc9bc3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2918214Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#74959}
parent 906193e0
......@@ -17,25 +17,25 @@
"use strict";
// Setting value to be retrieved in place of hole.
Array.prototype[1] = 'x';
Array.prototype[2] = 'x';
var sum_js3_got_interpreted = true;
function sum_js3(a, b, c) {
sum_js3_got_interpreted = %IsBeingInterpreted();
return a + b + c;
var sum_js_got_interpreted = true;
function sum_js(a, b, c, d) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c + d;
}
function foo(x, y) {
return sum_js3.apply(null, [x, , y]);
return sum_js.apply(null, ["", x, ,y]);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals('AxB', foo('A', 'B'));
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
// The protector should be invalidated, which prevents inlining.
%OptimizeFunctionOnNextCall(foo);
assertEquals('AxB', foo('A', 'B'));
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
assertOptimized(foo);
})();
......@@ -20,33 +20,33 @@
(function () {
"use strict";
var sum_js3_got_interpreted = true;
function sum_js3(a, b, c) {
sum_js3_got_interpreted = %IsBeingInterpreted();
return a + b + c;
var sum_js_got_interpreted = true;
function sum_js(a, b, c, d) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c + d;
}
function foo(x, y) {
return sum_js3.apply(null, [x, , y]);
return sum_js.apply(null, ["", x, ,y]);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals('AundefinedB', foo('A', 'B'));
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
%OptimizeFunctionOnNextCall(foo);
assertEquals('AundefinedB', foo('A', 'B'));
assertFalse(sum_js3_got_interpreted);
assertFalse(sum_js_got_interpreted);
assertOptimized(foo);
// Modify the array prototype, define a default value for element [1].
Array.prototype[1] = 'x';
Array.prototype[2] = 'x';
assertUnoptimized(foo);
// Now the call will not be inlined.
%PrepareFunctionForOptimization(foo);
%OptimizeFunctionOnNextCall(foo);
assertEquals('AxB', foo('A', 'B'));
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
assertOptimized(foo);
})();
......@@ -18,9 +18,9 @@
// Test deopt when array map changes.
(function () {
"use strict";
var sum_js3_got_interpreted = true;
function sum_js3(a, b, c) {
sum_js3_got_interpreted = %IsBeingInterpreted();
var sum_js_got_interpreted = true;
function sum_js(a, b, c) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c;
}
function foo(x, y, z, str) {
......@@ -28,25 +28,25 @@
if (str) {
v[0] = str;
}
return sum_js3.apply(null, v);
return sum_js.apply(null, v);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
for (let i = 0; i < 5; i++) {
%PrepareFunctionForOptimization(foo);
assertEquals(78, foo(26, 6, 46, null));
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
// Compile function foo; inlines 'sum_js3' into 'foo'.
// Compile function foo; inlines 'sum_js' into 'foo'.
%OptimizeFunctionOnNextCall(foo);
assertEquals(78, foo(26, 6, 46, null));
assertOptimized(foo);
if (i < 3) {
assertFalse(sum_js3_got_interpreted);
assertFalse(sum_js_got_interpreted);
} else {
// i: 3: Speculation mode prevents optimization of sum_js3.apply() call.
assertTrue(sum_js3_got_interpreted);
// i: 3: Speculation mode prevents optimization of sum_js.apply() call.
assertTrue(sum_js_got_interpreted);
}
// This should deoptimize:
......@@ -54,7 +54,7 @@
// i: 1,2: Deopt eager: wrong map.
// i: 3: Won't deopt anymore.
assertEquals("v8646", foo(26, 6, 46, "v8"));
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
if (i < 3) {
assertUnoptimized(foo);
......
......@@ -18,133 +18,133 @@
// Test JSCallReducer::ReduceJSCallWithArrayLike.
(function () {
"use strict";
var sum_js3_got_interpreted = true;
function sum_js3(a, b, c) {
sum_js3_got_interpreted = %IsBeingInterpreted();
return a + b + c;
var sum_js_got_interpreted = true;
function sum_js(a, b, c, d) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c + d;
}
function foo(x, y, z) {
return sum_js3.apply(null, [x, y, z]);
return sum_js.apply(null, ["", x, y, z]);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals('abc', foo('a', 'b', 'c'));
%OptimizeFunctionOnNextCall(foo);
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
assertEquals('abc', foo('a', 'b', 'c'));
assertFalse(sum_js3_got_interpreted);
assertOptimized(foo);
assertFalse(sum_js_got_interpreted);
})();
// Test with holey array.
(function () {
"use strict";
var sum_js3_got_interpreted = true;
function sum_js3(a, b, c) {
sum_js3_got_interpreted = %IsBeingInterpreted();
return a + b + c;
var sum_js_got_interpreted = true;
function sum_js(a, b, c, d) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c + d;
}
function foo(x, y) {
return sum_js3.apply(null, [x,,y]);
return sum_js.apply(null, ["",x,,y]);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals('AundefinedB', foo('A', 'B'));
%OptimizeFunctionOnNextCall(foo);
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
assertEquals('AundefinedB', foo('A', 'B'));
assertFalse(sum_js3_got_interpreted);
assertFalse(sum_js_got_interpreted);
assertOptimized(foo);
})();
// Test with holey-double array.
(function () {
"use strict";
var sum_js3_got_interpreted = true;
function sum_js3(a, b, c) {
sum_js3_got_interpreted = %IsBeingInterpreted();
return a + (b ? b : .0) + c;
var sum_js_got_interpreted = true;
function sum_js(a, b, c, d) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + (c ? c : .0) + d;
}
function foo(x, y) {
return sum_js3.apply(null, [x,,y]);
return sum_js.apply(null, [3.14, x, , y]);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals(42.17, foo(16.11, 26.06));
assertEquals(45.31, foo(16.11, 26.06));
%OptimizeFunctionOnNextCall(foo);
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
// This is expected to deoptimize
assertEquals(42.17, foo(16.11, 26.06));
assertTrue(sum_js3_got_interpreted);
assertEquals(45.31, foo(16.11, 26.06));
assertTrue(sum_js_got_interpreted);
assertUnoptimized(foo);
// Optimize again
%PrepareFunctionForOptimization(foo);
assertEquals(42.17, foo(16.11, 26.06));
assertEquals(45.31, foo(16.11, 26.06));
%OptimizeFunctionOnNextCall(foo);
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
// This this it should stay optimized, but with the call not inlined.
assertEquals(42.17, foo(16.11, 26.06));
assertTrue(sum_js3_got_interpreted);
// This should stay optimized, but with the call not inlined.
assertEquals(45.31, foo(16.11, 26.06));
assertTrue(sum_js_got_interpreted);
assertOptimized(foo);
})();
// Test deopt when array size changes.
(function () {
"use strict";
var sum_js3_got_interpreted = true;
function sum_js3(a, b, c) {
sum_js3_got_interpreted = %IsBeingInterpreted();
return a + b + c;
var sum_js_got_interpreted = true;
function sum_js(a, b, c, d) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c + d;
}
function foo(x, y, z) {
let a = [x, y, z];
let a = ["", x, y, z];
a.push('*');
return sum_js3.apply(null, a);
return sum_js.apply(null, a);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
// Here array size changes.
assertEquals('abc', foo('a', 'b', 'c'));
%OptimizeFunctionOnNextCall(foo);
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
// Here it should deoptimize.
assertEquals('abc', foo('a', 'b', 'c'));
assertUnoptimized(foo);
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
// Now speculation mode prevents the optimization.
%PrepareFunctionForOptimization(foo);
%OptimizeFunctionOnNextCall(foo);
assertEquals('abc', foo('a', 'b', 'c'));
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
assertOptimized(foo);
})();
// Test with FixedDoubleArray.
(function () {
"use strict";
var sum_js3_got_interpreted = true;
function sum_js3(a, b, c) {
sum_js3_got_interpreted = %IsBeingInterpreted();
return a + b + c;
var sum_js_got_interpreted = true;
function sum_js(a, b, c, d) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c + d;
}
function foo(x, y, z) {
return sum_js3.apply(null, [x, y, z]);
return sum_js.apply(null, [3.14, x, y, z]);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals(53.2, foo(11.03, 16.11, 26.06));
assertEquals(56.34, foo(11.03, 16.11, 26.06));
%OptimizeFunctionOnNextCall(foo);
assertTrue(sum_js3_got_interpreted);
assertEquals(53.2, foo(11.03, 16.11, 26.06));
assertFalse(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
assertEquals(56.34, foo(11.03, 16.11, 26.06));
assertFalse(sum_js_got_interpreted);
assertOptimized(foo);
})();
......@@ -207,68 +207,68 @@
// Test Reflect.apply().
(function () {
"use strict";
var sum_js3_got_interpreted = true;
function sum_js3(a, b, c) {
sum_js3_got_interpreted = %IsBeingInterpreted();
return a + b + c;
var sum_js_got_interpreted = true;
function sum_js(a, b, c, d) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c + d;
}
function foo(x, y ,z) {
return Reflect.apply(sum_js3, null, [x, y, z]);
return Reflect.apply(sum_js, null, ["", x, y, z]);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals('abc', foo('a', 'b', 'c'));
%OptimizeFunctionOnNextCall(foo);
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
assertEquals('abc', foo('a', 'b', 'c'));
assertFalse(sum_js3_got_interpreted);
assertFalse(sum_js_got_interpreted);
assertOptimized(foo);
})();
// Test JSCallReducer::ReduceJSCallWithSpread.
(function () {
"use strict";
var sum_js3_got_interpreted = true;
function sum_js3(a, b, c) {
sum_js3_got_interpreted = %IsBeingInterpreted();
return a + b + c;
var sum_js_got_interpreted = true;
function sum_js(a, b, c, d) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c + d;
}
function foo(x, y, z) {
const numbers = [x, y, z];
return sum_js3(...numbers);
const numbers = ["", x, y, z];
return sum_js(...numbers);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals('abc', foo('a', 'b', 'c'));
%OptimizeFunctionOnNextCall(foo);
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
assertEquals('abc', foo('a', 'b', 'c'));
assertFalse(sum_js3_got_interpreted);
assertFalse(sum_js_got_interpreted);
assertOptimized(foo);
})();
// Test spread call with empty array.
(function () {
"use strict";
var sum_js3_got_interpreted = true;
function sum_js3(a, b, c) {
sum_js3_got_interpreted = %IsBeingInterpreted();
var sum_js_got_interpreted = true;
function sum_js(a, b, c) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c;
}
function foo(x, y, z) {
const args = [];
return sum_js3(x, y, z, ...args);
return sum_js(x, y, z, ...args);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals('abc', foo('a', 'b', 'c'));
%OptimizeFunctionOnNextCall(foo);
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
assertEquals('abc', foo('a', 'b', 'c'));
assertFalse(sum_js3_got_interpreted);
assertFalse(sum_js_got_interpreted);
assertOptimized(foo);
})();
......@@ -276,13 +276,13 @@
(function () {
"use strict";
var sum_js_got_interpreted = true;
function sum_js(a, b, c, d, e, f) {
assertEquals(6, arguments.length);
function sum_js(a, b, c, d, e, f, g) {
assertEquals(7, arguments.length);
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c + d + e + f;
return a + b + c + d + e + f + g;
}
function foo(x, y, z) {
const numbers = [z, y, x];
const numbers = ["", z, y, x];
return sum_js(x, y, z, ...numbers);
}
......@@ -301,16 +301,16 @@
"use strict";
var sum_got_interpreted = true;
function foo_closure() {
return function(a, b, c) {
return function(a, b, c, d) {
sum_got_interpreted = %IsBeingInterpreted();
return a + b + c;
return a + b + c + d;
}
}
const _foo_closure = foo_closure();
%PrepareFunctionForOptimization(_foo_closure);
function foo(x, y, z) {
return foo_closure().apply(null, [x, y, z]);
return foo_closure().apply(null, ["", x, y, z]);
}
%PrepareFunctionForOptimization(foo_closure);
......@@ -376,15 +376,15 @@
(function () {
"use strict";
var sum_got_interpreted = true;
function sum_js3(a, b, c) {
function sum_js(a, b, c, d) {
sum_got_interpreted = %IsBeingInterpreted();
return this.x + a + b + c;
return this.x + a + b + c + d;
}
function foo(x, y, z) {
return sum_js3.bind({ x: 42 }).apply(null, [x, y, z]);
return sum_js.bind({ x: 42 }).apply(null, ["", x, y, z]);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals('42abc', foo('a', 'b', 'c'));
assertTrue(sum_got_interpreted);
......@@ -399,12 +399,12 @@
(function () {
"use strict";
var sum_got_interpreted = true;
function sum_js(a, b, c, d, e) {
function sum_js(a, b, c, d, e, f) {
sum_got_interpreted = %IsBeingInterpreted();
return this.x + a + b + c + d + e;
return this.x + a + b + c + d + e + f;
}
function foo(x, y, z) {
return sum_js.bind({ x: 3 }, 11, 31).apply(null, [x, y, z]);
return sum_js.bind({ x: 3 }, 11, 31).apply(null, ["", x, y, z]);
}
%PrepareFunctionForOptimization(sum_js);
......@@ -422,20 +422,20 @@
(function () {
"use strict";
var sum_js_got_interpreted = true;
function sum_js(a, b, c) {
function sum_js(a, b, c, d) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c + arguments.length;
return a + b + c + d + arguments.length;
}
function foo(x, y) {
return sum_js.apply(null, [x, y]);
return sum_js.apply(null, ["", x, y]);
}
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals('ABundefined2', foo('A', 'B'));
assertEquals('ABundefined3', foo('A', 'B'));
%OptimizeFunctionOnNextCall(foo);
assertTrue(sum_js_got_interpreted);
assertEquals('ABundefined2', foo('A', 'B'));
assertEquals('ABundefined3', foo('A', 'B'));
assertFalse(sum_js_got_interpreted);
assertOptimized(foo);
})();
......@@ -444,20 +444,20 @@
(function () {
"use strict";
var sum_js_got_interpreted = true;
function sum_js(a, b, c) {
function sum_js(a, b, c, d) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c + arguments.length;
return a + b + c + d + arguments.length;
}
function foo(v, w, x, y, z) {
return sum_js.apply(null, [v, w, x, y, z]);
return sum_js.apply(null, ["", v, w, x, y, z]);
}
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals('abc5', foo('a', 'b', 'c', 'd', 'e'));
assertEquals('abc6', foo('a', 'b', 'c', 'd', 'e'));
%OptimizeFunctionOnNextCall(foo);
assertTrue(sum_js_got_interpreted);
assertEquals('abc5', foo('a', 'b', 'c', 'd', 'e'));
assertEquals('abc6', foo('a', 'b', 'c', 'd', 'e'));
assertFalse(sum_js_got_interpreted);
assertOptimized(foo);
})();
......@@ -466,21 +466,21 @@
(function () {
"use strict";
var sum_js_got_interpreted = true;
function sum_js(a, b, c) {
function sum_js(a, b, c, d) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c + arguments.length;
return a + b + c + d + arguments.length;
}
function foo(x, y) {
const numbers = [x, y];
const numbers = ["", x, y];
return sum_js(...numbers);
}
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals('ABundefined2', foo('A', 'B'));
assertEquals('ABundefined3', foo('A', 'B'));
%OptimizeFunctionOnNextCall(foo);
assertTrue(sum_js_got_interpreted);
assertEquals('ABundefined2', foo('A', 'B'));
assertEquals('ABundefined3', foo('A', 'B'));
assertFalse(sum_js_got_interpreted);
assertOptimized(foo);
})();
......@@ -488,23 +488,23 @@
// Test call with spread over-application.
(function () {
"use strict";
var sum_js3_got_interpreted = true;
function sum_js3(a, b, c) {
sum_js3_got_interpreted = %IsBeingInterpreted();
return a + b + c + arguments.length;
var sum_js_got_interpreted = true;
function sum_js(a, b, c, d) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c + d + arguments.length;
}
function foo(v, w, x, y, z) {
const numbers = [v, w, x, y, z];
return sum_js3(...numbers);
const numbers = ["", v, w, x, y, z];
return sum_js(...numbers);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals('abc5', foo('a', 'b', 'c', 'd', 'e'));
assertEquals('abc6', foo('a', 'b', 'c', 'd', 'e'));
%OptimizeFunctionOnNextCall(foo);
assertTrue(sum_js3_got_interpreted);
assertEquals('abc5', foo('a', 'b', 'c', 'd', 'e'));
assertFalse(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
assertEquals('abc6', foo('a', 'b', 'c', 'd', 'e'));
assertFalse(sum_js_got_interpreted);
assertOptimized(foo);
})();
......@@ -514,10 +514,10 @@
var sum_js_got_interpreted = true;
function sum_js(a, b, ...moreArgs) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + moreArgs[0] + moreArgs[1] + moreArgs[2];
return a + b + moreArgs[0] + moreArgs[1] + moreArgs[2] + moreArgs[3];
}
function foo(v, w, x, y, z) {
return sum_js.apply(null, [v, w, x, y, z]);
return sum_js.apply(null, ["", v, w, x, y, z]);
}
%PrepareFunctionForOptimization(sum_js);
......@@ -533,51 +533,51 @@
// Test with 'arguments'.
(function () {
"use strict";
var sum_js3_got_interpreted = true;
function sum_js3(a, b, c) {
sum_js3_got_interpreted = %IsBeingInterpreted();
var sum_js_got_interpreted = true;
function sum_js(a, b, c) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c;
}
function foo() {
return sum_js3.apply(null, arguments);
return sum_js.apply(null, arguments);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
assertEquals('abc', foo('a', 'b', 'c'));
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
// The call is not inlined with CreateArguments.
%OptimizeFunctionOnNextCall(foo);
assertEquals('abc', foo('a', 'b', 'c'));
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
assertOptimized(foo);
})();
// Test with inlined calls.
(function () {
"use strict";
var sum_js3_got_interpreted = true;
function sum_js3(a, b, c) {
sum_js3_got_interpreted = %IsBeingInterpreted();
return a + b + c;
var sum_js_got_interpreted = true;
function sum_js(a, b, c, d) {
sum_js_got_interpreted = %IsBeingInterpreted();
return a + b + c + d;
}
function foo(x, y, z) {
return sum_js3.apply(null, [x, y, z]);
return sum_js.apply(null, ["", x, y, z]);
}
function bar(a, b, c) {
return foo(c, b, a);
}
%PrepareFunctionForOptimization(sum_js3);
%PrepareFunctionForOptimization(sum_js);
%PrepareFunctionForOptimization(foo);
%PrepareFunctionForOptimization(bar);
assertEquals('cba', bar('a', 'b', 'c'));
assertTrue(sum_js3_got_interpreted);
assertTrue(sum_js_got_interpreted);
// Optimization also works if the call is in an inlined function.
%OptimizeFunctionOnNextCall(bar);
assertEquals('cba', bar('a', 'b', 'c'));
assertFalse(sum_js3_got_interpreted);
assertFalse(sum_js_got_interpreted);
assertOptimized(bar);
})();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment