| 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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 UNIMPLEMENTED(); | 851 UNIMPLEMENTED(); |
| 852 return NULL; | 852 return NULL; |
| 853 } | 853 } |
| 854 | 854 |
| 855 | 855 |
| 856 void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 856 void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 857 UNIMPLEMENTED(); | 857 UNIMPLEMENTED(); |
| 858 } | 858 } |
| 859 | 859 |
| 860 | 860 |
| 861 LocationSummary* LoadClassIdInstr::MakeLocationSummary() const { |
| 862 UNIMPLEMENTED(); |
| 863 return NULL; |
| 864 } |
| 865 |
| 866 |
| 867 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 868 UNIMPLEMENTED(); |
| 869 } |
| 870 |
| 871 |
| 861 CompileType LoadIndexedInstr::ComputeType() const { | 872 CompileType LoadIndexedInstr::ComputeType() const { |
| 862 switch (class_id_) { | 873 switch (class_id_) { |
| 863 case kArrayCid: | 874 case kArrayCid: |
| 864 case kImmutableArrayCid: | 875 case kImmutableArrayCid: |
| 865 return CompileType::Dynamic(); | 876 return CompileType::Dynamic(); |
| 866 | 877 |
| 867 case kTypedDataFloat32ArrayCid: | 878 case kTypedDataFloat32ArrayCid: |
| 868 case kTypedDataFloat64ArrayCid: | 879 case kTypedDataFloat64ArrayCid: |
| 869 return CompileType::FromCid(kDoubleCid); | 880 return CompileType::FromCid(kDoubleCid); |
| 870 case kTypedDataFloat32x4ArrayCid: | 881 case kTypedDataFloat32x4ArrayCid: |
| (...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2267 } | 2278 } |
| 2268 | 2279 |
| 2269 | 2280 |
| 2270 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const { | 2281 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const { |
| 2271 return MakeCallSummary(); | 2282 return MakeCallSummary(); |
| 2272 } | 2283 } |
| 2273 | 2284 |
| 2274 | 2285 |
| 2275 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2286 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2276 __ TraceSimMsg("PolymorphicInstanceCallInstr"); | 2287 __ TraceSimMsg("PolymorphicInstanceCallInstr"); |
| 2277 Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(), | 2288 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
| 2278 kDeoptPolymorphicInstanceCallTestFail); | 2289 kDeoptPolymorphicInstanceCallTestFail); |
| 2279 if (ic_data().NumberOfChecks() == 0) { | 2290 if (ic_data().NumberOfChecks() == 0) { |
| 2280 __ b(deopt); | 2291 __ b(deopt); |
| 2281 return; | 2292 return; |
| 2282 } | 2293 } |
| 2283 ASSERT(ic_data().num_args_tested() == 1); | 2294 ASSERT(ic_data().num_args_tested() == 1); |
| 2284 if (!with_checks()) { | 2295 if (!with_checks()) { |
| 2285 ASSERT(ic_data().HasOneTarget()); | 2296 ASSERT(ic_data().HasOneTarget()); |
| 2286 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); | 2297 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); |
| 2287 compiler->GenerateStaticCall(instance_call()->deopt_id(), | 2298 compiler->GenerateStaticCall(deopt_id(), |
| 2288 instance_call()->token_pos(), | 2299 instance_call()->token_pos(), |
| 2289 target, | 2300 target, |
| 2290 instance_call()->ArgumentCount(), | 2301 instance_call()->ArgumentCount(), |
| 2291 instance_call()->argument_names(), | 2302 instance_call()->argument_names(), |
| 2292 locs()); | 2303 locs()); |
| 2293 return; | 2304 return; |
| 2294 } | 2305 } |
| 2295 | 2306 |
| 2296 // Load receiver into T0. | 2307 // Load receiver into T0. |
| 2297 __ lw(T0, Address(SP, (instance_call()->ArgumentCount() - 1) * kWordSize)); | 2308 __ lw(T0, Address(SP, (instance_call()->ArgumentCount() - 1) * kWordSize)); |
| 2298 | 2309 |
| 2299 LoadValueCid(compiler, T2, T0, | 2310 LoadValueCid(compiler, T2, T0, |
| 2300 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); | 2311 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); |
| 2301 | 2312 |
| 2302 compiler->EmitTestAndCall(ic_data(), | 2313 compiler->EmitTestAndCall(ic_data(), |
| 2303 T2, // Class id register. | 2314 T2, // Class id register. |
| 2304 instance_call()->ArgumentCount(), | 2315 instance_call()->ArgumentCount(), |
| 2305 instance_call()->argument_names(), | 2316 instance_call()->argument_names(), |
| 2306 deopt, | 2317 deopt, |
| 2307 instance_call()->deopt_id(), | 2318 deopt_id(), |
| 2308 instance_call()->token_pos(), | 2319 instance_call()->token_pos(), |
| 2309 locs()); | 2320 locs()); |
| 2310 } | 2321 } |
| 2311 | 2322 |
| 2312 | 2323 |
| 2313 LocationSummary* BranchInstr::MakeLocationSummary() const { | 2324 LocationSummary* BranchInstr::MakeLocationSummary() const { |
| 2314 UNREACHABLE(); | 2325 UNREACHABLE(); |
| 2315 return NULL; | 2326 return NULL; |
| 2316 } | 2327 } |
| 2317 | 2328 |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2813 compiler->GenerateCall(token_pos(), | 2824 compiler->GenerateCall(token_pos(), |
| 2814 &label, | 2825 &label, |
| 2815 PcDescriptors::kOther, | 2826 PcDescriptors::kOther, |
| 2816 locs()); | 2827 locs()); |
| 2817 __ Drop(2); // Discard type arguments and receiver. | 2828 __ Drop(2); // Discard type arguments and receiver. |
| 2818 } | 2829 } |
| 2819 | 2830 |
| 2820 } // namespace dart | 2831 } // namespace dart |
| 2821 | 2832 |
| 2822 #endif // defined TARGET_ARCH_MIPS | 2833 #endif // defined TARGET_ARCH_MIPS |
| 2823 | |
| OLD | NEW |