mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:09:48 +00:00
[vm,debugger] Do not stop at hoisted variable declarations when stepping through patterns
TEST=pkg/vm_service/test/step_through_patterns_test.dart Issue: https://github.com/dart-lang/sdk/issues/51812 Issue: https://github.com/dart-lang/sdk/issues/49755 Change-Id: Ieb2e6f49c613c7543e7e76119cefbc4d8f9ae3de Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291840 Commit-Queue: Alexander Markov <alexmarkov@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
This commit is contained in:
parent
3da80be140
commit
103a098d64
|
@ -43,15 +43,11 @@ List<String> expected = [
|
|||
"$FILE:${LINE + 0}:46", // on 'shape' after 'switch'
|
||||
"$FILE:${LINE + 1}:20", // on ':'
|
||||
"$FILE:${LINE + 2}:20", // on ':'
|
||||
"$FILE:${LINE + 1}:26", // on 'l' right after 'var'
|
||||
"$FILE:${LINE + 1}:7", // on 'Square'
|
||||
"$FILE:${LINE + 2}:26", // on 'r' right after 'var'
|
||||
"$FILE:${LINE + 2}:7", // on 'Circle'
|
||||
"$FILE:${LINE + 2}:26", // on 'r' right after 'var'
|
||||
"$FILE:${LINE + 2}:36", // on '>='
|
||||
"$FILE:${LINE + 3}:26", // on 'l' right after 'var'
|
||||
"$FILE:${LINE + 1}:7", // on 'Square'
|
||||
"$FILE:${LINE + 4}:26", // on 'r' right after 'var'
|
||||
"$FILE:${LINE + 2}:7", // on 'Circle'
|
||||
"$FILE:${LINE + 4}:26", // on 'r' right after 'var'
|
||||
"$FILE:${LINE + 4}:36", // on '<'
|
||||
|
|
|
@ -5802,7 +5802,7 @@ Fragment StreamingFlowGraphBuilder::BuildVariableDeclaration(
|
|||
? helper.equals_position_
|
||||
: helper.position_;
|
||||
if (position != nullptr) *position = helper.position_;
|
||||
if (NeedsDebugStepCheck(stack(), debug_position)) {
|
||||
if (NeedsDebugStepCheck(stack(), debug_position) && !helper.IsHoisted()) {
|
||||
instructions = DebugStepCheck(debug_position) + instructions;
|
||||
}
|
||||
instructions += StoreLocal(helper.position_, variable);
|
||||
|
|
Loading…
Reference in a new issue