Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: test/mjsunit/strict-mode-opt.js

Issue 6910022: Replace long running loops by OptimizeFunctionOnNextCall in some tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/regress/regress-1099.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « test/mjsunit/regress/regress-1099.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698