Skip to content

Commit a8d510f

Browse files
zichanggcommit-bot@chromium.org
authored andcommitted
[vm/kernel] Remove checks for synthetic variables in NeedsDebugStepCheck
Example: a = b ? true : false; For a simple assignment statement with an internal (synthetic) variable on the right hand side, debugger will not allow to pause. Because DebugStepCheck will only be inserted when right hand side is a real variable. Remove this check to enable debugger to stop on all assignments. Bug: #34541 Change-Id: Iec10e5034603aa3950ad86ed5c40dc7ca1d42a03 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107192 Commit-Queue: Zichang Guo <zichangguo@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
1 parent b071c8e commit a8d510f

5 files changed

Lines changed: 8 additions & 2 deletions

File tree

runtime/observatory/tests/service/next_through_simple_async_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ List<String> expected = [
3030
"$file:${LINE_A+1}:16", // on File
3131
"$file:${LINE_A+2}:31", // on 'lastModified'
3232
"$file:${LINE_A+2}:23", // on 'await'
33+
"$file:${LINE_A+2}:21", // on '='
3334
"$file:${LINE_A+3}:25", // on 'exists'
3435
"$file:${LINE_A+3}:17", // on 'await'
36+
"$file:${LINE_A+3}:15", // on '='
3537
"$file:${LINE_A+4}:47", // on ')', i.e. before ';'
3638
"$file:${LINE_A+4}:3", // on call to 'print'
3739
"$file:${LINE_A+5}:3", // on call to 'foo'

runtime/observatory/tests/service/next_through_simple_async_with_returns_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ List<String> expected = [
3131
"$file:${LINE_A+1}:16", // on 'File'
3232
"$file:${LINE_A+2}:25", // on 'exists'
3333
"$file:${LINE_A+2}:17", // on 'await'
34+
"$file:${LINE_A+2}:15", // on '='
3435
"$file:${LINE_A+4}:5" // on 'return'
3536
];
3637

runtime/observatory/tests/service/step_through_for_each_sync_star_2_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ List<String> expected = [
3434
"$file:${LINE + 9}:3", // on yield
3535

3636
"$file:${LINE + 1}:38", // on '{' in 'for' line
37+
"$file:${LINE + 1}:12", // on 'datapoint'
3738
"$file:${LINE + 2}:5", // on 'print'
3839
"$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
3940

@@ -42,6 +43,7 @@ List<String> expected = [
4243
"$file:${LINE + 10}:3", // on yield
4344

4445
"$file:${LINE + 1}:38", // on '{' in 'for' line
46+
"$file:${LINE + 1}:12", // on 'datapoint'
4547
"$file:${LINE + 2}:5", // on 'print'
4648
"$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
4749

runtime/observatory/tests/service/step_through_for_each_sync_star_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ List<String> expected = [
3535
"$file:${LINE + 9}:3", // on yield
3636

3737
"$file:${LINE + 1}:38", // on '{' in 'for' line
38+
"$file:${LINE + 1}:12", // on 'datapoint'
3839
"$file:${LINE + 2}:5", // on 'print'
3940
"$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
4041

@@ -43,6 +44,7 @@ List<String> expected = [
4344
"$file:${LINE + 11}:3", // on yield
4445

4546
"$file:${LINE + 1}:38", // on '{' in 'for' line
47+
"$file:${LINE + 1}:12", // on 'datapoint'
4648
"$file:${LINE + 2}:5", // on 'print'
4749
"$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
4850

runtime/vm/compiler/frontend/kernel_to_il.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,8 +1148,7 @@ bool FlowGraphBuilder::NeedsDebugStepCheck(Value* value,
11481148
if (definition->IsAllocateObject()) {
11491149
return !definition->AsAllocateObject()->closure_function().IsNull();
11501150
}
1151-
return definition->IsLoadLocal() &&
1152-
!definition->AsLoadLocal()->local().IsInternal();
1151+
return definition->IsLoadLocal();
11531152
}
11541153

11551154
Fragment FlowGraphBuilder::DebugStepCheck(TokenPosition position) {

0 commit comments

Comments
 (0)