Files
sdk/pkg/dev_compiler/lib
Nate Biggs d621ed9782 [ddc] Fix handling of continues in switch statements with labeled continues.
Tested with test case outlined in bug below. This should be tested via Lasse's tests when he lands them.

For slightly more context we compile code like this:
do {
  switch (y) {
    case 1:
      continue L1;
    L1:
    case 2:
      continue;
  }
} while (x);

into something like this:
do {
  while (true) {
    var labelState = y;
    switch (labelState) {
      case 1:
        labelState = 2;
      case 2:
        continue; // <-- This now only continues the while (true).
    }
  }
} while (x);

Bug: https://github.com/dart-lang/sdk/issues/59593
Change-Id: I9b343fd918e48cb44b65e90eab39d70fca4758d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397105
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2024-11-22 22:18:41 +00:00
..