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