Index: src/full-codegen/arm64/full-codegen-arm64.cc |
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc |
index 9fa5e26f27a9099100e33a995d385249f8e459ce..6d98c15d3cf16f9156d25777ee1ed36b69da910d 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -4798,12 +4798,13 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { |
break; |
case Token::INSTANCEOF: { |
- VisitForStackValue(expr->right()); |
- InstanceofStub stub(isolate(), InstanceofStub::kNoFlags); |
+ VisitForAccumulatorValue(expr->right()); |
+ __ Pop(x1); |
+ InstanceOfStub stub(isolate()); |
__ CallStub(&stub); |
- PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
- // The stub returns 0 for true. |
- __ CompareAndSplit(x0, 0, eq, if_true, if_false, fall_through); |
+ PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
+ __ CompareRoot(x0, Heap::kTrueValueRootIndex); |
+ Split(eq, if_true, if_false, fall_through); |
break; |
} |