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
Boolean.booleanValue() and other calls that are devirtualized should also be devirtualized in JSNI #9356
Comments
Yes. That needs to be banned as we do for all JSOs. |
Its the same as with Double, see #9242 |
Methods that are devirtualized or require trampoline dispatch are not supported in JSNI. Bug: gwtproject#9356 Bug-Link: http://github.com/gwtproject/gwt/issues/9356 Change-Id: I3b4ccee4ef158be3b87ce16cddfbade2cfd65446
A couple of patches related to this bug are up for review Improvements to the jsni restriction error reporting - https://gwt-review.googlesource.com/#/c/15120 |
Does this mean that it would work in the way I suggested in #9242, i.e. that |
Yes. I had to enhance the Devirtualizer to undestand the JS AST; almost all of GWT's Java AST passes it do not deal at all with the JS AST in JSNI, but only use some summary information to know which methods, fields, classliterals are referenced there. But it turned out to be a quite straight forward to add to the Devritualizer. Thanks for the suggestion. |
Bug: gwtproject#9356 Bug-Link: http://github.com/gwtproject/gwt/issues/9356 Change-Id: Ifbb582be9612e323a1a2e6e72a06bdcf813a9f1d
Only disallow taking references to devirtualized methods but allow invocations. Bug: gwtproject#9356 Bug-Link: http://github.com/gwtproject/gwt/issues/9356 Change-Id: I98d3248aedc705439db737b2d13e5bbe28469b5f
compiles to
value_0.booleanValue()
, which doesn't work sincevalue_0
is a native JS boolean that doesn't have a member namedbooleanValue
.Tested with the 2.8.0-beta1 and 2.8.0-SNAPSHOT.
The text was updated successfully, but these errors were encountered: