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

Side by Side Diff: test/mjsunit/regress/regress-5972.js

Issue 2697063002: Fix typeof optimization for undetectable (Closed)
Patch Set: Add TypeOfIsFunction to EscapeStatusAnalysis Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --allow-natives-syntax
6
7 var undetectable = %GetUndetectable();
8
9 function foo(a) {
10 const o = a ? foo : undetectable;
11 return typeof o === 'function';
12 }
13
14 assertFalse(foo(false));
vabr (Chromium) 2017/02/15 23:36:41 Just out of curiosity: why is the call to foo() re
Benedikt Meurer 2017/02/16 04:01:19 This is kind of a habit. In this particular case w
15 assertFalse(foo(false));
16 %OptimizeFunctionOnNextCall(foo);
17 assertFalse(foo(false));
OLDNEW
« src/compiler/effect-control-linearizer.cc ('K') | « src/compiler/verifier.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698