[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: https://github.com/dart-lang/sdk/issues/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>
diff --git a/runtime/observatory/tests/service/next_through_simple_async_test.dart b/runtime/observatory/tests/service/next_through_simple_async_test.dart
index 9ed99ed..fd1bcdb 100644
--- a/runtime/observatory/tests/service/next_through_simple_async_test.dart
+++ b/runtime/observatory/tests/service/next_through_simple_async_test.dart
@@ -30,8 +30,10 @@
   "$file:${LINE_A+1}:16", // on File
   "$file:${LINE_A+2}:31", // on 'lastModified'
   "$file:${LINE_A+2}:23", // on 'await'
+  "$file:${LINE_A+2}:21", // on '='
   "$file:${LINE_A+3}:25", // on 'exists'
   "$file:${LINE_A+3}:17", // on 'await'
+  "$file:${LINE_A+3}:15", // on '='
   "$file:${LINE_A+4}:47", // on ')', i.e. before ';'
   "$file:${LINE_A+4}:3", // on call to 'print'
   "$file:${LINE_A+5}:3", // on call to 'foo'
diff --git a/runtime/observatory/tests/service/next_through_simple_async_with_returns_test.dart b/runtime/observatory/tests/service/next_through_simple_async_with_returns_test.dart
index c112a29..ea773c4 100644
--- a/runtime/observatory/tests/service/next_through_simple_async_with_returns_test.dart
+++ b/runtime/observatory/tests/service/next_through_simple_async_with_returns_test.dart
@@ -31,6 +31,7 @@
   "$file:${LINE_A+1}:16", // on 'File'
   "$file:${LINE_A+2}:25", // on 'exists'
   "$file:${LINE_A+2}:17", // on 'await'
+  "$file:${LINE_A+2}:15", // on '='
   "$file:${LINE_A+4}:5" // on 'return'
 ];
 
diff --git a/runtime/observatory/tests/service/step_through_for_each_sync_star_2_test.dart b/runtime/observatory/tests/service/step_through_for_each_sync_star_2_test.dart
index 8eed4c1..8495d65 100644
--- a/runtime/observatory/tests/service/step_through_for_each_sync_star_2_test.dart
+++ b/runtime/observatory/tests/service/step_through_for_each_sync_star_2_test.dart
@@ -34,6 +34,7 @@
   "$file:${LINE + 9}:3", // on yield
 
   "$file:${LINE + 1}:38", // on '{' in 'for' line
+  "$file:${LINE + 1}:12", // on 'datapoint'
   "$file:${LINE + 2}:5", // on 'print'
   "$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
 
@@ -42,6 +43,7 @@
   "$file:${LINE + 10}:3", // on yield
 
   "$file:${LINE + 1}:38", // on '{' in 'for' line
+  "$file:${LINE + 1}:12", // on 'datapoint'
   "$file:${LINE + 2}:5", // on 'print'
   "$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
 
diff --git a/runtime/observatory/tests/service/step_through_for_each_sync_star_test.dart b/runtime/observatory/tests/service/step_through_for_each_sync_star_test.dart
index b390dcf..f36a1e2 100644
--- a/runtime/observatory/tests/service/step_through_for_each_sync_star_test.dart
+++ b/runtime/observatory/tests/service/step_through_for_each_sync_star_test.dart
@@ -35,6 +35,7 @@
   "$file:${LINE + 9}:3", // on yield
 
   "$file:${LINE + 1}:38", // on '{' in 'for' line
+  "$file:${LINE + 1}:12", // on 'datapoint'
   "$file:${LINE + 2}:5", // on 'print'
   "$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
 
@@ -43,6 +44,7 @@
   "$file:${LINE + 11}:3", // on yield
 
   "$file:${LINE + 1}:38", // on '{' in 'for' line
+  "$file:${LINE + 1}:12", // on 'datapoint'
   "$file:${LINE + 2}:5", // on 'print'
   "$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
 
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index 8fa5799..7298854 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -1148,8 +1148,7 @@
   if (definition->IsAllocateObject()) {
     return !definition->AsAllocateObject()->closure_function().IsNull();
   }
-  return definition->IsLoadLocal() &&
-         !definition->AsLoadLocal()->local().IsInternal();
+  return definition->IsLoadLocal();
 }
 
 Fragment FlowGraphBuilder::DebugStepCheck(TokenPosition position) {