Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 910b2cf9f062b578ba7d26d74943e85c3a1856d9..39862bc4d39cea38c63adf8a83ae7a218ce61909 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -3919,10 +3919,11 @@ void FullCodeGenerator::EmitLiteralCompareNil(CompareOperation* expr, |
__ CompareRoot(rax, nil_value); |
Split(equal, if_true, if_false, fall_through); |
} else { |
- Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); |
- CallIC(ic, expr->CompareOperationFeedbackId()); |
- __ CompareRoot(rax, Heap::kTrueValueRootIndex); |
- Split(equal, if_true, if_false, fall_through); |
+ __ JumpIfSmi(rax, if_false); |
+ __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); |
+ __ testb(FieldOperand(rax, Map::kBitFieldOffset), |
+ Immediate(1 << Map::kIsUndetectable)); |
mvstanton
2016/02/25 23:08:57
Adam and I were speculating that this allows a Map
adamk
2016/02/25 23:38:38
If there's something wrong with this patch, I don'
|
+ Split(not_zero, if_true, if_false, fall_through); |
} |
context()->Plug(if_true, if_false); |
} |