Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: runtime/vm/intermediate_language.cc

Issue 10885039: Deoptimization can occur at Dart calls (includes native calls to C) but not at runtime calls. This … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 void ClosureCallComp::EmitNativeCode(FlowGraphCompiler* compiler) { 1320 void ClosureCallComp::EmitNativeCode(FlowGraphCompiler* compiler) {
1321 // The arguments to the stub include the closure. The arguments 1321 // The arguments to the stub include the closure. The arguments
1322 // descriptor describes the closure's arguments (and so does not include 1322 // descriptor describes the closure's arguments (and so does not include
1323 // the closure). 1323 // the closure).
1324 Register temp_reg = locs()->temp(0).reg(); 1324 Register temp_reg = locs()->temp(0).reg();
1325 int argument_count = ArgumentCount(); 1325 int argument_count = ArgumentCount();
1326 const Array& arguments_descriptor = 1326 const Array& arguments_descriptor =
1327 DartEntry::ArgumentsDescriptor(argument_count - 1, 1327 DartEntry::ArgumentsDescriptor(argument_count - 1,
1328 argument_names()); 1328 argument_names());
1329 __ LoadObject(temp_reg, arguments_descriptor); 1329 __ LoadObject(temp_reg, arguments_descriptor);
1330 1330 compiler->GenerateDartCall(deopt_id(),
1331 compiler->GenerateCall(token_pos(), 1331 token_pos(),
1332 &StubCode::CallClosureFunctionLabel(), 1332 &StubCode::CallClosureFunctionLabel(),
1333 PcDescriptors::kOther, 1333 PcDescriptors::kOther,
1334 locs()); 1334 locs());
1335 __ Drop(argument_count); 1335 __ Drop(argument_count);
1336 } 1336 }
1337 1337
1338 1338
1339 LocationSummary* InstanceCallComp::MakeLocationSummary() const { 1339 LocationSummary* InstanceCallComp::MakeLocationSummary() const {
1340 return MakeCallSummary(); 1340 return MakeCallSummary();
1341 } 1341 }
1342 1342
1343 1343
1344 void InstanceCallComp::EmitNativeCode(FlowGraphCompiler* compiler) { 1344 void InstanceCallComp::EmitNativeCode(FlowGraphCompiler* compiler) {
1345 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 1345 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
1346 deopt_id(), 1346 deopt_id(),
1347 token_pos()); 1347 token_pos());
1348 compiler->GenerateInstanceCall(deopt_id(), 1348 compiler->GenerateInstanceCall(deopt_id(),
1349 token_pos(), 1349 token_pos(),
1350 function_name(), 1350 function_name(),
1351 ArgumentCount(), 1351 ArgumentCount(),
1352 argument_names(), 1352 argument_names(),
1353 checked_argument_count(), 1353 checked_argument_count(),
1354 locs()); 1354 locs());
1355 } 1355 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1532 use->AddToEnvUseList(); 1532 use->AddToEnvUseList();
1533 } 1533 }
1534 } 1534 }
1535 instr->set_env(copy); 1535 instr->set_env(copy);
1536 } 1536 }
1537 1537
1538 1538
1539 #undef __ 1539 #undef __
1540 1540
1541 } // namespace dart 1541 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698