Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index a46cf1e0ea6e1af44b50622e6e8f9f5b08e134a7..bbb5d6991a748953806de614b08d99ab535fa926 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -5032,13 +5032,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; |
} |