Index: test/mjsunit/closures.js |
diff --git a/test/mjsunit/closures.js b/test/mjsunit/closures.js |
index ee487a4b031af0fedec86ed49e33b12763dd6df7..7c1197107f7b73df789b87507c299ba67f728c2b 100644 |
--- a/test/mjsunit/closures.js |
+++ b/test/mjsunit/closures.js |
@@ -25,10 +25,10 @@ |
// (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 |
+ |
function runner(f, expected) { |
- for (var i = 0; i < 1000000; i++) { |
- assertEquals(expected, f.call(this)); |
- } |
+ assertEquals(expected, f.call(this)); |
} |
function test(n) { |
@@ -36,6 +36,8 @@ function test(n) { |
var result = n * 2 + arguments.length; |
return result; |
} |
+ for (var i = 0; i < 5; ++i) MyFunction(); |
+ %OptimizeFunctionOnNextCall(MyFunction) |
runner(MyFunction, n * 2); |
} |