| 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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 } | 503 } |
| 504 | 504 |
| 505 // Abort if this is a recursive occurrence. | 505 // Abort if this is a recursive occurrence. |
| 506 Definition* call = call_data->call; | 506 Definition* call = call_data->call; |
| 507 if (!FLAG_inline_recursive && IsCallRecursive(function, call)) { | 507 if (!FLAG_inline_recursive && IsCallRecursive(function, call)) { |
| 508 function.set_is_inlinable(false); | 508 function.set_is_inlinable(false); |
| 509 TRACE_INLINING(OS::Print(" Bailout: recursive function\n")); | 509 TRACE_INLINING(OS::Print(" Bailout: recursive function\n")); |
| 510 return false; | 510 return false; |
| 511 } | 511 } |
| 512 | 512 |
| 513 // Abort if the callee has an intrinsic translation. | |
| 514 if (Intrinsifier::CanIntrinsify(function) && | |
| 515 !function.is_optimizable()) { | |
| 516 function.set_is_inlinable(false); | |
| 517 TRACE_INLINING(OS::Print(" Bailout: can intrinsify\n")); | |
| 518 return false; | |
| 519 } | |
| 520 | |
| 521 Isolate* isolate = Isolate::Current(); | 513 Isolate* isolate = Isolate::Current(); |
| 522 // Save and clear deopt id. | 514 // Save and clear deopt id. |
| 523 const intptr_t prev_deopt_id = isolate->deopt_id(); | 515 const intptr_t prev_deopt_id = isolate->deopt_id(); |
| 524 isolate->set_deopt_id(0); | 516 isolate->set_deopt_id(0); |
| 525 // Install bailout jump. | 517 // Install bailout jump. |
| 526 LongJump* base = isolate->long_jump_base(); | 518 LongJump* base = isolate->long_jump_base(); |
| 527 LongJump jump; | 519 LongJump jump; |
| 528 isolate->set_long_jump_base(&jump); | 520 isolate->set_long_jump_base(&jump); |
| 529 if (setjmp(*jump.Set()) == 0) { | 521 if (setjmp(*jump.Set()) == 0) { |
| 530 // Parse the callee function. | 522 // Parse the callee function. |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1447 OS::Print("After Inlining of %s\n", flow_graph_-> | 1439 OS::Print("After Inlining of %s\n", flow_graph_-> |
| 1448 parsed_function().function().ToFullyQualifiedCString()); | 1440 parsed_function().function().ToFullyQualifiedCString()); |
| 1449 FlowGraphPrinter printer(*flow_graph_); | 1441 FlowGraphPrinter printer(*flow_graph_); |
| 1450 printer.PrintBlocks(); | 1442 printer.PrintBlocks(); |
| 1451 } | 1443 } |
| 1452 } | 1444 } |
| 1453 } | 1445 } |
| 1454 } | 1446 } |
| 1455 | 1447 |
| 1456 } // namespace dart | 1448 } // namespace dart |
| OLD | NEW |