Index: test/mjsunit/parallel-invalidate-transition-map.js |
diff --git a/test/mjsunit/parallel-invalidate-transition-map.js b/test/mjsunit/parallel-invalidate-transition-map.js |
index 2a2276f1e238bb1c19efe07ff50262d0e983fae6..716f63198cd02f4ba01af39ebd11c082d507ff0a 100644 |
--- a/test/mjsunit/parallel-invalidate-transition-map.js |
+++ b/test/mjsunit/parallel-invalidate-transition-map.js |
@@ -26,17 +26,13 @@ |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
// Flags: --track-fields --track-double-fields --allow-natives-syntax |
-// Flags: --parallel-recompilation --parallel-recompilation-delay=50 |
+// Flags: --parallel-recompilation --parallel-recompilation-delay=100 |
if (!%IsParallelRecompilationSupported()) { |
print("Parallel recompilation is disabled. Skipping this test."); |
quit(); |
} |
-function assertUnoptimized(fun) { |
- assertTrue(%GetOptimizationStatus(fun) != 1); |
-} |
- |
function new_object() { |
var o = {}; |
o.a = 1; |
@@ -53,9 +49,9 @@ add_field(new_object()); |
%OptimizeFunctionOnNextCall(add_field, "parallel"); |
var o = new_object(); |
-add_field(o); // Trigger optimization. |
-assertUnoptimized(add_field); // Not yet optimized. |
-o.c = 2.2; // Invalidate transition map. |
-%CompleteOptimization(add_field); // Conclude optimization with... |
-assertUnoptimized(add_field); // ... bailing out due to map dependency. |
- |
+// Trigger optimization in the background thread. |
+add_field(o); |
+// Invalidate transition map while optimization is underway. |
+o.c = 2.2; |
+// Sync with background thread to conclude optimization that bailed out. |
+assertUnoptimized(add_field, "sync"); |