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 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 UNIMPLEMENTED(); | 837 UNIMPLEMENTED(); |
838 return NULL; | 838 return NULL; |
839 } | 839 } |
840 | 840 |
841 | 841 |
842 void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 842 void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
843 UNIMPLEMENTED(); | 843 UNIMPLEMENTED(); |
844 } | 844 } |
845 | 845 |
846 | 846 |
| 847 LocationSummary* LoadClassIdInstr::MakeLocationSummary() const { |
| 848 UNIMPLEMENTED(); |
| 849 return NULL; |
| 850 } |
| 851 |
| 852 |
| 853 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 854 UNIMPLEMENTED(); |
| 855 } |
| 856 |
| 857 |
847 CompileType LoadIndexedInstr::ComputeType() const { | 858 CompileType LoadIndexedInstr::ComputeType() const { |
848 switch (class_id_) { | 859 switch (class_id_) { |
849 case kArrayCid: | 860 case kArrayCid: |
850 case kImmutableArrayCid: | 861 case kImmutableArrayCid: |
851 return CompileType::Dynamic(); | 862 return CompileType::Dynamic(); |
852 | 863 |
853 case kTypedDataFloat32ArrayCid: | 864 case kTypedDataFloat32ArrayCid: |
854 case kTypedDataFloat64ArrayCid: | 865 case kTypedDataFloat64ArrayCid: |
855 return CompileType::FromCid(kDoubleCid); | 866 return CompileType::FromCid(kDoubleCid); |
856 case kTypedDataFloat32x4ArrayCid: | 867 case kTypedDataFloat32x4ArrayCid: |
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2292 UNIMPLEMENTED(); | 2303 UNIMPLEMENTED(); |
2293 } | 2304 } |
2294 | 2305 |
2295 | 2306 |
2296 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const { | 2307 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const { |
2297 return MakeCallSummary(); | 2308 return MakeCallSummary(); |
2298 } | 2309 } |
2299 | 2310 |
2300 | 2311 |
2301 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2312 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2302 Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(), | 2313 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
2303 kDeoptPolymorphicInstanceCallTestFail); | 2314 kDeoptPolymorphicInstanceCallTestFail); |
2304 if (ic_data().NumberOfChecks() == 0) { | 2315 if (ic_data().NumberOfChecks() == 0) { |
2305 __ b(deopt); | 2316 __ b(deopt); |
2306 return; | 2317 return; |
2307 } | 2318 } |
2308 ASSERT(ic_data().num_args_tested() == 1); | 2319 ASSERT(ic_data().num_args_tested() == 1); |
2309 if (!with_checks()) { | 2320 if (!with_checks()) { |
2310 ASSERT(ic_data().HasOneTarget()); | 2321 ASSERT(ic_data().HasOneTarget()); |
2311 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); | 2322 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); |
2312 compiler->GenerateStaticCall(instance_call()->deopt_id(), | 2323 compiler->GenerateStaticCall(deopt_id(), |
2313 instance_call()->token_pos(), | 2324 instance_call()->token_pos(), |
2314 target, | 2325 target, |
2315 instance_call()->ArgumentCount(), | 2326 instance_call()->ArgumentCount(), |
2316 instance_call()->argument_names(), | 2327 instance_call()->argument_names(), |
2317 locs()); | 2328 locs()); |
2318 return; | 2329 return; |
2319 } | 2330 } |
2320 | 2331 |
2321 // Load receiver into R0. | 2332 // Load receiver into R0. |
2322 __ ldr(R0, Address(SP, (instance_call()->ArgumentCount() - 1) * kWordSize)); | 2333 __ ldr(R0, Address(SP, (instance_call()->ArgumentCount() - 1) * kWordSize)); |
2323 | 2334 |
2324 LoadValueCid(compiler, R2, R0, | 2335 LoadValueCid(compiler, R2, R0, |
2325 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); | 2336 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); |
2326 | 2337 |
2327 compiler->EmitTestAndCall(ic_data(), | 2338 compiler->EmitTestAndCall(ic_data(), |
2328 R2, // Class id register. | 2339 R2, // Class id register. |
2329 instance_call()->ArgumentCount(), | 2340 instance_call()->ArgumentCount(), |
2330 instance_call()->argument_names(), | 2341 instance_call()->argument_names(), |
2331 deopt, | 2342 deopt, |
2332 instance_call()->deopt_id(), | 2343 deopt_id(), |
2333 instance_call()->token_pos(), | 2344 instance_call()->token_pos(), |
2334 locs()); | 2345 locs()); |
2335 } | 2346 } |
2336 | 2347 |
2337 | 2348 |
2338 LocationSummary* BranchInstr::MakeLocationSummary() const { | 2349 LocationSummary* BranchInstr::MakeLocationSummary() const { |
2339 UNREACHABLE(); | 2350 UNREACHABLE(); |
2340 return NULL; | 2351 return NULL; |
2341 } | 2352 } |
2342 | 2353 |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2782 compiler->GenerateCall(token_pos(), | 2793 compiler->GenerateCall(token_pos(), |
2783 &label, | 2794 &label, |
2784 PcDescriptors::kOther, | 2795 PcDescriptors::kOther, |
2785 locs()); | 2796 locs()); |
2786 __ Drop(2); // Discard type arguments and receiver. | 2797 __ Drop(2); // Discard type arguments and receiver. |
2787 } | 2798 } |
2788 | 2799 |
2789 } // namespace dart | 2800 } // namespace dart |
2790 | 2801 |
2791 #endif // defined TARGET_ARCH_ARM | 2802 #endif // defined TARGET_ARCH_ARM |
2792 | |
OLD | NEW |