| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 5025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5036 compiler->GenerateStaticCall(deopt_id(), | 5036 compiler->GenerateStaticCall(deopt_id(), |
| 5037 instance_call()->token_pos(), | 5037 instance_call()->token_pos(), |
| 5038 target, | 5038 target, |
| 5039 instance_call()->ArgumentCount(), | 5039 instance_call()->ArgumentCount(), |
| 5040 instance_call()->argument_names(), | 5040 instance_call()->argument_names(), |
| 5041 locs(), | 5041 locs(), |
| 5042 ICData::Handle()); | 5042 ICData::Handle()); |
| 5043 return; | 5043 return; |
| 5044 } | 5044 } |
| 5045 | 5045 |
| 5046 // Load receiver into R0. | |
| 5047 __ LoadFromOffset( | |
| 5048 R0, SP, (instance_call()->ArgumentCount() - 1) * kWordSize, PP); | |
| 5049 | |
| 5050 Label* deopt = compiler->AddDeoptStub( | 5046 Label* deopt = compiler->AddDeoptStub( |
| 5051 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); | 5047 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); |
| 5052 LoadValueCid(compiler, R2, R0, | 5048 Label ok; |
| 5053 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); | |
| 5054 | |
| 5055 compiler->EmitTestAndCall(ic_data(), | 5049 compiler->EmitTestAndCall(ic_data(), |
| 5056 R2, // Class id register. | |
| 5057 instance_call()->ArgumentCount(), | 5050 instance_call()->ArgumentCount(), |
| 5058 instance_call()->argument_names(), | 5051 instance_call()->argument_names(), |
| 5059 deopt, | 5052 deopt, |
| 5053 &ok, |
| 5060 deopt_id(), | 5054 deopt_id(), |
| 5061 instance_call()->token_pos(), | 5055 instance_call()->token_pos(), |
| 5062 locs()); | 5056 locs()); |
| 5057 __ Bind(&ok); |
| 5063 } | 5058 } |
| 5064 | 5059 |
| 5065 | 5060 |
| 5066 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, | 5061 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, |
| 5067 bool opt) const { | 5062 bool opt) const { |
| 5068 comparison()->InitializeLocationSummary(zone, opt); | 5063 comparison()->InitializeLocationSummary(zone, opt); |
| 5069 // Branches don't produce a result. | 5064 // Branches don't produce a result. |
| 5070 comparison()->locs()->set_out(0, Location::NoLocation()); | 5065 comparison()->locs()->set_out(0, Location::NoLocation()); |
| 5071 return comparison()->locs(); | 5066 return comparison()->locs(); |
| 5072 } | 5067 } |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5657 1, | 5652 1, |
| 5658 locs()); | 5653 locs()); |
| 5659 __ Drop(1); | 5654 __ Drop(1); |
| 5660 __ Pop(result); | 5655 __ Pop(result); |
| 5661 } | 5656 } |
| 5662 | 5657 |
| 5663 | 5658 |
| 5664 } // namespace dart | 5659 } // namespace dart |
| 5665 | 5660 |
| 5666 #endif // defined TARGET_ARCH_ARM64 | 5661 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |