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 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2217 } | 2228 } |
2218 | 2229 |
2219 | 2230 |
2220 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const { | 2231 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const { |
2221 return MakeCallSummary(); | 2232 return MakeCallSummary(); |
2222 } | 2233 } |
2223 | 2234 |
2224 | 2235 |
2225 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2236 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2226 __ TraceSimMsg("PolymorphicInstanceCallInstr"); | 2237 __ TraceSimMsg("PolymorphicInstanceCallInstr"); |
2227 Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(), | 2238 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
2228 kDeoptPolymorphicInstanceCallTestFail); | 2239 kDeoptPolymorphicInstanceCallTestFail); |
2229 if (ic_data().NumberOfChecks() == 0) { | 2240 if (ic_data().NumberOfChecks() == 0) { |
2230 __ b(deopt); | 2241 __ b(deopt); |
2231 return; | 2242 return; |
2232 } | 2243 } |
2233 ASSERT(ic_data().num_args_tested() == 1); | 2244 ASSERT(ic_data().num_args_tested() == 1); |
2234 if (!with_checks()) { | 2245 if (!with_checks()) { |
2235 ASSERT(ic_data().HasOneTarget()); | 2246 ASSERT(ic_data().HasOneTarget()); |
2236 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); | 2247 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); |
2237 compiler->GenerateStaticCall(instance_call()->deopt_id(), | 2248 compiler->GenerateStaticCall(deopt_id(), |
2238 instance_call()->token_pos(), | 2249 instance_call()->token_pos(), |
2239 target, | 2250 target, |
2240 instance_call()->ArgumentCount(), | 2251 instance_call()->ArgumentCount(), |
2241 instance_call()->argument_names(), | 2252 instance_call()->argument_names(), |
2242 locs()); | 2253 locs()); |
2243 return; | 2254 return; |
2244 } | 2255 } |
2245 | 2256 |
2246 // Load receiver into T0. | 2257 // Load receiver into T0. |
2247 __ lw(T0, Address(SP, (instance_call()->ArgumentCount() - 1) * kWordSize)); | 2258 __ lw(T0, Address(SP, (instance_call()->ArgumentCount() - 1) * kWordSize)); |
2248 | 2259 |
2249 LoadValueCid(compiler, T2, T0, | 2260 LoadValueCid(compiler, T2, T0, |
2250 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); | 2261 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); |
2251 | 2262 |
2252 compiler->EmitTestAndCall(ic_data(), | 2263 compiler->EmitTestAndCall(ic_data(), |
2253 T2, // Class id register. | 2264 T2, // Class id register. |
2254 instance_call()->ArgumentCount(), | 2265 instance_call()->ArgumentCount(), |
2255 instance_call()->argument_names(), | 2266 instance_call()->argument_names(), |
2256 deopt, | 2267 deopt, |
2257 instance_call()->deopt_id(), | 2268 deopt_id(), |
2258 instance_call()->token_pos(), | 2269 instance_call()->token_pos(), |
2259 locs()); | 2270 locs()); |
2260 } | 2271 } |
2261 | 2272 |
2262 | 2273 |
2263 LocationSummary* BranchInstr::MakeLocationSummary() const { | 2274 LocationSummary* BranchInstr::MakeLocationSummary() const { |
2264 UNREACHABLE(); | 2275 UNREACHABLE(); |
2265 return NULL; | 2276 return NULL; |
2266 } | 2277 } |
2267 | 2278 |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2763 compiler->GenerateCall(token_pos(), | 2774 compiler->GenerateCall(token_pos(), |
2764 &label, | 2775 &label, |
2765 PcDescriptors::kOther, | 2776 PcDescriptors::kOther, |
2766 locs()); | 2777 locs()); |
2767 __ Drop(2); // Discard type arguments and receiver. | 2778 __ Drop(2); // Discard type arguments and receiver. |
2768 } | 2779 } |
2769 | 2780 |
2770 } // namespace dart | 2781 } // namespace dart |
2771 | 2782 |
2772 #endif // defined TARGET_ARCH_MIPS | 2783 #endif // defined TARGET_ARCH_MIPS |
2773 | |
OLD | NEW |