Commit f3fdcfc1 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[turbofan] Move allocations to prevent false positives

This CL moves allocations in array-multiple-receiver-maps.js
to prevent gc fuzzing from cleaning out code objects, which
will mess with assertOptimized in the test.

Bug: v8:7338
Change-Id: I9ee88cf5518307ff12302df2fdaca5258c23b779
Reviewed-on: https://chromium-review.googlesource.com/880957Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50809}
parent 40f6a133
......@@ -29,21 +29,23 @@ function runTest(f, message, mkICTraining, deoptArg) {
// Make sure the optimized function can handle
// all trained maps without deopt.
for (let a of t3) {
message += " for args " + JSON.stringify(a) + " should have been optimized";
f(a.arr, () => a.el);
message += " for args " + JSON.stringify(a);
assertOptimized(f, undefined, message + " should have been optimized");
assertOptimized(f, undefined, message);
}
} else {
// Trigger deopt, causing no-speculation bit to be set.
let a1 = deoptArg;
let a2 = deoptArg;
message += " for args " + JSON.stringify(a1);
message_unoptimized = message + " should have been unoptimized"
message_optimized = message + " should have been unoptimized"
f(a1.arr, () => a1.el);
assertUnoptimized(f, undefined, message + " should have been unoptimized");
assertUnoptimized(f, undefined, message_unoptimized);
%OptimizeFunctionOnNextCall(f);
// No speculation should protect against further deopts.
f(a2.arr, () => a2.el);
assertOptimized(f, undefined, message + " should have been optimized");
assertOptimized(f, undefined, message_optimized);
}
}
......
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