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

Unified Diff: test/mjsunit/compiler/smi-stores-opt.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/compiler/regress-rep-change.js ('k') | test/mjsunit/compiler/to-fast-properties.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/smi-stores-opt.js
diff --git a/test/mjsunit/regress/regress-crbug-242870.js b/test/mjsunit/compiler/smi-stores-opt.js
similarity index 86%
copy from test/mjsunit/regress/regress-crbug-242870.js
copy to test/mjsunit/compiler/smi-stores-opt.js
index 7183375ca811cedc81c870d34e694e98cf727f9b..ca0923abc99501096d182bcdcd05f6f4020de9c9 100644
--- a/test/mjsunit/regress/regress-crbug-242870.js
+++ b/test/mjsunit/compiler/smi-stores-opt.js
@@ -1,4 +1,4 @@
-// Copyright 2013 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,17 +27,23 @@
// Flags: --allow-natives-syntax
-var non_const_true = true;
+var o = {a:1.5};
+o.a = 0;
+var a = o.a;
-function f() {
- return (non_const_true || true && g());
+function g() {
+ return 1;
}
-function g() {
- for (;;) {}
+var o2 = {a:{}};
+
+function f() {
+ var result = {a: a};
+ var literal = {x:g()};
+ return [result, literal];
}
-assertTrue(f());
-assertTrue(f());
+f();
+f();
%OptimizeFunctionOnNextCall(f);
-assertTrue(f());
+assertEquals(1, f()[1].x);
« no previous file with comments | « test/mjsunit/compiler/regress-rep-change.js ('k') | test/mjsunit/compiler/to-fast-properties.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698