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

Unified Diff: src/compiler/typer.cc

Issue 1743433002: Revert of [compiler] Drop the CompareNilIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/verifier.cc » ('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 e7638019a398cf7821ce57ef5054e1415c6cdc1d..9679513219d666f64a9d2b7ebf5be1371c68acdb 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -57,8 +57,10 @@
unsigned32ish_ = Type::Union(Type::Unsigned32(), truncating_to_zero, zone);
falsish_ = Type::Union(
Type::Undetectable(),
- Type::Union(Type::Union(singleton_false_, cache_.kZeroish, zone),
- singleton_the_hole_, zone),
+ Type::Union(
+ Type::Union(Type::Union(singleton_false_, cache_.kZeroish, zone),
+ Type::NullOrUndefined(), zone),
+ singleton_the_hole_, zone),
zone);
truish_ = Type::Union(
singleton_true_,
@@ -242,7 +244,6 @@
static Type* ObjectIsNumber(Type*, Typer*);
static Type* ObjectIsReceiver(Type*, Typer*);
static Type* ObjectIsSmi(Type*, Typer*);
- static Type* ObjectIsUndetectable(Type*, Typer*);
static Type* JSAddRanger(RangeType*, RangeType*, Typer*);
static Type* JSSubtractRanger(RangeType*, RangeType*, Typer*);
@@ -468,9 +469,7 @@
// ES6 section 7.1.13 ToObject ( argument )
if (type->Is(Type::Receiver())) return type;
if (type->Is(Type::Primitive())) return Type::OtherObject();
- if (!type->Maybe(Type::OtherUndetectable())) {
- return Type::DetectableReceiver();
- }
+ if (!type->Maybe(Type::Undetectable())) return Type::DetectableReceiver();
return Type::Receiver();
}
@@ -530,13 +529,6 @@
Type* Typer::Visitor::ObjectIsSmi(Type* type, Typer* t) {
if (type->Is(Type::TaggedSigned())) return t->singleton_true_;
if (type->Is(Type::TaggedPointer())) return t->singleton_false_;
- return Type::Boolean();
-}
-
-
-Type* Typer::Visitor::ObjectIsUndetectable(Type* type, Typer* t) {
- if (type->Is(Type::Undetectable())) return t->singleton_true_;
- if (!type->Maybe(Type::Undetectable())) return t->singleton_false_;
return Type::Boolean();
}
@@ -1179,7 +1171,7 @@
return Type::Constant(f->string_string(), t->zone());
} else if (type->Is(Type::Symbol())) {
return Type::Constant(f->symbol_string(), t->zone());
- } else if (type->Is(Type::Union(Type::Undefined(), Type::OtherUndetectable(),
+ } else if (type->Is(Type::Union(Type::Undefined(), Type::Undetectable(),
t->zone()))) {
return Type::Constant(f->undefined_string(), t->zone());
} else if (type->Is(Type::Null())) {
@@ -1933,11 +1925,6 @@
}
-Type* Typer::Visitor::TypeObjectIsUndetectable(Node* node) {
- return TypeUnaryOp(node, ObjectIsUndetectable);
-}
-
-
// Machine operators.
Type* Typer::Visitor::TypeLoad(Node* node) { return Type::Any(); }
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698