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 5854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5865 compiler->GenerateStaticCall(deopt_id(), | 5865 compiler->GenerateStaticCall(deopt_id(), |
5866 instance_call()->token_pos(), | 5866 instance_call()->token_pos(), |
5867 target, | 5867 target, |
5868 instance_call()->ArgumentCount(), | 5868 instance_call()->ArgumentCount(), |
5869 instance_call()->argument_names(), | 5869 instance_call()->argument_names(), |
5870 locs(), | 5870 locs(), |
5871 ICData::Handle()); | 5871 ICData::Handle()); |
5872 return; | 5872 return; |
5873 } | 5873 } |
5874 | 5874 |
5875 // Load receiver into R0. | |
5876 __ LoadFromOffset(kWord, R0, SP, | |
5877 (instance_call()->ArgumentCount() - 1) * kWordSize); | |
5878 | |
5879 Label* deopt = compiler->AddDeoptStub( | 5875 Label* deopt = compiler->AddDeoptStub( |
5880 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); | 5876 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); |
5881 LoadValueCid(compiler, R2, R0, | 5877 Label ok; |
5882 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); | |
5883 | |
5884 compiler->EmitTestAndCall(ic_data(), | 5878 compiler->EmitTestAndCall(ic_data(), |
5885 R2, // Class id register. | |
5886 instance_call()->ArgumentCount(), | 5879 instance_call()->ArgumentCount(), |
5887 instance_call()->argument_names(), | 5880 instance_call()->argument_names(), |
5888 deopt, | 5881 deopt, |
| 5882 &ok, |
5889 deopt_id(), | 5883 deopt_id(), |
5890 instance_call()->token_pos(), | 5884 instance_call()->token_pos(), |
5891 locs()); | 5885 locs()); |
| 5886 __ Bind(&ok); |
5892 } | 5887 } |
5893 | 5888 |
5894 | 5889 |
5895 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, | 5890 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, |
5896 bool opt) const { | 5891 bool opt) const { |
5897 comparison()->InitializeLocationSummary(zone, opt); | 5892 comparison()->InitializeLocationSummary(zone, opt); |
5898 // Branches don't produce a result. | 5893 // Branches don't produce a result. |
5899 comparison()->locs()->set_out(0, Location::NoLocation()); | 5894 comparison()->locs()->set_out(0, Location::NoLocation()); |
5900 return comparison()->locs(); | 5895 return comparison()->locs(); |
5901 } | 5896 } |
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6879 1, | 6874 1, |
6880 locs()); | 6875 locs()); |
6881 __ Drop(1); | 6876 __ Drop(1); |
6882 __ Pop(result); | 6877 __ Pop(result); |
6883 } | 6878 } |
6884 | 6879 |
6885 | 6880 |
6886 } // namespace dart | 6881 } // namespace dart |
6887 | 6882 |
6888 #endif // defined TARGET_ARCH_ARM | 6883 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |