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

Unified Diff: test/mjsunit/compiler/regress-4389-3.js

Issue 1307413003: [crankshaft] DCE must not eliminate (observable) math operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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-4389-2.js ('k') | test/mjsunit/compiler/regress-4389-4.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/regress-4389-3.js
diff --git a/test/mjsunit/compiler/regress-491578.js b/test/mjsunit/compiler/regress-4389-3.js
similarity index 55%
copy from test/mjsunit/compiler/regress-491578.js
copy to test/mjsunit/compiler/regress-4389-3.js
index c27570456c31e9a191fe1f4f1ea17b80f29de98e..9aa72d1ac9ff196c5c113c207c7a1e414f84f950 100644
--- a/test/mjsunit/compiler/regress-491578.js
+++ b/test/mjsunit/compiler/regress-4389-3.js
@@ -2,14 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax
+// Flags: --allow-natives-syntax --dead-code-elimination
-function foo(x) {
- if (x === undefined) return;
- while (true) {
- while (1 || 2) { }
- f();
- }
-}
+function foo(x) { Math.floor(x); }
+foo(1);
+foo(2);
%OptimizeFunctionOnNextCall(foo);
-foo();
+assertThrows(function() { foo(Symbol()) }, TypeError);
« no previous file with comments | « test/mjsunit/compiler/regress-4389-2.js ('k') | test/mjsunit/compiler/regress-4389-4.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698