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

Unified Diff: src/ic/ic.cc

Issue 1417503008: [turbofan] Use CompareNilIC for abstract equality with null/undefined. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 80651b1588e0a14e1575e6cd2d6a252fc2cbbcfd..c0f9166da24b1740491a6d835a3e3f180932d8c5 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -2917,9 +2917,9 @@ 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 handle(Smi::FromInt(true), isolate);
+ return isolate->factory()->true_value();
}
- return handle(Smi::FromInt(object->IsUndetectableObject()), isolate);
+ return isolate->factory()->ToBoolean(object->IsUndetectableObject());
}
« src/compiler/js-typed-lowering.cc ('K') | « src/full-codegen/x87/full-codegen-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698