| 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 "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
| 9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
| 10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 Append(for_effect); | 960 Append(for_effect); |
| 961 if (!is_open()) { | 961 if (!is_open()) { |
| 962 owner()->DeallocateTemps(owner()->temp_count()); | 962 owner()->DeallocateTemps(owner()->temp_count()); |
| 963 return; | 963 return; |
| 964 } | 964 } |
| 965 } | 965 } |
| 966 | 966 |
| 967 // Call to stub that checks whether the debugger is in single | 967 // Call to stub that checks whether the debugger is in single |
| 968 // step mode. This call must happen before the contexts are | 968 // step mode. This call must happen before the contexts are |
| 969 // unchained so that captured variables can be inspected. | 969 // unchained so that captured variables can be inspected. |
| 970 // No debugger check is done in native functions. | 970 // No debugger check is done in native functions or for return |
| 971 // statements for which there is no associated source position. |
| 971 const Function& function = owner()->parsed_function()->function(); | 972 const Function& function = owner()->parsed_function()->function(); |
| 972 if (!function.is_native()) { | 973 if ((node->token_pos() != Scanner::kDummyTokenIndex) && |
| 974 !function.is_native()) { |
| 973 AddInstruction(new DebugStepCheckInstr(node->token_pos(), | 975 AddInstruction(new DebugStepCheckInstr(node->token_pos(), |
| 974 PcDescriptors::kReturn)); | 976 PcDescriptors::kReturn)); |
| 975 } | 977 } |
| 976 | 978 |
| 977 Value* return_value = for_value.value(); | 979 Value* return_value = for_value.value(); |
| 978 if (FLAG_enable_type_checks) { | 980 if (FLAG_enable_type_checks) { |
| 979 const bool is_implicit_dynamic_getter = | 981 const bool is_implicit_dynamic_getter = |
| 980 (!function.is_static() && | 982 (!function.is_static() && |
| 981 ((function.kind() == RawFunction::kImplicitGetter) || | 983 ((function.kind() == RawFunction::kImplicitGetter) || |
| 982 (function.kind() == RawFunction::kImplicitStaticFinalGetter))); | 984 (function.kind() == RawFunction::kImplicitStaticFinalGetter))); |
| (...skipping 3069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4052 LanguageError::kError, | 4054 LanguageError::kError, |
| 4053 Heap::kNew, | 4055 Heap::kNew, |
| 4054 "FlowGraphBuilder Bailout: %s %s", | 4056 "FlowGraphBuilder Bailout: %s %s", |
| 4055 String::Handle(function.name()).ToCString(), | 4057 String::Handle(function.name()).ToCString(), |
| 4056 reason)); | 4058 reason)); |
| 4057 Isolate::Current()->long_jump_base()->Jump(1, error); | 4059 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 4058 } | 4060 } |
| 4059 | 4061 |
| 4060 | 4062 |
| 4061 } // namespace dart | 4063 } // namespace dart |
| OLD | NEW |