Index: src/full-codegen/x87/full-codegen-x87.cc |
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc |
index db5e1f6d5f768124bf1f06987aa3b7f0550bc3cb..25b8171487f5a351b38836aa2d42fe832a6b4b6d 100644 |
--- a/src/full-codegen/x87/full-codegen-x87.cc |
+++ b/src/full-codegen/x87/full-codegen-x87.cc |
@@ -5023,13 +5023,13 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { |
break; |
case Token::INSTANCEOF: { |
- VisitForStackValue(expr->right()); |
- InstanceofStub stub(isolate(), InstanceofStub::kNoFlags); |
+ VisitForAccumulatorValue(expr->right()); |
+ __ Pop(edx); |
+ InstanceOfStub stub(isolate()); |
__ CallStub(&stub); |
- PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
- __ test(eax, eax); |
- // The stub returns 0 for true. |
- Split(zero, if_true, if_false, fall_through); |
+ PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
+ __ cmp(eax, isolate()->factory()->true_value()); |
+ Split(equal, if_true, if_false, fall_through); |
break; |
} |