-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhanced switch v2.0 - Part I (#3310)
* Reimplement resolution, analysis and bookkeeping involved with `CaseStatement` and resolution of `SwitchStatement` for a streamlined and cleaner implementation resulting in readily obvious control flow and minimization of state. * Report non-constant label expressions during resolution rather than waiting for flow analysis phase. * Change how duplicate label expressions are reported. Don't blame the whole case, just the duplicate expression; Don't blame the original, just the duplicate. * Represent qualified enumerators with qualified names internally so to avoid name clashes * Eliminate the hack to inject synthetic `BreakStatement` in label rule switch blocks. Enhance the code generator to handle these explicitly. * Simplify the implementation of SwitchStatement.getFallThroughState correcting various issues. * Eliminate the unnecessary vector `SwitchStatement.constMapping` that is passed to `org.eclipse.jdt.internal.compiler.codegen.CodeStream.tableswitch` - constanMapping[i] == i always! * Enable various tests in `PrimitiveInPatternsTest.java` that were disabled, fixing broken tests; Remove their disabled cousins from `PrimitiveInPatternsTestSH.java` * Add a disabled regression test for #3319 (not yet understood/fixed) * Numerous defect fixes as listed below * Fixes #3336 * Fixes #3318 * Fixes #3320 * Fixes #3321 * Fixes #3334 * Fixes #3335 * Fixes #3265 * Fixes #3169 * Fixes #3339 * Fixes #3337 * Fixes #3344
- Loading branch information
1 parent
2fe0af3
commit a589ad2
Showing
31 changed files
with
1,236 additions
and
1,391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.