[Kaffe] memset in javacall.c on mips platform

2005-09-23 Thread ColinYen
Hi,All:

I run kaffe(1.1.X_CVS_20050930) on mips platform.
If Kaffe(intrp) run memset(call.args, 0,
(METHOD_NARGS(meth)+engine_reservedArgs(meth)+2)*(sizeof(jvalue)+2));
in KaffeVM_callMethodA in kaffe/kaffevm/javacall.c, system get
error message.
I find Can't access bad memory exception.

message:
Internal error: caught an unexpected exception.
Please check your CLASSPATH and your installation.
java/lang/NullPointerException
  at java.lang.Object.getClass (Object.java:331)
  at java.security.Permissions.add (Permissions.java:112)

But I remove statement memset(call.args, 0,
(METHOD_NARGS(meth)+engine_reservedArgs(meth)+2)*(sizeof(jvalue)+2));
Kaffe can run correctly.

I don't know what's happen? Please help me.

Thank a lot.

Colin Yen

___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] Using Kaffe with Nano-X engine

2005-09-23 Thread Gianluca Moro
Hi all,

I'm trying to compile Kaffe on a MIPS embedded
system with Nano-X as graphical library.

The compilation was done with

./configure --with-jikes=no --with-engine=intrp 
--enable-pure-java-math --without-esd --without-kaffe-x-awt
--with-kaffe-nanox-awt --with-jikes=no
--with-rt-jar=/home/AMDgiammy/kaffe-1.1.6/libraries/javalib/rt.jar
--without-classpath-gtk-awt

Now I correctly execute java programs with textual output,
but when I try a graphical Hello World test,
I get:
java.awt.AWTError: Cannot load AWT toolkit:
gnu.java.awt.peer.gtk.GtkToolkit

It seems kaffe try to use X (non present), but I have
not found where to tell it to use Nano-X!

Can someone give me a pointer to some configuration or steps
I must accomplish 
to make kaffe execute graphical programs on Nano-X?

thanx
giammy



--
Gianluca Moro Visit  http://ilpinguino.altervista.org/
[EMAIL PROTECTED]  MyBlog http://blog.libero.it/giangiammy/



__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] Using Kaffe with Nano-X engine

2005-09-23 Thread Dalibor Topic
Gianluca Moro wrote:
 Hi all,
 
 I'm trying to compile Kaffe on a MIPS embedded
 system with Nano-X as graphical library.
 
 The compilation was done with
 
 ./configure --with-jikes=no --with-engine=intrp 
 --enable-pure-java-math --without-esd --without-kaffe-x-awt
 --with-kaffe-nanox-awt --with-jikes=no
 --with-rt-jar=/home/AMDgiammy/kaffe-1.1.6/libraries/javalib/rt.jar
 --without-classpath-gtk-awt
 
 Now I correctly execute java programs with textual output,
 but when I try a graphical Hello World test,
 I get:
 java.awt.AWTError: Cannot load AWT toolkit:
 gnu.java.awt.peer.gtk.GtkToolkit
 
 It seems kaffe try to use X (non present), but I have
 not found where to tell it to use Nano-X!
 
 Can someone give me a pointer to some configuration or steps
 I must accomplish 
 to make kaffe execute graphical programs on Nano-X?

Ciao gianluca,

try kaffe -Xkaffe-nanox-awt HelloWorld. :)

I'll add that to the documentation in FAQ/FAQ.awt. Thanks for the bug
report.

ciao,
dalibor topic

___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] CVS kaffe (gb): libraries/clib/fdlibm/: Such an ancient code assumed long as a

2005-09-23 Thread Kaffe CVS
PatchSet 6930 
Date: 2005/09/23 16:31:52
Author: gb
Branch: HEAD
Tag: (none) 
Log:
* libraries/clib/fdlibm/: Such an ancient code assumed long as a
32-bit word value, thus changing its occurrences to int.

Fixes DoublePrint test on 64-bit platforms.

Members: 
ChangeLog:1.4452-1.4453 
libraries/clib/fdlibm/dtoa.c:1.3-1.4 
libraries/clib/fdlibm/mprec.c:1.3-1.4 
libraries/clib/fdlibm/mprec.h:1.5-1.6 
libraries/clib/fdlibm/strtod.c:1.3-1.4 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4452 kaffe/ChangeLog:1.4453
--- kaffe/ChangeLog:1.4452  Thu Sep 22 20:20:43 2005
+++ kaffe/ChangeLog Fri Sep 23 16:31:52 2005
@@ -1,3 +1,10 @@
+2005-09-23  Gwenole Beauchesne  [EMAIL PROTECTED]
+
+   * libraries/clib/fdlibm/: Such an ancient code assumed long as a
+   32-bit word value, thus changing its occurrences to int.
+
+   Fixes DoublePrint test on 64-bit platforms.
+
 2005-09-22  Guilhem Lavaux  [EMAIL PROTECTED]
 
* kaffe/kaffevm/kaffe-gc/gc-incremental.c
Index: kaffe/libraries/clib/fdlibm/dtoa.c
diff -u kaffe/libraries/clib/fdlibm/dtoa.c:1.3 
kaffe/libraries/clib/fdlibm/dtoa.c:1.4
--- kaffe/libraries/clib/fdlibm/dtoa.c:1.3  Tue May 31 21:18:30 2005
+++ kaffe/libraries/clib/fdlibm/dtoa.c  Fri Sep 23 16:31:53 2005
@@ -35,12 +35,12 @@
_Jv_Bigint * b _AND _Jv_Bigint * S)
 {
   int n;
-  long borrow, y;
-  unsigned long carry, q, ys;
-  unsigned long *bx, *bxe, *sx, *sxe;
+  int borrow, y;
+  unsigned int carry, q, ys;
+  unsigned int *bx, *bxe, *sx, *sxe;
 #ifdef Pack_32
-  long z;
-  unsigned long si, zs;
+  int z;
+  unsigned int si, zs;
 #endif
 
   n = S-_wds;
@@ -145,7 +145,7 @@
 print (_Jv_Bigint * b)
 {
   int i, wds;
-  unsigned long *x, y;
+  unsigned int *x, y;
   wds = b-_wds;
   x = b-_x+wds;
   i = 0;
@@ -249,10 +249,10 @@
 k_check, leftright, m2, m5, s2, s5, try_quick;
   int ilim = 0, ilim1 = 0, spec_case = 0;
   union double_union d, d2, eps;
-  long L;
+  int L;
 #ifndef Sudden_Underflow
   int denorm;
-  unsigned long x;
+  unsigned int x;
 #endif
   _Jv_Bigint *b, *b1, *delta, *mlo = NULL, *mhi, *S;
   double ds;
@@ -441,8 +441,8 @@
 default:
   break;
 }
-  j = sizeof (unsigned long);
-  for (ptr-_result_k = 0; (int) (sizeof (_Jv_Bigint) - sizeof (unsigned 
long)) + j = i;
+  j = sizeof (unsigned int);
+  for (ptr-_result_k = 0; (int) (sizeof (_Jv_Bigint) - sizeof (unsigned int)) 
+ j = i;
j = 1)
 ptr-_result_k++;
   ptr-_result = Balloc (ptr, ptr-_result_k);
Index: kaffe/libraries/clib/fdlibm/mprec.c
diff -u kaffe/libraries/clib/fdlibm/mprec.c:1.3 
kaffe/libraries/clib/fdlibm/mprec.c:1.4
--- kaffe/libraries/clib/fdlibm/mprec.c:1.3 Tue May 31 21:18:30 2005
+++ kaffe/libraries/clib/fdlibm/mprec.c Fri Sep 23 16:31:54 2005
@@ -120,7 +120,7 @@
 void
 _DEFUN (Bfree, (ptr, v), struct _Jv_reent *ptr _AND _Jv_Bigint * v)
 {
-  long i;
+  int i;
 
   i = v - ptr-_freelist;
 
@@ -139,9 +139,9 @@
int a)
 {
   int i, wds;
-  unsigned long *x, y;
+  unsigned int *x, y;
 #ifdef Pack_32
-  unsigned long xi, z;
+  unsigned int xi, z;
 #endif
   _Jv_Bigint *b1;
 
@@ -184,11 +184,11 @@
_CONST char *s _AND
int nd0 _AND
int nd _AND
-   unsigned long y9)
+   unsigned int y9)
 {
   _Jv_Bigint *b;
   int i, k;
-  long x, y;
+  int x, y;
 
   x = (nd + 8) / 9;
   for (k = 0, y = 1; x  y; y = 1, k++);
@@ -220,7 +220,7 @@
 
 int
 _DEFUN (hi0bits,
-   (x), register unsigned long x)
+   (x), register unsigned int x)
 {
   register int k = 0;
 
@@ -254,10 +254,10 @@
 }
 
 int
-_DEFUN (lo0bits, (y), unsigned long *y)
+_DEFUN (lo0bits, (y), unsigned int *y)
 {
   register int k;
-  register unsigned long x = *y;
+  register unsigned int x = *y;
 
   if (x  7)
 {
@@ -319,10 +319,10 @@
 {
   _Jv_Bigint *c;
   int k, wa, wb, wc;
-  unsigned long carry, y, z;
-  unsigned long *x, *xa, *xae, *xb, *xbe, *xc, *xc0;
+  unsigned int carry, y, z;
+  unsigned int *x, *xa, *xae, *xb, *xbe, *xc, *xc0;
 #ifdef Pack_32
-  unsigned long z2;
+  unsigned int z2;
 #endif
 
   if (a-_wds  b-_wds)
@@ -450,7 +450,7 @@
 {
   int i, k1, n, n1;
   _Jv_Bigint *b1;
-  unsigned long *x, *x1, *xe, z;
+  unsigned int *x, *x1, *xe, z;
 
 #ifdef Pack_32
   n = k  5;
@@ -508,7 +508,7 @@
 int
 _DEFUN (cmp, (a, b), _Jv_Bigint * a _AND _Jv_Bigint * b)
 {
-  unsigned long *xa, *xa0, *xb, *xb0;
+  unsigned int *xa, *xa0, *xb, *xb0;
   int i, j;
 
   i = a-_wds;
@@ -541,10 +541,10 @@
 {
   _Jv_Bigint *c;
   int i, wa, wb;
-  long borrow, y;  /* We need signed shifts here. */
-  unsigned long *xa, *xae, *xb, *xbe, *xc;
+  int borrow, y;   /* We need signed shifts here. */
+  unsigned int *xa, *xae, *xb, *xbe, *xc;
 #ifdef Pack_32
-  long z;
+  int z;
 #endif
 
   i = cmp (a, b);
@@ -623,7 +623,7 @@
 _DEFUN (ulp, (_x), double _x)
 {
   union double_union x, a;
-  register long L;
+  register int L;
 
   x.d = _x;
 
@@ -669,11 +669,11 @@
 _DEFUN (b2d, (a, e),
_Jv_Bigint * a