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

Unified Diff: test/mjsunit/regress/regress-crbug-640497.js

Issue 2363573003: [turbofan] Add proper type guards to escape analysis. (Closed)
Patch Set: Better comment. Created 4 years, 3 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/compiler/escape-analysis-reducer.cc ('k') | test/unittests/compiler/escape-analysis-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-crbug-640497.js
diff --git a/test/mjsunit/regress/regress-crbug-644245.js b/test/mjsunit/regress/regress-crbug-640497.js
similarity index 50%
copy from test/mjsunit/regress/regress-crbug-644245.js
copy to test/mjsunit/regress/regress-crbug-640497.js
index 7f4e00599e7eabfd8923c81debd3633bcfb095fb..c637badb66d06d018cbacb12bbb96ae7c877348e 100644
--- a/test/mjsunit/regress/regress-crbug-644245.js
+++ b/test/mjsunit/regress/regress-crbug-640497.js
@@ -4,14 +4,15 @@
// Flags: --allow-natives-syntax --turbo --turbo-escape
-function f() {
- try {
- throw "boom";
- } catch(e) {
- %_DeoptimizeNow();
- }
-}
+// Warm up {g} with arrays and strings.
+function g(v) { return v.length; }
+assertEquals(1, g("x"));
+assertEquals(2, g("xy"));
+assertEquals(1, g([1]));
+assertEquals(2, g([1,2]));
+// Inline into {f}, where we see only an array.
+function f() { assertEquals(0, g([])); }
f();
f();
%OptimizeFunctionOnNextCall(f);
« no previous file with comments | « src/compiler/escape-analysis-reducer.cc ('k') | test/unittests/compiler/escape-analysis-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698