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

Unified Diff: test/mjsunit/regress/regress-2618.js

Issue 13811014: Fix OSR for nested loops. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 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/cctest/test-compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-2618.js
diff --git a/test/mjsunit/regress/regress-2451.js b/test/mjsunit/regress/regress-2618.js
similarity index 68%
copy from test/mjsunit/regress/regress-2451.js
copy to test/mjsunit/regress/regress-2618.js
index 465e4e68c26f3e3e119cbaf82d50c8f83c6efa9a..638b71e6228b9f5c5fcfffeafcb0d72e606faf9b 100644
--- a/test/mjsunit/regress/regress-2451.js
+++ b/test/mjsunit/regress/regress-2618.js
@@ -25,17 +25,50 @@
// (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
+// Flags: --use-osr --allow-natives-syntax
function f() {
- assertEquals(-1.0, Math.round(-1.5));
- assertEquals(-2.0, Math.round(-2.5));
- assertEquals(-1.0, Math.round(-0.5000000000000001));
+ do {
+ do {
+ for (i = 0; i < 10000000; i++) {
+ // This should run long enough to trigger OSR.
+ }
+ } while (false);
+ } while (false);
}
f();
-f();
-%OptimizeFunctionOnNextCall(f);
-f();
assertTrue(%GetOptimizationStatus(f) != 2);
+
+function g() {
+ for (var i = 0; i < 1; i++) { }
+
+ do {
+ do {
+ for (i = 0; i < 1; i++) { }
+ } while (false);
+ } while (false);
+
+ do {
+ do {
+ do {
+ do {
+ do {
+ do {
+ do {
+ do {
+ for (i = 0; i < 10000000; i++) { }
+ } while (false);
+ } while (false);
+ } while (false);
+ } while (false);
+ } while (false);
+ } while (false);
+ } while (false);
+ } while (false);
+}
+
+g();
+assertTrue(%GetOptimizationStatus(g) != 2);
+
« no previous file with comments | « test/cctest/test-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698