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/flow_graph_inliner.h" | 5 #include "vm/flow_graph_inliner.h" |
6 | 6 |
7 #include "vm/block_scheduler.h" | 7 #include "vm/block_scheduler.h" |
8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
10 #include "vm/flow_graph.h" | 10 #include "vm/flow_graph.h" |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 // parameters. | 537 // parameters. |
538 if (function.HasOptionalParameters()) { | 538 if (function.HasOptionalParameters()) { |
539 TRACE_INLINING(OS::Print(" adjusting for optional parameters\n")); | 539 TRACE_INLINING(OS::Print(" adjusting for optional parameters\n")); |
540 if (!AdjustForOptionalParameters(*parsed_function, | 540 if (!AdjustForOptionalParameters(*parsed_function, |
541 argument_names, | 541 argument_names, |
542 arguments, | 542 arguments, |
543 param_stubs, | 543 param_stubs, |
544 callee_graph)) { | 544 callee_graph)) { |
545 function.set_is_inlinable(false); | 545 function.set_is_inlinable(false); |
546 TRACE_INLINING(OS::Print(" Bailout: optional arg mismatch\n")); | 546 TRACE_INLINING(OS::Print(" Bailout: optional arg mismatch\n")); |
| 547 isolate->set_long_jump_base(base); |
547 return false; | 548 return false; |
548 } | 549 } |
549 } | 550 } |
550 | 551 |
551 // After treating optional parameters the actual/formal count must match. | 552 // After treating optional parameters the actual/formal count must match. |
552 ASSERT(arguments->length() == function.NumParameters()); | 553 ASSERT(arguments->length() == function.NumParameters()); |
553 ASSERT(param_stubs->length() == callee_graph->parameter_count()); | 554 ASSERT(param_stubs->length() == callee_graph->parameter_count()); |
554 | 555 |
555 BlockScheduler block_scheduler(callee_graph); | 556 BlockScheduler block_scheduler(callee_graph); |
556 block_scheduler.AssignEdgeWeights(); | 557 block_scheduler.AssignEdgeWeights(); |
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1484 OS::Print("After Inlining of %s\n", flow_graph_-> | 1485 OS::Print("After Inlining of %s\n", flow_graph_-> |
1485 parsed_function().function().ToFullyQualifiedCString()); | 1486 parsed_function().function().ToFullyQualifiedCString()); |
1486 FlowGraphPrinter printer(*flow_graph_); | 1487 FlowGraphPrinter printer(*flow_graph_); |
1487 printer.PrintBlocks(); | 1488 printer.PrintBlocks(); |
1488 } | 1489 } |
1489 } | 1490 } |
1490 } | 1491 } |
1491 } | 1492 } |
1492 | 1493 |
1493 } // namespace dart | 1494 } // namespace dart |
OLD | NEW |