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

Unified Diff: test/mjsunit/compiler/parallel-proto-change.js

Issue 19807002: Turn on parallel recompilation for tests that assert optimization status. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix small details. no logic change. Created 7 years, 5 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 | « test/mjsunit/assert-opt-and-deopt.js ('k') | test/mjsunit/constant-folding-2.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/parallel-proto-change.js
diff --git a/test/mjsunit/compiler/parallel-proto-change.js b/test/mjsunit/compiler/parallel-proto-change.js
index 2392a37c95504e94c6688e9d048118e0e376c77a..25ea3b59dfc5b83b6d7e80f697fc8ba22d3f5c08 100644
--- a/test/mjsunit/compiler/parallel-proto-change.js
+++ b/test/mjsunit/compiler/parallel-proto-change.js
@@ -33,10 +33,6 @@ if (!%IsParallelRecompilationSupported()) {
quit();
}
-function assertUnoptimized(fun) {
- assertTrue(%GetOptimizationStatus(fun) != 1);
-}
-
function f(foo) { return foo.bar(); }
var o = {};
@@ -45,11 +41,14 @@ o.__proto__ = { __proto__: { bar: function() { return 1; } } };
assertEquals(1, f(o));
assertEquals(1, f(o));
+// Mark for parallel optimization.
%OptimizeFunctionOnNextCall(f, "parallel");
-assertEquals(1, f(o)); // Trigger optimization.
-assertUnoptimized(f); // Optimization not yet done.
+// Trigger optimization in the parallel thread.
+assertEquals(1, f(o));
+// While parallel recompilation is running, optimization not yet done.
+assertUnoptimized(f, "no sync");
// Change the prototype chain during optimization to trigger map invalidation.
o.__proto__.__proto__ = { bar: function() { return 2; } };
-%CompleteOptimization(f); // Conclude optimization with...
-assertUnoptimized(f); // ... bailing out due to map dependency.
+// Optimization eventually bails out due to map dependency.
+assertUnoptimized(f, "sync");
assertEquals(2, f(o));
« no previous file with comments | « test/mjsunit/assert-opt-and-deopt.js ('k') | test/mjsunit/constant-folding-2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698