| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 5860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5871 compiler->GenerateStaticCall(deopt_id(), | 5871 compiler->GenerateStaticCall(deopt_id(), |
| 5872 instance_call()->token_pos(), | 5872 instance_call()->token_pos(), |
| 5873 target, | 5873 target, |
| 5874 instance_call()->ArgumentCount(), | 5874 instance_call()->ArgumentCount(), |
| 5875 instance_call()->argument_names(), | 5875 instance_call()->argument_names(), |
| 5876 locs(), | 5876 locs(), |
| 5877 ICData::Handle()); | 5877 ICData::Handle()); |
| 5878 return; | 5878 return; |
| 5879 } | 5879 } |
| 5880 | 5880 |
| 5881 // Load receiver into R0. | |
| 5882 __ LoadFromOffset(kWord, R0, SP, | |
| 5883 (instance_call()->ArgumentCount() - 1) * kWordSize); | |
| 5884 | |
| 5885 Label* deopt = compiler->AddDeoptStub( | 5881 Label* deopt = compiler->AddDeoptStub( |
| 5886 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); | 5882 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); |
| 5887 LoadValueCid(compiler, R2, R0, | 5883 Label ok; |
| 5888 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); | |
| 5889 | |
| 5890 compiler->EmitTestAndCall(ic_data(), | 5884 compiler->EmitTestAndCall(ic_data(), |
| 5891 R2, // Class id register. | |
| 5892 instance_call()->ArgumentCount(), | 5885 instance_call()->ArgumentCount(), |
| 5893 instance_call()->argument_names(), | 5886 instance_call()->argument_names(), |
| 5894 deopt, | 5887 deopt, |
| 5888 &ok, |
| 5895 deopt_id(), | 5889 deopt_id(), |
| 5896 instance_call()->token_pos(), | 5890 instance_call()->token_pos(), |
| 5897 locs()); | 5891 locs()); |
| 5892 __ Bind(&ok); |
| 5898 } | 5893 } |
| 5899 | 5894 |
| 5900 | 5895 |
| 5901 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, | 5896 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, |
| 5902 bool opt) const { | 5897 bool opt) const { |
| 5903 comparison()->InitializeLocationSummary(zone, opt); | 5898 comparison()->InitializeLocationSummary(zone, opt); |
| 5904 // Branches don't produce a result. | 5899 // Branches don't produce a result. |
| 5905 comparison()->locs()->set_out(0, Location::NoLocation()); | 5900 comparison()->locs()->set_out(0, Location::NoLocation()); |
| 5906 return comparison()->locs(); | 5901 return comparison()->locs(); |
| 5907 } | 5902 } |
| (...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6885 1, | 6880 1, |
| 6886 locs()); | 6881 locs()); |
| 6887 __ Drop(1); | 6882 __ Drop(1); |
| 6888 __ Pop(result); | 6883 __ Pop(result); |
| 6889 } | 6884 } |
| 6890 | 6885 |
| 6891 | 6886 |
| 6892 } // namespace dart | 6887 } // namespace dart |
| 6893 | 6888 |
| 6894 #endif // defined TARGET_ARCH_ARM | 6889 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |