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

Unified Diff: runtime/vm/kernel_binary_flowgraph.cc

Issue 3004693002: [kernel] Add offset to SwitchContinueStatement; add debugging test (Closed)
Patch Set: ... Created 3 years, 4 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
« no previous file with comments | « runtime/observatory/tests/service/step_through_switch_with_continue_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_binary_flowgraph.cc
diff --git a/runtime/vm/kernel_binary_flowgraph.cc b/runtime/vm/kernel_binary_flowgraph.cc
index 47aab5d4a98fc32765e6c9a1023ee8347df19dc7..f0b3984379d0af31e41406d3a79417f2e47e7d8b 100644
--- a/runtime/vm/kernel_binary_flowgraph.cc
+++ b/runtime/vm/kernel_binary_flowgraph.cc
@@ -1296,7 +1296,8 @@ void StreamingScopeBuilder::VisitStatement() {
return;
}
case kContinueSwitchStatement:
- builder_->ReadUInt(); // read target_index.
+ builder_->ReadPosition(); // read position.
+ builder_->ReadUInt(); // read target_index.
return;
case kIfStatement:
VisitExpression(); // read condition.
@@ -4579,7 +4580,8 @@ void StreamingFlowGraphBuilder::SkipStatement() {
return;
}
case kContinueSwitchStatement:
- ReadUInt(); // read target_index.
+ ReadPosition(); // read position.
+ ReadUInt(); // read target_index.
return;
case kIfStatement:
SkipExpression(); // read condition.
@@ -6958,7 +6960,8 @@ Fragment StreamingFlowGraphBuilder::BuildSwitchStatement() {
}
Fragment StreamingFlowGraphBuilder::BuildContinueSwitchStatement() {
- intptr_t target_index = ReadUInt(); // read target index.
+ TokenPosition position = ReadPosition(); // read position.
+ intptr_t target_index = ReadUInt(); // read target index.
TryFinallyBlock* outer_finally = NULL;
intptr_t target_context_depth = -1;
@@ -6969,6 +6972,9 @@ Fragment StreamingFlowGraphBuilder::BuildContinueSwitchStatement() {
instructions +=
TranslateFinallyFinalizers(outer_finally, target_context_depth);
if (instructions.is_open()) {
+ if (NeedsDebugStepCheck(parsed_function()->function(), position)) {
+ instructions += DebugStepCheck(position);
+ }
instructions += Goto(entry);
}
return instructions;
« no previous file with comments | « runtime/observatory/tests/service/step_through_switch_with_continue_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698