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 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 | 1003 |
1004 // Call to stub that checks whether the debugger is in single | 1004 // Call to stub that checks whether the debugger is in single |
1005 // step mode. This call must happen before the contexts are | 1005 // step mode. This call must happen before the contexts are |
1006 // unchained so that captured variables can be inspected. | 1006 // unchained so that captured variables can be inspected. |
1007 // No debugger check is done in native functions or for return | 1007 // No debugger check is done in native functions or for return |
1008 // statements for which there is no associated source position. | 1008 // statements for which there is no associated source position. |
1009 const Function& function = owner()->parsed_function()->function(); | 1009 const Function& function = owner()->parsed_function()->function(); |
1010 if ((node->token_pos() != Scanner::kNoSourcePos) && | 1010 if ((node->token_pos() != Scanner::kNoSourcePos) && |
1011 !function.is_native() && FLAG_enable_debugger) { | 1011 !function.is_native() && FLAG_enable_debugger) { |
1012 AddInstruction(new DebugStepCheckInstr(node->token_pos(), | 1012 AddInstruction(new DebugStepCheckInstr(node->token_pos(), |
1013 PcDescriptors::kReturn)); | 1013 PcDescriptors::kRuntimeCall)); |
1014 } | 1014 } |
1015 | 1015 |
1016 if (FLAG_enable_type_checks) { | 1016 if (FLAG_enable_type_checks) { |
1017 const bool is_implicit_dynamic_getter = | 1017 const bool is_implicit_dynamic_getter = |
1018 (!function.is_static() && | 1018 (!function.is_static() && |
1019 ((function.kind() == RawFunction::kImplicitGetter) || | 1019 ((function.kind() == RawFunction::kImplicitGetter) || |
1020 (function.kind() == RawFunction::kImplicitStaticFinalGetter))); | 1020 (function.kind() == RawFunction::kImplicitStaticFinalGetter))); |
1021 // Implicit getters do not need a type check at return, unless they compute | 1021 // Implicit getters do not need a type check at return, unless they compute |
1022 // the initial value of a static field. | 1022 // the initial value of a static field. |
1023 // The body of a constructor cannot modify the type of the | 1023 // The body of a constructor cannot modify the type of the |
(...skipping 2924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3948 Report::MessageF(Report::kBailout, | 3948 Report::MessageF(Report::kBailout, |
3949 Script::Handle(function.script()), | 3949 Script::Handle(function.script()), |
3950 function.token_pos(), | 3950 function.token_pos(), |
3951 "FlowGraphBuilder Bailout: %s %s", | 3951 "FlowGraphBuilder Bailout: %s %s", |
3952 String::Handle(function.name()).ToCString(), | 3952 String::Handle(function.name()).ToCString(), |
3953 reason); | 3953 reason); |
3954 UNREACHABLE(); | 3954 UNREACHABLE(); |
3955 } | 3955 } |
3956 | 3956 |
3957 } // namespace dart | 3957 } // namespace dart |
OLD | NEW |