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

Unified Diff: src/code-stubs.cc

Issue 1681813004: Drop null/undefined check if we already check for IsUndetectable in BuildCompareNil (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Minor cleanup 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 | « no previous file | src/crankshaft/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 6f03f300b67f59898fadc165663c6dec73d27355..7c9711c510f8e5c9e6562a62aaab75d00363c33d 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -459,9 +459,7 @@ void CompareNilICStub::UpdateStatus(Handle<Object> object) {
state.Add(NULL_TYPE);
} else if (object->IsUndefined()) {
state.Add(UNDEFINED);
- } else if (object->IsUndetectableObject() ||
- object->IsOddball() ||
- !object->IsHeapObject()) {
+ } else if (object->IsUndetectableObject() || object->IsSmi()) {
state.RemoveAll();
state.Add(GENERIC);
} else if (IsMonomorphic()) {
@@ -940,9 +938,9 @@ bool ToBooleanStub::Types::UpdateStatus(Handle<Object> object) {
Add(SPEC_OBJECT);
return !object->IsUndetectableObject();
} else if (object->IsString()) {
+ DCHECK(!object->IsUndetectableObject());
Add(STRING);
- return !object->IsUndetectableObject() &&
- String::cast(*object)->length() != 0;
+ return String::cast(*object)->length() != 0;
} else if (object->IsSymbol()) {
Add(SYMBOL);
return true;
« no previous file with comments | « no previous file | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698