Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(683)

Unified Diff: test/mjsunit/es6/array-iterator-turbo.js

Issue 2853783003: [tests] Fix and un-skip mjsunit/es6/array-iterator-turbo (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-test.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/array-iterator-turbo.js
diff --git a/test/mjsunit/es6/array-iterator-turbo.js b/test/mjsunit/es6/array-iterator-turbo.js
index bbf30e9790109f17783ebfb89ae86eb338cca7d1..5259a33044c7d8963921b5c5d741bfb25a6904b6 100644
--- a/test/mjsunit/es6/array-iterator-turbo.js
+++ b/test/mjsunit/es6/array-iterator-turbo.js
@@ -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);
- }
+ assertOptimized(fn, '', key);
assertEquals(expected, fn(array), key);
- if (expect_deopt) {
- assertUnoptimized(fn, '', key);
- } else {
- assertOptimized(fn, '', key);
- }
+ 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);
- }
+ 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);
}
}
};
« no previous file with comments | « src/runtime/runtime-test.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698