ABCL on jailbroken iPhone
Vibhu Mohindra
vibhu.mohindra at gmail.com
Wed Aug 12 11:57:05 UTC 2015
My jailbroken iPhone has GNU classpath[0] and jamvm[1] installed.
To get ABCL working with GNU classpath, I needed to patch two of
classpath's classes as below.
I patched and built classpath in a Linux VM, then extracted the two
class files from the resulting glibj.zip and inserted them into the
iPhone's /usr/share/classpath/glibj.zip .
I've reported these modifications to:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67188
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67189
the latter of which may be an ABCL problem, not a GNU classpath one.
(Performance: The ABCL REPL takes a few minutes to appear, but things
look good when it does.)
ref:
[0] http://www.gnu.org/software/classpath/
[1] http://jamvm.sourceforge.net/
Vibhu
diff -Naur classpath-0.99/java/math/BigInteger.java
classpath-0.99.abcl/java/math/BigInteger.java
--- classpath-0.99/java/math/BigInteger.java 2010-09-02
17:47:07.000000000 +0100
+++ classpath-0.99.abcl/java/math/BigInteger.java 2015-08-11
02:01:18.000000000 +0100
@@ -183,6 +183,7 @@
int i, digit;
boolean negative;
byte[] bytes;
+ if (len == 0) throw new NumberFormatException("zero length big
integer");
char ch = s.charAt(0);
if (ch == '-')
{
diff -Naur classpath-0.99/java/nio/charset/CharsetEncoder.java
classpath-0.99.abcl/java/nio/charset/CharsetEncoder.java
--- classpath-0.99/java/nio/charset/CharsetEncoder.java 2010-06-03
20:13:04.000000000 +0100
+++ classpath-0.99.abcl/java/nio/charset/CharsetEncoder.java 2015-08-12
12:16:13.000000000 +0100
@@ -159,8 +159,6 @@
// in progress" and also that "it resets this Encoder".
// Should we check to see that the state is reset, or should we
// call reset()?
- if (state != STATE_RESET)
- throw new IllegalStateException ();
// REVIEW: Using max instead of average may allocate a very large
// buffer. Maybe we should do something more efficient?
@@ -199,9 +197,6 @@
// a return value indicating an incomplete decoding operation"
// XXX: We will not check the previous return value, just
// that the previous call passed true for endOfInput
- if (state != STATE_RESET && state != STATE_CODING
- && !(endOfInput && state == STATE_END))
- throw new IllegalStateException ();
state = newState;
for (;;)
More information about the armedbear-devel
mailing list