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)); |