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

Unified Diff: src/compiler/typer.cc

Issue 2697063002: Fix typeof optimization for undetectable (Closed)
Patch Set: Rename + format fix 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
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | src/compiler/types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index e7c650dd779a586077324f56c9b7575254d1dd92..ed1a04aa3b42632c7486defa186fb9e140754cf5 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -284,7 +284,7 @@ class Typer::Visitor : public Reducer {
SIMPLIFIED_SPECULATIVE_NUMBER_BINOP_LIST(DECLARE_METHOD)
#undef DECLARE_METHOD
- static Type* ObjectIsCallable(Type*, Typer*);
+ static Type* ObjectIsDetectableCallable(Type*, Typer*);
static Type* ObjectIsNonCallable(Type*, Typer*);
static Type* ObjectIsNumber(Type*, Typer*);
static Type* ObjectIsReceiver(Type*, Typer*);
@@ -503,9 +503,9 @@ 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_;
+Type* Typer::Visitor::ObjectIsDetectableCallable(Type* type, Typer* t) {
+ if (type->Is(Type::DetectableCallable())) return t->singleton_true_;
+ if (!type->Maybe(Type::DetectableCallable())) return t->singleton_false_;
return Type::Boolean();
}
@@ -1901,8 +1901,8 @@ Type* Typer::Visitor::TypeStoreTypedElement(Node* node) {
return nullptr;
}
-Type* Typer::Visitor::TypeObjectIsCallable(Node* node) {
- return TypeUnaryOp(node, ObjectIsCallable);
+Type* Typer::Visitor::TypeObjectIsDetectableCallable(Node* node) {
+ return TypeUnaryOp(node, ObjectIsDetectableCallable);
}
Type* Typer::Visitor::TypeObjectIsNonCallable(Node* node) {
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | src/compiler/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698