Re: [kaffe] kaffe 1.1.4: gnu.classpath.Configuration.CLASSPATH_VERSION

2004-03-15 Thread Holger Schurig
Here is a patch to fix this, it's against current CVS:

PS: I patched only configure.in. Because configure is in CVS, too, it 
should be regenerated. And, oh, Configuration.java could/should be 
removed from CVS now.

-- 
MN-Logistik GmbH http://www.mn-logistik.de
Holger Schurig
Dieselstr. 18
61191 Rosbach v.d.Höhe
Tel: (+49) 6003 9141 0   Fax: (+49) 6003 9141 49

#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#

--- head/configure.in~classpathversion
+++ head/configure.in
@@ -1739,6 +1739,7 @@
 AC_CONFIG_FILES([kaffe/scripts/bat/Makefile])
 AC_CONFIG_FILES([kaffe/scripts/compat/Makefile])
 AC_CONFIG_FILES([libraries/javalib/Makefile])
+AC_CONFIG_FILES([libraries/javalib/gnu/classpath/Configuration.java])
 AC_CONFIG_FILES([libraries/clib/Makefile])
 AC_CONFIG_FILES([libraries/clib/native/Makefile])
 AC_CONFIG_FILES([libraries/clib/io/Makefile])
--- /dev/null
+++ head/libraries/javalib/gnu/classpath/Configuration.java.in
@@ -0,0 +1,108 @@
+/* gnu.classpath.Configuration
+   Copyright (C) 1998, 2001, 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath;
+
+/**
+ * This file defines compile-time constants that can be accessed by
+ * java code. It is pre-processed by configure.  
+ */
+public interface Configuration
+{
+  /**
+   * The value of CLASSPATH_HOME is the location that the classpath
+   * libraries and support files where installed in. It is set according to
+   * the argument for --prefix given to configure and used to set the
+   * System property gnu.classpath.home.
+   */
+  String CLASSPATH_HOME = @prefix@;
+
+  /**
+   * The release version number of GNU Classpath.
+   * It is set according to the value of 'version' in the configure[.in] file
+   * and used to set the System property gnu.classpath.version.
+   */
+  String CLASSPATH_VERSION = @VERSION@;
+
+  /**
+   * The value of DEBUG is substituted according to whether the
+   * --enable-debug argument was passed to configure. Code
+   * which is made conditional based on the value of this flag - typically 
+   * code that generates debugging output - will be removed by the optimizer 
+   * in a non-debug build.
+   */
+  boolean DEBUG = false;
+
+  /**
+   * The value of LOAD_LIBRARY is substituted according to whether the
+   * --enable-load-library or --disable-load-library argument was passed 
+   * to configure.  By default, configure should define this is as true.
+   * If set to false, loadLibrary() calls to load native function
+   * implementations, typically found in static initializers of classes
+   * which contain native functions, will be omitted.  This is useful for
+   * runtimes which pre-link their native function implementations and do
+   * not require additional shared libraries to be loaded.
+   */
+  boolean INIT_LOAD_LIBRARY = true;
+
+  /**
+   * Set to true if the VM provides a native method to implement
+   * Proxy.getProxyClass completely, including argument verification.
+   * If this is true, HAVE_NATIVE_GET_PROXY_DATA and
+   * HAVE_NATIVE_GENERATE_PROXY_CLASS should be false.
+   * @see java.lang.reflect.Proxy
+   */
+  boolean HAVE_NATIVE_GET_PROXY_CLASS = false;
+
+  /**
+   * Set to true if the VM provides a native method to implement
+   * the first part of Proxy.getProxyClass: generation of the array
+   * 

[kaffe] OpenBSD unexpected exception during classpath build

2004-03-15 Thread Riccardo
Hey,

I tried again building OpenBSD/sparc kaffe libraries (I didn't modify 
anything, since I suspected the last problem to be system related and 
not kaffe).

Right now it builds for quite some time and then ends this way:

[optimized and generated java.util.Collection in 238 ms]
Internal error: caught an unexpected exception.
Please check your CLASSPATH and your installation
java/lang/NullPointerException
Abort (core dumped)


nice, eh? also to try checking installation when I am still building :)

-R


___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] Use swing with Kaffe

2004-03-15 Thread bart59
Hello,
How can I use swing with kaffe ?

I have the java 1.4 from sun also installed,
but when I run my application:
kaffe myapp 
It cant find any swing component (jframe or jdialog)


thanks dor your help!

Bart


___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] BUG: dummy

2004-03-15 Thread Dalibor Topic
Hi Guy,

Guy McArthur wrote:
This is not a true bug, but nonetheless the word dummy in the 
unavailable options of appletviewer is a pretty silly, poor UI choice. 
Why not just have them greyed-out if they are not available?
Good question. The Appletviewer would need someone to give it some care, 
and make it more useable.

So, it would be nice if you could take a look at the code is in 
libraries/javalib/kaffe/applet/AppletViewer.java, and try to fix the 
silly stuff, if you've got some time [1].

cheers,
dalibor topic
[1] Just make sure that you're not 'tainted', i.e. have looked at Sun's 
sources, decompiled them, or signed an NDA that would prevent you from 
contributing. We're a clean-room effort, and want to avoid someone 
pulling an SCO on us.

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] Use swing with Kaffe

2004-03-15 Thread Dalibor Topic
Salut Bart,

[EMAIL PROTECTED] wrote:
Hello,
How can I use swing with kaffe ?
I have the java 1.4 from sun also installed,
but when I run my application:
kaffe myapp 
It cant find any swing component (jframe or jdialog)
there are 3 possibilities:

a) Take swing 1.1.1 from sun and put it in your CLASSPATH. See 
FAQ/FAQ.awt for details.

b) Try to get SwingWT working with Kaffe. SwingWT is an implementation 
of Swing over SWT, the toolkit used by Eclipse.

c) Help out with the AWT merge from GNU Classpath, which includes the 
beginnings of a free software Swing implementation.

cheers,
dalibor topic
___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] CVS kaffe (dalibor): Poll for POLLHUP, too

2004-03-15 Thread Kaffe CVS
PatchSet 4519 
Date: 2004/03/15 14:19:43
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Poll for POLLHUP, too

2004-03-15  Dalibor Topic [EMAIL PROTECTED]

* kaffe/kaffevm/systems/unix-jthreads/jthread.c:
Poll for POLLHUP, too, since some systems only set
PULLHUP on EOF.

Members: 
ChangeLog:1.2097-1.2098 
kaffe/kaffevm/systems/unix-jthreads/jthread.c:1.108-1.109 
libltdl/config-h.in:1.13-1.14 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2097 kaffe/ChangeLog:1.2098
--- kaffe/ChangeLog:1.2097  Sat Mar 13 17:41:56 2004
+++ kaffe/ChangeLog Mon Mar 15 14:19:43 2004
@@ -1,3 +1,9 @@
+2004-03-15  Dalibor Topic [EMAIL PROTECTED]
+
+   * kaffe/kaffevm/systems/unix-jthreads/jthread.c:
+   Poll for POLLHUP, too, since some systems only set
+   PULLHUP on EOF.
+
 2004-03-13  Dalibor Topic [EMAIL PROTECTED]
 
* config/m68k/jit.h:
Index: kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c
diff -u kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c:1.108 
kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c:1.109
--- kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c:1.108   Thu Mar 11 16:00:08 
2004
+++ kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c Mon Mar 15 14:19:44 2004
@@ -2109,7 +2109,11 @@
for (nfd = 0, i = 0; i = maxFd; i++) {
short ev = 0;
if (readQ[i] != 0) {/* FD_ISSET(i, readsPending) */
-   ev |= POLLIN;
+   /* Check for POLLIN and POLLHUP for portability.
+* Some poll(2) implementations return POLLHUP
+* on EOF.
+*/
+   ev |= POLLIN | POLLHUP;
}
if (writeQ[i] != 0) {   /* FD_ISSET(i, writesPending) */
ev |= POLLOUT;
Index: kaffe/libltdl/config-h.in
diff -u kaffe/libltdl/config-h.in:1.13 kaffe/libltdl/config-h.in:1.14
--- kaffe/libltdl/config-h.in:1.13  Tue Jan 27 11:08:43 2004
+++ kaffe/libltdl/config-h.in   Mon Mar 15 14:19:45 2004
@@ -3,9 +3,6 @@
 /* Define to 1 if you have the `argz_append' function. */
 #undef HAVE_ARGZ_APPEND
 
-/* Define to 1 if you have the `argz_create_sep' function. */
-#undef HAVE_ARGZ_CREATE_SEP
-
 /* Define to 1 if you have the argz.h header file. */
 #undef HAVE_ARGZ_H
 

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] debugging JITted methods

2004-03-15 Thread Dalibor Topic
[EMAIL PROTECTED] wrote:
I am using Kaffe for a research project in school where I am adding a 
bytecode to some .class files. It's a new bytecode and I'm trying to 
make the changes to the JIT to account for the new bytecode, but coming 
across some trouble.

I started out making changes to the interpreter. Mostly, it involved 
copying/pasting INVOKESTATIC in kaffe.def and adding a couple asm(...) 
statements. But, it turns out I need to use the JIT, which is not so 
straightforward. I've been working on it some and think I have an idea 
of how I need to do things differently, but debugging is going to be 
tough. As a rudimentary way of debugging, I have been trying to find a 
way to dump the JITted method so I could look at that, but haven't been 
able to find a good way to do that.
See the xdebugging support (FAQ.xdebugging) for a way to generate 
debugging information in jitted code siutable for gdb.

You can take a look at the emitted code from the jitter by configuring 
and building kaffe with --enable-debug and using kaffe -vmdebug JIT to 
run your classes.

I expect implementing the new code could be done really cleanly (and 
quickly) by someone who really understands how the JIT is implemented. 
I'm just having a tough time figuring that out.
See FAQ.jit3 for a nice overview of how jit3 works.

If you can help me out some, I'd really appreciate it. If I get it all 
figured out, I'd be willing to write up some documentation on how I did 
what I'm working on so if/when other people try to do something similar 
they could suffer a little less than me.
That would be very welcome!

About my environment:
My PC is intel/linux
Kaffe is compiled to alpha/digital unix
I'm running the JVM on an alpha simulator on the intel machine
This makes debugging much tougher because if I run gdb I'm debugging the 
simulator, not kaffe. I might be able to run gdb on the simulator, but 
I'd like to avoid trying to set that up unless absolutely necessary. It 
took me long enough to get kaffe running on it.
Out of curiosity: There is an alpha simulator for intel macines? Is it 
free software?

If you want access to real Alpha hardware, check out HP-Compaq's 
TestDrive project. You can sign up for online access to alpha-linux, 
alpha-osf (and so on ..) hardware.

cheers,
dalibor topic
___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] kaffe 1.1.4: gnu.classpath.Configuration.CLASSPATH_VERSION

2004-03-15 Thread Dalibor Topic
Holger Schurig wrote:
Here is a patch to fix this, it's against current CVS:

PS: I patched only configure.in. Because configure is in CVS, too, it 
should be regenerated. And, oh, Configuration.java could/should be 
removed from CVS now.
Done. but unfortunately, it doesn't work that well (with kjc, at least):

[ start compilation in verbose mode ]
error:File gnu/classpath/Configuration.java not found
gmake[1]: *** [lib/stamp] Error 1
The problem is that Configuration.java is generated in the build 
direectory, whereas the compiler is looking for the file in the source 
directory. Automake allows for a (very useful) separation of source and 
build directories.

I tried, but I couldn't get this to work.

cheers,
dalibor topic
___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] CVS kaffe (dalibor): Small include file fix for pthreads

2004-03-15 Thread Kaffe CVS
PatchSet 4520 
Date: 2004/03/15 17:22:27
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Small include file fix for pthreads

2004-03-15  Dalibor Topic [EMAIL PROTECTED]

* kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:
Import limits.h instead of linux specific bits/local_lim.h.

Reported by: Riccardo Mottola [EMAIL PROTECTED]

Members: 
ChangeLog:1.2098-1.2099 
kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.20-1.21 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2098 kaffe/ChangeLog:1.2099
--- kaffe/ChangeLog:1.2098  Mon Mar 15 14:19:43 2004
+++ kaffe/ChangeLog Mon Mar 15 17:22:27 2004
@@ -1,5 +1,12 @@
 2004-03-15  Dalibor Topic [EMAIL PROTECTED]
 
+   * kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:
+   Import limits.h instead of linux specific bits/local_lim.h.
+
+   Reported by: Riccardo Mottola [EMAIL PROTECTED]
+
+2004-03-15  Dalibor Topic [EMAIL PROTECTED]
+
* kaffe/kaffevm/systems/unix-jthreads/jthread.c:
Poll for POLLHUP, too, since some systems only set
PULLHUP on EOF.
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.20 
kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.21
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.20Tue Feb 17 
04:13:31 2004
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c Mon Mar 15 17:22:29 
2004
@@ -47,7 +47,7 @@
  * typedefs  defines
  */
 
-#include bits/local_lim.h
+#include limits.h
 
 /*
  * This is the configurable section. Note that SCHED_FIFO is the only

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] CVS kaffe (dalibor): Fixes for m68k

2004-03-15 Thread Kaffe CVS
PatchSet 4521 
Date: 2004/03/15 17:37:02
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixes for m68k

2004-03-15  Dalibor Topic [EMAIL PROTECTED]

* config/m68k/clear-cache.h:
Removed.

* config/m68k/jit.h:
Reverted patch since it breaks things on non-linux platforms.

Reported by: Tony Wyatt [EMAIL PROTECTED]

* config/m68k/linux/jit-md.h:
Added linux specific cache clearing code.

*  config/m68k/linux/clear-cache.h:
New file. Fixed #define.

Reported by: Riccardo Mottola [EMAIL PROTECTED]

Members: 
ChangeLog:1.2099-1.2100 
config/m68k/clear-cache.h:1.1-1.2(DEAD) 
config/m68k/jit.h:1.12-1.13 
config/m68k/linux/clear-cache.h:INITIAL-1.1 
config/m68k/linux/jit-md.h:1.3-1.4 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2099 kaffe/ChangeLog:1.2100
--- kaffe/ChangeLog:1.2099  Mon Mar 15 17:22:27 2004
+++ kaffe/ChangeLog Mon Mar 15 17:37:02 2004
@@ -1,5 +1,23 @@
 2004-03-15  Dalibor Topic [EMAIL PROTECTED]
 
+   * config/m68k/clear-cache.h:
+   Removed.
+
+   * config/m68k/jit.h:
+   Reverted patch since it breaks things on non-linux platforms.
+
+   Reported by: Tony Wyatt [EMAIL PROTECTED]
+
+   * config/m68k/linux/jit-md.h:
+   Added linux specific cache clearing code.
+
+   *  config/m68k/linux/clear-cache.h:
+   New file. Fixed #define.
+
+   Reported by: Riccardo Mottola [EMAIL PROTECTED]
+
+2004-03-15  Dalibor Topic [EMAIL PROTECTED]
+
* kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:
Import limits.h instead of linux specific bits/local_lim.h.
 
===
Checking out kaffe/config/m68k/clear-cache.h
RCS:  /home/cvs/kaffe/kaffe/config/m68k/Attic/clear-cache.h,v
VERS: 1.1
***
--- kaffe/config/m68k/clear-cache.h Mon Mar 15 17:40:16 2004
+++ /dev/null   Sun Aug  4 19:57:58 2002
@@ -1,53 +0,0 @@
-/* Definitions for Motorola 68k running Linux-based GNU systems with
-   ELF format.
-   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
-   Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-#if !defined(CLEAR_CACHE_H)
-#define (CLEAR_CACHE_H)
-
-/* Clear the instruction cache from `beg' to `end'.  This makes an
-   inline system call to SYS_cacheflush.  The arguments are as
-   follows:
-
-   cacheflush (addr, scope, cache, len)
-
-   addr  - the start address for the flush
-   scope  - the scope of the flush (see the cpush insn)
-   cache  - which cache to flush (see the cpush insn)
-   len- a factor relating to the number of flushes to perform:
-   len/16 lines, or len/4096 pages.  */
-
-#define CLEAR_INSN_CACHE(BEG, END) \
-{  \
-  register unsigned long _beg __asm (%d1) = (unsigned long) (BEG);   \
-  unsigned long _end = (unsigned long) (END);  \
-  register unsigned long _len __asm (%d4) = (_end - _beg + 32);  \
-  __asm __volatile \
-(move%.l #123, %/d0\n\t  /* system call nr */\
- move%.l #1, %/d2\n\t/* clear lines */   \
- move%.l #3, %/d3\n\t/* insn+data caches */  \
- trap #0 \
- : /* no outputs */\
- : d (_beg), d (_len)  \
- : %d0, %d2, %d3);   \
-}
-
-#endif /* !defined(CLEAR_CACHE_H) */
Index: kaffe/config/m68k/jit.h
diff -u kaffe/config/m68k/jit.h:1.12 kaffe/config/m68k/jit.h:1.13
--- kaffe/config/m68k/jit.h:1.12Sat Mar 13 17:41:58 2004
+++ kaffe/config/m68k/jit.h Mon Mar 15 17:37:04 2004
@@ -18,8 +18,6 @@
 #ifndef __m68k_jit_h
 #define __m68k_jit_h
 
-#include clear-cache.h
-
 /**/
 /* Exception handling information. */
 /**/
@@ -193,8 +191,7 @@
 
For those with 020's and 030's, this is effectively a no-op.  */
 
-/* For now, let's try to use gcc's own macro */
-#define FLUSH_DCACHE(beg,end)  CLEAR_INSN_CACHE((beg),(end))
+#define 

Re: [kaffe] Bug in Kaffe 1.1.4 handling of Stack Overflow.

2004-03-15 Thread Timothy Stack
 
 I'm using Kaffe 1.1.4.

What CPU/OS are you using?

 If I compile and run the following test program under Kaffe 1.1.4,
 Kaffe exits with status 0 (normal exit).
 
 It should instead throw a java.lang.StackOverflowError and print out a
 backtrace.
 
 The program, Bad.java:
[snipped]

 dispatchException(): java/lang/ArrayStoreException
 java/lang/System.arraycopy has no handlers.
 java/lang/String.getChars has no handlers.
 java/lang/StringBuffer.append has no handlers.
 java/lang/StackTraceElement.toString has no handlers.
 java/lang/Throwable.stackTraceStringBuffer has no handlers.
 java/lang/Throwable.stackTraceString has no handlers.
 java/lang/Throwable.printStackTrace has no handlers.
 java/lang/Throwable.printStackTrace has no handlers.

I got something similar to this, but then updated my CVS and it worked 
fine on x86/FreeBSD.

tim

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] PATCH: consistently separate jitter and backend register ID

2004-03-15 Thread Casey Marshall
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

 Timothy == Timothy Stack [EMAIL PROTECTED] writes:

   Working on the MIPS JIT3 I have made some small changes to the 
 architechture-independent register code for JIT3 that at least
 allow  the MIPS JIT to pass all the tests in test/internal. To
 summarize,  slotRegister now returns the `jitter ID' of the
 assigned register (the  index into the reginfo array), instead of
 the `backend ID'. All code  that depends on the former is
 unchanged, and all code that depends on  the latter now uses a new
 macro, `slotRegisterRegister', that is  equivalent to
 slotRegister, but returns the backend ID.
 
 Okie, I'll take a look at this and check it in tonight/tomorrow
 morning.

Timothy I looked at the patch, but I'm not totally convinced its the
Timothy right thing to do...

Me neither. I instead changed `slotAlias' to use regno, and not the
return value of `slotRegister'.

However, I tried something similar to this on x86 and it didn't
work. I haven't tried this approach (attached) on x86 yet.

Timothy I'd really prefer something that had stronger typing so that
Timothy these mistakes don't continue to happen.  For example, the
Timothy x86 backend mixes up uses of the jitter ID for a register and
Timothy the backend ID.  Its a little trivial, but still...

I'm in favor of Kevin's idea of renaming one of the two `regno'
members in the two structs (`kregs' and `SlotData').

Cheers,

- -- 
Casey Marshall || [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 http://mailcrypt.sourceforge.net/

iD8DBQFAVfHigAuWMgRGsWsRAsv9AJwL06bDJnTSYxJUfSkYGO4es9EFuwCfVKBI
LUqHxizwTTg9Kas4Q3p333Y=
=bx2x
-END PGP SIGNATURE-
Index: kaffe/kaffevm/jit3/machine.c
===
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/jit3/machine.c,v
retrieving revision 1.48
diff -u -r1.48 machine.c
--- kaffe/kaffevm/jit3/machine.c	8 Mar 2004 21:21:13 -	1.48
+++ kaffe/kaffevm/jit3/machine.c	15 Mar 2004 18:04:03 -
@@ -1115,6 +1115,9 @@
 	type = s-u[1].value.i;
 	from = s-u[2].slot;
 
+	if (from-regno == NOREG) {
+		slotRegister(from, type, rread, NOREG);
+	}
 	if (reginfo[from-regno].flags  Rreadonce) {
 		/*
 		 * XXX Aggressively spill the floating point register on x86.
@@ -1138,7 +1141,7 @@
 	/* Get the register we're aliasing and attach the 'to' slot
 	 * to it.
 	 */
-	reg = slotRegister(from, type, rread, NOREG);
+	reg = from-regno;
 	reginfo[reg].refs++;
 	to-regno = reg;
 	to-modified = rwrite;


[kaffe] CVS kaffe (dalibor): Small fix for compiler warning

2004-03-15 Thread Kaffe CVS
PatchSet 4522 
Date: 2004/03/15 17:54:46
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Small fix for compiler warning

2004-03-15  Dalibor Topic [EMAIL PROTECTED]

* libraries/clib/awt/X/fnt.c:
Define variables only used without I18N support
only when I18N support is turned off.

Members: 
ChangeLog:1.2100-1.2101 
libraries/clib/awt/X/fnt.c:1.12-1.13 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2100 kaffe/ChangeLog:1.2101
--- kaffe/ChangeLog:1.2100  Mon Mar 15 17:37:02 2004
+++ kaffe/ChangeLog Mon Mar 15 17:54:46 2004
@@ -1,5 +1,11 @@
 2004-03-15  Dalibor Topic [EMAIL PROTECTED]
 
+   * libraries/clib/awt/X/fnt.c:
+   Define variables only used without I18N support
+   only when I18N support is turned off.
+
+2004-03-15  Dalibor Topic [EMAIL PROTECTED]
+
* config/m68k/clear-cache.h:
Removed.
 
Index: kaffe/libraries/clib/awt/X/fnt.c
diff -u kaffe/libraries/clib/awt/X/fnt.c:1.12 kaffe/libraries/clib/awt/X/fnt.c:1.13
--- kaffe/libraries/clib/awt/X/fnt.c:1.12   Fri Mar  5 17:12:35 2004
+++ kaffe/libraries/clib/awt/X/fnt.cMon Mar 15 17:54:47 2004
@@ -338,7 +338,6 @@
 Java_java_awt_Toolkit_fntGetWidths ( JNIEnv* env, jclass clazz, XFontStruct* fs )
 #endif 
 {
-  int   n = 256;
   jintArray widths;
   jint  *jw;
   jboolean isCopy;
@@ -350,6 +349,7 @@
   int num;
 #else  
   register  int i, j;
+  const int n = 256;
 #endif  
 
   widths = (*env)-NewIntArray( env, 256);
@@ -396,12 +396,13 @@
   jboolean  isCopy;
   jbyte*jb = (*env)-GetByteArrayElements( env, jBytes, isCopy);
   int   n = (*env)-GetArrayLength( env, jBytes);
-  int   w;
 #ifdef KAFFE_I18N
   wchar_t   *wch;
   XRectangle *ink_array, *logical_array;
   XRectangle overall_ink, overall_logical;
   int num;
+#else
+  int   w;
 #endif
 
   if ( off+len  n ) len = n - off;

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] Bug in Kaffe 1.1.4 handling of Stack Overflow.

2004-03-15 Thread Steven Augart
Timothy Stack wrote:
I'm using Kaffe 1.1.4.


What CPU/OS are you using?
x86 (Pentium III), Linux (Red Hat kernel 2.4.20-18.9)

If I compile and run the following test program under Kaffe 1.1.4,
Kaffe exits with status 0 (normal exit).
It should instead throw a java.lang.StackOverflowError and print out a
backtrace.
The program, Bad.java:
[snipped]


   dispatchException(): java/lang/ArrayStoreException
   java/lang/System.arraycopy has no handlers.
   java/lang/String.getChars has no handlers.
   java/lang/StringBuffer.append has no handlers.
   java/lang/StackTraceElement.toString has no handlers.
   java/lang/Throwable.stackTraceStringBuffer has no handlers.
   java/lang/Throwable.stackTraceString has no handlers.
   java/lang/Throwable.printStackTrace has no handlers.
   java/lang/Throwable.printStackTrace has no handlers.


I got something similar to this, but then updated my CVS and it worked 
fine on x86/FreeBSD.
I'm glad to hear that the bug may have been fixed in the CVS head.

I'm going to continue operating on releases for a while; this isn't a 
show-stopper now that I know about the problem.

--Steve Augart

--
Steven Augart
Jikes RVM, open source Research Virtual Machine:
http://oss.software.ibm.com/jikesrvm
Office: +1 914/784-6743
T.J. Watson Research Center, IBM
___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] (no subject)

2004-03-15 Thread Dalibor Topic
Hi Heppan,

[EMAIL PROTECTED] wrote:
today i have a two problems...

1. the first problem i have is that i can't run make successfully when i want to crosscompile kaffe 1.1.3 for an arm. 
my configure: ./configure --prefix=/home/pr4/local/kaffe113arm --host=arm-linux --build=i686-linux --enable-pure-java-math

--enable-pure-java-math is needed, because without i got the error message Information: Enlightened Sound Daemon not found
configure: error: Could not find GNU MP library.  Install the gmp development package, or pass --enable-pure-java-math to configure.
but GNU MP (version 4.1.2-94) is installed. anyway, when i run make after successfull configure make aborts with: 
Relocations in generic ELF (EM: 3)
.libs/ByteToCharDefault.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[2]: *** [libnative.la] Fehler 1

by the way, i got the same with kaffe 1.1.4, pherhaps it'S no problem with kaffe, does someone know a solve? i couldn't solve this problem yet, so i want to compile kaffe direct at the device, and there is the next problem
Take a look at FAQ/FAQ.cross-compiling. I assume that the problem is 
that you didn't explicitely set the linker to the arm linker.

2. i had compiled java on a SimPad (no crosscompiling, OS is Debian and CPU is an ARM). when i want to start a small java programm always it aborts with the message: 
kaffe-bin: exception.h:139: vmExcept_setJNIFrame: Assertion `fp != 0' failed.
Aborted

i tried to find exception.h to take a look on it, but i couldn't find the file...
You should try out the CVS, it has had a few improvements for ARM 
architecture. If your platform is an xscale/pxa, you need to 
--enable-pxa in configure.

cheers,
dalibor topic
___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] debugging JITted methods

2004-03-15 Thread kaffe
Dalibor Topic wrote:

See the xdebugging support (FAQ.xdebugging) for a way to generate 
debugging information in jitted code siutable for gdb.

You can take a look at the emitted code from the jitter by configuring 
and building kaffe with --enable-debug and using kaffe -vmdebug JIT to 
run your classes.
I had tried a bit of this before, but it seems that I finally got the 
right combination of things. Good grief, 60,000 lines of asm for hello 
world.

I expect implementing the new code could be done really cleanly (and 
quickly) by someone who really understands how the JIT is 
implemented. I'm just having a tough time figuring that out.


See FAQ.jit3 for a nice overview of how jit3 works.
It's my understanding that there is no JIT3 for Alpha. Is that the case? 
I definately need to stick with Alpha at this point. I found a pretty 
good summary of the JIT process, though, which helped clear things up some.

Out of curiosity: There is an alpha simulator for intel macines? Is it 
free software?


I am using SSMT
http://maggini.eng.umd.edu/vortex/ssmt.html
It is based on Simplescalar
http://www.simplescalar.com/
I am using SSMT because I need its multithreading ability. As far as I 
know, you can set up simplescalar on an x86-linux machine to emulate an 
alpha-linux machine without too much difficulty (although I haven't done 
it myself). I actually have an Alpha box. It's what I use to compile. I 
tried getting cross-compilation to work, but could never make a working 
x86-alpha-osf compiler.



___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [Java-gnome-developer] Re: [Sablevm-developer] Re: [kaffe] Ja va-Gnome: jni or cni

2004-03-15 Thread Archie Cobbs
Jeffrey Morgan wrote:
  Actually, I reckon that the same argument applies to java-gnome in
  general.  Anyone who uses the java-gnome libraries in a GUI-based Java
  application is risking tying that application into GNOME.  By 
  contrast,
  if they use Swing or SWT, they can easily port the 
  application across a
  wide range of supported platforms.
 
 But this is the point of the whole project.  Our goal is to target
 gnome and gtk environments.  java-gnome is for writing applications
 that target the gnome desktop environment.  As a result, we have
 many classes that are designed to provide the developer the type
 of integration that they would expect on a platform if they were
 using c or c++.

If you choose CNI, then please change the name of your project
(as suggested by someone else) to gcj-gnome from java-gnome
to avoid confusion.

Thanks,
-Archie

__
Archie Cobbs  *CTO, Awarix*  http://www.awarix.com

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe