| 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);
|
|
|