Index: runtime/vm/intermediate_language_x64.cc |
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc |
index 78b9a3f5117a40062782f88fb359b64869c1b375..8345f6f6ec88bf90a449ff4c105a5dfa06a6d573 100644 |
--- a/runtime/vm/intermediate_language_x64.cc |
+++ b/runtime/vm/intermediate_language_x64.cc |
@@ -5456,23 +5456,18 @@ void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
return; |
} |
- // Load receiver into RAX. |
- __ movq(RAX, |
- Address(RSP, (instance_call()->ArgumentCount() - 1) * kWordSize)); |
- |
Label* deopt = compiler->AddDeoptStub( |
deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); |
- LoadValueCid(compiler, RDI, RAX, |
- (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); |
- |
+ Label ok; |
compiler->EmitTestAndCall(ic_data(), |
- RDI, // Class id register. |
instance_call()->ArgumentCount(), |
instance_call()->argument_names(), |
deopt, |
+ &ok, |
deopt_id(), |
instance_call()->token_pos(), |
locs()); |
+ __ Bind(&ok); |
} |