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

ios13_postfix#3: compiler, fix for exception on JVM bridged methods with @Bridge annotation #422

Merged

Conversation

dkimitsa
Copy link
Contributor

this PR adds logic to skip bridged synthetic JVM methods added by compiler to handle overridden covariant return type methods. This fixes compiler exception while compiling NWTxtRecord class:

java.lang.IllegalArgumentException: @Bridge annotated method <org.robovm.apple.network.NWTxtRecord: org.robovm.apple.foundation.NSObject copy()> must be native
	at org.robovm.compiler.BridgeMethodCompiler.validateBridgeMethod(BridgeMethodCompiler.java:87)
	at org.robovm.compiler.BridgeMethodCompiler.doCompile(BridgeMethodCompiler.java:233)

…to handle overridden covariant return type methods. This fixes compiler exception while compiling `NWTxtRecord` class:

java.lang.IllegalArgumentException: @bridge annotated method <org.robovm.apple.network.NWTxtRecord: org.robovm.apple.foundation.NSObject copy()> must be native
	at org.robovm.compiler.BridgeMethodCompiler.validateBridgeMethod(BridgeMethodCompiler.java:87)
	at org.robovm.compiler.BridgeMethodCompiler.doCompile(BridgeMethodCompiler.java:233)
@dkimitsa
Copy link
Contributor Author

more details in post

@Tom-Ski Tom-Ski merged commit 2ba7986 into MobiVM:jdk12 Nov 7, 2019
@dkimitsa dkimitsa deleted the cocoa13_postfix4_bridged_synthetic_covariants branch November 8, 2019 10:45
dkimitsa added a commit to dkimitsa/robovm that referenced this pull request Dec 17, 2019
…bridge is able to build now. But it crashes runtime as CLASS INFO structure is corrupted.

Root case for this: bridge pointer is not added(as result of MobiVM#422) but MI_BRO_BRIDGE is added to method flags. This flags makes runtime to expect the pointer but it missing and entire class struct is shifted and missread into crash
Tom-Ski pushed a commit that referenced this pull request Jan 10, 2020
* * jetbrains intellij plugin for gradle version updated

* * intellij maven pom reworked into stand-alone. as mvn:version is not able to update parent version number

* * added sonatype repo for snapshot dependencies

* * eclipse plugin's maven.pom switched into standalone (without) as tyho plugin is not able update parent's version during release

* * release script reworked to properly pick up new idea artifact and update it gradle version

* * Idea: release script updated to use property to specify the dependencies. otherview version:commit failed to pick up non existing dependencies (for future version)

* * as result of #422 covariant return type methods annotated by @bridge is able to build now. But it crashes runtime as CLASS INFO structure is corrupted.
Root case for this: bridge pointer is not added(as result of #422) but MI_BRO_BRIDGE is added to method flags. This flags makes runtime to expect the pointer but it missing and entire class struct is shifted and missread into crash
dkimitsa added a commit to dkimitsa/robovm that referenced this pull request Apr 9, 2020
…to handle overridden covariant return type methods. This fixes compiler exception while compiling `NWTxtRecord` class: (MobiVM#422)

java.lang.IllegalArgumentException: @bridge annotated method <org.robovm.apple.network.NWTxtRecord: org.robovm.apple.foundation.NSObject copy()> must be native
	at org.robovm.compiler.BridgeMethodCompiler.validateBridgeMethod(BridgeMethodCompiler.java:87)
	at org.robovm.compiler.BridgeMethodCompiler.doCompile(BridgeMethodCompiler.java:233)
dkimitsa added a commit to dkimitsa/robovm that referenced this pull request Apr 9, 2020
* * jetbrains intellij plugin for gradle version updated

* * intellij maven pom reworked into stand-alone. as mvn:version is not able to update parent version number

* * added sonatype repo for snapshot dependencies

* * eclipse plugin's maven.pom switched into standalone (without) as tyho plugin is not able update parent's version during release

* * release script reworked to properly pick up new idea artifact and update it gradle version

* * Idea: release script updated to use property to specify the dependencies. otherview version:commit failed to pick up non existing dependencies (for future version)

* * as result of MobiVM#422 covariant return type methods annotated by @bridge is able to build now. But it crashes runtime as CLASS INFO structure is corrupted.
Root case for this: bridge pointer is not added(as result of MobiVM#422) but MI_BRO_BRIDGE is added to method flags. This flags makes runtime to expect the pointer but it missing and entire class struct is shifted and missread into crash
dkimitsa added a commit to dkimitsa/robovm that referenced this pull request Apr 9, 2020
…to handle overridden covariant return type methods. This fixes compiler exception while compiling `NWTxtRecord` class: (MobiVM#422)

java.lang.IllegalArgumentException: @bridge annotated method <org.robovm.apple.network.NWTxtRecord: org.robovm.apple.foundation.NSObject copy()> must be native
	at org.robovm.compiler.BridgeMethodCompiler.validateBridgeMethod(BridgeMethodCompiler.java:87)
	at org.robovm.compiler.BridgeMethodCompiler.doCompile(BridgeMethodCompiler.java:233)
dkimitsa added a commit to dkimitsa/robovm that referenced this pull request Apr 9, 2020
* * jetbrains intellij plugin for gradle version updated

* * intellij maven pom reworked into stand-alone. as mvn:version is not able to update parent version number

* * added sonatype repo for snapshot dependencies

* * eclipse plugin's maven.pom switched into standalone (without) as tyho plugin is not able update parent's version during release

* * release script reworked to properly pick up new idea artifact and update it gradle version

* * Idea: release script updated to use property to specify the dependencies. otherview version:commit failed to pick up non existing dependencies (for future version)

* * as result of MobiVM#422 covariant return type methods annotated by @bridge is able to build now. But it crashes runtime as CLASS INFO structure is corrupted.
Root case for this: bridge pointer is not added(as result of MobiVM#422) but MI_BRO_BRIDGE is added to method flags. This flags makes runtime to expect the pointer but it missing and entire class struct is shifted and missread into crash
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.

2 participants