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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --allow-natives-syntax --turbo --turbo-escape 5 // Flags: --allow-natives-syntax --turbo --turbo-escape
6 6
7 function f() { 7 // Warm up {g} with arrays and strings.
8 try { 8 function g(v) { return v.length; }
9 throw "boom"; 9 assertEquals(1, g("x"));
10 } catch(e) { 10 assertEquals(2, g("xy"));
11 %_DeoptimizeNow(); 11 assertEquals(1, g([1]));
12 } 12 assertEquals(2, g([1,2]));
13 }
14 13
14 // Inline into {f}, where we see only an array.
15 function f() { assertEquals(0, g([])); }
15 f(); 16 f();
16 f(); 17 f();
17 %OptimizeFunctionOnNextCall(f); 18 %OptimizeFunctionOnNextCall(f);
18 f(); 19 f();
OLDNEW
« 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