-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Use of newer Java methods fail on Android #2982
Comments
Your mean the IR JIT, right? The bit that compiles AST to IR is still needed as there's no way to execute an AST any more is there? Are the IR optimisations part of the IR compiler? You might want those anyway. |
The change on the branch is minimal. I am still exploring the code to find where the boundaries are. Pretty fuzzy boundaries so far :) Without solving this issue, I won't get any error messages :( |
The following line triggered the error: https://github.com/ruboto/ruboto/blob/master/assets/src/org/ruboto/JRubyAdapter.java#L310 Changing the puts to It then fails on this: https://gist.github.com/donv/1836c1a4707c508038dc So I guess I removed too much. The "Compiler" is needed, but the JitCompiler should be removed, but the Compiler loads MethodHandle... |
@donv FYI, the link you supplied was to ruboto master and the JRubyAdapter.java file changed since then. Line 310 is currently a blank line. You may want to update the link to a known revision. |
Hi!
I have made a branch for not loading the IR compiler when setting compile mode OFF (or truffle).
https://github.com/jruby/jruby/tree/test-optional_compiler
It seems to do the job, but when running JRuby 9000 master on Android (Ruboto), I get an error in Kernel#puts:
https://gist.github.com/donv/9896b7c3890d34726efa
The source for the failing line is here:
https://github.com/android/platform_frameworks_base/blob/master/core/java/com/android/internal/os/LoggingPrintStream.java#L64
I have not found exactly how it fails, but my guess is that LoggingPrintStream implements all known methods for PrintStream for Java 6, but JRuby 9K uses a method for Java 7 or later that then falls through to OutputStream#write which throws an AssertionError.
My guess it is
org.jruby.util.io.PosixShim.write(PosixShim.java:92)
I guess JRuby can be made to have different behaviour under Android...
Any help with this is appreciated.
The text was updated successfully, but these errors were encountered: