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 74e6d86a1041070e8df8e9b02d13f3e0ac697226..aa1ac6de90952c3a0f5e2e3ea28c4f1d1dcdd9f1 100644 |
--- a/test/mjsunit/compiler/parallel-proto-change.js |
+++ b/test/mjsunit/compiler/parallel-proto-change.js |
@@ -25,7 +25,12 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Flags: --allow-natives-syntax --parallel-recompilation |
+// Flags: --allow-natives-syntax |
+// Flags: --parallel-recompilation --parallel-recompilation-delay=50 |
+ |
+function assertUnoptimized(fun) { |
+ assertTrue(%GetOptimizationStatus(fun) != 1); |
+} |
function f(foo) { return foo.bar(); } |
@@ -36,10 +41,10 @@ assertEquals(1, f(o)); |
assertEquals(1, f(o)); |
%OptimizeFunctionOnNextCall(f, "parallel"); |
-assertEquals(1, f(o)); |
-// Change the prototype chain during optimization. |
+assertEquals(1, f(o)); // Trigger optimization. |
+assertUnoptimized(f); // Optimization not yet done. |
+// Change the prototype chain during optimization to trigger map invalidation. |
o.__proto__.__proto__ = { bar: function() { return 2; } }; |
- |
-%WaitUntilOptimized(f); |
- |
+%CompleteOptimization(f); // Conclude optimization with... |
+assertUnoptimized(f); // ... bailing out due to map dependency. |
assertEquals(2, f(o)); |