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

Unified Diff: src/ic/ic.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 | « src/ic/ic.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 0f1d4cce1c9c326b9ba775ec4028ddc6d443d48f..05a6dd7dbd1794d0be447edb0e82f26f26fd9d54 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -2738,15 +2738,6 @@ void CompareNilIC::Clear(Address address, Code* target, Address constant_pool) {
}
-Handle<Object> CompareNilIC::DoCompareNilSlow(Isolate* isolate, NilValue nil,
- Handle<Object> object) {
- if (object->IsNull() || object->IsUndefined()) {
- return isolate->factory()->true_value();
- }
- return isolate->factory()->ToBoolean(object->IsUndetectableObject());
-}
-
-
Handle<Object> CompareNilIC::CompareNil(Handle<Object> object) {
ExtraICState extra_ic_state = target()->extra_ic_state();
@@ -2758,8 +2749,6 @@ Handle<Object> CompareNilIC::CompareNil(Handle<Object> object) {
stub.UpdateStatus(object);
- NilValue nil = stub.nil_value();
-
// Find or create the specialized stub to support the new set of types.
Handle<Code> code;
if (stub.IsMonomorphic()) {
@@ -2771,7 +2760,7 @@ Handle<Object> CompareNilIC::CompareNil(Handle<Object> object) {
code = stub.GetCode();
}
set_target(*code);
- return DoCompareNilSlow(isolate(), nil, object);
+ return isolate()->factory()->ToBoolean(object->IsUndetectableObject());
}
« no previous file with comments | « src/ic/ic.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698