| 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/flow_graph_builder.h" | 5 #include "vm/flow_graph_builder.h" |
| 6 | 6 |
| 7 #include "vm/ast_printer.h" | 7 #include "vm/ast_printer.h" |
| 8 #include "vm/code_descriptors.h" | 8 #include "vm/code_descriptors.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 ValueGraphVisitor::VisitBinaryOpNode(node); | 454 ValueGraphVisitor::VisitBinaryOpNode(node); |
| 455 } | 455 } |
| 456 | 456 |
| 457 | 457 |
| 458 void EffectGraphVisitor::Bailout(const char* reason) { | 458 void EffectGraphVisitor::Bailout(const char* reason) { |
| 459 owner()->Bailout(reason); | 459 owner()->Bailout(reason); |
| 460 } | 460 } |
| 461 | 461 |
| 462 | 462 |
| 463 void EffectGraphVisitor::InlineBailout(const char* reason) { | 463 void EffectGraphVisitor::InlineBailout(const char* reason) { |
| 464 owner()->parsed_function().function().set_is_inlinable(false); |
| 464 if (owner()->InInliningContext()) owner()->Bailout(reason); | 465 if (owner()->InInliningContext()) owner()->Bailout(reason); |
| 465 } | 466 } |
| 466 | 467 |
| 467 | 468 |
| 468 // <Statement> ::= Return { value: <Expression> | 469 // <Statement> ::= Return { value: <Expression> |
| 469 // inlined_finally_list: <InlinedFinally>* } | 470 // inlined_finally_list: <InlinedFinally>* } |
| 470 void EffectGraphVisitor::VisitReturnNode(ReturnNode* node) { | 471 void EffectGraphVisitor::VisitReturnNode(ReturnNode* node) { |
| 471 ValueGraphVisitor for_value(owner(), temp_index()); | 472 ValueGraphVisitor for_value(owner(), temp_index()); |
| 472 node->value()->Visit(&for_value); | 473 node->value()->Visit(&for_value); |
| 473 Append(for_value); | 474 Append(for_value); |
| (...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2647 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; | 2648 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; |
| 2648 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 2649 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| 2649 OS::SNPrint(chars, len, kFormat, function_name, reason); | 2650 OS::SNPrint(chars, len, kFormat, function_name, reason); |
| 2650 const Error& error = Error::Handle( | 2651 const Error& error = Error::Handle( |
| 2651 LanguageError::New(String::Handle(String::New(chars)))); | 2652 LanguageError::New(String::Handle(String::New(chars)))); |
| 2652 Isolate::Current()->long_jump_base()->Jump(1, error); | 2653 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 2653 } | 2654 } |
| 2654 | 2655 |
| 2655 | 2656 |
| 2656 } // namespace dart | 2657 } // namespace dart |
| OLD | NEW |