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 f0796f7cb782f60561beb16a66df22b7ae98cf88..715678cc750c30263e1253cf5ade88d6727f6f6f 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -5041,13 +5041,13 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { |
break; |
case Token::INSTANCEOF: { |
- VisitForStackValue(expr->right()); |
- InstanceofStub stub(isolate(), InstanceofStub::kNoFlags); |
+ VisitForAccumulatorValue(expr->right()); |
+ __ Pop(rdx); |
+ InstanceOfStub stub(isolate()); |
__ CallStub(&stub); |
- PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
- __ testp(rax, rax); |
- // The stub returns 0 for true. |
- Split(zero, if_true, if_false, fall_through); |
+ PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
+ __ CompareRoot(rax, Heap::kTrueValueRootIndex); |
+ Split(equal, if_true, if_false, fall_through); |
break; |
} |