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

Unified Diff: runtime/vm/kernel_binary_flowgraph.cc

Issue 3003863002: [kernel] Position on switch expression (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 | « pkg/kernel/lib/binary/ast_to_binary.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 f2ac430eca251b23443b734fd4be9bd26b889a73..47aab5d4a98fc32765e6c9a1023ee8347df19dc7 100644
--- a/runtime/vm/kernel_binary_flowgraph.cc
+++ b/runtime/vm/kernel_binary_flowgraph.cc
@@ -1280,6 +1280,7 @@ void StreamingScopeBuilder::VisitStatement() {
}
case kSwitchStatement: {
AddSwitchVariable();
+ builder_->ReadPosition(); // read position.
VisitExpression(); // read condition.
int case_count = builder_->ReadListLength(); // read number of cases.
for (intptr_t i = 0; i < case_count; ++i) {
@@ -4563,6 +4564,7 @@ void StreamingFlowGraphBuilder::SkipStatement() {
SkipStatement(); // read body.
return;
case kSwitchStatement: {
+ ReadPosition(); // read position.
SkipExpression(); // read condition.
int case_count = ReadListLength(); // read number of cases.
for (intptr_t i = 0; i < case_count; ++i) {
@@ -6750,6 +6752,7 @@ Fragment StreamingFlowGraphBuilder::BuildForInStatement(bool async) {
}
Fragment StreamingFlowGraphBuilder::BuildSwitchStatement() {
+ ReadPosition(); // read position.
// We need the number of cases. So start by getting that, then go back.
intptr_t offset = ReaderOffset();
SkipExpression(); // temporarily skip condition
« no previous file with comments | « pkg/kernel/lib/binary/ast_to_binary.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698