-
Notifications
You must be signed in to change notification settings - Fork 142
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
Double-check bytecode differences due to #3191 #3649
Comments
@srikanth-sankaran do you have a minute to double-check my understanding? Class Since in BETA_JAVA24 we avoid Is this sound reasoning? |
The second class with differences can be reduced to
Now the context of the local class is no longer static. For a moment I figured that this would break once we enable the lines in comments requiring access to the enclosing instance. But even without the lambda method, the enclosing instance is passed into the constructor alright. The need to do so is detected using Here's the relevant byte code portion when compiled with BETA_JAVA24:
In both examples javac does create a lambda method, but these don't seem to add any value. |
Sounds reasonable to me. However this has been a frustrating area in my experience to exactly and consistently pin down things. I have seen some back and forth in both compilers - no ready references to all tickets unfortunately but here is one: |
I boldly take this as approval :) -- in particular because my question was not about error reporting, but about code gen - although of course both parts rely on some common logic in the compiler. |
Y-builds show a difference between class files as reported in eclipse-platform/eclipse.platform.releng.aggregator#2793 (comment)
I reduced one of the affected classes to this:
In master the constructor reference
ProviderImpl::new
creates these bytes:Whereas in JAVA_BETA24 we no longer create the lambda method but directly emit:
The change is brought in by #3198
The text was updated successfully, but these errors were encountered: