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

Unified Diff: runtime/vm/kernel_to_il.cc

Issue 2750013002: [kernel] Debugging of switch statement (Closed)
Patch Set: Addressed comments Created 3 years, 9 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/vm/kernel_binary.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_to_il.cc
diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc
index cde178557a0087823af686203b414eeecba50486..b2898b85b251e0ba75f4e3255ce55628c74645d0 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -5810,13 +5810,14 @@ void FlowGraphBuilder::VisitSwitchStatement(SwitchStatement* node) {
TargetEntryInstr* then;
TargetEntryInstr* otherwise;
- current_instructions += Constant(constant_evaluator_.EvaluateExpression(
- switch_case->expressions()[j]));
+ Expression* expression = switch_case->expressions()[j];
+ current_instructions +=
+ Constant(constant_evaluator_.EvaluateExpression(expression));
current_instructions += PushArgument();
current_instructions += LoadLocal(scopes_->switch_variable);
current_instructions += PushArgument();
current_instructions += InstanceCall(
- TokenPosition::kNoSource, Symbols::EqualOperator(), Token::kEQ,
+ expression->position(), Symbols::EqualOperator(), Token::kEQ,
/*argument_count=*/2,
/*num_args_checked=*/2);
current_instructions += BranchIfTrue(&then, &otherwise);
« no previous file with comments | « runtime/vm/kernel_binary.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698