Revision: 9034
Author:   [email protected]
Date:     Mon Aug 29 01:46:35 2011
Log: Adjust unit test to avoid flakyness when running with the ARM simulator.

In some cases the assert that the test function is not optimized fails
because the function may be optimized already after the second invocation.
(e.g. when running slow in debug mode)
Review URL: http://codereview.chromium.org/7778009
http://code.google.com/p/v8/source/detail?r=9034

Modified:
 /branches/bleeding_edge/test/mjsunit/assert-opt-and-deopt.js

=======================================
--- /branches/bleeding_edge/test/mjsunit/assert-opt-and-deopt.js Fri Jul 1 04:12:27 2011 +++ /branches/bleeding_edge/test/mjsunit/assert-opt-and-deopt.js Mon Aug 29 01:46:35 2011
@@ -54,7 +54,7 @@
* that you later want to track de/optimizations for. It is necessary because
  * tests are sometimes executed several times in a row, and you want to
  * disregard counts from previous runs.
- */
+ */
 OptTracker.prototype.CheckpointOptCount = function(func) {
   this.opt_counts_[func] = %GetOptimizationCount(func);
 };
@@ -148,7 +148,7 @@
 tracker.AssertDeoptHappened(f, false);
 tracker.AssertDeoptCount(f, 0);

-for (var i = 0; i < 2; i++) f(1);
+f(1);

 tracker.AssertOptCount(f, 0);
 tracker.AssertIsOptimized(f, false);

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to