| 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 "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 UNIMPLEMENTED(); | 833 UNIMPLEMENTED(); |
| 834 return NULL; | 834 return NULL; |
| 835 } | 835 } |
| 836 | 836 |
| 837 | 837 |
| 838 void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 838 void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 839 UNIMPLEMENTED(); | 839 UNIMPLEMENTED(); |
| 840 } | 840 } |
| 841 | 841 |
| 842 | 842 |
| 843 LocationSummary* LoadClassIdInstr::MakeLocationSummary() const { |
| 844 UNIMPLEMENTED(); |
| 845 return NULL; |
| 846 } |
| 847 |
| 848 |
| 849 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 850 UNIMPLEMENTED(); |
| 851 } |
| 852 |
| 853 |
| 843 CompileType LoadIndexedInstr::ComputeType() const { | 854 CompileType LoadIndexedInstr::ComputeType() const { |
| 844 switch (class_id_) { | 855 switch (class_id_) { |
| 845 case kArrayCid: | 856 case kArrayCid: |
| 846 case kImmutableArrayCid: | 857 case kImmutableArrayCid: |
| 847 return CompileType::Dynamic(); | 858 return CompileType::Dynamic(); |
| 848 | 859 |
| 849 case kTypedDataFloat32ArrayCid: | 860 case kTypedDataFloat32ArrayCid: |
| 850 case kTypedDataFloat64ArrayCid: | 861 case kTypedDataFloat64ArrayCid: |
| 851 return CompileType::FromCid(kDoubleCid); | 862 return CompileType::FromCid(kDoubleCid); |
| 852 case kTypedDataFloat32x4ArrayCid: | 863 case kTypedDataFloat32x4ArrayCid: |
| (...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2161 UNIMPLEMENTED(); | 2172 UNIMPLEMENTED(); |
| 2162 } | 2173 } |
| 2163 | 2174 |
| 2164 | 2175 |
| 2165 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const { | 2176 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const { |
| 2166 return MakeCallSummary(); | 2177 return MakeCallSummary(); |
| 2167 } | 2178 } |
| 2168 | 2179 |
| 2169 | 2180 |
| 2170 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2181 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2171 Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(), | 2182 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
| 2172 kDeoptPolymorphicInstanceCallTestFail); | 2183 kDeoptPolymorphicInstanceCallTestFail); |
| 2173 if (ic_data().NumberOfChecks() == 0) { | 2184 if (ic_data().NumberOfChecks() == 0) { |
| 2174 __ b(deopt); | 2185 __ b(deopt); |
| 2175 return; | 2186 return; |
| 2176 } | 2187 } |
| 2177 ASSERT(ic_data().num_args_tested() == 1); | 2188 ASSERT(ic_data().num_args_tested() == 1); |
| 2178 if (!with_checks()) { | 2189 if (!with_checks()) { |
| 2179 ASSERT(ic_data().HasOneTarget()); | 2190 ASSERT(ic_data().HasOneTarget()); |
| 2180 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); | 2191 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); |
| 2181 compiler->GenerateStaticCall(instance_call()->deopt_id(), | 2192 compiler->GenerateStaticCall(deopt_id(), |
| 2182 instance_call()->token_pos(), | 2193 instance_call()->token_pos(), |
| 2183 target, | 2194 target, |
| 2184 instance_call()->ArgumentCount(), | 2195 instance_call()->ArgumentCount(), |
| 2185 instance_call()->argument_names(), | 2196 instance_call()->argument_names(), |
| 2186 locs()); | 2197 locs()); |
| 2187 return; | 2198 return; |
| 2188 } | 2199 } |
| 2189 | 2200 |
| 2190 // Load receiver into R0. | 2201 // Load receiver into R0. |
| 2191 __ ldr(R0, Address(SP, (instance_call()->ArgumentCount() - 1) * kWordSize)); | 2202 __ ldr(R0, Address(SP, (instance_call()->ArgumentCount() - 1) * kWordSize)); |
| 2192 | 2203 |
| 2193 LoadValueCid(compiler, R2, R0, | 2204 LoadValueCid(compiler, R2, R0, |
| 2194 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); | 2205 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); |
| 2195 | 2206 |
| 2196 compiler->EmitTestAndCall(ic_data(), | 2207 compiler->EmitTestAndCall(ic_data(), |
| 2197 R2, // Class id register. | 2208 R2, // Class id register. |
| 2198 instance_call()->ArgumentCount(), | 2209 instance_call()->ArgumentCount(), |
| 2199 instance_call()->argument_names(), | 2210 instance_call()->argument_names(), |
| 2200 deopt, | 2211 deopt, |
| 2201 instance_call()->deopt_id(), | 2212 deopt_id(), |
| 2202 instance_call()->token_pos(), | 2213 instance_call()->token_pos(), |
| 2203 locs()); | 2214 locs()); |
| 2204 } | 2215 } |
| 2205 | 2216 |
| 2206 | 2217 |
| 2207 LocationSummary* BranchInstr::MakeLocationSummary() const { | 2218 LocationSummary* BranchInstr::MakeLocationSummary() const { |
| 2208 UNREACHABLE(); | 2219 UNREACHABLE(); |
| 2209 return NULL; | 2220 return NULL; |
| 2210 } | 2221 } |
| 2211 | 2222 |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2651 compiler->GenerateCall(token_pos(), | 2662 compiler->GenerateCall(token_pos(), |
| 2652 &label, | 2663 &label, |
| 2653 PcDescriptors::kOther, | 2664 PcDescriptors::kOther, |
| 2654 locs()); | 2665 locs()); |
| 2655 __ Drop(2); // Discard type arguments and receiver. | 2666 __ Drop(2); // Discard type arguments and receiver. |
| 2656 } | 2667 } |
| 2657 | 2668 |
| 2658 } // namespace dart | 2669 } // namespace dart |
| 2659 | 2670 |
| 2660 #endif // defined TARGET_ARCH_ARM | 2671 #endif // defined TARGET_ARCH_ARM |
| 2661 | |
| OLD | NEW |