| 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 5029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5040 compiler->GenerateStaticCall(deopt_id(), | 5040 compiler->GenerateStaticCall(deopt_id(), |
| 5041 instance_call()->token_pos(), | 5041 instance_call()->token_pos(), |
| 5042 target, | 5042 target, |
| 5043 instance_call()->ArgumentCount(), | 5043 instance_call()->ArgumentCount(), |
| 5044 instance_call()->argument_names(), | 5044 instance_call()->argument_names(), |
| 5045 locs(), | 5045 locs(), |
| 5046 ICData::Handle()); | 5046 ICData::Handle()); |
| 5047 return; | 5047 return; |
| 5048 } | 5048 } |
| 5049 | 5049 |
| 5050 // Load receiver into R0. | |
| 5051 __ LoadFromOffset( | |
| 5052 R0, SP, (instance_call()->ArgumentCount() - 1) * kWordSize, PP); | |
| 5053 | |
| 5054 Label* deopt = compiler->AddDeoptStub( | 5050 Label* deopt = compiler->AddDeoptStub( |
| 5055 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); | 5051 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); |
| 5056 LoadValueCid(compiler, R2, R0, | 5052 Label ok; |
| 5057 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); | |
| 5058 | |
| 5059 compiler->EmitTestAndCall(ic_data(), | 5053 compiler->EmitTestAndCall(ic_data(), |
| 5060 R2, // Class id register. | |
| 5061 instance_call()->ArgumentCount(), | 5054 instance_call()->ArgumentCount(), |
| 5062 instance_call()->argument_names(), | 5055 instance_call()->argument_names(), |
| 5063 deopt, | 5056 deopt, |
| 5057 &ok, |
| 5064 deopt_id(), | 5058 deopt_id(), |
| 5065 instance_call()->token_pos(), | 5059 instance_call()->token_pos(), |
| 5066 locs()); | 5060 locs()); |
| 5061 __ Bind(&ok); |
| 5067 } | 5062 } |
| 5068 | 5063 |
| 5069 | 5064 |
| 5070 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, | 5065 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, |
| 5071 bool opt) const { | 5066 bool opt) const { |
| 5072 comparison()->InitializeLocationSummary(zone, opt); | 5067 comparison()->InitializeLocationSummary(zone, opt); |
| 5073 // Branches don't produce a result. | 5068 // Branches don't produce a result. |
| 5074 comparison()->locs()->set_out(0, Location::NoLocation()); | 5069 comparison()->locs()->set_out(0, Location::NoLocation()); |
| 5075 return comparison()->locs(); | 5070 return comparison()->locs(); |
| 5076 } | 5071 } |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5661 1, | 5656 1, |
| 5662 locs()); | 5657 locs()); |
| 5663 __ Drop(1); | 5658 __ Drop(1); |
| 5664 __ Pop(result); | 5659 __ Pop(result); |
| 5665 } | 5660 } |
| 5666 | 5661 |
| 5667 | 5662 |
| 5668 } // namespace dart | 5663 } // namespace dart |
| 5669 | 5664 |
| 5670 #endif // defined TARGET_ARCH_ARM64 | 5665 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |