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

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

Issue 17977002: - Remove arguments definition test from the VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/flow_graph_inliner.h" 5 #include "vm/flow_graph_inliner.h"
6 6
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/flow_graph.h" 9 #include "vm/flow_graph.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 // If the callee has optional parameters, rebuild the argument and stub 542 // If the callee has optional parameters, rebuild the argument and stub
543 // arrays so that actual arguments are in one-to-one with the formal 543 // arrays so that actual arguments are in one-to-one with the formal
544 // parameters. 544 // parameters.
545 if (function.HasOptionalParameters()) { 545 if (function.HasOptionalParameters()) {
546 TRACE_INLINING(OS::Print(" adjusting for optional parameters\n")); 546 TRACE_INLINING(OS::Print(" adjusting for optional parameters\n"));
547 AdjustForOptionalParameters(*parsed_function, 547 AdjustForOptionalParameters(*parsed_function,
548 argument_names, 548 argument_names,
549 arguments, 549 arguments,
550 param_stubs, 550 param_stubs,
551 callee_graph); 551 callee_graph);
552 // Add a bogus parameter at the end for the (unused) arguments
553 // descriptor slot. The parser allocates an extra slot between
554 // locals and parameters to hold the arguments descriptor in case it
555 // escapes. We currently bailout if there are argument test
556 // expressions or escaping variables so this parameter and the stack
557 // slot are not used.
558 if (parsed_function->GetSavedArgumentsDescriptorVar() != NULL) {
559 param_stubs->Add(new ParameterInstr(
560 function.NumParameters(), callee_graph->graph_entry()));
561 }
562 } 552 }
563 553
564 // After treating optional parameters the actual/formal count must match. 554 // After treating optional parameters the actual/formal count must match.
565 ASSERT(arguments->length() == function.NumParameters()); 555 ASSERT(arguments->length() == function.NumParameters());
566 ASSERT(param_stubs->length() == callee_graph->parameter_count()); 556 ASSERT(param_stubs->length() == callee_graph->parameter_count());
567 557
568 { 558 {
569 TimerScope timer(FLAG_compiler_stats, 559 TimerScope timer(FLAG_compiler_stats,
570 &CompilerStats::graphinliner_ssa_timer, 560 &CompilerStats::graphinliner_ssa_timer,
571 isolate); 561 isolate);
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 OS::Print("After Inlining of %s\n", flow_graph_-> 1362 OS::Print("After Inlining of %s\n", flow_graph_->
1373 parsed_function().function().ToFullyQualifiedCString()); 1363 parsed_function().function().ToFullyQualifiedCString());
1374 FlowGraphPrinter printer(*flow_graph_); 1364 FlowGraphPrinter printer(*flow_graph_);
1375 printer.PrintBlocks(); 1365 printer.PrintBlocks();
1376 } 1366 }
1377 } 1367 }
1378 } 1368 }
1379 } 1369 }
1380 1370
1381 } // namespace dart 1371 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698