Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master to beta java24 #3315

Merged
merged 14 commits into from
Nov 15, 2024

Conversation

mpalat
Copy link
Contributor

@mpalat mpalat commented Nov 15, 2024

What it does

How to test

Author checklist

srikanth-sankaran and others added 14 commits November 8, 2024 15:50
* Restructure switch expressions grammar aligning it with JLS terminology; Eliminate unnecessary calls outs from the automaton (-> instead of ::=); fold multiple consume rules into one by parameterizing; delete dangling non-terminals (ThrowExpression ...); deduplicate unnecessary distinct non-terminals (e.g `SwitchLabelExpr` vs `SwitchLabel` ...) 
* Replace the pair of tokens, first the synthetic `BeginCaseExpr` followed by '->' in switch rules with a single synthetic `CaseArrow`. The scanner will disambiguate whether a  token '->' is `TokenNameARROW` used in lambdas or is a `CaseArrow` used in switch rules by checking if the automaton will shift  `CaseArrow` or not. 
* DiagnoseParser's repair of a misclassified '->' will allow it to recover perfectly! Just suppressing the message will do.
* Get rid of code engaging `VanguardParser` in reconnaissance missions for `yield` and '->' disambiguation.
* Eliminate feedback from Parser to Scanner on co-ordinates of the case statement
* Eliminate feedforward from Parser to SwitchStatement on whether it contains patterns, nulls etc; Let Switch discover it's self by itself :)
* Declutter `SwitchStatement.resolve()` by simplifying control flow; streamline management of secrets; 
* Delete `SelectionParserTest12.java` as it is fully duplicated by `SelectionParserTest13.java`; Rename the latter to `SelectionParserTest14.java` and ensure it runs in the right compliance mode. Hook up this dangling junit to a parent
* Tweak a failing test case in `PrimitiveInPatternsTestSH.java` to work around a bug elsewhere that was masked so far. eclipse-jdt#3265 raised as follow up.
* Adjust a few tests that result in altered diagnostics due to grammar refactoring
* Adjust test in `FormatterRegressionTests.java`  and `ResolveTests12To15.java` to run at the right compliance levels
eclipse-jdt#2699)

Introduce a new strategy (enabled by opt-in
CompilationUnit.DOM_BASED_OPERATIONS flag) which, instead of
using the ECJ-derived parser, uses ASTParser to create a DOM and then
turns the DOM into a JavaModel structure.

This has the benefit of:
* Simplifying the code as an crawling DOM is usually simpler than
dealing with lower-level parser
* allowing other parsers as backend if ASTParser is configured for it
…cks (eclipse-jdt#3281)

* This has been disabled more than a decade ago!
* use Set<String>
* cache a unmodifiable copy
* simplify PackageCacheEntry to record
* add missing final/volatile modifiers
* remove ClasspathJrt.PackageCache (only module names had been used)
* don't calculate unused location of module.info
* remove closeZipFileAtEnd (was always true when zipfile!=null)

eclipse-jdt#3250
And remove duplicate code in
ClasspathJrtWithReleaseOption.getModuleNames()
@mpalat mpalat merged commit ec39498 into eclipse-jdt:BETA_JAVA24 Nov 15, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants