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

Unified Diff: src/compiler/typer.cc

Issue 2697063002: Fix typeof optimization for undetectable (Closed)
Patch Set: DetectableCallable TODO: renaming 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index 5fb20da9a5df17e8f6edf4cb87e1666dfa8aaa75..ca0369c2339152677a3ea3e6d226b8085e57f916 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -504,8 +504,8 @@ Type* Typer::Visitor::ToString(Type* type, Typer* t) {
// Type checks.
Type* Typer::Visitor::ObjectIsCallable(Type* type, Typer* t) {
- if (type->Is(Type::Callable())) return t->singleton_true_;
- if (!type->Maybe(Type::Callable())) return t->singleton_false_;
+ if (type->Is(Type::DetectableCallable())) return t->singleton_true_;
+ if (!type->Maybe(Type::DetectableCallable())) return t->singleton_false_;
return Type::Boolean();
}
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/types.h » ('j') | src/compiler/types.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698