| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/flow_graph_allocator.h" | 9 #include "vm/flow_graph_allocator.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 void ClosureCallComp::EmitNativeCode(FlowGraphCompiler* compiler) { | 1314 void ClosureCallComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1315 // The arguments to the stub include the closure. The arguments | 1315 // The arguments to the stub include the closure. The arguments |
| 1316 // descriptor describes the closure's arguments (and so does not include | 1316 // descriptor describes the closure's arguments (and so does not include |
| 1317 // the closure). | 1317 // the closure). |
| 1318 Register temp_reg = locs()->temp(0).reg(); | 1318 Register temp_reg = locs()->temp(0).reg(); |
| 1319 int argument_count = ArgumentCount(); | 1319 int argument_count = ArgumentCount(); |
| 1320 const Array& arguments_descriptor = | 1320 const Array& arguments_descriptor = |
| 1321 DartEntry::ArgumentsDescriptor(argument_count - 1, | 1321 DartEntry::ArgumentsDescriptor(argument_count - 1, |
| 1322 argument_names()); | 1322 argument_names()); |
| 1323 __ LoadObject(temp_reg, arguments_descriptor); | 1323 __ LoadObject(temp_reg, arguments_descriptor); |
| 1324 | 1324 compiler->GenerateDartCall(deopt_id(), |
| 1325 compiler->GenerateCall(token_pos(), | 1325 token_pos(), |
| 1326 &StubCode::CallClosureFunctionLabel(), | 1326 &StubCode::CallClosureFunctionLabel(), |
| 1327 PcDescriptors::kOther, | 1327 PcDescriptors::kOther, |
| 1328 locs()); | 1328 locs()); |
| 1329 __ Drop(argument_count); | 1329 __ Drop(argument_count); |
| 1330 } | 1330 } |
| 1331 | 1331 |
| 1332 | 1332 |
| 1333 LocationSummary* InstanceCallComp::MakeLocationSummary() const { | 1333 LocationSummary* InstanceCallComp::MakeLocationSummary() const { |
| 1334 return MakeCallSummary(); | 1334 return MakeCallSummary(); |
| 1335 } | 1335 } |
| 1336 | 1336 |
| 1337 | 1337 |
| 1338 void InstanceCallComp::EmitNativeCode(FlowGraphCompiler* compiler) { | 1338 void InstanceCallComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1339 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, | 1339 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, |
| 1340 deopt_id(), | 1340 deopt_id(), |
| 1341 token_pos()); | 1341 token_pos()); |
| 1342 compiler->GenerateInstanceCall(deopt_id(), | 1342 compiler->GenerateInstanceCall(deopt_id(), |
| 1343 token_pos(), | 1343 token_pos(), |
| 1344 function_name(), | 1344 function_name(), |
| 1345 ArgumentCount(), | 1345 ArgumentCount(), |
| 1346 argument_names(), | 1346 argument_names(), |
| 1347 checked_argument_count(), | 1347 checked_argument_count(), |
| 1348 locs()); | 1348 locs()); |
| 1349 } | 1349 } |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 value->set_use_index(i); | 1523 value->set_use_index(i); |
| 1524 value->AddToEnvUseList(); | 1524 value->AddToEnvUseList(); |
| 1525 } | 1525 } |
| 1526 instr->set_env(copy); | 1526 instr->set_env(copy); |
| 1527 } | 1527 } |
| 1528 | 1528 |
| 1529 | 1529 |
| 1530 #undef __ | 1530 #undef __ |
| 1531 | 1531 |
| 1532 } // namespace dart | 1532 } // namespace dart |
| OLD | NEW |