Index: test/mjsunit/strict-mode-opt.js |
diff --git a/test/mjsunit/strict-mode-opt.js b/test/mjsunit/strict-mode-opt.js |
index e2eae33fc43f40c0cd0ba0a3105740fd03b37bda..5ca5c279e108cbc6bbee2ef962000ba440d27c8d 100644 |
--- a/test/mjsunit/strict-mode-opt.js |
+++ b/test/mjsunit/strict-mode-opt.js |
@@ -25,8 +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 |
+ |
var global = 0; |
-var MAX = 1000000; |
+var MAX = 5; |
// Attempt to inline strcit in non-strict. |
@@ -43,6 +45,7 @@ function nonstrictCallStrict(n) { |
(function testInlineStrictInNonStrict() { |
for (var i = 0; i <= MAX; i ++) { |
try { |
+ if (i == MAX - 1) %OptimizeFunctionOnNextCall(nonstrictCallStrict); |
nonstrictCallStrict(i); |
} catch (e) { |
assertInstanceof(e, ReferenceError); |
@@ -68,6 +71,7 @@ function strictCallNonStrict(n) { |
(function testInlineNonStrictInStrict() { |
for (var i = 0; i <= MAX; i ++) { |
try { |
+ if (i == MAX - 1) %OptimizeFunctionOnNextCall(nonstrictCallStrict); |
strictCallNonStrict(i); |
} catch (e) { |
fail("no exception", "exception"); |
@@ -87,6 +91,7 @@ function strictAssignToUndefined(n) { |
(function testOptimizeStrictAssignToUndefined() { |
for (var i = 0; i <= MAX; i ++) { |
try { |
+ if (i == MAX - 1) %OptimizeFunctionOnNextCall(nonstrictCallStrict); |
strictAssignToUndefined(i); |
} catch (e) { |
assertInstanceof(e, ReferenceError); |