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

Unified Diff: test/mjsunit/allocation-folding.js

Issue 18254008: Collect side effects on paths to dominated block including the dominator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « src/hydrogen-gvn.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/allocation-folding.js
diff --git a/test/mjsunit/regress/regress-crbug-242870.js b/test/mjsunit/allocation-folding.js
similarity index 85%
copy from test/mjsunit/regress/regress-crbug-242870.js
copy to test/mjsunit/allocation-folding.js
index 7183375ca811cedc81c870d34e694e98cf727f9b..a730bf12a032b538f2f5a7870bbc3e9c594435ac 100644
--- a/test/mjsunit/regress/regress-crbug-242870.js
+++ b/test/mjsunit/allocation-folding.js
@@ -25,19 +25,22 @@
// (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 non_const_true = true;
-
+// Flags: --allow-natives-syntax --nouse-osr
function f() {
- return (non_const_true || true && g());
+ var elem1 = [1,2,3];
+ for (var i=0; i < 100000; i++) {
+ var bar = [1];
+ }
+ var elem2 = [1,2,3];
+ return elem2;
}
-function g() {
- for (;;) {}
+f(); f(); f();
+%OptimizeFunctionOnNextCall(f);
+var result = f();
+
+for (var i=0; i < 100000; i++) {
+ var bar = [1];
}
-assertTrue(f());
-assertTrue(f());
-%OptimizeFunctionOnNextCall(f);
-assertTrue(f());
+assertEquals(result[2], 3);
« no previous file with comments | « src/hydrogen-gvn.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698