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/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
9 | 9 |
10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1241 | 1241 |
1242 | 1242 |
1243 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label, | 1243 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label, |
1244 const ICData& ic_data, | 1244 const ICData& ic_data, |
1245 intptr_t argument_count, | 1245 intptr_t argument_count, |
1246 intptr_t deopt_id, | 1246 intptr_t deopt_id, |
1247 intptr_t token_pos, | 1247 intptr_t token_pos, |
1248 LocationSummary* locs) { | 1248 LocationSummary* locs) { |
1249 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0); | 1249 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0); |
1250 __ TraceSimMsg("InstanceCall"); | 1250 __ TraceSimMsg("InstanceCall"); |
1251 __ LoadImmediate(S4, 0); | |
1252 __ LoadObject(S5, ic_data); | 1251 __ LoadObject(S5, ic_data); |
1253 GenerateDartCall(deopt_id, | 1252 GenerateDartCall(deopt_id, |
1254 token_pos, | 1253 token_pos, |
1255 target_label, | 1254 target_label, |
1256 PcDescriptors::kIcCall, | 1255 PcDescriptors::kIcCall, |
1257 locs); | 1256 locs); |
1258 __ TraceSimMsg("InstanceCall return"); | 1257 __ TraceSimMsg("InstanceCall return"); |
1259 __ Drop(argument_count); | 1258 __ Drop(argument_count); |
1260 #if defined(DEBUG) | 1259 #if defined(DEBUG) |
1261 __ LoadImmediate(S4, kInvalidObjectPointer); | 1260 __ LoadImmediate(S4, kInvalidObjectPointer); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1334 const ICData& ic_data) { | 1333 const ICData& ic_data) { |
1335 uword label_address = 0; | 1334 uword label_address = 0; |
1336 if (ic_data.NumArgsTested() == 0) { | 1335 if (ic_data.NumArgsTested() == 0) { |
1337 label_address = StubCode::ZeroArgsUnoptimizedStaticCallEntryPoint(); | 1336 label_address = StubCode::ZeroArgsUnoptimizedStaticCallEntryPoint(); |
1338 } else if (ic_data.NumArgsTested() == 2) { | 1337 } else if (ic_data.NumArgsTested() == 2) { |
1339 label_address = StubCode::TwoArgsUnoptimizedStaticCallEntryPoint(); | 1338 label_address = StubCode::TwoArgsUnoptimizedStaticCallEntryPoint(); |
1340 } else { | 1339 } else { |
1341 UNIMPLEMENTED(); | 1340 UNIMPLEMENTED(); |
1342 } | 1341 } |
1343 ExternalLabel target_label(label_address); | 1342 ExternalLabel target_label(label_address); |
1344 __ LoadImmediate(S4, 0); | |
1345 __ LoadObject(S5, ic_data); | 1343 __ LoadObject(S5, ic_data); |
1346 GenerateDartCall(deopt_id, | 1344 GenerateDartCall(deopt_id, |
1347 token_pos, | 1345 token_pos, |
1348 &target_label, | 1346 &target_label, |
1349 PcDescriptors::kUnoptStaticCall, | 1347 PcDescriptors::kUnoptStaticCall, |
1350 locs); | 1348 locs); |
1351 #if defined(DEBUG) | 1349 #if defined(DEBUG) |
1352 __ LoadImmediate(S4, kInvalidObjectPointer); | 1350 __ LoadImmediate(S4, kInvalidObjectPointer); |
1353 #endif | 1351 #endif |
1354 __ Drop(argument_count); | 1352 __ Drop(argument_count); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1415 __ TraceSimMsg("EqualityRegRegCompare"); | 1413 __ TraceSimMsg("EqualityRegRegCompare"); |
1416 __ Comment("EqualityRegRegCompare"); | 1414 __ Comment("EqualityRegRegCompare"); |
1417 if (needs_number_check) { | 1415 if (needs_number_check) { |
1418 __ addiu(SP, SP, Immediate(-2 * kWordSize)); | 1416 __ addiu(SP, SP, Immediate(-2 * kWordSize)); |
1419 __ sw(left, Address(SP, 1 * kWordSize)); | 1417 __ sw(left, Address(SP, 1 * kWordSize)); |
1420 __ sw(right, Address(SP, 0 * kWordSize)); | 1418 __ sw(right, Address(SP, 0 * kWordSize)); |
1421 if (is_optimizing()) { | 1419 if (is_optimizing()) { |
1422 __ BranchLinkPatchable( | 1420 __ BranchLinkPatchable( |
1423 &StubCode::OptimizedIdenticalWithNumberCheckLabel()); | 1421 &StubCode::OptimizedIdenticalWithNumberCheckLabel()); |
1424 } else { | 1422 } else { |
1425 __ LoadImmediate(S4, 0); | |
1426 __ LoadImmediate(S5, 0); | |
1427 __ BranchLinkPatchable( | 1423 __ BranchLinkPatchable( |
1428 &StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); | 1424 &StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); |
1429 } | 1425 } |
1430 if (token_pos != Scanner::kNoSourcePos) { | 1426 if (token_pos != Scanner::kNoSourcePos) { |
1431 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, | 1427 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, |
1432 Isolate::kNoDeoptId, | 1428 Isolate::kNoDeoptId, |
1433 token_pos); | 1429 token_pos); |
1434 } | 1430 } |
1435 #if defined(DEBUG) | 1431 #if defined(DEBUG) |
1436 if (!is_optimizing()) { | 1432 if (!is_optimizing()) { |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1807 __ AddImmediate(SP, kDoubleSize); | 1803 __ AddImmediate(SP, kDoubleSize); |
1808 } | 1804 } |
1809 | 1805 |
1810 | 1806 |
1811 #undef __ | 1807 #undef __ |
1812 | 1808 |
1813 | 1809 |
1814 } // namespace dart | 1810 } // namespace dart |
1815 | 1811 |
1816 #endif // defined TARGET_ARCH_MIPS | 1812 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |