Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 1170483002: Fixed breakpoint handling at return statement with inlined finally clauses. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 077031e4eea1a534b435044479c182e6be36598f..586c6eba1eff44cc291a426c9e515b542721af4c 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -1081,6 +1081,18 @@ void EffectGraphVisitor::VisitReturnNode(ReturnNode* node) {
Append(for_value);
Value* return_value = for_value.value();
+ // Call to stub that checks whether the debugger is in single
+ // step mode. This call must happen before the contexts are
+ // unchained so that captured variables can be inspected.
+ // No debugger check is done in native functions or for return
+ // statements for which there is no associated source position.
+ const Function& function = owner()->function();
+ if (FLAG_support_debugger &&
+ (node->token_pos() != Scanner::kNoSourcePos) && !function.is_native()) {
+ AddInstruction(new(Z) DebugStepCheckInstr(node->token_pos(),
+ RawPcDescriptors::kRuntimeCall));
+ }
+
NestedContextAdjustment context_adjustment(owner(), owner()->context_level());
if (node->inlined_finally_list_length() > 0) {
@@ -1099,18 +1111,6 @@ void EffectGraphVisitor::VisitReturnNode(ReturnNode* node) {
return_value = Bind(BuildLoadLocal(*temp));
}
- // Call to stub that checks whether the debugger is in single
- // step mode. This call must happen before the contexts are
- // unchained so that captured variables can be inspected.
- // No debugger check is done in native functions or for return
- // statements for which there is no associated source position.
- const Function& function = owner()->function();
- if (FLAG_support_debugger &&
- (node->token_pos() != Scanner::kNoSourcePos) && !function.is_native()) {
- AddInstruction(new(Z) DebugStepCheckInstr(node->token_pos(),
- RawPcDescriptors::kRuntimeCall));
- }
-
if (Isolate::Current()->TypeChecksEnabled()) {
const bool is_implicit_dynamic_getter =
(!function.is_static() &&

Powered by Google App Engine
This is Rietveld 408576698