Index: test/mjsunit/compiler/concurrent-proto-change.js |
diff --git a/test/mjsunit/compiler/parallel-proto-change.js b/test/mjsunit/compiler/concurrent-proto-change.js |
similarity index 87% |
rename from test/mjsunit/compiler/parallel-proto-change.js |
rename to test/mjsunit/compiler/concurrent-proto-change.js |
index 76022798934329461b86779beda093394b3bd9d9..e126465a9566f2c540515185326061767e7caef0 100644 |
--- a/test/mjsunit/compiler/parallel-proto-change.js |
+++ b/test/mjsunit/compiler/concurrent-proto-change.js |
@@ -26,7 +26,7 @@ |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
// Flags: --allow-natives-syntax |
-// Flags: --concurrent-recompilation --concurrent-recompilation-delay=50 |
+// Flags: --concurrent-recompilation --block-concurrent-recompilation |
if (!%IsConcurrentRecompilationSupported()) { |
print("Concurrent recompilation is disabled. Skipping this test."); |
@@ -43,12 +43,14 @@ assertEquals(1, f(o)); |
// Mark for concurrent optimization. |
%OptimizeFunctionOnNextCall(f, "concurrent"); |
-// Trigger optimization in the background thread. |
+// Kick off recompilation. |
assertEquals(1, f(o)); |
-// While concurrent recompilation is running, optimization not yet done. |
-assertUnoptimized(f, "no sync"); |
-// Change the prototype chain during optimization to trigger map invalidation. |
+// Change the prototype chain after compile graph has been created. |
o.__proto__.__proto__ = { bar: function() { return 2; } }; |
+// At this point, concurrent recompilation thread has not yet done its job. |
+assertUnoptimized(f, "no sync"); |
+// Let the background thread proceed. |
+%UnblockConcurrentRecompilation(); |
// Optimization eventually bails out due to map dependency. |
assertUnoptimized(f, "sync"); |
assertEquals(2, f(o)); |