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

Unified Diff: src/code-stubs.cc

Issue 16732002: remove equality kind from compare nil ic (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index b4479da9230d21b357fd716f4b003889a7868469..6b6e25019dedf6ebbbfe1344b250a656a813260f 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -432,25 +432,18 @@ void ICCompareStub::Generate(MacroAssembler* masm) {
void CompareNilICStub::Record(Handle<Object> object) {
ASSERT(types_ != Types::FullCompare());
- if (equality_kind_ == kStrictEquality) {
- // When testing for strict equality only one value will evaluate to true
- types_.RemoveAll();
- types_.Add((nil_value_ == kNullValue) ? NULL_TYPE:
- UNDEFINED);
+ if (object->IsNull()) {
+ types_.Add(NULL_TYPE);
+ } else if (object->IsUndefined()) {
+ types_.Add(UNDEFINED);
+ } else if (object->IsUndetectableObject() ||
+ object->IsOddball() ||
+ !object->IsHeapObject()) {
+ types_ = Types::FullCompare();
+ } else if (IsMonomorphic()) {
+ types_ = Types::FullCompare();
} else {
- if (object->IsNull()) {
- types_.Add(NULL_TYPE);
- } else if (object->IsUndefined()) {
- types_.Add(UNDEFINED);
- } else if (object->IsUndetectableObject() ||
- object->IsOddball() ||
- !object->IsHeapObject()) {
- types_ = Types::FullCompare();
- } else if (IsMonomorphic()) {
- types_ = Types::FullCompare();
- } else {
- types_.Add(MONOMORPHIC_MAP);
- }
+ types_.Add(MONOMORPHIC_MAP);
}
}
@@ -477,8 +470,6 @@ void CompareNilICStub::PrintName(StringStream* stream) {
types_.Print(stream);
stream->Add((nil_value_ == kNullValue) ? "(NullValue|":
"(UndefinedValue|");
- stream->Add((equality_kind_ == kStrictEquality) ? "StrictEquality)":
- "NonStrictEquality)");
}
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698