Commit 47f3ea50 authored by jkummerow's avatar jkummerow Committed by Commit bot

[tests] Fix and un-skip mjsunit/es6/array-iterator-turbo

BUG=v8:6113,v8:6325

Review-Url: https://codereview.chromium.org/2853783003
Cr-Commit-Position: refs/heads/master@{#45024}
parent eec6bb70
......@@ -280,6 +280,11 @@ RUNTIME_FUNCTION(Runtime_OptimizeFunctionOnNextCall) {
if (function->IsOptimized()) return isolate->heap()->undefined_value();
function->MarkForOptimization();
if (FLAG_trace_opt) {
PrintF("[manually marking ");
function->ShortPrint();
PrintF(" for optimization]\n");
}
if (args.length() == 2) {
CONVERT_ARG_HANDLE_CHECKED(String, type, 1);
......
......@@ -102,29 +102,13 @@ let tests = {
%OptimizeFunctionOnNextCall(fn);
fn(array);
// TODO(bmeurer): FAST_HOLEY_DOUBLE_ELEMENTS maps generally deopt when
// a hole is encountered. Test should be fixed once that is corrected.
let expect_deopt = /HOLEY_DOUBLE/.test(key);
if (expect_deopt) {
assertUnoptimized(fn, '', key);
} else {
assertOptimized(fn, '', key);
}
assertEquals(expected, fn(array), key);
if (expect_deopt) {
assertUnoptimized(fn, '', key);
} else {
assertOptimized(fn, '', key);
}
// Check no deopt when another array with the same map is used
assertTrue(%HaveSameMap(array, array2), key);
if (expect_deopt) {
assertUnoptimized(fn, '', key);
} else {
assertOptimized(fn, '', key);
}
assertEquals(expected2, fn(array2), key);
// CheckMaps bailout
......@@ -231,6 +215,10 @@ let tests = {
let clone = new array.constructor(array);
%ArrayBufferNeuter(clone.buffer);
assertThrows(() => sum(clone), TypeError);
// Clear the slate for the next iteration.
%DeoptimizeFunction(sum);
%ClearFunctionFeedback(sum);
}
}
};
......
......@@ -183,9 +183,6 @@
# which makes the test useless.
'big-object-literal': [PASS, ['mode == debug', SKIP]],
# BUG(v8:6113).
'es6/array-iterator-turbo': [SKIP],
# BUG(v8:6306).
'wasm/huge-memory': [SKIP],
}], # ALWAYS
......
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