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

Unified Diff: test/mjsunit/regress/comparison-in-effect-context-deopt.js

Issue 185653004: Experimental parser: merge to r19637 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 10 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/compare-map-elim1.js ('k') | test/mjsunit/regress/number-named-call-deopt.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/comparison-in-effect-context-deopt.js
diff --git a/test/mjsunit/compiler/regress-106351.js b/test/mjsunit/regress/comparison-in-effect-context-deopt.js
similarity index 85%
copy from test/mjsunit/compiler/regress-106351.js
copy to test/mjsunit/regress/comparison-in-effect-context-deopt.js
index 2a67a055d338ae6ac29fdf94704836e8958e38f1..b28dff73a745dfc7445a6c093380c56f51b3fb76 100644
--- a/test/mjsunit/compiler/regress-106351.js
+++ b/test/mjsunit/regress/comparison-in-effect-context-deopt.js
@@ -1,4 +1,4 @@
-// Copyright 2011 the V8 project authors. All rights reserved.
+// Copyright 2014 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -27,12 +27,21 @@
// Flags: --allow-natives-syntax
-// Test Math.round with the input reused in the same expression.
+function lazyDeopt() {
+ %DeoptimizeFunction(test);
+ return "deopt";
+}
+
+var x = { toString : lazyDeopt };
+
+function g(x) {
+ return "result";
+}
+
function test(x) {
- var v = Math.round(x) - x;
- assertEquals(0.5, v);
+ return g(void(x == ""));
}
-for (var i = 0; i < 5; ++i) test(0.5);
+test(x);
%OptimizeFunctionOnNextCall(test);
-test(0.5);
+assertEquals("result", test(x));
« no previous file with comments | « test/mjsunit/regress/compare-map-elim1.js ('k') | test/mjsunit/regress/number-named-call-deopt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698