Index: kaffe/configure
diff -u kaffe/configure:1.1.1.19 kaffe/configure:1.25
--- kaffe/configure:1.1.1.19	Wed Nov 11 01:39:51 1998
+++ kaffe/configure	Wed Nov 11 02:40:14 1998
@@ -530,13 +530,12 @@
 fi
 
 
+GVER=1.5.1; KVER=1.00
 
-KVER=1.00
-
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:540: checking for $ac_word" >&5
+echo "configure:539: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -565,7 +564,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:569: checking for $ac_word" >&5
+echo "configure:568: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -613,7 +612,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:617: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:616: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -623,11 +622,11 @@
 cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext <<EOF
-#line 627 "configure"
+#line 626 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -647,12 +646,12 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:651: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:650: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:656: checking whether we are using GNU C" >&5
+echo "configure:655: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -661,7 +660,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -676,7 +675,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:680: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:679: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -734,7 +733,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:738: checking host system type" >&5
+echo "configure:737: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -877,14 +876,14 @@
 	{ echo "configure: error: Configuration $host_cpu-$host_os does not support $want_engine mode" 1>&2; exit 1; }
 fi
 echo $ac_n "checking execution engine""... $ac_c" 1>&6
-echo "configure:881: checking execution engine" >&5
+echo "configure:880: checking execution engine" >&5
 echo "$ac_t""$with_engine" 1>&6
 
 engine_frag=$srcdir/kaffe/kaffevm/$with_engine/Makefile.frag
 
 
 echo $ac_n "checking library type""... $ac_c" 1>&6
-echo "configure:888: checking library type" >&5
+echo "configure:887: checking library type" >&5
 if test "$dynamic_libraries" = "no" ; then
 	echo "$ac_t""static" 1>&6
 else
@@ -899,7 +898,7 @@
 fi
 
 echo $ac_n "checking sun compatibility mode""... $ac_c" 1>&6
-echo "configure:903: checking sun compatibility mode" >&5
+echo "configure:902: checking sun compatibility mode" >&5
 if test "$with_suncompat" = "" ; then
 	with_suncompat=yes
 fi
@@ -917,7 +916,7 @@
 fi
 
 echo $ac_n "checking thread system""... $ac_c" 1>&6
-echo "configure:921: checking thread system" >&5
+echo "configure:920: checking thread system" >&5
 if test "$with_threads" = "" ; then
 	with_threads=unix-jthreads
 fi
@@ -930,7 +929,7 @@
 
 if test "$with_engine" != "intrp" ; then
 	echo $ac_n "checking for trampolines""... $ac_c" 1>&6
-echo "configure:934: checking for trampolines" >&5
+echo "configure:933: checking for trampolines" >&5
 	if test -f $srcdir/config/$host_cpu/trampolines.c ; then
 		link_from="$link_from config/$host_cpu/trampolines.c"
 		link_to="$link_to kaffe/kaffevm/trampolines.c"
@@ -952,7 +951,7 @@
 
 
 echo $ac_n "checking how to generate depend files""... $ac_c" 1>&6
-echo "configure:956: checking how to generate depend files" >&5
+echo "configure:955: checking how to generate depend files" >&5
 if test "$DEPTOOL" = ""; then
 			DEPTOOL="true"
 	INC_DEPEND="# automatic dependency generation not enabled in configure"
@@ -1030,7 +1029,7 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1034: checking for a BSD compatible install" >&5
+echo "configure:1033: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1080,7 +1079,7 @@
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1084: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1083: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1109,7 +1108,7 @@
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1113: checking for $ac_word" >&5
+echo "configure:1112: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1138,7 +1137,7 @@
 # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1142: checking for $ac_word" >&5
+echo "configure:1141: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1168,7 +1167,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1172: checking for $ac_word" >&5
+echo "configure:1171: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MKDIR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1200,7 +1199,7 @@
 # Extract the first word of "dlltool", so it can be a program name with args.
 set dummy dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1204: checking for $ac_word" >&5
+echo "configure:1203: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1230,7 +1229,7 @@
 
 if test "$LN_S" = "" ; then
 	echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1234: checking whether ln -s works" >&5
+echo "configure:1233: checking whether ln -s works" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1269,7 +1268,7 @@
 
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:1273: checking size of short" >&5
+echo "configure:1272: checking size of short" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1277,7 +1276,7 @@
   ac_cv_sizeof_short=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1281 "configure"
+#line 1280 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1288,7 +1287,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
@@ -1308,7 +1307,7 @@
 
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1312: checking size of int" >&5
+echo "configure:1311: checking size of int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1316,7 +1315,7 @@
   ac_cv_sizeof_int=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1320 "configure"
+#line 1319 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1327,7 +1326,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -1347,7 +1346,7 @@
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1351: checking size of long" >&5
+echo "configure:1350: checking size of long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1355,7 +1354,7 @@
   ac_cv_sizeof_long=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1359 "configure"
+#line 1358 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1366,7 +1365,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -1386,7 +1385,7 @@
 
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:1390: checking size of long long" >&5
+echo "configure:1389: checking size of long long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1394,7 +1393,7 @@
   ac_cv_sizeof_long_long=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1398 "configure"
+#line 1397 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1405,7 +1404,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long_long=`cat conftestval`
 else
@@ -1425,7 +1424,7 @@
 
 
 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
-echo "configure:1429: checking size of __int64" >&5
+echo "configure:1428: checking size of __int64" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1433,7 +1432,7 @@
   ac_cv_sizeof___int64=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1437 "configure"
+#line 1436 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1444,7 +1443,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof___int64=`cat conftestval`
 else
@@ -1464,7 +1463,7 @@
 
 
 echo $ac_n "checking size of void*""... $ac_c" 1>&6
-echo "configure:1468: checking size of void*" >&5
+echo "configure:1467: checking size of void*" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1472,7 +1471,7 @@
   ac_cv_sizeof_voidp=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1476 "configure"
+#line 1475 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1483,7 +1482,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_voidp=`cat conftestval`
 else
@@ -1505,7 +1504,7 @@
 
 
 echo $ac_n "checking alignment of void*""... $ac_c" 1>&6
-echo "configure:1509: checking alignment of void*" >&5
+echo "configure:1508: checking alignment of void*" >&5
 if eval "test \"`echo '$''{'ac_cv_alignmentof_voidp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1513,7 +1512,7 @@
   ac_cv_alignmentof_voidp=1
 else
   cat > conftest.$ac_ext <<EOF
-#line 1517 "configure"
+#line 1516 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main() { struct { char c; void *p; } t; FILE *f;
@@ -1523,7 +1522,7 @@
   fprintf (f, "%d", ((char*) &t.p)-((char*) &t));
   fclose(f); exit (0); }
 EOF
-if { (eval echo configure:1527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_alignmentof_voidp=`cat conftestdata`
 else
@@ -1545,12 +1544,12 @@
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1549: checking return type of signal handlers" >&5
+echo "configure:1548: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1554 "configure"
+#line 1553 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -1567,7 +1566,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:1571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -1586,7 +1585,7 @@
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1590: checking how to run the C preprocessor" >&5
+echo "configure:1589: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1601,13 +1600,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1605 "configure"
+#line 1604 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1618,13 +1617,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1622 "configure"
+#line 1621 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1647,12 +1646,12 @@
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1651: checking for ANSI C header files" >&5
+echo "configure:1650: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1656 "configure"
+#line 1655 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1660,7 +1659,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1677,7 +1676,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1681 "configure"
+#line 1680 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1695,7 +1694,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1699 "configure"
+#line 1698 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1716,7 +1715,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1720 "configure"
+#line 1719 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1727,7 +1726,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:1731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1751,12 +1750,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1755: checking for size_t" >&5
+echo "configure:1754: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1760 "configure"
+#line 1759 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1784,12 +1783,12 @@
 fi
 
 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:1788: checking for ssize_t" >&5
+echo "configure:1787: checking for ssize_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1793 "configure"
+#line 1792 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1823,7 +1822,7 @@
 
 
 echo $ac_n "checking for printf in -lc""... $ac_c" 1>&6
-echo "configure:1827: checking for printf in -lc" >&5
+echo "configure:1826: checking for printf in -lc" >&5
 ac_lib_var=`echo c'_'printf | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1831,7 +1830,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1835 "configure"
+#line 1834 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1842,7 +1841,7 @@
 printf()
 ; return 0; }
 EOF
-if { (eval echo configure:1846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1870,7 +1869,7 @@
 fi
 
 echo $ac_n "checking for _mwvalidcheckl in -lmw""... $ac_c" 1>&6
-echo "configure:1874: checking for _mwvalidcheckl in -lmw" >&5
+echo "configure:1873: checking for _mwvalidcheckl in -lmw" >&5
 ac_lib_var=`echo mw'_'_mwvalidcheckl | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1878,7 +1877,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lmw  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1882 "configure"
+#line 1881 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1889,7 +1888,7 @@
 _mwvalidcheckl()
 ; return 0; }
 EOF
-if { (eval echo configure:1893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1917,7 +1916,7 @@
 fi
 
 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:1921: checking for sin in -lm" >&5
+echo "configure:1920: checking for sin in -lm" >&5
 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1925,7 +1924,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1929 "configure"
+#line 1928 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1936,7 +1935,7 @@
 sin()
 ; return 0; }
 EOF
-if { (eval echo configure:1940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1964,7 +1963,7 @@
 fi
 
 echo $ac_n "checking for mpz_abs in -lgmp""... $ac_c" 1>&6
-echo "configure:1968: checking for mpz_abs in -lgmp" >&5
+echo "configure:1967: checking for mpz_abs in -lgmp" >&5
 ac_lib_var=`echo gmp'_'mpz_abs | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1972,7 +1971,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lgmp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1976 "configure"
+#line 1975 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1983,7 +1982,7 @@
 mpz_abs()
 ; return 0; }
 EOF
-if { (eval echo configure:1987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2015,7 +2014,7 @@
 
 if test "$dynamic_libraries" = "yes" ; then
 		echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2019: checking for dlopen in -ldl" >&5
+echo "configure:2018: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2023,7 +2022,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2027 "configure"
+#line 2026 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2034,7 +2033,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:2038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2063,7 +2062,7 @@
 
 	if test "$ac_cv_lib_dl_dlopen" = "no" ; then
 		echo $ac_n "checking for _dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2067: checking for _dlopen in -ldl" >&5
+echo "configure:2066: checking for _dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'_dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2071,7 +2070,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2075 "configure"
+#line 2074 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2082,7 +2081,7 @@
 _dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2111,7 +2110,7 @@
 
 		if test "$ac_cv_lib_dl__dlopen" = "no" ; then
 			echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
-echo "configure:2115: checking for dld_init in -ldld" >&5
+echo "configure:2114: checking for dld_init in -ldld" >&5
 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2119,7 +2118,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2123 "configure"
+#line 2122 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2130,7 +2129,7 @@
 dld_init()
 ; return 0; }
 EOF
-if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2164,12 +2163,12 @@
 
 
 echo $ac_n "checking for gethostname""... $ac_c" 1>&6
-echo "configure:2168: checking for gethostname" >&5
+echo "configure:2167: checking for gethostname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2173 "configure"
+#line 2172 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostname(); below.  */
@@ -2192,7 +2191,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_gethostname=yes"
 else
@@ -2213,7 +2212,7 @@
 
 if test $ac_cv_func_gethostname = no; then
       echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
-echo "configure:2217: checking for gethostname in -lnsl" >&5
+echo "configure:2216: checking for gethostname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2221,7 +2220,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
+#line 2224 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2232,7 +2231,7 @@
 gethostname()
 ; return 0; }
 EOF
-if { (eval echo configure:2236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2261,12 +2260,12 @@
 
 fi
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:2265: checking for gethostbyname" >&5
+echo "configure:2264: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2270 "configure"
+#line 2269 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -2289,7 +2288,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -2310,7 +2309,7 @@
 
 if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2314: checking for gethostbyname in -lnsl" >&5
+echo "configure:2313: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2318,7 +2317,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2322 "configure"
+#line 2321 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2329,7 +2328,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2358,12 +2357,12 @@
 
 fi
 echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:2362: checking for connect" >&5
+echo "configure:2361: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2367 "configure"
+#line 2366 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -2386,7 +2385,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -2407,7 +2406,7 @@
 
 if test $ac_cv_func_connect = no; then
   echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:2411: checking for connect in -lsocket" >&5
+echo "configure:2410: checking for connect in -lsocket" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2415,7 +2414,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2419 "configure"
+#line 2418 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2426,7 +2425,7 @@
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2457,7 +2456,7 @@
 
 
 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
-echo "configure:2461: checking for deflate in -lz" >&5
+echo "configure:2460: checking for deflate in -lz" >&5
 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2465,7 +2464,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lz  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2469 "configure"
+#line 2468 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2476,7 +2475,7 @@
 deflate()
 ; return 0; }
 EOF
-if { (eval echo configure:2480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2506,7 +2505,7 @@
 
 
 echo $ac_n "checking for mpz_add in -lgmp""... $ac_c" 1>&6
-echo "configure:2510: checking for mpz_add in -lgmp" >&5
+echo "configure:2509: checking for mpz_add in -lgmp" >&5
 ac_lib_var=`echo gmp'_'mpz_add | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2514,7 +2513,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lgmp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2518 "configure"
+#line 2517 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2525,7 +2524,7 @@
 mpz_add()
 ; return 0; }
 EOF
-if { (eval echo configure:2529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2559,7 +2558,7 @@
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:2563: checking for X" >&5
+echo "configure:2562: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -2621,12 +2620,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 2625 "configure"
+#line 2624 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2695,14 +2694,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2699 "configure"
+#line 2698 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:2706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -2804,7 +2803,7 @@
 
 
 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:2808: checking for shmat in -lipc" >&5
+echo "configure:2807: checking for shmat in -lipc" >&5
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2812,7 +2811,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2816 "configure"
+#line 2815 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2823,7 +2822,7 @@
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:2827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2854,7 +2853,7 @@
 OLIBS=$LIBS
 LIBS="$LIBS $X_LIBRARIES"
 echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
-echo "configure:2858: checking for jpeg_read_header in -ljpeg" >&5
+echo "configure:2857: checking for jpeg_read_header in -ljpeg" >&5
 ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2862,7 +2861,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ljpeg  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2866 "configure"
+#line 2865 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2873,7 +2872,7 @@
 jpeg_read_header()
 ; return 0; }
 EOF
-if { (eval echo configure:2877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2901,7 +2900,7 @@
 fi
 
 echo $ac_n "checking for png_create_info_struct in -lpng""... $ac_c" 1>&6
-echo "configure:2905: checking for png_create_info_struct in -lpng" >&5
+echo "configure:2904: checking for png_create_info_struct in -lpng" >&5
 ac_lib_var=`echo png'_'png_create_info_struct | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2909,7 +2908,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lpng  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2913 "configure"
+#line 2912 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2920,7 +2919,7 @@
 png_create_info_struct()
 ; return 0; }
 EOF
-if { (eval echo configure:2924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2948,7 +2947,7 @@
 fi
 
 echo $ac_n "checking for DGifOpenFileHandle in -lgif""... $ac_c" 1>&6
-echo "configure:2952: checking for DGifOpenFileHandle in -lgif" >&5
+echo "configure:2951: checking for DGifOpenFileHandle in -lgif" >&5
 ac_lib_var=`echo gif'_'DGifOpenFileHandle | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2956,7 +2955,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lgif  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2960 "configure"
+#line 2959 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2967,7 +2966,7 @@
 DGifOpenFileHandle()
 ; return 0; }
 EOF
-if { (eval echo configure:2971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3012,12 +3011,12 @@
 
 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3016: checking for ANSI C header files" >&5
+echo "configure:3015: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3021 "configure"
+#line 3020 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3025,7 +3024,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3042,7 +3041,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
+#line 3045 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -3060,7 +3059,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3064 "configure"
+#line 3063 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -3081,7 +3080,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 3085 "configure"
+#line 3084 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3092,7 +3091,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -3119,17 +3118,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3123: checking for $ac_hdr" >&5
+echo "configure:3122: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3128 "configure"
+#line 3127 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3160,12 +3159,12 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:3164: checking for $ac_hdr that defines DIR" >&5
+echo "configure:3163: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3169 "configure"
+#line 3168 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -3173,7 +3172,7 @@
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:3177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -3198,7 +3197,7 @@
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:3202: checking for opendir in -ldir" >&5
+echo "configure:3201: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3206,7 +3205,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3210 "configure"
+#line 3209 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3217,7 +3216,7 @@
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:3221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3239,7 +3238,7 @@
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:3243: checking for opendir in -lx" >&5
+echo "configure:3242: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3247,7 +3246,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3251 "configure"
+#line 3250 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3258,7 +3257,7 @@
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:3262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3284,12 +3283,12 @@
 
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3288: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3287: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3293 "configure"
+#line 3292 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -3298,7 +3297,7 @@
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:3302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -3319,12 +3318,12 @@
 fi
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:3323: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:3322: checking whether struct tm is in sys/time.h or time.h" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3328 "configure"
+#line 3327 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -3332,7 +3331,7 @@
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:3336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -3353,12 +3352,12 @@
 fi
 
 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:3357: checking for tm_zone in struct tm" >&5
+echo "configure:3356: checking for tm_zone in struct tm" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3362 "configure"
+#line 3361 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_cv_struct_tm>
@@ -3366,7 +3365,7 @@
 struct tm tm; tm.tm_zone;
 ; return 0; }
 EOF
-if { (eval echo configure:3370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm_zone=yes
 else
@@ -3386,12 +3385,12 @@
 
 else
   echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:3390: checking for tzname" >&5
+echo "configure:3389: checking for tzname" >&5
 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3395 "configure"
+#line 3394 "configure"
 #include "confdefs.h"
 #include <time.h>
 #ifndef tzname /* For SGI.  */
@@ -3401,7 +3400,7 @@
 atoi(*tzname);
 ; return 0; }
 EOF
-if { (eval echo configure:3405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_var_tzname=yes
 else
@@ -3423,14 +3422,14 @@
 fi
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3427: checking whether byte ordering is bigendian" >&5
+echo "configure:3426: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 3434 "configure"
+#line 3433 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3441,11 +3440,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 3449 "configure"
+#line 3448 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3456,7 +3455,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3476,7 +3475,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3480 "configure"
+#line 3479 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3489,7 +3488,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -3513,14 +3512,14 @@
 fi
 
 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
-echo "configure:3517: checking whether char is unsigned" >&5
+echo "configure:3516: checking whether char is unsigned" >&5
 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$GCC" = yes; then
   # GCC predefines this symbol on systems where it applies.
 cat > conftest.$ac_ext <<EOF
-#line 3524 "configure"
+#line 3523 "configure"
 #include "confdefs.h"
 #ifdef __CHAR_UNSIGNED__
   yes
@@ -3542,7 +3541,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3546 "configure"
+#line 3545 "configure"
 #include "confdefs.h"
 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
 #if !defined(__STDC__) || __STDC__ != 1
@@ -3552,7 +3551,7 @@
   volatile char c = 255; exit(c < 0);
 }
 EOF
-if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_char_unsigned=yes
 else
@@ -3576,21 +3575,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:3580: checking for inline" >&5
+echo "configure:3579: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 3587 "configure"
+#line 3586 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:3594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -3618,12 +3617,12 @@
 
 
 echo $ac_n "checking for struct sigcontext""... $ac_c" 1>&6
-echo "configure:3622: checking for struct sigcontext" >&5
+echo "configure:3621: checking for struct sigcontext" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_sigcontext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3627 "configure"
+#line 3626 "configure"
 #include "confdefs.h"
 #include <asm/signal.h>
 #include <asm/sigcontext.h>
@@ -3631,7 +3630,7 @@
 struct sigcontext t;
 ; return 0; }
 EOF
-if { (eval echo configure:3635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_sigcontext=yes
 else
@@ -3653,19 +3652,19 @@
 
 
 echo $ac_n "checking for struct sigcontext_struct (without asm/sigcontext.h)""... $ac_c" 1>&6
-echo "configure:3657: checking for struct sigcontext_struct (without asm/sigcontext.h)" >&5
+echo "configure:3656: checking for struct sigcontext_struct (without asm/sigcontext.h)" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_sigcontext_struct'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3662 "configure"
+#line 3661 "configure"
 #include "confdefs.h"
 #include <asm/signal.h>
 int main() {
 struct sigcontext_struct t;
 ; return 0; }
 EOF
-if { (eval echo configure:3669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_sigcontext_struct=yes
 else
@@ -3680,12 +3679,12 @@
 echo "$ac_t""$ac_cv_struct_sigcontext_struct" 1>&6
 
 echo $ac_n "checking for struct sigcontext_struct (with asm/sigcontext.h)""... $ac_c" 1>&6
-echo "configure:3684: checking for struct sigcontext_struct (with asm/sigcontext.h)" >&5
+echo "configure:3683: checking for struct sigcontext_struct (with asm/sigcontext.h)" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_sigcontext_struct_with'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3689 "configure"
+#line 3688 "configure"
 #include "confdefs.h"
 #include <asm/signal.h>
 #include <asm/sigcontext.h>
@@ -3693,7 +3692,7 @@
 struct sigcontext_struct t;
 ; return 0; }
 EOF
-if { (eval echo configure:3697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_sigcontext_struct_with=yes
 else
@@ -3717,12 +3716,12 @@
 
 
 echo $ac_n "checking for strftime""... $ac_c" 1>&6
-echo "configure:3721: checking for strftime" >&5
+echo "configure:3720: checking for strftime" >&5
 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3726 "configure"
+#line 3725 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char strftime(); below.  */
@@ -3745,7 +3744,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_strftime=yes"
 else
@@ -3767,7 +3766,7 @@
   echo "$ac_t""no" 1>&6
 # strftime is in -lintl on SCO UNIX.
 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
-echo "configure:3771: checking for strftime in -lintl" >&5
+echo "configure:3770: checking for strftime in -lintl" >&5
 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3775,7 +3774,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3779 "configure"
+#line 3778 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3786,7 +3785,7 @@
 strftime()
 ; return 0; }
 EOF
-if { (eval echo configure:3790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3816,17 +3815,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3820: checking for $ac_hdr" >&5
+echo "configure:3819: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3825 "configure"
+#line 3824 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3855,12 +3854,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3859: checking for $ac_func" >&5
+echo "configure:3858: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3864 "configure"
+#line 3863 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3883,7 +3882,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3908,7 +3907,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3912: checking for working mmap" >&5
+echo "configure:3911: checking for working mmap" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3916,7 +3915,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 3920 "configure"
+#line 3919 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -4056,7 +4055,7 @@
 }
 
 EOF
-if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -4081,12 +4080,12 @@
 for ac_func in select socket getsockname
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4085: checking for $ac_func" >&5
+echo "configure:4084: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4090 "configure"
+#line 4089 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4109,7 +4108,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4136,12 +4135,12 @@
 for ac_func in memcpy memmove
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4140: checking for $ac_func" >&5
+echo "configure:4139: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4145 "configure"
+#line 4144 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4164,7 +4163,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4191,12 +4190,12 @@
 for ac_func in mkdir
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4195: checking for $ac_func" >&5
+echo "configure:4194: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4200 "configure"
+#line 4199 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4219,7 +4218,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4246,12 +4245,12 @@
 for ac_func in getcwd getwd gettimeofday ftime time uname getuid
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4250: checking for $ac_func" >&5
+echo "configure:4249: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4255 "configure"
+#line 4254 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4274,7 +4273,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4301,12 +4300,12 @@
 for ac_func in remainder remainderf fmod fmodf drem rint floor ceil finite isinf isnan strtod strdup
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4305: checking for $ac_func" >&5
+echo "configure:4304: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4310 "configure"
+#line 4309 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4329,7 +4328,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4356,12 +4355,12 @@
 for ac_func in strerror hstrerror
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4360: checking for $ac_func" >&5
+echo "configure:4359: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4365 "configure"
+#line 4364 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4384,7 +4383,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4411,12 +4410,12 @@
 for ac_func in fcntl ioctl
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4415: checking for $ac_func" >&5
+echo "configure:4414: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4420 "configure"
+#line 4419 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4439,7 +4438,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4466,12 +4465,12 @@
 for ac_func in alarm setitimer
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4470: checking for $ac_func" >&5
+echo "configure:4469: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4475 "configure"
+#line 4474 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4494,7 +4493,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4521,12 +4520,12 @@
 for ac_func in sigprocmask sigsetmask sigemptyset sigaddset signal sigaction
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4525: checking for $ac_func" >&5
+echo "configure:4524: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4530 "configure"
+#line 4529 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4549,7 +4548,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4576,12 +4575,12 @@
 for ac_func in sbrk valloc memalign mallopt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4580: checking for $ac_func" >&5
+echo "configure:4579: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4585 "configure"
+#line 4584 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4604,7 +4603,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4631,12 +4630,12 @@
 for ac_func in waitpid kill fork execve execvp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4635: checking for $ac_func" >&5
+echo "configure:4634: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4640 "configure"
+#line 4639 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4659,7 +4658,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4686,12 +4685,12 @@
 for ac_func in rld_load shl_load LoadLibrary dld_link
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4690: checking for $ac_func" >&5
+echo "configure:4689: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4695 "configure"
+#line 4694 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4714,7 +4713,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4741,12 +4740,12 @@
 for ac_func in sync fsync
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4745: checking for $ac_func" >&5
+echo "configure:4744: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4750 "configure"
+#line 4749 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4769,7 +4768,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4796,12 +4795,12 @@
 for ac_func in atexit on_exit vsnprintf snprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4800: checking for $ac_func" >&5
+echo "configure:4799: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4805 "configure"
+#line 4804 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4824,7 +4823,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4850,12 +4849,12 @@
 
 
 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:4854: checking for dlopen" >&5
+echo "configure:4853: checking for dlopen" >&5
 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4859 "configure"
+#line 4858 "configure"
 #include "confdefs.h"
 #ifdef HAVE_DLFCN_H
 #include <dlfcn.h>
@@ -4866,7 +4865,7 @@
 dlopen(0, 0)
 ; return 0; }
 EOF
-if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_func_dlopen=yes
 else
@@ -4888,12 +4887,12 @@
 fi
 
 echo $ac_n "checking for dlerror""... $ac_c" 1>&6
-echo "configure:4892: checking for dlerror" >&5
+echo "configure:4891: checking for dlerror" >&5
 if eval "test \"`echo '$''{'ac_cv_func_dlerror'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4897 "configure"
+#line 4896 "configure"
 #include "confdefs.h"
 #ifdef HAVE_DLFCN_H
 #include <dlfcn.h>
@@ -4904,7 +4903,7 @@
 dlerror()
 ; return 0; }
 EOF
-if { (eval echo configure:4908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_func_dlerror=yes
 else
@@ -4928,19 +4927,19 @@
 
 if test "$host_cpu" = "alpha" ; then
   echo $ac_n "checking for alpha support of amask instruction""... $ac_c" 1>&6
-echo "configure:4932: checking for alpha support of amask instruction" >&5
+echo "configure:4931: checking for alpha support of amask instruction" >&5
 if eval "test \"`echo '$''{'ac_cv_alpha_asm_amask'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4937 "configure"
+#line 4936 "configure"
 #include "confdefs.h"
 
 int main() {
  long r; __asm__("amask 1,%0" : "=r"(r)); return !r; 
 ; return 0; }
 EOF
-if { (eval echo configure:4944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_alpha_asm_amask=yes
 else
@@ -4965,12 +4964,12 @@
 
 
 echo $ac_n "checking for declaration of select""... $ac_c" 1>&6
-echo "configure:4969: checking for declaration of select" >&5
+echo "configure:4968: checking for declaration of select" >&5
 if eval "test \"`echo '$''{'ac_cv_declared_select'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4974 "configure"
+#line 4973 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_UNISTD_H
@@ -4987,7 +4986,7 @@
  void *foo = select; 
 ; return 0; }
 EOF
-if { (eval echo configure:4991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_declared_select=yes; cat >> confdefs.h <<\EOF
 #define HAVE_DECLARED_SELECT 1
@@ -5008,7 +5007,7 @@
 
 
 echo $ac_n "checking for underscore in dlsym""... $ac_c" 1>&6
-echo "configure:5012: checking for underscore in dlsym" >&5
+echo "configure:5011: checking for underscore in dlsym" >&5
 if eval "test \"`echo '$''{'ac_cv_underscore'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5017,13 +5016,13 @@
   ac_cv_underscore=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 5021 "configure"
+#line 5020 "configure"
 #include "confdefs.h"
 main()
 {void* lib = (void*)dlopen(_LIBC_);
   if (dlsym(lib, "_printf") != 0) { exit(0); } else { exit(1); } }
 EOF
-if { (eval echo configure:5027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_underscore=yes
 else
@@ -5046,19 +5045,19 @@
 fi
 
 echo $ac_n "checking for underscore in C assembly names""... $ac_c" 1>&6
-echo "configure:5050: checking for underscore in C assembly names" >&5
+echo "configure:5049: checking for underscore in C assembly names" >&5
 if eval "test \"`echo '$''{'ac_cv_underscore_c_names'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5055 "configure"
+#line 5054 "configure"
 #include "confdefs.h"
 extern int foo_alias();asm("\n_foo_alias:");void foo() {};
 int main() {
 foo_alias();
 ; return 0; }
 EOF
-if { (eval echo configure:5062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_underscore_c_names=yes
 else
@@ -5115,12 +5114,29 @@
 fi
 
 
+if test x"$enable_guarana" != xno &&
+   test -d $srcdir/kaffe/kaffevm/guarana ; then
+	cat >> confdefs.h <<\EOF
+#define GUARANA 1
+EOF
+
+	COMMENT_GUARANA=
+	GUARANALIB="../kaffevm/libguarana$LIBEXT"
+else
+	COMMENT_GUARANA="#"
+	GUARANALIB=
+fi
+
+
+
 if test "$dynamic_libraries" = "yes" ; then
 	NOSHAREDLIBS="-L../kaffevm -lkaffevm $VM_LIBRARIES $STD_LIBRARIES"
 	KAFFE_LIBDEP=""
 else
 	NOSHAREDLIBS="../kaffevm/libkaffevm$LIBEXT $JAVA_LIBRARIES $STD_LIBRARIES $ZIP_LIBRARIES $NET_LIBRARIES $X_LIBRARIES $AWTLIB"
 	KAFFE_LIBDEP="$KAFFE_LIBDEP ../kaffevm/libkaffevm$LIBEXT $JAVA_LIBRARIES"
+	NOSHAREDLIBS="$NOSHAREDLIBS $GUARANALIB"
+	KAFFE_LIBDEP="$KAFFE_LIBDEP $GUARANALIB"
 	PIC=""
 	PICVM=""
 	LIBSHARE=""
@@ -5284,7 +5300,7 @@
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
-trap 'rm -fr `echo "$output config/config.h include/jtypes.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "$output config/config.h include/jtypes.h include/guarana.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -5377,6 +5393,8 @@
 s%@PNG_LIBRARIES@%$PNG_LIBRARIES%g
 s%@GIF_LIBRARIES@%$GIF_LIBRARIES%g
 s%@AWTLIB@%$AWTLIB%g
+s%@GVER@%$GVER%g
+s%@COMMENT_GUARANA@%$COMMENT_GUARANA%g
 s%@subdirs@%$subdirs%g
 s%@packages@%$packages%g
 s%@KAFFE_LIBDEP@%$KAFFE_LIBDEP%g
@@ -5503,7 +5521,7 @@
 if test "${CONFIG_HEADERS+set}" != set; then
 EOF
 cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="config/config.h include/jtypes.h"
+  CONFIG_HEADERS="config/config.h include/jtypes.h include/guarana.h"
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 fi
Index: kaffe/configure.in
diff -u kaffe/configure.in:1.1.1.18 kaffe/configure.in:1.25
--- kaffe/configure.in:1.1.1.18	Wed Nov 11 01:40:02 1998
+++ kaffe/configure.in	Wed Nov 11 02:40:17 1998
@@ -1,6 +1,6 @@
 AC_INIT(kaffe)
-
 dnl Setup version number.
+GVER=1.5.1; dnl Guarana reflective kernel
 KVER=1.00
 
 dnl Find the compiler early on in case we need to override.
@@ -691,6 +691,19 @@
 
 changequote([, ])dnl
 
+dnl Configure in the Guarana stuff.
+if test x"$enable_guarana" != xno &&
+   test -d $srcdir/kaffe/kaffevm/guarana ; then
+	AC_DEFINE(GUARANA)
+	COMMENT_GUARANA=
+	GUARANALIB="../kaffevm/libguarana$LIBEXT"
+else
+	COMMENT_GUARANA="#"
+	GUARANALIB=
+fi
+AC_SUBST(GVER)
+AC_SUBST(COMMENT_GUARANA)
+
 dnl If we have share libraries, cancel all the non-shared ones.
 dnl  Otherwise, add on the machine again to help linking.
 if test "$dynamic_libraries" = "yes" ; then
@@ -699,6 +712,8 @@
 else
 	NOSHAREDLIBS="../kaffevm/libkaffevm$LIBEXT $JAVA_LIBRARIES $STD_LIBRARIES $ZIP_LIBRARIES $NET_LIBRARIES $X_LIBRARIES $AWTLIB"
 	KAFFE_LIBDEP="$KAFFE_LIBDEP ../kaffevm/libkaffevm$LIBEXT $JAVA_LIBRARIES"
+	NOSHAREDLIBS="$NOSHAREDLIBS $GUARANALIB"
+	KAFFE_LIBDEP="$KAFFE_LIBDEP $GUARANALIB"
 	PIC=""
 	PICVM=""
 	LIBSHARE=""
@@ -767,7 +782,7 @@
 kaffehome=`eval echo $datadir`/kaffe
 AC_DEFINE_UNQUOTED(DEFAULT_KAFFEHOME, "$kaffehome")
 
-AC_CONFIG_HEADER(config/config.h include/jtypes.h)
+AC_CONFIG_HEADER(config/config.h include/jtypes.h include/guarana.h)
 AC_OUTPUT($output)
 
 dnl =========================================================================
Index: kaffe/config/config.h.in
diff -u kaffe/config/config.h.in:1.1.1.14 kaffe/config/config.h.in:1.16
--- kaffe/config/config.h.in:1.1.1.14	Wed Nov 11 01:40:10 1998
+++ kaffe/config/config.h.in	Wed Nov 11 02:40:18 1998
@@ -377,6 +377,9 @@
 /* Kaffe version number */
 #undef	KAFFEVERSION
 
+/* Enable Guarana reflective kernel */
+#undef  GUARANA
+
 /* Define default KAFFEHOME */
 #undef  DEFAULT_KAFFEHOME
 
Index: kaffe/include/Makefile.in
diff -u kaffe/include/Makefile.in:1.1.1.11 kaffe/include/Makefile.in:1.12
--- kaffe/include/Makefile.in:1.1.1.11	Wed Sep  9 21:35:45 1998
+++ kaffe/include/Makefile.in	Wed Sep  9 22:34:41 1998
@@ -20,6 +20,7 @@
 SHELL=		/bin/sh
 
 BUILT_INCLUDEFILES= \
+		guarana.h \
 		jtypes.h
 
 INCLUDEFILES= \
Index: kaffe/include/guarana.h.in
diff -u /dev/null kaffe/include/guarana.h.in:1.1
--- /dev/null	Mon Nov 16 07:56:04 1998
+++ kaffe/include/guarana.h.in	Fri May 16 19:21:19 1997
@@ -0,0 +1,18 @@
+/* guarana.h
+ * Enable or disable Guarana's Reflective Kernel and MetaObject support
+ *
+ * Written by Alexandre Oliva <oliva@dcc.unicamp.br>
+ */
+
+#ifndef __guarana_h
+#define __guarana_h
+
+#ifndef GUARANA
+#undef GUARANA
+#endif
+
+#ifdef GUARANA
+struct HBR_unicamp_Guarana_MetaObject;
+#endif
+
+#endif
Index: kaffe/include/java_lang_Object.h
diff -u kaffe/include/java_lang_Object.h:1.1.1.2 kaffe/include/java_lang_Object.h:1.3
--- kaffe/include/java_lang_Object.h:1.1.1.2	Mon Mar 30 20:11:46 1998
+++ kaffe/include/java_lang_Object.h	Sun Apr 19 13:12:10 1998
@@ -11,6 +11,8 @@
 #ifndef __java_lang_object_h
 #define __java_lang_object_h
 
+#include <guarana.h>
+
 struct _dispatchTable;
 struct _iLock;
 
@@ -18,6 +20,9 @@
 	struct _dispatchTable*  dtable;
 #if defined(USE_LOCK_CACHE)
 	struct _iLock*		lock;
+#endif
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject* meta_object;
 #endif
 	/* Data follows on immediately */
 } Hjava_lang_Object;
Index: kaffe/kaffe/kaffe/main.c
diff -u kaffe/kaffe/kaffe/main.c:1.1.1.11 kaffe/kaffe/kaffe/main.c:1.5
--- kaffe/kaffe/kaffe/main.c:1.1.1.11	Tue Oct  6 03:18:08 1998
+++ kaffe/kaffe/kaffe/main.c	Tue Oct  6 04:46:56 1998
@@ -27,6 +27,9 @@
 
 extern char* engine_name;
 extern char* engine_version;
+#ifdef GUARANA
+extern char* guarana_version;
+#endif
 static char* java_version;
 
 #include "jni.h"
@@ -223,6 +226,9 @@
 			fprintf(stderr, "Kaffe Virtual Machine\n");
 			fprintf(stderr, "Copyright (c) 1996, 1997, 1998\nTransvirtual Technologies, Inc.  All rights reserved\n");
 			fprintf(stderr, "Engine: %s   Version: %s   Java Version: %s\n", engine_name, engine_version, java_version);
+#ifdef GUARANA
+			fprintf(stderr, "\nInstrumented with Guarana %s\nCopyright (c) 1997, 1998  Alexandre Oliva\n", guarana_version);
+#endif
 			exit(0);
 		}
 		else if (strcmp(argv[i], "-classpath") == 0) {
Index: kaffe/kaffe/kaffevm/Makefile.in
diff -u kaffe/kaffe/kaffevm/Makefile.in:1.1.1.14 kaffe/kaffe/kaffevm/Makefile.in:1.20
--- kaffe/kaffe/kaffevm/Makefile.in:1.1.1.14	Tue Oct  6 03:18:18 1998
+++ kaffe/kaffe/kaffevm/Makefile.in	Wed Nov 11 02:40:21 1998
@@ -11,6 +11,8 @@
 prefix=		@prefix@
 exec_prefix=	@exec_prefix@
 libdir=		@libdir@
+classdir=	@datadir@/kaffe
+nativedir=	@nativedir@
 INSTROOT=	@INSTROOT@
 INSTALL=	@INSTALL@
 INSTALL_DATA=	@INSTALL_DATA@
@@ -27,13 +29,14 @@
 LIBS=		@LIBS@
 LDTAIL=		@LDTAIL@ @NET_LIBRARIES@ @STD_LIBRARIES@ @VM_LIBRARIES@
 KVER=		@KVER@
+GVER=		@GVER@
 OBJEXT=		@OBJEXT@
 LIBEXT=		@LIBVMEXT@
 
 INCLUDES=	-I. -I$(srcdir) -I$(srcdir)/../../config -I../../config -I../../include -I$(srcdir)/../../include -I../../libraries/clib
 CPPFLAGS=	@CPPFLAGS@
 CFLAGS=		@CFLAGS@
-ALL_CFLAGS=	$(INCLUDES) $(CPPFLAGS) $(CFLAGS) @KAFFEVMFLAGS@ $(ENGINE_CFLAGS) -DKVER=\"$(KVER)\" $(EXTRA_CFLAGS)
+ALL_CFLAGS=	$(INCLUDES) $(CPPFLAGS) $(CFLAGS) @KAFFEVMFLAGS@ $(ENGINE_CFLAGS) -DKVER=\"$(KVER)\" -DGVER=\"$(GVER)\" $(EXTRA_CFLAGS)
 
 LIBNAME=	libkaffevm
 LIB=		$(LIBNAME)$(LIBEXT).$(KVER)
@@ -74,8 +77,45 @@
 @cpu_os_frag@
 @threads_frag@
 
-OBJECT=		$(COMMON) $(THREAD) $(ENGINE_OBJECTS) $(CPU_OBJECTS) $(CPUOS_OBJECTS)
+GUARANA_OBJECTS = \
+		guarana/GuaraNative$(OBJEXT)
 
+OBJECT=		$(COMMON) $(THREAD) $(ENGINE_OBJECTS) $(CPU_OBJECTS) $(CPUOS_OBJECTS) @COMMENT_GUARANA@ $(GUARANA_OBJECTS)
+
+LIBGUARANA_OBJECTS = \
+		guarana/Guarana$(OBJEXT) \
+		guarana/Operation$(OBJEXT) \
+		guarana/OperationFactoryInternal$(OBJEXT) \
+		guarana/Result$(OBJEXT)
+
+$(LIBGUARANA_OBJECTS) $(GUARANA_OBJECTS) : guarana/Makefile.build
+
+LIBGEXT=	@LIBEXT@
+LIBGUARANAME=	libguarana
+LIBGUARANA=	$(LIBGUARANAME)$(LIBGEXT).$(GVER)
+LLIBGUARANA=	$(LIBGUARANAME)$(LIBGEXT)
+
+guarana/Makefile.build:
+		test -d guarana || mkdir guarana
+		cp $(srcdir)/guarana/Makefile $@
+
+@COMMENT_GUARANA@ all: $(LLIBGUARANA)
+
+$(LLIBGUARANA): $(LIBGUARANA)
+		rm -f $(LLIBGUARANA)
+		$(LN) $(LIBGUARANA) $(LLIBGUARANA)
+
+$(LIBGUARANA): $(LIBGUARANA_OBJECTS) libguarana.exp
+		$(MAKE) LIB="$(LIBGUARANA)" OBJECT="$(LIBGUARANA_OBJECTS)" mkguarana
+
+.PHONY: mkguarana
+mkguarana:
+		@LINKLIB@
+
+libguarana.exp:
+		$(DLLTOOL) --def $(srcdir)/$(LIBGUARANAME).def --output-exp libguarana.exp --output-lib $(LIBGUARANAME).a --dllname $(LLIBGUARANA)
+		touch libguarana.exp
+
 DEPENDS=       $(OBJECT:@OBJEXT@=.d)
 
 mkkaffevm:	$(LLIB)
@@ -97,6 +137,7 @@
 
 clean:
 		rm -f $(LIB) $(LLIB) $(OBJECT) lib.exp
+@COMMENT_GUARANA@	rm -f $(LIBGUARANA) $(LLIBGUARANA) $(LIBGUARANA_OBJECTS) libguarana.exp
 		rm -f $(DEPENDS)
 		rm -f .depend
 		touch .depend
@@ -111,10 +152,16 @@
 		$(INSTALL_DATA) $(LIB) $(INSTROOT)$(libdir)/$(LIB)
 		rm -f $(INSTROOT)$(libdir)/$(LLIB)
 		$(LN) $(LIB) $(INSTROOT)$(libdir)/$(LLIB)
+@COMMENT_GUARANA@	$(INSTALL_DATA) $(LIBGUARANA) $(INSTROOT)$(nativedir)/$(LIBGUARANA)
+@COMMENT_GUARANA@	rm -f $(INSTROOT)$(nativedir)/$(LLIBGUARANA)
+@COMMENT_GUARANA@	$(LN) $(LIBGUARANA) $(INSTROOT)$(nativedir)/$(LLIBGUARANA)
+@COMMENT_GUARANA@	test -d $(INSTROOT)$(classdir) || $(MKDIR) $(INSTROOT)$(classdir)
+@COMMENT_GUARANA@	$(INSTALL_DATA) $(srcdir)/guarana/guarana.jar $(INSTROOT)$(classdir)/guarana.jar
 
 derived-files:
 
 depend:         $(DEPENDS)
+@COMMENT_GUARANA@	test -d guarana || mkdir guarana
 		rm -f .depend
 		cat $(DEPENDS) > .depend
 
Index: kaffe/kaffe/kaffevm/baseClasses.c
diff -u kaffe/kaffe/kaffevm/baseClasses.c:1.1.1.11 kaffe/kaffe/kaffevm/baseClasses.c:1.8
--- kaffe/kaffe/kaffevm/baseClasses.c:1.1.1.11	Wed Nov 11 01:41:06 1998
+++ kaffe/kaffe/kaffevm/baseClasses.c	Wed Nov 11 02:40:22 1998
@@ -28,6 +28,9 @@
 #include "exception.h"
 #include "itypes.h"
 #include "md.h"
+#ifdef GUARANA
+#include "external.h"
+#endif
 
 Utf8Const* init_name;
 Utf8Const* final_name;
@@ -103,6 +106,18 @@
 	/* Init native support */
 	initNative();
 
+#ifdef GUARANA
+#ifdef NO_SHARED_LIBRARIES
+	java_lang_Class_init_function_pointers();
+#else
+	{
+	  void (*init_func_ptrs)(void) =
+	    loadNativeLibrarySym("java_lang_Class_init_function_pointers");
+	  init_func_ptrs();
+	}
+#endif
+#endif
+	
 	/* Create the initialise and finalize names and signatures. */
 	init_name = makeUtf8ConstFixed(INIT, -1);
 	final_name = makeUtf8ConstFixed(FINAL, -1);
Index: kaffe/kaffe/kaffevm/classMethod.c
diff -u kaffe/kaffe/kaffevm/classMethod.c:1.1.1.12 kaffe/kaffe/kaffevm/classMethod.c:1.15
--- kaffe/kaffe/kaffevm/classMethod.c:1.1.1.12	Wed Nov 11 01:41:08 1998
+++ kaffe/kaffe/kaffevm/classMethod.c	Wed Nov 11 02:40:22 1998
@@ -297,7 +297,7 @@
 void
 registerClass(classEntry* entry)
 {
-	lockMutex(entry);
+	lockCEntryMutex(entry);
 
 	/*
 	 * It is necessary to add the entry->class to the GC in some
@@ -305,7 +305,7 @@
 	 * however, this isn't possible right now.
 	 */
 
-	unlockMutex(entry);
+	unlockCEntryMutex(entry);
 }
 
 static
@@ -528,7 +528,7 @@
 	} 
 
 	/* Lock centry before setting centry->class */
-	lockMutex(centry);
+	lockCEntryMutex(centry);
 
 	/* Check again in case someone else did it */
 	if (centry->class == NULL) {
@@ -550,7 +550,7 @@
 	}
 
 	/* Release lock now class has been entered and processed */
-	unlockMutex(centry);
+	unlockCEntryMutex(centry);
 
 	if (clazz == NULL) {
 		throwException(ClassNotFoundException(name->data));
@@ -574,12 +574,12 @@
 	(*class) = newClass();
 
         centry = lookupClassEntry(makeUtf8Const(name, -1), 0);
-	lockMutex(centry);
+	lockCEntryMutex(centry);
 	if (centry->class == 0) {
 		centry->class = *class;
 		findClass(centry);
 	}
-	unlockMutex(centry);
+	unlockCEntryMutex(centry);
 
 	processClass(centry->class, CSTATE_LINKED);
 }
@@ -613,13 +613,13 @@
 	 * else may update it while we're doing this.  Once we've got the
 	 * name we don't really care.
 	 */
-	lockMutex(this->centry);
+	lockCEntryMutex(this->centry);
 	if (FIELD_RESOLVED(fld)) {
-		unlockMutex(this->centry);
+		unlockCEntryMutex(this->centry);
 		return (FIELD_TYPE(fld));
 	}
 	name = ((Utf8Const*)fld->type)->data;
-	unlockMutex(this->centry);
+	unlockCEntryMutex(this->centry);
 
 	clas = getClassFromSignature(name, this->loader);
 
@@ -806,7 +806,7 @@
 	int idx;
 	int n;
 
-	lockMutex(class->centry);
+	lockCEntryMutex(class->centry);
 
 	pool = CLASS_CONSTANTS(class);
 	fld = CLASS_SFIELDS(class);
@@ -858,7 +858,7 @@
 		}
 	}
 
-	unlockMutex(class->centry);
+	unlockCEntryMutex(class->centry);
 }
 
 static
@@ -866,7 +866,11 @@
 buildDispatchTable(Hjava_lang_Class* class)
 {
 	Method* meth;
+#ifdef GUARANA
+	dispatchMethod* mtab;
+#else
 	void** mtab;
+#endif
 	int i;
 #if defined(TRANSLATOR)
 	int ntramps = 0;
@@ -919,10 +923,10 @@
 	   one block of memory.  This is primarily done for GC reasons in
 	   that I didn't want to add another slot on class just for holding
 	   the trampolines, but it also works out for space reasons.  */
-	class->dtable = (dispatchTable*)gc_malloc(sizeof(dispatchTable) + class->msize * sizeof(void*) + ntramps * sizeof(methodTrampoline), GC_ALLOC_DISPATCHTABLE);
+	class->dtable = (dispatchTable*)gc_malloc(sizeof(dispatchTable) + class->msize * DTABLE_METHODSIZE + ntramps * sizeof(methodTrampoline), GC_ALLOC_DISPATCHTABLE);
 	tramp = (methodTrampoline*) &class->dtable->method[class->msize];
 #else
-	class->dtable = (dispatchTable*)gc_malloc(sizeof(dispatchTable) + (class->msize * sizeof(void*)), GC_ALLOC_DISPATCHTABLE);
+	class->dtable = (dispatchTable*)gc_malloc(sizeof(dispatchTable) + (class->msize * DTABLE_METHODSIZE), GC_ALLOC_DISPATCHTABLE);
 #endif
 
 	class->dtable->class = class;
@@ -930,9 +934,18 @@
 
 	/* Install inherited methods into dispatch table. */
 	if (class->superclass != NULL) {
+#ifdef GUARANA
+		dispatchMethod* super_mtab = class->superclass->dtable->method;
+#else
 		Method** super_mtab = (Method**)class->superclass->dtable->method;
+#endif
 		for (i = 0; i < class->superclass->msize; i++) {
+#ifdef GUARANA
+			DMETHOD_ADDR(mtab[i]) = DMETHOD_ADDR(super_mtab[i]);
+			DMETHOD_DESC(mtab[i]) = DMETHOD_DESC(super_mtab[i]);
+#else
 			mtab[i] = super_mtab[i];
+#endif
 		}
 	}
 
@@ -952,7 +965,12 @@
 			tramp++;
 		}
 		if (meth->idx >= 0) {
+#ifdef GUARANA
+		        DMETHOD_DESC(mtab[meth->idx]) = meth;
+		        DMETHOD_ADDR(mtab[meth->idx]) = METHOD_NATIVECODE(meth);
+#else
 			mtab[meth->idx] = METHOD_NATIVECODE(meth);
+#endif
 		}
 	}
 	FLUSH_DCACHE(class->dtable, tramp);
@@ -968,7 +986,11 @@
 	 * See "Java Language Specification" (1996) section 12.3.2. */
 	if ((class->accflags & ACC_ABSTRACT) == 0) {
 		for (i = class->msize - 1; i >= 0; i--) {
+#ifdef GUARANA
+			if (DMETHOD_ADDR(mtab[i]) == NULL) {
+#else
 			if (mtab[i] == NULL) {
+#endif
 				throwException(AbstractMethodError);
 			}
 		}
@@ -1015,7 +1037,7 @@
 	int idx;
 	constants* pool;
 
-	lockMutex(class->centry);
+	lockCEntryMutex(class->centry);
 
 	/* Scan constant pool and convert any constant strings into true
 	 * java strings.
@@ -1034,7 +1056,7 @@
 		}
 	}
 
-	unlockMutex(class->centry);
+	unlockCEntryMutex(class->centry);
 }
 
 classEntry*
@@ -1249,11 +1271,11 @@
 	}
 
 	/* Lock class entry */
-	lockMutex(centry);
+	lockCEntryMutex(centry);
 
 	/* Incase someone else did it */
 	if (centry->class != 0) {
-		unlockMutex(centry);
+		unlockCEntryMutex(centry);
 #if !INTERN_UTF8CONSTS
 		gc_free(arr_name);
 #endif
@@ -1285,7 +1307,7 @@
 	arr_class->state = CSTATE_OK;
 	arr_class->centry = centry;
 
-	unlockMutex(centry);
+	unlockCEntryMutex(centry);
 
 	found:;
 	if (CLASS_IS_PRIMITIVE(c)) {
Index: kaffe/kaffe/kaffevm/classMethod.h
diff -u kaffe/kaffe/kaffevm/classMethod.h:1.1.1.13 kaffe/kaffe/kaffevm/classMethod.h:1.19
--- kaffe/kaffe/kaffevm/classMethod.h:1.1.1.13	Wed Nov 11 01:41:09 1998
+++ kaffe/kaffe/kaffevm/classMethod.h	Wed Nov 11 02:40:23 1998
@@ -143,16 +143,49 @@
 	constIndex*		declared_exceptions;
 } methods;
 
+#ifdef GUARANA
+
+#if defined(TRANSLATOR)
+
+#define METHOD_NATIVEOFFSET	((int)&(((methods*)0)->ncode))
+
+typedef struct _dispatchMethod {
+	void *addr;
+	Method *desc;
+} dispatchMethod;
+
+#define DMETHOD_ADDR(dm)	((dm).addr)
+#define DMETHOD_DESC(dm)	((dm).desc)
+#define DMETHOD_DESCOFFSET	((int)&(((dispatchMethod*)0)->desc))
+
+#else
+typedef void *dispatchMethod;
+
+#define DMETHOD_ADDR(dm)	(dm)
+#define DMETHOD_DESC(dm)	(dm)
+#define DMETHOD_DESCOFFSET	0
+#endif
+#endif
+
 typedef struct _dispatchTable {
 	Hjava_lang_Class*	class;
-	void*			method[1];
+#ifdef GUARANA
+        dispatchMethod		method[1];
+#else
+        void*			method[1];
+#endif
 } dispatchTable;
 
 #define	CLASS_STATE		((int)&(((Hjava_lang_Class*)0)->state))
 
 #define	DTABLE_CLASS		0
+#ifdef GUARANA
+#define	DTABLE_METHODOFFSET	((int)&(((dispatchTable*)0)->method[0]))
+#define	DTABLE_METHODSIZE	(sizeof(((dispatchTable*)0)->method[0]))
+#else
 #define	DTABLE_METHODOFFSET	(sizeof(void*))
 #define	DTABLE_METHODSIZE	(sizeof(void*))
+#endif
 
 typedef struct _fields {
 	Utf8Const*		name;
Index: kaffe/kaffe/kaffevm/exception.c
diff -u kaffe/kaffe/kaffevm/exception.c:1.1.1.11 kaffe/kaffe/kaffevm/exception.c:1.6
--- kaffe/kaffe/kaffevm/exception.c:1.1.1.11	Mon Sep  7 14:17:04 1998
+++ kaffe/kaffe/kaffevm/exception.c	Mon Sep  7 15:03:36 1998
@@ -170,7 +170,7 @@
 			/* If not here, exit monitor if synchronised. */
 			lk = getLock(obj);
 			if (lk != 0 && lk->holder == (*Kaffe_ThreadInterface.currentNative)()) {
-				unlockMutex(obj);
+				unlockObjMutex(obj);
 			}
 		}
 	}
@@ -212,7 +212,7 @@
 			/* If method found and synchronised, unlock the lock */
 			lk = getLock(obj);
 			if (lk != 0 && lk->holder == (*Kaffe_ThreadInterface.currentNative)()) {
-				unlockMutex(obj);
+				unlockObjMutex(obj);
 			}
 		}
 	}
Index: kaffe/kaffe/kaffevm/findInJar.c
diff -u kaffe/kaffe/kaffevm/findInJar.c:1.1.1.12 kaffe/kaffe/kaffevm/findInJar.c:1.10
--- kaffe/kaffe/kaffevm/findInJar.c:1.1.1.12	Mon Sep  7 14:17:07 1998
+++ kaffe/kaffe/kaffevm/findInJar.c	Mon Sep  7 15:03:37 1998
@@ -99,7 +99,7 @@
 			class = newClass();
 		}
 
-		lockMutex(centry);
+		lockCEntryMutex(centry);
 
 		class->name = centry->name;
 		class->centry = centry;
@@ -107,7 +107,7 @@
 		readClass(class, &hand, NULL);
 		class->state = CSTATE_LOADED;
 
-		unlockMutex(centry);
+		unlockCEntryMutex(centry);
 
 		if (hand.base != 0) {
 			gc_free_fixed(hand.base);
Index: kaffe/kaffe/kaffevm/jni.c
diff -u kaffe/kaffe/kaffevm/jni.c:1.1.1.8 kaffe/kaffe/kaffevm/jni.c:1.10
--- kaffe/kaffe/kaffevm/jni.c:1.1.1.8	Wed Nov 11 01:41:18 1998
+++ kaffe/kaffe/kaffevm/jni.c	Wed Nov 11 02:40:24 1998
@@ -14,6 +14,9 @@
 #endif
 
 #include "config.h"
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
 #include "config-std.h"
 #include "config-mem.h"
 #include "jni.h"
@@ -391,7 +394,18 @@
 	}
 	obj = newObject(clazz);
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	ADD_REF(obj);
 	END_EXCEPTION_HANDLING();
@@ -431,7 +445,18 @@
 	}
 	obj = newObject(clazz);
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	ADD_REF(obj);
 	END_EXCEPTION_HANDLING();
@@ -498,7 +523,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	ADD_REF(retval.l);
 	END_EXCEPTION_HANDLING();
@@ -534,7 +570,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.l);
@@ -553,7 +600,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.z);
@@ -588,7 +646,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.z);
@@ -607,7 +676,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.b);
@@ -642,7 +722,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.b);
@@ -661,7 +752,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.c);
@@ -696,7 +798,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.c);
@@ -715,7 +828,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.s);
@@ -750,7 +874,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.s);
@@ -769,7 +904,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.i);
@@ -804,7 +950,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.i);
@@ -823,7 +980,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.j);
@@ -858,7 +1026,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.j);
@@ -877,7 +1056,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.f);
@@ -912,7 +1102,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.f);
@@ -931,7 +1132,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.d);
@@ -966,7 +1178,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, &retval);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, &retval);
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.d);
@@ -984,7 +1207,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_resolve_method_invocation(mo, obj, m, args, 0);
+	    } else {
+		callMethodV(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, 0);
+	    }
+	}
+#else
 	callMethodV(m, o->dtable->method[m->idx], obj, args, 0);
+#endif
 
 	END_EXCEPTION_HANDLING();
 }
@@ -1015,7 +1249,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_resolve_method_invocation(obj, m, (slots*)args, 0);
+	    } else {
+		callMethodA(m, DMETHOD_ADDR(o->dtable->method[m->idx]), obj, args, 0);
+	    }
+	}
+#else
 	callMethodA(m, o->dtable->method[m->idx], obj, args, 0);
+#endif
 
 	END_EXCEPTION_HANDLING();
 }
@@ -1032,7 +1277,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	ADD_REF(retval.l);
 	END_EXCEPTION_HANDLING();
@@ -1067,7 +1323,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	ADD_REF(retval.l);
 	END_EXCEPTION_HANDLING();
@@ -1086,7 +1353,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.z);
@@ -1120,7 +1398,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.z);
@@ -1138,7 +1427,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.b);
@@ -1172,7 +1472,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.b);
@@ -1190,7 +1501,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.c);
@@ -1224,7 +1546,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.c);
@@ -1242,7 +1575,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.s);
@@ -1276,7 +1620,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.s);
@@ -1294,7 +1649,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.i);
@@ -1328,7 +1694,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.i);
@@ -1346,7 +1723,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.j);
@@ -1380,7 +1768,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.j);
@@ -1398,7 +1797,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.f);
@@ -1432,7 +1842,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.f);
@@ -1450,7 +1871,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.d);
@@ -1484,7 +1916,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.d);
@@ -1501,7 +1944,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, obj, m, args, 0);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), obj, args, 0);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 }
@@ -1531,7 +1985,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)obj)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(obj, m, (slots*)args, 0);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), obj, args, 0);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 }
@@ -1781,7 +2246,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	ADD_REF(retval.l);
 	END_EXCEPTION_HANDLING();
@@ -1816,7 +2292,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	ADD_REF(retval.l);
 	END_EXCEPTION_HANDLING();
@@ -1835,7 +2322,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.z);
@@ -1869,7 +2367,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.z);
@@ -1887,7 +2396,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.b);
@@ -1921,7 +2441,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.b);
@@ -1939,7 +2470,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.c);
@@ -1973,7 +2515,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.c);
@@ -1991,7 +2544,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.s);
@@ -2025,7 +2589,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.s);
@@ -2043,7 +2618,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.i);
@@ -2077,7 +2663,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.i);
@@ -2095,7 +2692,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.j);
@@ -2129,7 +2737,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.j);
@@ -2147,7 +2766,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.f);
@@ -2181,7 +2811,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.f);
@@ -2199,7 +2840,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.d);
@@ -2233,7 +2885,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 	return (retval.d);
@@ -2251,7 +2914,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_va_list_reify_method_invocation(mo, cls, m, args, (slots*)&retval);
+	    } else {
+#endif
 	callMethodV(m, JNI_METHOD_CODE(m), 0, args, &retval);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 }
@@ -2281,7 +2955,18 @@
 		throwException(NoSuchMethodError(m->name->data));
 	}
 
+#ifdef GUARANA
+	{
+	    struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)cls)->meta_object;
+	    if (mo) {
+		guarana_slots_reify_method_invocation(cls, m, (slots*)args, 0);
+	    } else {
+#endif
 	callMethodA(m, JNI_METHOD_CODE(m), 0, args, 0);
+#ifdef GUARANA
+	    }
+	}
+#endif
 
 	END_EXCEPTION_HANDLING();
 }
@@ -3369,7 +4054,7 @@
 {
 	BEGIN_EXCEPTION_HANDLING(0);
 
-	lockMutex(obj);
+	lockObjMutex(obj);
 
 	END_EXCEPTION_HANDLING();
 	return (0);
@@ -3380,7 +4065,7 @@
 {
 	BEGIN_EXCEPTION_HANDLING(0);
 
-	unlockMutex(obj);
+	unlockObjMutex(obj);
 
 	END_EXCEPTION_HANDLING();
 	return (0);
Index: kaffe/kaffe/kaffevm/kaffe.def
diff -u kaffe/kaffe/kaffevm/kaffe.def:1.1.1.11 kaffe/kaffe/kaffevm/kaffe.def:1.19
--- kaffe/kaffe/kaffevm/kaffe.def:1.1.1.11	Tue Oct  6 03:18:52 1998
+++ kaffe/kaffe/kaffevm/kaffe.def	Tue Oct  6 04:47:00 1998
@@ -1,4 +1,4 @@
-/*
+/* -*- C -*-
  * kaffe.def
  * Kaffe instruction definitions.
  *
@@ -9,6 +9,10 @@
  * of this file. 
  */
 
+#ifdef GUARANA
+# define guarana_spill_and_clean_registers() end_sub_block()
+#endif
+
 define_insn(NOP)
 {
         /*
@@ -315,10 +319,36 @@
 
 	CHECK_NULL (IALOAD, rstack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(IALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_int(stack(1), rstack(1), rstack(0), object_array_offset);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(IALOAD, 33));
+
+	set_label(IALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), int, wstack(1));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(IALOAD, 33);
+	start_sub_block();
+#endif
+
 	pop(1);
 }
 
@@ -332,10 +362,35 @@
 
 	CHECK_NULL (LALOAD, stack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(LALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_long(stack_long(0), stack(1), stack(0), object_array_offset);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(LALOAD, 33));
+
+	set_label(LALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), long, stack_long(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(LALOAD, 33);
+	start_sub_block();
+#endif
 }
 
 define_insn(FALOAD)
@@ -348,11 +403,36 @@
 
 	CHECK_NULL (FALOAD, stack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(FALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_float(stack(1), stack(1), stack(0), object_array_offset);
 
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(FALOAD, 33));
+
+	set_label(FALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), float, wstack(1));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(FALOAD, 33);
+	start_sub_block();
+#endif
+
 	pop(1);
 }
 
@@ -366,10 +446,35 @@
 
 	CHECK_NULL (DALOAD, stack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(DALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_double(stack_double(0), stack(1), stack(0), object_array_offset);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(DALOAD, 33));
+
+	set_label(DALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), double, stack_double(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(DALOAD, 33);
+	start_sub_block();
+#endif
 }
 
 define_insn(AALOAD)
@@ -382,10 +487,36 @@
 
 	CHECK_NULL(AALOAD, rstack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(AALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_ref(stack(1), rstack(1), rstack(0), object_array_offset);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(AALOAD, 33));
+
+	set_label(AALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), ref, wstack(1));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(AALOAD, 33);
+	start_sub_block();
+#endif
+
 	pop(1);
 }
 
@@ -399,10 +530,36 @@
 
 	CHECK_NULL(BALOAD, rstack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(BALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_byte(stack(1), rstack(1), rstack(0), object_array_offset);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(BALOAD, 33));
+
+	set_label(BALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), byte, wstack(1));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(BALOAD, 33);
+	start_sub_block();
+#endif
+
 	pop(1);
 }
 
@@ -416,10 +573,36 @@
 
 	CHECK_NULL(CALOAD, rstack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(CALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_char(stack(1), rstack(1), rstack(0), object_array_offset);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(CALOAD, 33));
+
+	set_label(CALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), char, wstack(1));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(CALOAD, 33);
+	start_sub_block();
+#endif
+
 	pop(1);
 }
 
@@ -433,10 +616,36 @@
 
 	CHECK_NULL(SALOAD, rstack(1), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(1), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(SALOAD, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(1), rstack(0));
 
 	load_offset_scaled_short(stack(1), rstack(1), rstack(0), object_array_offset);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(SALOAD, 33));
+
+	set_label(SALOAD, 32);
+
+	start_sub_block();
+	softcall_reify_array_load(tmp2, rstack(1), rstack(0), short, wstack(1));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(SALOAD, 33);
+	start_sub_block();
+#endif
+
 	pop(1);
 }
 
@@ -591,10 +800,36 @@
 
 	CHECK_NULL(IASTORE, rstack(2), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(2), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(IASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(2), rstack(1));
 
 	store_offset_scaled_int(rstack(2), rstack(1), object_array_offset, rstack(0));
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(IASTORE, 33));
+
+	set_label(IASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(2), rstack(1), int, rstack(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(IASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(3);
 }
 
@@ -609,10 +844,36 @@
 
 	CHECK_NULL(LASTORE, stack(3), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(3), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(LASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(3), rstack(2));
 
 	store_offset_scaled_long(stack(3), stack(2), object_array_offset, stack_long(0));
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(LASTORE, 33));
+
+	set_label(LASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(3), rstack(2), long, stack_long(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(LASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(4);
 }
 
@@ -627,10 +888,36 @@
 
 	CHECK_NULL(FASTORE, stack(2), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(2), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(FASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(2), rstack(1));
 
 	store_offset_scaled_float(stack(2), stack(1), object_array_offset, stack(0));
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(FASTORE, 33));
+
+	set_label(FASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(2), rstack(1), float, rstack(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(FASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(3);
 }
 
@@ -645,11 +932,36 @@
 
 	CHECK_NULL(DASTORE, stack(3), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(3), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(DASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(3), rstack(2));
 
 	store_offset_scaled_long(stack(3), stack(2), object_array_offset, stack_double(0));
 
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(DASTORE, 33));
+
+	set_label(DASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(3), rstack(2), double, stack_double(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(DASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(4);
 }
 
@@ -664,6 +976,16 @@
 
 	CHECK_NULL(AASTORE, rstack(2), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(2), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(AASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(2), rstack(1));
 
@@ -672,6 +994,22 @@
 	SOFT_ADDREFERENCE(rstack(2), rstack(0));
 
 	store_offset_scaled_ref(rstack(2), rstack(1), object_array_offset, rstack(0));
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(AASTORE, 33));
+
+	set_label(AASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(2), rstack(1), ref, rstack(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(AASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(3);
 }
 
@@ -686,10 +1024,36 @@
 
 	CHECK_NULL(BASTORE, rstack(2), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(2), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(BASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(2), rstack(1));
 
 	store_offset_scaled_byte(rstack(2), rstack(1), object_array_offset, rstack(0));
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(BASTORE, 33));
+
+	set_label(BASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(2), rstack(1), byte, rstack(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(BASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(3);
 }
 
@@ -704,10 +1068,36 @@
 
 	CHECK_NULL(CASTORE, rstack(2), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(2), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(CASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(2), rstack(1));
 
 	store_offset_scaled_char(rstack(2), rstack(1), object_array_offset, rstack(0));
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(CASTORE, 33));
+
+	set_label(CASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(2), rstack(1), char, rstack(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(CASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(3);
 }
 
@@ -722,10 +1112,36 @@
 
 	CHECK_NULL(SASTORE, rstack(2), 34);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	load_offset_ref(tmp2, rstack(2), META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(SASTORE, 32));
+#endif
+
 	/* Check we are within the array bounds */
 	check_array_index(rstack(2), rstack(1));
 
 	store_offset_scaled_short(rstack(2), rstack(1), object_array_offset, rstack(0));
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(SASTORE, 33));
+
+	set_label(SASTORE, 32);
+
+	start_sub_block();
+	softcall_reify_array_store(tmp2, rstack(2), rstack(1), short, rstack(0));
+	slot_nowriteback(tmp2);
+	end_sub_block();
+	set_label(SASTORE, 33);
+	start_sub_block();
+#endif
+
 	pop(3);
 }
 
@@ -1884,6 +2300,17 @@
 	get_static_field_info(idx);
 	INIT_STATIC_CLASS(field_class());
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	move_ref_const(tmp2, finfo.class);
+	load_offset_ref(tmp2, tmp2, META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(GETSTATIC, 32));
+#endif
+
 	/* Use the proper load to increase the chances of the translator
 	   getting data in the right type of register.  */
 
@@ -1924,6 +2351,39 @@
 	default:
 		ABORT();
 	}
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(GETSTATIC, 33));
+
+	if (FIELD_ISREF(finfo.field)) {
+		pop(1);
+	}
+	else switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) {
+	default:
+		pop(1);
+		break;
+	case 'J':
+	case 'D':
+		pop(2);
+		break;
+	}
+
+	set_label(GETSTATIC, 32);
+
+	start_sub_block();
+	slot_alloctmp(tmp);
+	move_ref_const(tmp, finfo.class);
+	push(1);
+	softcall_reify_field_load(tmp2, tmp);
+	slot_nowriteback(tmp);
+	slot_nowriteback(tmp2);
+	end_sub_block();
+
+	set_label(GETSTATIC, 33);
+	start_sub_block();
+#endif
 }
 
 define_insn(PUTSTATIC)
@@ -1938,6 +2398,17 @@
 	get_static_field_info(idx);
 	INIT_STATIC_CLASS(field_class());
 
+#ifdef GUARANA
+	slot_alloctmp(tmp2);
+
+	move_ref_const(tmp2, finfo.class);
+	load_offset_ref(tmp2, tmp2, META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(PUTSTATIC, 32));
+#endif
+
 	if (FIELD_ISREF(finfo.field)) {
 		SOFT_ADDREFERENCE_STATIC(field_statics(), stack(0));
 		store_addr_ref(FIELD_ADDRESS(finfo.field), stack(0));
@@ -1976,6 +2447,40 @@
 	default:
 		ABORT();
 	}
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(PUTSTATIC, 33));
+
+	if (FIELD_ISREF(finfo.field)) {
+		push(1);
+	}
+	else switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) {
+	default:
+		push(1);
+		break;
+	case 'J':
+	case 'D':
+		push(2);
+		break;
+	}
+
+	set_label(PUTSTATIC, 32);
+	
+	start_sub_block();
+
+	slot_alloctmp(tmp);
+	move_ref_const(tmp, finfo.class);
+	softcall_reify_field_store(tmp2, tmp);
+
+	slot_nowriteback(tmp);
+	slot_nowriteback(tmp2);
+
+	end_sub_block();
+
+	set_label(PUTSTATIC, 33);
+	start_sub_block();
+#endif
 }
 
 define_insn(GETFIELD)
@@ -1995,6 +2500,17 @@
 	/* Use the proper load to increase the chances of the translator
 	   getting data in the right type of register.  */
 
+#ifdef GUARANA
+	slot_alloctmp(tmp);
+	move_ref(tmp, rstack(0));
+	slot_alloctmp(tmp2);
+	load_offset_ref(tmp2, tmp, META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(GETFIELD, 32));
+#endif
+
 	if (FIELD_ISREF(finfo.field)) {
 		load_offset_ref(stack(0), rstack(0), FIELD_OFFSET(finfo.field));
 	}
@@ -2027,6 +2543,32 @@
 	default:
 		ABORT();
 	}
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(GETFIELD, 33));
+
+	if (!FIELD_ISREF(finfo.field))
+	  switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) {
+	  case 'J':
+	  case 'D':
+	    pop(1);
+	    break;
+	}
+
+	set_label(GETFIELD, 32);
+	
+	start_sub_block();
+	softcall_reify_field_load(tmp2, tmp);
+	slot_nowriteback(tmp2);
+	slot_nowriteback(tmp);
+
+	end_sub_block();
+
+	set_label(GETFIELD, 33);
+	start_sub_block();
+#endif
 }
 
 define_insn(PUTFIELD)
@@ -2040,6 +2582,43 @@
 
 	get_field_info(idx);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp);
+	slot_alloctmp(tmp2);
+
+	/* since we have moved the check_stack_ref and CHECK_NULL
+	   tests here, they might have been commented out from the
+	   non-intercepted branch, but then, they usually expand to
+	   nothing... */
+
+	if (FIELD_ISREF(finfo.field)) {
+	  check_stack_ref(1);
+	  move_ref(tmp, rstack(1));
+	  CHECK_NULL(PUTFIELD, tmp, 42);
+	} else switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) {
+	default:
+	  check_stack_ref(1);
+	  move_ref(tmp, rstack(1));
+	  CHECK_NULL(PUTFIELD, tmp, 43);
+	  break;
+	case 'J':
+	  check_stack_ref(2);
+	  move_ref(tmp, rstack(2));
+	  CHECK_NULL(PUTFIELD, tmp, 44);
+	  break;
+	case 'D':
+	  check_stack_ref(2);
+	  move_ref(tmp, rstack(2));
+	  CHECK_NULL(PUTFIELD, tmp, 44);
+	  break;
+	}
+	load_offset_ref(tmp2, tmp, META_OBJECT_OFFSET);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(PUTFIELD, 32));
+#endif
+
 	/* Use the proper store to increase the chances of the translator
 	   having the data in the right type of register already.  */
 
@@ -2097,6 +2676,38 @@
 	default:
 		ABORT();
 	}
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(PUTFIELD, 33));
+
+	if (FIELD_ISREF(finfo.field)) {
+	  push(2);
+	} else switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) {
+	default:
+	  push(2);
+	  break;
+	case 'J':
+	case 'D':
+	  push(3);
+	  break;
+	}
+
+	set_label(PUTFIELD, 32);
+	
+	start_sub_block();
+	softcall_reify_field_store(tmp2, tmp);
+	pop(1);
+
+	slot_nowriteback(tmp2);
+	slot_nowriteback(tmp);
+
+	end_sub_block();
+
+	set_label(PUTFIELD, 33);
+	start_sub_block();
+#endif
 }
 
 #define	METHOD_RETURN_VALUE()					\
@@ -2163,6 +2774,14 @@
 
 		check_stack_ref(idx);
 
+#ifdef GUARANA
+		guarana_spill_and_clean_registers();
+
+		load_offset_ref(tmp, rstack(idx), META_OBJECT_OFFSET);
+
+		cbranch_ref_const_ne(tmp, 0, reference_label(INVOKEVIRTUAL, 26));
+#endif
+
 		/* Find dispatch table in object */
 		load_offset_ref(mtable, stack(idx), method_dtable_offset);
 
@@ -2185,6 +2804,38 @@
 		/* Pop args */
 		popargs();
 
+#ifdef GUARANA
+		branch_a(reference_label(INVOKEVIRTUAL, 27));
+
+		push(idx);
+		--idx;
+
+		set_label(INVOKEVIRTUAL, 26);
+		/* Otherwise call through MetaObject */
+
+		start_sub_block();
+
+		/* Find dispatch table in object */
+		load_offset_ref(mtable, stack(idx), method_dtable_offset);
+
+		load_offset_ref(tmp, mtable,
+				DTABLE_METHODOFFSET + DMETHOD_DESCOFFSET +
+				method_idx() * DTABLE_METHODSIZE);
+ 			
+		slot_nowriteback(tmp);
+
+		/* Call it */
+		low = method_returntype();
+		softcall_reify_method_invocation(tmp);
+
+		idx++;
+		pop(idx);
+
+		end_sub_block();
+
+		set_label(INVOKEVIRTUAL, 27);
+#endif
+
 		start_sub_block();
 		METHOD_RETURN_VALUE();
 	}
@@ -2217,6 +2868,18 @@
 
 		check_stack_ref(idx);
 
+#ifdef GUARANA
+		slot_alloctmp(tmp2);
+
+		load_offset_ref(tmp2, rstack(idx), META_OBJECT_OFFSET);
+
+		slot_nowriteback(tmp2);
+
+		guarana_spill_and_clean_registers();
+
+		cbranch_ref_const_ne(tmp2, 0, reference_label(INVOKESPECIAL, 28));
+#endif
+
 		/* Push arguments & object */
 		build_call_frame(method_sig(), stack(idx), idx);
 		idx++;
@@ -2232,6 +2895,31 @@
 		/* Pop args */
 		popargs();
 
+#ifdef GUARANA
+		branch_a(reference_label(INVOKESPECIAL, 29));
+
+		push(idx);
+		--idx;
+
+		set_label(INVOKESPECIAL, 28);
+		/* Otherwise call through MetaObject */
+
+		start_sub_block();
+
+		move_ref_const(tmp2, method_method());
+
+		/* Call it */
+		low = method_returntype();
+		softcall_reify_method_invocation(tmp2);
+
+		++idx;
+		pop(idx);
+
+		end_sub_block();
+
+		set_label(INVOKESPECIAL, 29);
+#endif
+
 		start_sub_block();
 		METHOD_RETURN_VALUE();
 	}
@@ -2258,6 +2946,19 @@
 	else {
 		idx = method_nargs();
 
+#ifdef GUARANA
+		slot_alloctmp(tmp2);
+
+		move_ref_const(tmp2, method_class ());
+		load_offset_ref(tmp2, tmp2, META_OBJECT_OFFSET);
+
+		slot_nowriteback(tmp2);
+
+		guarana_spill_and_clean_registers();
+		
+		cbranch_ref_const_ne(tmp2, 0, reference_label(INVOKESTATIC, 30));
+#endif
+
 		/* Push arguments */
 		build_call_frame(method_sig(), 0, idx);
 
@@ -2272,7 +2973,30 @@
 		/* Pop args */
 		popargs();
 
+#ifdef GUARANA
+		branch_a(reference_label(INVOKESTATIC, 31));
+
+		push(idx);
+
+		set_label(INVOKESTATIC, 30);
+		/* Otherwise call through MetaObject */
+
 		start_sub_block();
+
+		move_ref_const(tmp2, method_method());
+
+		/* Call it */
+		low = method_returntype();
+		softcall_reify_method_invocation(tmp2);
+
+		pop(idx);
+
+		end_sub_block();
+
+		set_label(INVOKESTATIC, 31);
+#endif
+
+		start_sub_block();
 		METHOD_RETURN_VALUE();
 	}
 }
@@ -2307,6 +3031,23 @@
 
 		softcall_lookupmethod(tmp, method_method(), stack(idx));
 
+#ifdef GUARANA
+		slot_alloctmp(tmp2);
+
+		load_offset_ref(tmp2, rstack(idx), META_OBJECT_OFFSET);
+
+		slot_nowriteback(tmp2);
+
+		guarana_spill_and_clean_registers();
+
+		cbranch_ref_const_ne(tmp2, 0, reference_label(INVOKEINTERFACE, 32));
+
+#ifdef TRANSLATOR
+		load_offset_ref(tmp, tmp, METHOD_NATIVEOFFSET);
+#endif
+
+#endif
+
 		/* Push arguments & object */
 		build_call_frame(method_sig(), stack(idx), idx);
 		idx++;
@@ -2322,7 +3063,31 @@
 		/* Pop args */
 		popargs();
 
+#ifdef GUARANA
+		branch_a(reference_label(INVOKEINTERFACE, 33));
+
+		push(idx);
+		--idx;
+
+		set_label(INVOKEINTERFACE, 32);
+		/* Otherwise call through MetaObject */
+
 		start_sub_block();
+
+		low = method_returntype();
+
+		/* Call it */
+		softcall_reify_method_invocation(tmp);
+
+		idx++;
+		pop(idx);
+
+		end_sub_block();
+
+		set_label(INVOKEINTERFACE, 33);
+#endif
+
+		start_sub_block();
 		METHOD_RETURN_VALUE();
 	}
 }
@@ -2376,7 +3141,38 @@
 
 	check_stack_array(0);
 
+#ifdef GUARANA
+	slot_alloctmp(tmp);
+	slot_alloctmp(tmp2);
+
+	move_ref(tmp, rstack(0));
+	load_offset_ref(tmp2, tmp, META_OBJECT_OFFSET);
+
+	slot_nowriteback(tmp2);
+
+	guarana_spill_and_clean_registers();
+
+	cbranch_ref_const_ne(tmp2, 0, reference_label(ARRAYLENGTH, 35));
+#endif
+
 	load_offset_int(stack(0), rstack(0), object_array_length);
+
+#ifdef GUARANA
+	end_sub_block();
+
+	branch_a(reference_label(ARRAYLENGTH, 36));
+
+	set_label(ARRAYLENGTH, 35);
+
+	start_sub_block();
+
+	softcall_reify_arraylength(stack(0), rstack(0));
+
+	end_sub_block();
+
+	set_label(ARRAYLENGTH, 36);
+	start_sub_block();
+#endif
 }
 
 define_insn(ATHROW)
Index: kaffe/kaffe/kaffevm/locks.h
diff -u kaffe/kaffe/kaffevm/locks.h:1.1.1.8 kaffe/kaffe/kaffevm/locks.h:1.7
--- kaffe/kaffe/kaffevm/locks.h:1.1.1.8	Mon Sep  7 14:17:19 1998
+++ kaffe/kaffe/kaffevm/locks.h	Wed Sep  9 05:08:32 1998
@@ -13,9 +13,33 @@
 #define __locks_h
 
 #include "md.h"
+#include "guarana.h"
 
-#define	lockMutex			_lockMutex
-#define	unlockMutex			_unlockMutex
+#ifdef GUARANA
+
+struct Hjava_lang_Object;
+extern void guarana_reify_monitorEnter(struct Hjava_lang_Object *o);
+extern void guarana_reify_monitorExit(struct Hjava_lang_Object *o);
+
+# define lockObjMutex			guarana_reify_monitorEnter
+# define unlockObjMutex			guarana_reify_monitorExit
+
+# define lockCEntryMutex		_lockMutex
+# define unlockCEntryMutex		_unlockMutex
+
+#else
+
+# define lockObjMutex			_lockMutex
+# define unlockObjMutex			_unlockMutex
+
+# define lockCEntryMutex		_lockMutex
+# define unlockCEntryMutex		_unlockMutex
+
+#endif
+
+#define lockObjMutexDirect		_lockMutex
+#define unlockObjMutexDirect		_unlockMutex
+
 #define	waitCond			_waitCond
 #define	signalCond			_signalCond
 #define	broadcastCond			_broadcastCond
Index: kaffe/kaffe/kaffevm/lookup.c
diff -u kaffe/kaffe/kaffevm/lookup.c:1.1.1.9 kaffe/kaffe/kaffevm/lookup.c:1.8
--- kaffe/kaffe/kaffevm/lookup.c:1.1.1.9	Tue Oct  6 03:18:58 1998
+++ kaffe/kaffe/kaffevm/lookup.c	Tue Oct  6 04:47:00 1998
@@ -117,10 +117,10 @@
 		 * lock and get the tag & name again just in case.  If we
 		 * have been resolved then we just return the answer.
 		 */
-		lockMutex(this->centry);
+		lockCEntryMutex(this->centry);
 		tag = pool->tags[idx];
 		name = WORD2UTF(pool->data[idx]);
-		unlockMutex(this->centry);
+		unlockCEntryMutex(this->centry);
 
 		if (tag == CONSTANT_ResolvedClass) {
 			return (CLASS_CLASS(idx, pool));
@@ -148,10 +148,10 @@
 	/* Lock the class while we update the constant pool.  Someone
 	 * may have done this already but we don't care.
 	 */
-	lockMutex(this->centry);
+	lockCEntryMutex(this->centry);
 	pool->data[idx] = (ConstSlot)class;
 	pool->tags[idx] = CONSTANT_ResolvedClass;
-	unlockMutex(this->centry);
+	unlockCEntryMutex(this->centry);
 
 	return (class);
 }
Index: kaffe/kaffe/kaffevm/object.c
diff -u kaffe/kaffe/kaffevm/object.c:1.1.1.7 kaffe/kaffe/kaffevm/object.c:1.8
--- kaffe/kaffe/kaffevm/object.c:1.1.1.7	Wed Nov 11 01:41:22 1998
+++ kaffe/kaffe/kaffevm/object.c	Wed Nov 11 02:40:26 1998
@@ -30,6 +30,10 @@
 #include "external.h"
 #include "gc.h"
 
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
+
 extern Hjava_lang_Class* ThreadClass;
 
 extern gcFuncs gcFinalizeObject;
@@ -41,7 +45,11 @@
  * Create a new Java object.
  */
 Hjava_lang_Object*
+#ifdef GUARANA
+newObjectNoMessage(Hjava_lang_Class* class)
+#else
 newObject(Hjava_lang_Class* class)
+#endif
 {
 	Hjava_lang_Object* obj;
 
@@ -50,6 +58,10 @@
         /* Fill in object information */
         obj->dtable = class->dtable;
 
+#ifdef GUARANA
+	obj->meta_object = 0;
+#endif
+
 ADBG(	printf("newObject %x class %s\n", obj,
 		(class ? class->name->data : "<none>"));
 		fflush(stdout);						)
@@ -83,7 +95,11 @@
  * Allocate a new array, of whatever types.
  */
 Hjava_lang_Object*
+#ifdef GUARANA
+newArrayNoMessage(Hjava_lang_Class* elclass, int count)
+#else
 newArray(Hjava_lang_Class* elclass, int count)
+#endif
 {
 	Hjava_lang_Class* class;
 	Hjava_lang_Object* obj;
@@ -96,6 +112,9 @@
 	}
 	class = lookupArray(elclass);
 	obj->dtable = class->dtable;
+#ifdef GUARANA
+	obj->meta_object = 0;
+#endif
 	ARRAY_SIZE(obj) = count;
 	return (obj);
 }
@@ -104,17 +123,30 @@
  * Allocate a new multi-dimensional array.
  */
 Hjava_lang_Object*
+#ifdef GUARANA
+guarana_newMultiArray(Hjava_lang_Class *clazz, Hjava_lang_Object *creator, int *dims)
+#else
 newMultiArray(Hjava_lang_Class* clazz, int* dims)
+#endif
 {
 	Hjava_lang_Object* obj;
 	Hjava_lang_Object** array;
 	int i;
 	
+#ifdef GUARANA
+	obj = guarana_newArray(CLASS_ELEMENT_TYPE(clazz), dims[0], creator);
+#else
 	obj = newArray(CLASS_ELEMENT_TYPE(clazz), dims[0]);
+#endif
 	if (dims[1] >= 0) {
 		array = OBJARRAY_DATA(obj);
 		for (i = 0; i < dims[0]; i++) {
+#ifdef GUARANA
+		        /* FIXME: reify assignment? */
+			array[i] = guarana_newMultiArray(CLASS_ELEMENT_TYPE(clazz), obj, &dims[1]);
+#else
 			array[i] = newMultiArray(CLASS_ELEMENT_TYPE(clazz), &dims[1]);
+#endif
 		}
 	}
 
Index: kaffe/kaffe/kaffevm/object.h
diff -u kaffe/kaffe/kaffevm/object.h:1.1.1.4 kaffe/kaffe/kaffevm/object.h:1.4
--- kaffe/kaffe/kaffevm/object.h:1.1.1.4	Mon Mar 30 20:13:33 1998
+++ kaffe/kaffe/kaffevm/object.h	Sun Apr 19 13:12:33 1998
@@ -33,6 +33,10 @@
 #define	ARRAY_SIZE_OFFSET	((int)&ARRAY_SIZE(0))
 #define	ARRAY_DATA_OFFSET	((int)(((Array*)0)+1))
 
+#ifdef GUARANA
+#define META_OBJECT_OFFSET      ((int)&(*(Hjava_lang_Object*)0).meta_object)
+#endif
+
 struct Hjava_lang_Class;
 
 Hjava_lang_Object*	newObject(struct Hjava_lang_Class*);
Index: kaffe/kaffe/kaffevm/soft.c
diff -u kaffe/kaffe/kaffevm/soft.c:1.1.1.11 kaffe/kaffe/kaffevm/soft.c:1.17
--- kaffe/kaffe/kaffevm/soft.c:1.1.1.11	Wed Nov 11 01:41:24 1998
+++ kaffe/kaffe/kaffevm/soft.c	Wed Nov 11 02:40:27 1998
@@ -36,16 +36,28 @@
 #include "itypes.h"
 #include "machine.h"
 
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
+
 /*
  * soft_new
  */
 void*
+#ifdef GUARANA
+soft_new(Hjava_lang_Class* c, Hjava_lang_Object *creator)
+#else
 soft_new(Hjava_lang_Class* c)
+#endif
 {
 	Hjava_lang_Object* obj;
 
 	processClass(c, CSTATE_OK);
+#ifdef GUARANA
+	obj = guarana_newObject(c, creator);
+#else
 	obj = newObject(c);
+#endif
 
 DBG(NEWINSTR,	
 	dprintf("New object of type %s (%d,%x)\n", 
@@ -58,7 +70,11 @@
  * soft_newarray
  */
 void*
+#ifdef GUARANA
+soft_newarray(jint type, jint size, struct Hjava_lang_Object *creator)
+#else
 soft_newarray(jint type, jint size)
+#endif
 {
 	Hjava_lang_Object* obj;
 
@@ -66,7 +82,12 @@
 		throwException(NegativeArraySizeException);
 	}
 
+
+#ifdef GUARANA
+	obj = guarana_newArray(TYPE_CLASS(type), size, creator);
+#else
 	obj = newArray(TYPE_CLASS(type), size);
+#endif
 
 DBG(NEWINSTR,	
 	dprintf("New array of %s [%d] (%x)\n", 
@@ -79,7 +100,11 @@
  * soft_anewarray
  */
 void*
+#ifdef GUARANA
+soft_anewarray(Hjava_lang_Class* elclass, jint size, struct Hjava_lang_Object *creator)
+#else
 soft_anewarray(Hjava_lang_Class* elclass, jint size)
+#endif
 {
 	Hjava_lang_Object* obj;
 
@@ -87,7 +112,11 @@
 		throwException(NegativeArraySizeException);
 	}
 
+#ifdef GUARANA
+	obj = guarana_newArray(elclass, size, creator);
+#else
 	obj = newArray(elclass, size);
+#endif
 
 DBG(NEWINSTR,	
 	dprintf("New array object [%d] of %s (%x)\n", size,
@@ -102,7 +131,11 @@
 
 #if defined(INTERPRETER)
 void*
+#ifdef GUARANA
+soft_multianewarray(Hjava_lang_Class* class, struct Hjava_lang_Object *creator, jint dims, slots* args)
+#else
 soft_multianewarray(Hjava_lang_Class* class, jint dims, slots* args)
+#endif
 {
         int array[MAXDIMS];
         Hjava_lang_Object* obj;
@@ -131,7 +164,11 @@
         arraydims[i] = -1;
 
         /* Mmm, okay now build the array using the wonders of recursion */
+#ifdef GUARANA
+	obj = guarana_newMultiArray(class, creator, arraydims);
+#else
         obj = newMultiArray(class, arraydims);
+#endif
 
 
 	if (arraydims != array) {
@@ -145,7 +182,11 @@
 
 #if defined(TRANSLATOR)
 void*
+#ifdef GUARANA
+soft_multianewarray(Hjava_lang_Class* class, struct Hjava_lang_Object *creator, jint dims, ...)
+#else
 soft_multianewarray(Hjava_lang_Class* class, jint dims, ...)
+#endif
 {
 	va_list ap;
 	int array[MAXDIMS];
@@ -174,7 +215,11 @@
 	va_end(ap);
 
 	/* Mmm, okay now build the array using the wonders of recursion */
+#ifdef GUARANA
+	obj = guarana_newMultiArray(class, creator, arraydims);
+#else
         obj = newMultiArray(class, arraydims);
+#endif
 
 	if (arraydims != array) {
 		gc_free_fixed(arraydims);
@@ -200,7 +245,7 @@
 		throwException(NoSuchMethodError(name->data));
 	}
 
-#if defined(TRANSLATOR)
+#if defined(TRANSLATOR) && !defined(GUARANA)
 	return (METHOD_NATIVECODE(meth));
 #else
 	return (meth);
@@ -443,7 +488,11 @@
 
 	/* Update dispatch table */
 	if (meth->idx >= 0) {
+#ifdef GUARANA
+		DMETHOD_ADDR(meth->class->dtable->method[meth->idx]) = METHOD_NATIVECODE(meth);
+#else
 		meth->class->dtable->method[meth->idx] = METHOD_NATIVECODE(meth);
+#endif
 	}
 
 #if 0
Index: kaffe/kaffe/kaffevm/soft.h
diff -u kaffe/kaffe/kaffevm/soft.h:1.1.1.5 kaffe/kaffe/kaffevm/soft.h:1.8
--- kaffe/kaffe/kaffevm/soft.h:1.1.1.5	Mon Mar 30 20:13:46 1998
+++ kaffe/kaffe/kaffevm/soft.h	Sun Apr 19 13:12:36 1998
@@ -16,9 +16,15 @@
 struct Hjava_lang_Class;
 struct Hjava_lang_Object;
 
+#ifdef GUARANA
+void*	soft_new(struct Hjava_lang_Class*, struct Hjava_lang_Object* creator);
+void*	soft_newarray(jint, jint, struct Hjava_lang_Object* creator);
+void*	soft_anewarray(struct Hjava_lang_Class*, jint, struct Hjava_lang_Object* creator);
+#else
 void*	soft_new(struct Hjava_lang_Class*);
 void*	soft_newarray(jint, jint);
 void*	soft_anewarray(struct Hjava_lang_Class*, jint);
+#endif
 void	soft_initialise_class(struct Hjava_lang_Class*);
 nativecode* soft_get_method_code (Method*);
 
@@ -43,8 +49,12 @@
 jint	soft_rem(jint, jint);
 
 #if defined(INTERPRETER)
+#ifdef GUARANA
+void*	soft_multianewarray(struct Hjava_lang_Class*, struct Hjava_lang_Object *creator, jint, slots*);
+#else
 void*	soft_multianewarray(struct Hjava_lang_Class*, jint, slots*);
 #endif
+#endif
 
 #if defined(TRANSLATOR)
 jlong	soft_lmul(jlong, jlong);
@@ -58,7 +68,11 @@
 jlong	soft_ashrl(jlong, jint);
 jlong	soft_lshrl(jlong, jint);
 jint	soft_lcmp(jlong, jlong);
+#ifdef GUARANA
+void*	soft_multianewarray(struct Hjava_lang_Class*, struct Hjava_lang_Object *creator, jint, ...);
+#else
 void*	soft_multianewarray(struct Hjava_lang_Class*, jint, ...);
+#endif
 #endif
 
 jlong	soft_cvtil(jint);
Index: kaffe/kaffe/kaffevm/support.c
diff -u kaffe/kaffe/kaffevm/support.c:1.1.1.16 kaffe/kaffe/kaffevm/support.c:1.18
--- kaffe/kaffe/kaffevm/support.c:1.1.1.16	Wed Nov 11 01:41:26 1998
+++ kaffe/kaffe/kaffevm/support.c	Wed Nov 11 02:40:27 1998
@@ -32,6 +32,10 @@
 #include "thread.h"
 #include "locks.h"
 
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
+
 #if !defined(HAVE_GETTIMEOFDAY)
 #include <sys/timeb.h>
 #endif
@@ -58,6 +62,9 @@
 do_execute_java_method_v(void* obj, char* method_name, char* signature, Method* mb, int isStaticCall, va_list argptr)
 {
 	jvalue retval;
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo;
+#endif
 
 	if (mb == 0) {
 		if (isStaticCall) {
@@ -78,7 +85,20 @@
 		throwException(NoSuchMethodError(method_name));
 	}
 
+#ifdef GUARANA
+	if (isStaticCall) {
+	  mo = mb->class->head.meta_object;
+	} else {
+	  mo = ((struct Hjava_lang_Object *)obj)->meta_object;
+	}
+	if (mo) {
+	  guarana_va_list_reify_method_invocation(mo, obj, mb, argptr, (slots*)&retval);
+	} else {
+#endif
 	callMethodV(mb, METHOD_INDIRECTMETHOD(mb), obj, argptr, &retval);
+#ifdef GUARANA
+	}
+#endif
 
 	return (retval);
 }
@@ -105,6 +125,9 @@
 	Method* mb;
 	jvalue retval;
 	char cnname[CLASSMAXSIG];	/* Unchecked buffer - FIXME! */
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo;
+#endif
 
 	/* Convert "." to "/" */
 	classname2pathname(cname, cnname);
@@ -117,7 +140,17 @@
 	}
 
 	/* Make the call */
+#ifdef GUARANA
+	mo = mb->class->head.meta_object;
+
+	if (mo) {
+	  guarana_va_list_reify_method_invocation(mo, 0, mb, argptr, (slots*)&retval);
+	} else {
+#endif
 	callMethodV(mb, METHOD_INDIRECTMETHOD(mb), 0, argptr, &retval);
+#ifdef GUARANA
+	}
+#endif
 
 	return (retval);
 }
@@ -145,6 +178,9 @@
 	Method* mb;
 	char buf[MAXEXCEPTIONLEN];
 	jvalue retval;
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo;
+#endif
 
 	if (cc == 0) {
 		/* Convert "." to "/" */
@@ -173,7 +209,16 @@
 	assert(obj != 0);
 
 	/* Make the call */
+#ifdef GUARANA
+	mo = ((struct Hjava_lang_Object *)obj)->meta_object;
+	if (mo) {
+	  guarana_va_list_reify_method_invocation(mo, obj, mb, argptr, (slots*)&retval);
+	} else {
+#endif
 	callMethodV(mb, METHOD_INDIRECTMETHOD(mb), obj, argptr, &retval);
+#ifdef GUARANA
+	}
+#endif
 
 	return (obj);
 }
@@ -350,7 +395,7 @@
 			else {
 				sync = (Hjava_lang_Object*)call.args[0].l;
 			}
-			lockMutex(sync);
+			lockObjMutex(sync);
 		}
 		else {
 			sync = 0;
@@ -360,7 +405,7 @@
 		sysdepCallMethod(&call);
 
 		if (sync != 0) {
-			unlockMutex(sync);
+			unlockObjMutex(sync);
 		}
 	}
 #endif
@@ -526,7 +571,7 @@
 			else {
 				sync = (Hjava_lang_Object*)call.args[0].l;
 			}
-			lockMutex(sync);
+			lockObjMutex(sync);
 		}
 		else {
 			sync = 0;
@@ -536,7 +581,7 @@
 		sysdepCallMethod(&call);
 
 		if (sync != 0) {
-			unlockMutex(sync);
+			unlockObjMutex(sync);
 		}
 	}
 #endif
Index: kaffe/kaffe/kaffevm/thread.c
diff -u kaffe/kaffe/kaffevm/thread.c:1.1.1.12 kaffe/kaffe/kaffevm/thread.c:1.7
--- kaffe/kaffe/kaffevm/thread.c:1.1.1.12	Wed Aug  5 19:17:32 1998
+++ kaffe/kaffe/kaffevm/thread.c	Wed Aug  5 22:35:51 1998
@@ -121,10 +121,10 @@
 	else {
 #ifdef LET_TIM_DECIDE_IF_HE_REALLY_WANTS_THAT
 		/* Stop the thread - and wait for it to terminate */
-		lockMutex(tid);
+		lockObjMutex(tid);
 		(*Kaffe_ThreadInterface.stop)(tid);
 		waitCond(tid, 0);
-		unlockMutex(tid);
+		unlockObjMutex(tid);
 #else
 		/* 
 		 * Waiting for the thread to exit could cause a deadlock,
Index: kaffe/kaffe/kaffevm/intrp/icode.h
diff -u kaffe/kaffe/kaffevm/intrp/icode.h:1.1.1.9 kaffe/kaffe/kaffevm/intrp/icode.h:1.13
--- kaffe/kaffe/kaffevm/intrp/icode.h:1.1.1.9	Tue Oct  6 03:19:16 1998
+++ kaffe/kaffe/kaffevm/intrp/icode.h	Tue Oct  6 04:47:03 1998
@@ -142,6 +142,10 @@
 #define	return_float(s)				(s)[0].v.tfloat = retval[0].v.tfloat
 #define	return_double(s)			(s)[0].v.tdouble = retval[0].v.tdouble
 #define	return_ref(s)				(s)[0].v.taddr = retval[0].v.taddr
+#define return_boolean return_int
+#define return_byte return_int
+#define return_short return_int
+#define return_char return_int
 
 #define	monitor_enter()				/* Not needed for interpreter */
 #define	monitor_exit()				/* Not needed for interpreter */
@@ -268,18 +272,29 @@
 #define	cvt_double_float(t, f)			(t)[0].v.tfloat = (f)[0].v.tdouble
 
 #define	softcall_lookupmethod(r, n, t)		(r)[0].v.taddr = soft_lookupmethod((t)[0].v.taddr, (n)->name, (n)->signature)
+#ifdef GUARANA
+#define CREATOR ((methaccflags & ACC_STATIC) ? &meth->class->head : (Hjava_lang_Object*)local(0)->v.taddr)
+#define	softcall_new(r, t)			(r)->v.taddr = soft_new(t, CREATOR)
+#define	softcall_newarray(r, s, t)		(r)->v.taddr = soft_newarray(t, (s)->v.tint, CREATOR)
+#define	softcall_anewarray(r, s, t)		(r)->v.taddr = soft_anewarray(t, (s)->v.tint, CREATOR)
+#else
 #define	softcall_new(r, t)			(r)->v.taddr = soft_new(t)
 #define	softcall_newarray(r, s, t)		(r)->v.taddr = soft_newarray(t, (s)->v.tint)
 #define	softcall_anewarray(r, s, t)		(r)->v.taddr = soft_anewarray(t, (s)->v.tint)
+#endif
 #define	softcall_athrow(s)			soft_athrow((s)[0].v.taddr)
 #define	softcall_checkcast(n, o, t)		soft_checkcast(t, (o)->v.taddr)
 #define softcall_initialise_class(cl)		soft_initialise_class(cl)
 #define	softcall_instanceof(r, o, t)		(r)->v.tint = soft_instanceof(t, (o)->v.taddr)
 
-#define	softcall_monitorenter(o)		lockMutex((o)[0].v.taddr)
-#define	softcall_monitorexit(o)			unlockMutex((o)[0].v.taddr)
+#define	softcall_monitorenter(o)		lockObjMutex((o)[0].v.taddr)
+#define	softcall_monitorexit(o)			unlockObjMutex((o)[0].v.taddr)
 
+#ifdef GUARANA
+#define	softcall_multianewarray(r, z, s, t)	(r)->v.taddr = soft_multianewarray(t, CREATOR, z, s)
+#else
 #define	softcall_multianewarray(r, z, s, t)	(r)->v.taddr = soft_multianewarray(t, z, s)
+#endif
 
 #define	softcall_badarrayindex()		soft_badarrayindex()
 #define	softcall_nullpointer()			soft_nullpointer()
@@ -296,5 +311,66 @@
 						}
 #define	build_call_frame(SIG, OBJ, NRARGS)	/* Not needed for interpreter */
 
+
+#ifdef GUARANA
+#define softcall_reify_method_invocation(method) \
+  guarana_slots_reify_method_invocation((((Method*)((method)->v.taddr))->accflags & ACC_STATIC) ? 0 : (rstack(idx))->v.taddr, \
+					(method)->v.taddr, \
+					rstack(idx-1), retval)
+
+#define softcall_reify_field_load(mo, obj) do { \
+  jvalue *res; \
+  if (FIELD_ISREF(finfo.field)) \
+    res = (jvalue *)wstack(0); \
+  else \
+    switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) { \
+    case 'J': \
+      res = (jvalue *)stack_long(-1); \
+      push(1); \
+      break; \
+    case 'D': \
+      res = (jvalue *)stack_double(-1); \
+      push(1); \
+      break; \
+    default: \
+      res = (jvalue *)wstack(0); \
+      break; \
+    } \
+  guarana_reify_field_load((mo)->v.taddr, (obj)->v.taddr, finfo.class, finfo.field, res); \
+} while (0)
+
+#define softcall_reify_field_store(mo, obj) do { \
+  jvalue *res; \
+  if (FIELD_ISREF(finfo.field)) { \
+    res = (jvalue *)rstack(0); \
+    pop(1); \
+  } else \
+    switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) { \
+    case 'J': \
+      res = (jvalue *)stack_long(0); \
+      pop(2); \
+      break; \
+    case 'D': \
+      res = (jvalue *)stack_double(0); \
+      pop(2); \
+      break; \
+    default: \
+      res = (jvalue *)rstack(0); \
+      pop(1); \
+      break; \
+    } \
+  guarana_reify_field_store((mo)->v.taddr, (obj)->v.taddr, finfo.class, finfo.field, res); \
+} while (0)
+
+#define softcall_reify_arraylength(to, from) \
+  (to)->v.tint = guarana_reify_arraylength((from)->v.taddr)
+
+#define softcall_reify_array_load(mo, obj, index, type, retto) \
+  guarana_reify_array_load((mo)->v.taddr, (obj)->v.taddr, (index)->v.tint, (jvalue*)&(retto)->v)
+
+#define softcall_reify_array_store(mo, obj, index, type, value) \
+  guarana_reify_array_store((mo)->v.taddr, (obj)->v.taddr, (index)->v.tint, (jvalue*)&(value)->v)
+
+#endif
 
 #endif
Index: kaffe/kaffe/kaffevm/intrp/machine.c
diff -u kaffe/kaffe/kaffevm/intrp/machine.c:1.1.1.10 kaffe/kaffe/kaffevm/intrp/machine.c:1.6
--- kaffe/kaffe/kaffevm/intrp/machine.c:1.1.1.10	Mon Sep  7 14:17:34 1998
+++ kaffe/kaffe/kaffevm/intrp/machine.c	Mon Sep  7 15:03:39 1998
@@ -42,6 +42,9 @@
 #include "checks.h"
 #include "errors.h"
 #include "md.h"
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
 
 /*
  * Define information about this engine.
@@ -167,7 +170,7 @@
 		else {
 			mobj = (Hjava_lang_Object*)lcl[0].v.taddr;
 		}
-		lockMutex(mobj);
+		lockObjMutex(mobj);
 	}       
 
 	sp = &lcl[meth->localsz - 1];
@@ -194,7 +197,7 @@
 
 	/* Unsync. if required */
 	if (mobj != 0) {
-		unlockMutex(mobj);
+		unlockObjMutex(mobj);
 	}       
 	if (tid != NULL && unhand(tid)->PrivateInfo != 0) {
 		unhand(tid)->exceptPtr = (struct Hkaffe_util_Ptr*)mjbuf.prev;
Index: kaffe/kaffe/kaffevm/jit/codeproto.h
diff -u kaffe/kaffe/kaffevm/jit/codeproto.h:1.1.1.6 kaffe/kaffe/kaffevm/jit/codeproto.h:1.4
--- kaffe/kaffe/kaffevm/jit/codeproto.h:1.1.1.6	Mon Sep  7 14:17:37 1998
+++ kaffe/kaffe/kaffevm/jit/codeproto.h	Mon Sep  7 15:03:39 1998
@@ -111,6 +111,10 @@
 void return_long(SlotInfo*);
 void return_float(SlotInfo*);
 void return_double(SlotInfo*);
+#define return_boolean return_int
+#define return_byte return_int
+#define return_short return_int
+#define return_char return_int
 
 void returnarg_int(SlotInfo*);
 void returnarg_ref(SlotInfo*);
@@ -228,11 +232,19 @@
 
 void softcall_lookupmethod(SlotInfo*, Method*, SlotInfo*);
 void softcall_nullpointer(void);
+#ifdef GUARANA
+void softcall_new_(SlotInfo*, struct Hjava_lang_Class*, Method *);
+void softcall_newarray_(SlotInfo*, SlotInfo*, int, Method *);
+void softcall_anewarray_(SlotInfo*, SlotInfo*, struct Hjava_lang_Class*, Method *);
+void softcall_multianewarray_(SlotInfo*, int, SlotInfo*,
+			      struct Hjava_lang_Class*, Method *);
+#else
 void softcall_new(SlotInfo*, struct Hjava_lang_Class*);
 void softcall_newarray(SlotInfo*, SlotInfo*, int);
 void softcall_anewarray(SlotInfo*, SlotInfo*, struct Hjava_lang_Class*);
 void softcall_multianewarray(SlotInfo*, int, SlotInfo*,
 			     struct Hjava_lang_Class*);
+#endif
 void softcall_athrow(SlotInfo*);
 void softcall_checkcast(SlotInfo*, SlotInfo*, struct Hjava_lang_Class*);
 void softcall_get_method_code(SlotInfo*, SlotInfo*);
Index: kaffe/kaffe/kaffevm/jit/icode.c
diff -u kaffe/kaffe/kaffevm/jit/icode.c:1.1.1.10 kaffe/kaffe/kaffevm/jit/icode.c:1.11
--- kaffe/kaffe/kaffevm/jit/icode.c:1.1.1.10	Tue Oct  6 03:19:26 1998
+++ kaffe/kaffe/kaffevm/jit/icode.c	Tue Oct  6 04:47:05 1998
@@ -30,6 +30,9 @@
 #include "locks.h"
 #include "machine.h"
 #include "codeproto.h"
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
 
 #if defined(WORDS_BIGENDIAN)
 #define	LSLOT(_s)	((_s)+1)
@@ -251,7 +254,7 @@
 	else {
 		pusharg_ref(obj, 0);
 	}
-	call_soft(lockMutex);
+	call_soft(lockObjMutex);
 	popargs();
 	start_sub_block();
 }
@@ -266,7 +269,7 @@
 	else {
 		pusharg_ref(obj, 0);
 	}
-	call_soft(unlockMutex);
+	call_soft(unlockObjMutex);
 	popargs();
 	start_sub_block();
 }
@@ -3160,7 +3163,11 @@
 /*									   */
 
 void
+#ifdef GUARANA
+build_call_frame_guarana(Utf8Const* sig, SlotInfo* obj, int sp_idx, int minidx)
+#else
 build_call_frame(Utf8Const* sig, SlotInfo* obj, int sp_idx)
+#endif
 {
 	struct pusharg_info {
 		char type;
@@ -3170,17 +3177,19 @@
 	static struct pusharg_info* args;
 	static int sz_args = 0;
 	int arg_idx;
-	int idx;
+#ifndef GUARANA
+	int minidx = 0;
+#endif
+	int idx = minidx;
 	char* sigptr;
 
 	/* Make sure we have enough argument space */
-	if (sp_idx + 1 > sz_args) {
-		sz_args = sp_idx + 1;
+	if (sp_idx + minidx + 1 > sz_args) {
+		sz_args = sp_idx + minidx + 1;
 		args = gc_realloc_fixed(args, sizeof(struct pusharg_info) * sz_args);
 	}
 
 	/* If we've got an object ... */
-	idx = 0;
 	if (obj != 0) {
 		args[idx].type = 'O';
 		args[idx].arg_idx = idx;
@@ -3236,7 +3245,7 @@
 		idx++;
 	}
 
-	for (idx--; idx >= 0; idx--) {
+	for (idx--; idx >= minidx; idx--) {
 		sp_idx = args[idx].sp_idx;
 		arg_idx = args[idx].arg_idx;
 		switch (args[idx].type) {
@@ -3370,10 +3379,25 @@
 	fixup_function_call();
 }
 
-void
+void 
+#ifdef GUARANA
+softcall_new_(SlotInfo* dst, Hjava_lang_Class* classobj, Method *meth)
+#else
 softcall_new(SlotInfo* dst, Hjava_lang_Class* classobj)
+#endif
 {
 	prepare_function_call();
+#ifdef GUARANA
+	if (meth->accflags & ACC_STATIC) {
+		SlotInfo* tmp;
+		slot_alloctmp(tmp);
+		move_ref_const(tmp, meth->class);
+		pusharg_ref(tmp, 1);
+		slot_nowriteback(tmp);
+	} else {
+		pusharg_ref(local(0), 1);
+	}
+#endif
 	pusharg_class_const(classobj, 0);
 	call_soft(soft_new);
 	popargs();
@@ -3382,12 +3406,23 @@
 }
 
 void
+#ifdef GUARANA
+softcall_newarray_(SlotInfo* dst, SlotInfo* size, int type, Method *meth)
+#else
 softcall_newarray(SlotInfo* dst, SlotInfo* size, int type)
+#endif
 {
 	if (size == dst) {
 		slot_nowriteback(size);
 	}
 	prepare_function_call();
+#ifdef GUARANA
+	if (meth->accflags & ACC_STATIC) {
+		pusharg_ref_const(meth->class, 2);
+	} else {
+		pusharg_ref(local(0), 2);
+	}
+#endif
 	pusharg_int(size, 1);
 	pusharg_int_const(type, 0);
 	call_soft(soft_newarray);
@@ -3397,12 +3432,23 @@
 }
 
 void
+#ifdef GUARANA
+softcall_anewarray_(SlotInfo* dst, SlotInfo* size, Hjava_lang_Class* type, Method *meth)
+#else
 softcall_anewarray(SlotInfo* dst, SlotInfo* size, Hjava_lang_Class* type)
+#endif
 {
 	if (dst == size) {
 		slot_nowriteback(size);
 	}
 	prepare_function_call();
+#ifdef GUARANA
+	if (meth->accflags & ACC_STATIC) {
+		pusharg_ref_const(meth->class, 2);
+	} else {
+		pusharg_ref(local(0), 2);
+	}
+#endif
 	pusharg_int(size, 1);
 	pusharg_class_const(type, 0);
 	call_soft(soft_anewarray);
@@ -3413,15 +3459,31 @@
 
 
 void
+#ifdef GUARANA
+softcall_multianewarray_(SlotInfo* dst, int size, SlotInfo* stktop, Hjava_lang_Class* classobj, Method *meth)
+#else
 softcall_multianewarray(SlotInfo* dst, int size, SlotInfo* stktop, Hjava_lang_Class* classobj)
+#endif
 {
 	int i;
 
 	prepare_function_call();
+#ifdef GUARANA
+	for (i = 0; i < size; i++) {
+		pusharg_int(&stktop[i], 2+size-i);
+	}
+	pusharg_int_const(size, 2);
+	if (meth->accflags & ACC_STATIC) {
+		pusharg_ref_const(meth->class, 1);
+	} else {
+		pusharg_ref(local(0), 1);
+	}
+#else
 	for (i = 0; i < size; i++) {
 		pusharg_int(&stktop[i], 1+size-i);
 	}
 	pusharg_int_const(size, 1);
+#endif
 	pusharg_class_const(classobj, 0);
 	call_soft(soft_multianewarray);
 	popargs();
@@ -3474,7 +3536,7 @@
 	slot_nowriteback(mon);
 	prepare_function_call();
 	pusharg_ref(mon, 0);
-	call_soft(lockMutex);
+	call_soft(lockObjMutex);
 	popargs();
 	fixup_function_call();
 }
@@ -3485,7 +3547,7 @@
 	slot_nowriteback(mon);
 	prepare_function_call();
 	pusharg_ref(mon, 0);
-	call_soft(unlockMutex);
+	call_soft(unlockObjMutex);
 	popargs();
 	fixup_function_call();
 }
Index: kaffe/kaffe/kaffevm/jit/icode_internal.h
diff -u kaffe/kaffe/kaffevm/jit/icode_internal.h:1.1.1.1 kaffe/kaffe/kaffevm/jit/icode_internal.h:1.2
--- kaffe/kaffe/kaffevm/jit/icode_internal.h:1.1.1.1	Mon Sep  7 14:17:35 1998
+++ kaffe/kaffe/kaffevm/jit/icode_internal.h	Wed Sep  9 05:13:23 1998
@@ -41,6 +41,10 @@
 extern void store_offset_short(SlotInfo*, jint, SlotInfo*);
 
 extern void move_string_const(SlotInfo*, void*);
+#ifdef GUARANA
+extern void build_call_frame_guarana(Utf8Const*, SlotInfo*, int, int);
+#else
 extern void build_call_frame(Utf8Const*, SlotInfo*, int);
+#endif
 extern void softcall_nosuchmethod(Hjava_lang_Class*, Utf8Const*, Utf8Const*);
 
Index: kaffe/kaffe/kaffevm/jit/machine.c
diff -u kaffe/kaffe/kaffevm/jit/machine.c:1.1.1.13 kaffe/kaffe/kaffevm/jit/machine.c:1.10
--- kaffe/kaffe/kaffevm/jit/machine.c:1.1.1.13	Wed Nov 11 01:41:35 1998
+++ kaffe/kaffe/kaffevm/jit/machine.c	Wed Nov 11 02:40:28 1998
@@ -42,6 +42,9 @@
 #include "external.h"
 #include "soft.h"
 #include "jni.h"
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
 
 /*
  * Define information about this engine.
@@ -160,7 +163,7 @@
 		return;
 	}
 
-	lockMutex(meth->class);
+	lockObjMutexDirect(&meth->class->head);
 
 	if (Kaffe_JavaVMArgs[0].enableVerboseJIT) {
 		tms = currentTime();
@@ -176,7 +179,7 @@
 		KAFFEJIT_TO_NATIVE(meth);
 		/* Note that this is a real function not a trampoline.  */
 		meth->c.ncode.ncode_end = METHOD_NATIVECODE(meth);
-		unlockMutex(meth->class);
+		unlockObjMutexDirect(&meth->class->head);
 		unlockStaticMutex(&translatorlock);
 		return;
 	}
@@ -298,7 +301,7 @@
 		       METHOD_NATIVECODE(meth));
 	}
 
-	unlockMutex(meth->class);
+	unlockObjMutexDirect(&meth->class->head);
 	unlockStaticMutex(&translatorlock);
 }
 
Index: kaffe/kaffe/kaffevm/jit/machine.h
diff -u kaffe/kaffe/kaffevm/jit/machine.h:1.1.1.9 kaffe/kaffe/kaffevm/jit/machine.h:1.18
--- kaffe/kaffe/kaffevm/jit/machine.h:1.1.1.9	Wed Nov 11 01:41:35 1998
+++ kaffe/kaffe/kaffevm/jit/machine.h	Wed Nov 11 02:40:28 1998
@@ -90,6 +90,195 @@
 struct _methods;
 void translate(struct _methods*);
 
+#ifdef GUARANA
+#define	softcall_new(r, t)			softcall_new_((r), (t), meth)
+#define	softcall_newarray(r, s, t)		softcall_newarray_((r), (s), (t), meth)
+#define	softcall_anewarray(r, s, t)		softcall_anewarray_((r), (s), (t), meth)
+#define	softcall_multianewarray(r, z, s, t)	softcall_multianewarray_((r), (z), (s), (t), meth)
+
+#define build_call_frame(sig, obj, sp) build_call_frame_guarana((sig), (obj), (sp), 0)
+
+#define softcall_reify_method_invocation(method) do { \
+  end_sub_block(); \
+  prepare_function_call() ; \
+  if (method_method()->accflags & ACC_STATIC) {\
+    build_call_frame_guarana(method_sig(), 0, idx, 2); \
+    pusharg_ref_const(0, 1); \
+  } else { \
+    build_call_frame_guarana(method_sig(), stack(idx), idx, 1); \
+  } \
+  pusharg_ref((method), 0); \
+  switch (low) { \
+  case 'V': \
+    call_soft(jvoid_reify_method_invocation); \
+    break; \
+  case 'L': \
+  case '[': \
+    call_soft(jref_reify_method_invocation); \
+    break; \
+  case 'Z': \
+    call_soft(jboolean_reify_method_invocation); \
+    break; \
+  case 'C': \
+    call_soft(jchar_reify_method_invocation); \
+    break; \
+  case 'B': \
+    call_soft(jbyte_reify_method_invocation); \
+    break; \
+  case 'S': \
+    call_soft(jshort_reify_method_invocation); \
+    break; \
+  case 'I': \
+    call_soft(jint_reify_method_invocation); \
+    break; \
+  case 'J': \
+    call_soft(jlong_reify_method_invocation); \
+    break; \
+  case 'F': \
+    call_soft(jfloat_reify_method_invocation); \
+    break; \
+  case 'D': \
+    call_soft(jdouble_reify_method_invocation); \
+    break; \
+  default: \
+    ABORT(); \
+  } \
+  popargs(); \
+  fixup_function_call(); \
+  start_sub_block(); \
+} while (0)
+
+#define softcall_reify_field_load(mo, obj) do { \
+  void *func = 0; SlotInfo *slot = 0; void (*retfunc)(SlotInfo *) = 0; \
+  prepare_function_call(); \
+  pusharg_ref_const(finfo.field, 3); \
+  pusharg_ref_const(finfo.class, 2); \
+  pusharg_ref((obj), 1); \
+  pusharg_ref((mo), 0); \
+  if (FIELD_ISREF(finfo.field)) { \
+    func = jref_reify_field_load; slot = wstack(0); retfunc = return_ref; \
+  } else switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) { \
+  case 'Z': \
+    func = jboolean_reify_field_load; slot = wstack(0); retfunc = return_int; \
+    break; \
+  case 'C': \
+    func = jchar_reify_field_load; slot = wstack(0); retfunc = return_int; \
+    break; \
+  case 'B': \
+    func = jbyte_reify_field_load; slot = wstack(0); retfunc = return_int; \
+    break; \
+  case 'S': \
+    func = jshort_reify_field_load;  slot = wstack(0); retfunc = return_int; \
+    break; \
+  case 'I': \
+    func = jint_reify_field_load; slot = wstack(0); retfunc = return_int; \
+    break; \
+  case 'J': \
+    func = jlong_reify_field_load; push(1); slot = stack_long(0); retfunc = return_long; \
+    break; \
+  case 'F': \
+    func = jfloat_reify_field_load; slot = wstack(0); retfunc = return_float; \
+    break; \
+  case 'D': \
+    func = jdouble_reify_field_load; push(1); slot = stack_double(0); retfunc = return_double; \
+    break; \
+  default: \
+    ABORT(); \
+  } \
+  call_soft(func); \
+  popargs(); \
+  fixup_function_call(); \
+  retfunc(slot); \
+} while (0)
+
+#ifndef pusharg_char
+#define pusharg_char pusharg_int
+#endif
+#ifndef pusharg_bool
+#define pusharg_bool pusharg_int
+#endif
+#ifndef pusharg_byte
+#define pusharg_byte pusharg_int
+#endif
+#ifndef pusharg_short
+#define pusharg_short pusharg_int
+#endif
+
+#define softcall_reify_field_store(mo, obj) do { \
+  void *func = 0; \
+  prepare_function_call(); \
+  if (FIELD_ISREF(finfo.field)) { \
+    pusharg_ref(rstack(0), 4); pop(1); func = jref_reify_field_store; \
+  } else switch (CLASS_PRIM_SIG(FIELD_TYPE(finfo.field))) { \
+  case 'Z': \
+    pusharg_bool(rstack(0), 4); pop(1); func = jboolean_reify_field_store; \
+    break; \
+  case 'C': \
+    pusharg_char(rstack(0), 4); pop(1); func = jchar_reify_field_store; \
+    break; \
+  case 'B': \
+    pusharg_byte(rstack(0), 4); pop(1); func = jbyte_reify_field_store; \
+    break; \
+  case 'S': \
+    pusharg_short(rstack(0), 4); pop(1); func = jshort_reify_field_store; \
+    break; \
+  case 'I': \
+    pusharg_int(rstack(0), 4); pop(1); func = jint_reify_field_store; \
+    break; \
+  case 'J': \
+    pusharg_long(stack_long(0), 4); pop(2); func = jlong_reify_field_store; \
+    break; \
+  case 'F': \
+    pusharg_float(rstack(0), 4); pop(1); func = jfloat_reify_field_store; \
+    break; \
+  case 'D': \
+    pusharg_double(stack_double(0), 4); pop(2); func = jdouble_reify_field_store; \
+    break; \
+  default: \
+    ABORT(); \
+  } \
+  pusharg_ref_const(finfo.field, 3); \
+  pusharg_ref_const(finfo.class, 2); \
+  pusharg_ref((obj), 1); \
+  pusharg_ref((mo), 0); \
+  call_soft(func); \
+  popargs(); \
+  fixup_function_call(); \
+} while (0)
+
+#define softcall_reify_array_load(mo, obj, index, type, retto) do { \
+  prepare_function_call(); \
+  pusharg_int((index), 2); \
+  pusharg_ref((obj), 1); \
+  pusharg_ref((mo), 0); \
+  call_soft(j##type##_reify_array_load); \
+  popargs(); \
+  fixup_function_call(); \
+  return_##type(retto); \
+} while (0)
+
+#define softcall_reify_array_store(mo, obj, index, type, value) do { \
+  prepare_function_call(); \
+  pusharg_##type((value), 3); \
+  pusharg_int((index), 2); \
+  pusharg_ref((obj), 1); \
+  pusharg_ref((mo), 0); \
+  call_soft(j##type##_reify_array_store); \
+  popargs(); \
+  fixup_function_call(); \
+} while(0)
+
+#define softcall_reify_arraylength(to, from) do { \
+  prepare_function_call(); \
+  pusharg_ref((from), 0); \
+  call_soft(guarana_reify_arraylength); \
+  popargs(); \
+  fixup_function_call(); \
+  return_int((to)); \
+} while (0)
+
+#endif /* GUARANA */
+
 typedef struct _nativeCodeInfo {
 	void*	mem;
 	int	memlen;
Index: kaffe/kaffe/kaffevm/mem/gc-incremental.c
diff -u kaffe/kaffe/kaffevm/mem/gc-incremental.c:1.1.1.6 kaffe/kaffe/kaffevm/mem/gc-incremental.c:1.9
--- kaffe/kaffe/kaffevm/mem/gc-incremental.c:1.1.1.6	Wed Nov 11 01:41:37 1998
+++ kaffe/kaffe/kaffevm/mem/gc-incremental.c	Wed Nov 11 02:40:29 1998
@@ -26,6 +26,9 @@
 #include "soft.h"
 #include "md.h"
 #include "jni.h"
+#ifdef GUARANA
+#include "guarana/GuaraNative.h"
+#endif
 
 static gcList gclists[5];
 static int mustfree = 4;		/* temporary list */
@@ -118,6 +121,9 @@
 static void walkClass(void*, uint32);
 static void walkObject(void*, uint32);
 static void walkRefArray(void*, uint32);
+#ifdef GUARANA
+static void walkPrimArray(void*, uint32);
+#endif
 
 /* Standard GC function sets */
 static gcFuncs gcFunctions[] = {
@@ -125,9 +131,13 @@
 	{ walkNull,	    GC_OBJECT_NORMAL },	/* GC_ALLOC_NOWALK */
 	{ walkNull,	    GC_OBJECT_FIXED  },	/* GC_ALLOC_FIXED */
 	{ walkObject,	    finalizeObject   },	/* GC_ALLOC_NORMALOBJECT */
+#ifdef GUARANA
+	{ walkPrimArray,    finalizeObject   },	/* GC_ALLOC_PRIMARRAY */
+#else
 	{ walkNull,	    GC_OBJECT_NORMAL },	/* GC_ALLOC_PRIMARRAY */
-	{ walkRefArray,     GC_OBJECT_NORMAL },	/* GC_ALLOC_REFARRAY */
-	{ walkClass,        GC_OBJECT_NORMAL },	/* GC_ALLOC_CLASSOBJECT */
+#endif
+	{ walkRefArray,     finalizeObject   },	/* GC_ALLOC_REFARRAY */
+	{ walkClass,        finalizeObject   },	/* GC_ALLOC_CLASSOBJECT */
 	{ 0,       	    0		     },	/* GC_ALLOC_FINALIZEOBJECT */
 	{ walkConservative, GC_OBJECT_NORMAL },	/* GC_ALLOC_METHOD */
 	{ walkConservative, GC_OBJECT_NORMAL },	/* GC_ALLOC_FIELD */
@@ -391,6 +401,9 @@
 	gcStats.markedmem += size;
 
 	class = (Hjava_lang_Class*)base;
+#ifdef GUARANA
+	markObject(class->head.meta_object);
+#endif
 
 	markObject(class->name);
 	if (class->state >= CSTATE_PREPARED) {
@@ -418,7 +431,7 @@
 }
 
 /*
- * Walk an array object objects.
+ * Walk an array of objects.
  */
 static
 void
@@ -434,6 +447,9 @@
 	gcStats.markedmem += size;
 
 	arr = (Hjava_lang_Object*)base;
+#ifdef GUARANA
+	markObject(arr->meta_object);
+#endif
 	ptr = OBJARRAY_DATA(arr);
 	for (i = ARRAY_SIZE(arr); --i>= 0; ) {
 		Hjava_lang_Object* el = *ptr++;
@@ -443,7 +459,25 @@
 	}
 }
 
+#ifdef GUARANA
 /*
+ * Walk an array of primitive type.
+ */
+static
+void
+walkPrimArray(void* base, uint32 size)
+{
+	Hjava_lang_Object* arr;
+
+	gcStats.markedobj += 1;
+	gcStats.markedmem += size;
+
+	arr = (Hjava_lang_Object*)base;
+	markObject(arr->meta_object);
+}
+#endif
+
+/*
  * The Garbage Collector sits in a loop starting a collection, waiting
  * until it's finished incrementally, then tidying up before starting
  * another one.
@@ -935,7 +969,17 @@
 
 	final = findMethod(OBJECT_CLASS((Hjava_lang_Object*)ob), final_name, void_signature);
 	if (final != 0) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo = ((Hjava_lang_Object*)ob)->meta_object;
+		if (mo) {
+		  slots slot[1];
+		    guarana_slots_reify_method_invocation(ob, final, slot, slot);
+		} else {
+#endif
 		callMethodA(final, METHOD_INDIRECTMETHOD(final), (Hjava_lang_Object*)ob, 0, 0);
+#ifdef GUARANA
+		}
+#endif
 	}
 	else {
 		/* This shouldn't happen */
Index: kaffe/kaffe/kaffevm/systems/unix-jthreads/internal.c
diff -u kaffe/kaffe/kaffevm/systems/unix-jthreads/internal.c:1.1.1.5 kaffe/kaffe/kaffevm/systems/unix-jthreads/internal.c:1.4
--- kaffe/kaffe/kaffevm/systems/unix-jthreads/internal.c:1.1.1.5	Mon Sep  7 14:17:52 1998
+++ kaffe/kaffe/kaffevm/systems/unix-jthreads/internal.c	Mon Sep  7 15:03:41 1998
@@ -65,9 +65,9 @@
         Hjava_lang_Thread *tid = jlThread;
 
         /* Notify on the object just in case anyone is waiting */
-        lockMutex(&tid->base);
+        lockObjMutex(&tid->base);
         broadcastCond(&tid->base);
-        unlockMutex(&tid->base);
+        unlockObjMutex(&tid->base);
 }
 
 static void 
Index: kaffe/kaffe/scripts/Makefile.in
diff -u kaffe/kaffe/scripts/Makefile.in:1.1.1.10 kaffe/kaffe/scripts/Makefile.in:1.6
--- kaffe/kaffe/scripts/Makefile.in:1.1.1.10	Tue Oct  6 03:19:45 1998
+++ kaffe/kaffe/scripts/Makefile.in	Tue Oct  6 04:47:09 1998
@@ -66,6 +66,11 @@
 			$(INSTALL_SCRIPT) $$i $(INSTROOT)$(bindir)/$(KPREFIX)$$i ;\
 		done
 
+@COMMENT_GUARANA@install: install-guarana
+@COMMENT_GUARANA@install-guarana: install-sun @suncompatible@
+@COMMENT_GUARANA@	$(INSTALL_SCRIPT) $(INSTROOT)$(bindir)/$(KPREFIX)kaffe$(SCREXT) $(INSTROOT)$(bindir)/$(KPREFIX)guarana$(SCREXT)
+@COMMENT_GUARANA@	$(INSTALL_SCRIPT) $(INSTROOT)$(bindir)/$(KPREFIX)javac$(SCREXT) $(INSTROOT)$(bindir)/$(KPREFIX)guaranac$(SCREXT)
+
 derived-files:
 
 depend:
Index: kaffe/kaffe/scripts/kaffe.in
diff -u kaffe/kaffe/scripts/kaffe.in:1.1.1.5 kaffe/kaffe/scripts/kaffe.in:1.6
--- kaffe/kaffe/scripts/kaffe.in:1.1.1.5	Wed Nov 11 01:41:44 1998
+++ kaffe/kaffe/scripts/kaffe.in	Thu Nov 12 11:55:10 1998
@@ -17,6 +17,7 @@
 #	2. Klasses.jar in $datadir/kaffe
 #	3. pizza.jar in $datadir/kaffe
 #	4. classes.zip in $datadir/kaffe iff it exists.
+#	5. guarana.jar in $datadir/kaffe iff it exists.
 #
 
 # If KAFFE_DEBUG is set to either gdb or emacs, a debugging session
@@ -33,6 +34,9 @@
 CLASSPATH="${CLASSPATH-.}:$KAFFE_CLASSDIR/Klasses.jar:$KAFFE_CLASSDIR/pizza.jar"
 if test -f "$KAFFE_CLASSDIR/classes.zip"; then
   CLASSPATH="$CLASSPATH:$KAFFE_CLASSDIR/classes.zip"
+fi
+if test -f $KAFFE_CLASSDIR/guarana.jar; then
+  CLASSPATH="$CLASSPATH:$KAFFE_CLASSDIR/guarana.jar"
 fi
 export CLASSPATH
 LD_LIBRARY_PATH="$KAFFE_LIB"${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"}
Index: kaffe/libraries/clib/external_wrappers.h
diff -u kaffe/libraries/clib/external_wrappers.h:1.1.1.2 kaffe/libraries/clib/external_wrappers.h:1.2
--- kaffe/libraries/clib/external_wrappers.h:1.1.1.2	Tue Jul 14 22:56:58 1998
+++ kaffe/libraries/clib/external_wrappers.h	Wed Sep  9 05:04:31 1998
@@ -19,3 +19,6 @@
 #if defined(HAVE_X)
 #include "awt/external_wrappers.h"
 #endif
+#ifdef GUARANA
+#include "../../kaffe/kaffevm/guarana/external_wrappers.h"
+#endif
Index: kaffe/libraries/clib/native/Array.c
diff -u kaffe/libraries/clib/native/Array.c:1.1.1.5 kaffe/libraries/clib/native/Array.c:1.5
--- kaffe/libraries/clib/native/Array.c:1.1.1.5	Mon Sep  7 14:18:23 1998
+++ kaffe/libraries/clib/native/Array.c	Wed Sep  9 05:20:11 1998
@@ -28,18 +28,31 @@
 #include <native.h>
 #include "defs.h"
 
+#ifdef GUARANA
+extern void guarana_reify_array_load(struct HBR_unicamp_Guarana_MetaObject *mo, struct Hjava_lang_Object *o, int index, jvalue *res);
+extern void guarana_reify_array_store(struct HBR_unicamp_Guarana_MetaObject *mo, struct Hjava_lang_Object *o, int index, jvalue *val);
+extern int guarana_reify_arraylength(struct Hjava_lang_Object *o);
+#endif
+
 jint
 java_lang_reflect_Array_getLength(struct Hjava_lang_Object* obj)
 {
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
 		SignalError("java.lang.IllegalArgumentException", "");
 
+#ifdef GUARANA
+	return guarana_reify_arraylength(obj);
+#else
 	return (obj_length((HArrayOfObject*)obj));
+#endif
 }
 
 struct Hjava_lang_Object*
 java_lang_reflect_Array_get(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -49,6 +62,16 @@
 	
 	if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return execute_java_constructor(0,javaLangIntegerClass,"(I)V",
+							res.i);
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -57,6 +80,16 @@
 	}
 	else if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return execute_java_constructor(0,javaLangShortClass,"(I)V",
+							res.i);
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -65,6 +98,16 @@
 	}
 	else if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return execute_java_constructor(0,javaLangLongClass,"(J)V",
+							res.j);
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -73,6 +116,16 @@
 	}
 	else if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return execute_java_constructor(0,javaLangByteClass,"(B)V",
+							res.i);
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -89,6 +142,16 @@
 	}
 	else if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return execute_java_constructor(0,javaLangCharacterClass,"(C)V",
+							res.i);
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -97,6 +160,16 @@
 	}
 	else if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return execute_java_constructor(0,javaLangFloatClass,"(F)V",
+							res.f);
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -105,6 +178,16 @@
 	}
 	else if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return execute_java_constructor(0,javaLangDoubleClass,"(D)V",
+							res.d);
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -117,6 +200,15 @@
 		 */
 
 		HArrayOfObject *arr = (HArrayOfObject *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.l;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -127,6 +219,9 @@
 jbool
 java_lang_reflect_Array_getBoolean(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -136,6 +231,15 @@
 	
 	if ( clazz == booleanClass ) {
 		HArrayOfBoolean *arr = (HArrayOfBoolean *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -148,6 +252,9 @@
 jbyte
 java_lang_reflect_Array_getByte(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -157,6 +264,15 @@
 	
 	if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+	}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -169,6 +285,9 @@
 jchar
 java_lang_reflect_Array_getChar(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -178,12 +297,30 @@
 	
 	if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -196,6 +333,9 @@
 jshort
 java_lang_reflect_Array_getShort(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -205,12 +345,30 @@
 	
 	if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -223,6 +381,9 @@
 jint
 java_lang_reflect_Array_getInt(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -232,24 +393,60 @@
 	
 	if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -262,6 +459,9 @@
 jlong
 java_lang_reflect_Array_getLong(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -271,30 +471,75 @@
 	
 	if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.j;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -307,6 +552,9 @@
 jfloat
 java_lang_reflect_Array_getFloat(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -316,36 +564,90 @@
 	
 	if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.f;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.j;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -358,6 +660,9 @@
 jdouble
 java_lang_reflect_Array_getDouble(struct Hjava_lang_Object* obj, jint elem)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -367,42 +672,105 @@
 	
 	if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.d;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.f;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.j;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		return unhand(arr)->body[elem];
 	} else if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue res;
+			guarana_reify_array_load(mo, obj, elem, &res);
+			return res.i;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -415,6 +783,9 @@
 void
 java_lang_reflect_Array_set(struct Hjava_lang_Object* obj, jint elem, struct Hjava_lang_Object* val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -422,6 +793,15 @@
 
 	if (!CLASS_IS_PRIMITIVE(CLASS_ELEMENT_TYPE(OBJECT_CLASS(obj)))) {
 		HArrayOfObject *arr = (HArrayOfObject *)obj;
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.l = val;
+			guarana_reify_array_store(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -466,6 +846,9 @@
 void
 java_lang_reflect_Array_setBoolean(struct Hjava_lang_Object* obj, jint elem, jbool val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -475,6 +858,16 @@
 	
 	if ( clazz == booleanClass ) {
 		HArrayOfBoolean *arr = (HArrayOfBoolean *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -487,6 +880,9 @@
 void
 java_lang_reflect_Array_setByte(struct Hjava_lang_Object* obj, jint elem, jbyte val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -496,42 +892,112 @@
 	
 	if ( clazz == byteClass ) {
 		HArrayOfByte *arr = (HArrayOfByte *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.j = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.f = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.d = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -544,6 +1010,9 @@
 void
 java_lang_reflect_Array_setChar(struct Hjava_lang_Object* obj, jint elem, jchar val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -553,30 +1022,80 @@
 	
 	if ( clazz == charClass ) {
 		HArrayOfChar *arr = (HArrayOfChar *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.j = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.f = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.d = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -589,6 +1108,9 @@
 void
 java_lang_reflect_Array_setShort(struct Hjava_lang_Object* obj, jint elem, jshort val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -598,30 +1120,80 @@
 	
 	if ( clazz == shortClass ) {
 		HArrayOfShort *arr = (HArrayOfShort *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.j = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.f = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.d = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -634,6 +1206,9 @@
 void
 java_lang_reflect_Array_setInt(struct Hjava_lang_Object* obj, jint elem, jint val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -643,24 +1218,64 @@
 	
 	if ( clazz == intClass ) {
 		HArrayOfInt *arr = (HArrayOfInt *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.i = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.j = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.f = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.d = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -673,6 +1288,9 @@
 void
 java_lang_reflect_Array_setLong(struct Hjava_lang_Object* obj, jint elem, jlong val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -682,18 +1300,48 @@
 	
 	if ( clazz == longClass ) {
 		HArrayOfLong *arr = (HArrayOfLong *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.j = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.f = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.d = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -706,6 +1354,9 @@
 void
 java_lang_reflect_Array_setFloat(struct Hjava_lang_Object* obj, jint elem, jfloat val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -715,12 +1366,32 @@
 	
 	if ( clazz == floatClass ) {
 		HArrayOfFloat *arr = (HArrayOfFloat *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.f = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
 		unhand(arr)->body[elem] = val;
 	} else if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.d = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
@@ -733,6 +1404,9 @@
 void
 java_lang_reflect_Array_setDouble(struct Hjava_lang_Object* obj, jint elem, jdouble val)
 {
+#ifdef GUARANA
+	struct HBR_unicamp_Guarana_MetaObject *mo = obj->meta_object;
+#endif
 	Hjava_lang_Class *clazz;
 
 	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))
@@ -742,6 +1416,16 @@
 	
 	if ( clazz == doubleClass ) {
 		HArrayOfDouble *arr = (HArrayOfDouble *)obj;
+
+#ifdef GUARANA
+		if (mo) {
+			jvalue value;
+			value.d = val;
+			guarana_reify_array_load(mo, obj, elem, &value);
+			return;
+		}
+#endif
+
 		if (elem < 0 || elem >= obj_length(arr))
 			SignalError("java.lang.ArrayIndexOutOfBoundsException", "");
 		
Index: kaffe/libraries/clib/native/Class.c
diff -u kaffe/libraries/clib/native/Class.c:1.1.1.7 kaffe/libraries/clib/native/Class.c:1.11
--- kaffe/libraries/clib/native/Class.c:1.1.1.7	Tue Oct  6 03:20:21 1998
+++ kaffe/libraries/clib/native/Class.c	Tue Oct  6 04:47:26 1998
@@ -450,6 +450,30 @@
 	return (field);
 }
  
+#ifdef GUARANA
+extern HArrayOfObject* (*p_makeParameters)(Method *meth);
+
+extern Hjava_lang_Class* (*p_makeReturn)(Method *meth);
+
+extern Hjava_lang_reflect_Constructor* (*p_makeConstructor)(struct Hjava_lang_Class* clazz, int slot);
+
+extern Hjava_lang_reflect_Method* (*p_makeMethod)(struct Hjava_lang_Class* clazz, int slot);
+
+extern Hjava_lang_reflect_Field* (*p_makeField)(struct Hjava_lang_Class* clazz, int slot);
+
+extern Hjava_lang_String* (*p_getClassName)(struct Hjava_lang_Class *clazz);
+
+void
+java_lang_Class_init_function_pointers(void) {
+	p_makeParameters = makeParameters;
+	p_makeReturn = makeReturn;
+	p_makeConstructor = makeConstructor;
+	p_makeMethod = makeMethod;
+	p_makeField = makeField;
+	p_getClassName = java_lang_Class_getName;
+}
+#endif
+
 /*
  * count the number of methods in a class that are not constructors.
  * If declared is not set, count only public methods.
Index: kaffe/libraries/clib/native/ClassLoader.c
diff -u kaffe/libraries/clib/native/ClassLoader.c:1.1.1.5 kaffe/libraries/clib/native/ClassLoader.c:1.4
--- kaffe/libraries/clib/native/ClassLoader.c:1.1.1.5	Tue Jul 14 22:57:11 1998
+++ kaffe/libraries/clib/native/ClassLoader.c	Wed Jul 15 03:43:28 1998
@@ -83,16 +83,16 @@
 	/*
 	 * see if somebody loaded that class already
 	 */
-	lockMutex(centry);
+	lockCEntryMutex(centry);
 	if (centry->class != NULL) {
-		unlockMutex(centry);
+		unlockCEntryMutex(centry);
 		SignalError("java.lang.ClassFormatError", "Duplicate name");
 	}
 
 	/* enter the class we loaded and return */
 	centry->class = clazz;
 	clazz->centry = centry;
-	unlockMutex(centry);
+	unlockCEntryMutex(centry);
 
 	/*
 	 * While it is not necessary that one be able to actually *use*
Index: kaffe/libraries/clib/native/Field.c
diff -u kaffe/libraries/clib/native/Field.c:1.1.1.3 kaffe/libraries/clib/native/Field.c:1.5
--- kaffe/libraries/clib/native/Field.c:1.1.1.3	Mon Sep  7 14:18:31 1998
+++ kaffe/libraries/clib/native/Field.c	Sat Sep 12 00:43:36 1998
@@ -36,6 +36,11 @@
 #include <native.h>
 #include "defs.h"
 
+#ifdef GUARANA
+extern void guarana_reify_field_load(struct HBR_unicamp_Guarana_MetaObject *mo, struct Hjava_lang_Object *o, struct Hjava_lang_Class *declass, Field *field, jvalue *res);
+extern void guarana_reify_field_store(struct HBR_unicamp_Guarana_MetaObject *mo, struct Hjava_lang_Object *o, struct Hjava_lang_Class *declass, Field *field, jvalue *val);
+#endif
+
 static
 char*
 getFieldAddress(Hjava_lang_reflect_Field* this, struct Hjava_lang_Object* obj)
@@ -82,9 +87,41 @@
         Hjava_lang_Class* clas;
         Field* fld;
         char* base;
+#ifdef GUARANA
+	jvalue result;
+	struct HBR_unicamp_Guarana_MetaObject *mo;
+#endif
 
         clas = (Hjava_lang_Class*) unhand(this)->clazz;
         fld = CLASS_FIELDS(clas) + unhand(this)->slot;
+#ifdef GUARANA
+	if (fld->accflags & ACC_STATIC)
+	  mo = clas->head.meta_object;
+	else
+	  mo = obj->meta_object;
+
+	if (mo) {
+	  base = (char*)&result;
+	  guarana_reify_field_load(mo, obj, clas, fld, &result);
+
+	  if (FIELD_ISREF(fld))
+	    switch (CLASS_PRIM_SIG(FIELD_TYPE(fld))) {
+	    case 'Z':
+	      result.z = result.i;
+	      break;
+	    case 'B':
+	      result.b = result.i;
+	      break;
+	    case 'S':
+	      result.s = result.i;
+	      break;
+	    case 'C':
+	      result.c = result.i;
+	      break;
+	    }
+
+        } else
+#endif
         base = getFieldAddress(this, obj);
 
 	if ( fld->type == intClass ) {
@@ -132,6 +169,20 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == booleanClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return *(jbool*)base;
 	}
         else {
@@ -152,6 +203,20 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == byteClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return *(jbyte*)base;
 	}
         else {
@@ -171,6 +236,20 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == charClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return *(jchar*)base;
 	}
         else {
@@ -191,9 +270,37 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == shortClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return *(jshort*)base;
 	}
         else if ( fld->type == byteClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jshort)(*(jbyte*)base);
 	}
         else {
@@ -213,15 +320,71 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return *(jint*)base;
 	}
         else if ( fld->type == shortClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jint)(*(jshort*)base);
 	}
         else if ( fld->type == byteClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jint)(*(jbyte*)base);
 	}
         else if ( fld->type == charClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jint)(*(jchar*)base);
 	}
         else {
@@ -241,18 +404,88 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.j;
+		} else
+#endif
                 return *(jlong*)base;
 	}
         else if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jlong)(*(jint*)base);
 	}
         else if ( fld->type == shortClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jlong)(*(jshort*)base);
 	}
         else if ( fld->type == byteClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jlong)(*(jbyte*)base);
 	}
         else if ( fld->type == charClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jlong)(*(jchar*)base);
 	}
         else {
@@ -272,21 +505,105 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.f;
+		} else
+#endif
                 return *(jfloat*)base;
 	}
         else if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.j;
+		} else
+#endif
                 return (jfloat)(*(jlong*)base);
 	}
         else if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jfloat)(*(jint*)base);
 	}
         else if ( fld->type == shortClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jfloat)(*(jshort*)base);
 	}
         else if ( fld->type == byteClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jfloat)(*(jbyte*)base);
 	}
         else if ( fld->type == charClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jfloat)(*(jchar*)base);
 	}
         else {
@@ -306,24 +623,122 @@
         base = getFieldAddress(this, obj);
 
         if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.d;
+		} else
+#endif
                 return *(jdouble*)base;
 	}
         else if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.f;
+		} else
+#endif
                 return (jdouble)(*(jfloat*)base);
 	}
         else if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.j;
+		} else
+#endif
                 return (jdouble)(*(jlong*)base);
 	}
         else if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jdouble)(*(jint*)base);
 	}
         else if ( fld->type == shortClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jdouble)(*(jshort*)base);
 	}
         else if ( fld->type == byteClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jdouble)(*(jbyte*)base);
 	}
         else if ( fld->type == charClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue result;
+		  guarana_reify_field_load(mo, obj, clas, fld, &result);
+		  return result.i;
+		} else
+#endif
                 return (jdouble)(*(jchar*)base);
 	}
         else {
@@ -348,6 +763,20 @@
         }
 
         if ( fld->type == booleanClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jbool*)base = val;
 	}
         else {
@@ -371,21 +800,105 @@
         }
 
         if ( fld->type == byteClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jbyte*)base = val;
 	}
         else if ( fld->type == shortClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jshort*)base = (jshort)val;
 	}
         else if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jint*)base = (jint)val;
 	}
         else if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.j = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jlong*)base = (jlong)val;
 	}
         else if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.f = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jfloat*)base = (jfloat)val;
 	}
         else if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.d = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jdouble*)base =(jdouble)val;
 	}
         else {
@@ -409,18 +922,88 @@
         }
 
         if ( fld->type == charClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jchar*)base = val;
 	}
         else if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jint*)base = (jint)val;
 	}
         else if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.j = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jlong*)base = (jlong)val;
 	}
         else if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.f = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jfloat*)base = (jfloat)val;
 	}
         else if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.d = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jdouble*)base =(jdouble)val;
 	}
         else {
@@ -444,18 +1027,88 @@
         }
 
         if ( fld->type == shortClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jshort*)base = val;
 	}
         else if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jint*)base = (jint)val;
 	}
         else if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.j = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jlong*)base = (jlong)val;
 	}
         else if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.f = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jfloat*)base = (jfloat)val;
 	}
         else if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.d = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jdouble*)base =(jdouble)val;
 	}
         else {
@@ -479,15 +1132,71 @@
         }
 
         if ( fld->type == intClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.i = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jint*)base = val;
 	}
         else if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.j = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jlong*)base = (jlong)val;
 	}
         else if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.f = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jfloat*)base = (jfloat)val;
 	}
         else if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.d = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jdouble*)base =(jdouble)val;
 	}
         else {
@@ -511,12 +1220,54 @@
         }
 
         if ( fld->type == longClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.j = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jlong*)base = val;
 	}
         else if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.f = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jfloat*)base = (jfloat)val;
 	}
         else if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.d = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jdouble*)base = (jdouble)val;
 	}
         else {
@@ -540,9 +1291,37 @@
         }
 
         if ( fld->type == floatClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.f = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jfloat*)base = val;
 	}
         else if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.d = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jdouble*)base =(jdouble)val;
 	}
         else {
@@ -566,6 +1345,20 @@
         }
 
         if ( fld->type == doubleClass ) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.d = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		} else
+#endif
                 *(jdouble*)base = val;
 	}
         else {
@@ -588,6 +1381,22 @@
         }
 	
 	if (FIELD_ISREF(fld) && (val == NULL || soft_instanceof(resolveFieldType(fld, clas), val))) {
+#ifdef GUARANA
+		struct HBR_unicamp_Guarana_MetaObject *mo;
+
+		if (fld->accflags & ACC_STATIC)
+		  mo = clas->head.meta_object;
+		else
+		  mo = obj->meta_object;
+
+		if (mo) {
+		  jvalue value;
+		  value.l = val;
+		  guarana_reify_field_store(mo, obj, clas, fld, &value);
+		  return;
+		}
+
+#endif
 		base = getFieldAddress(this, obj);
 		*(struct Hjava_lang_Object**)base = val;
 		return;
Index: kaffe/libraries/clib/native/Thread.c
diff -u kaffe/libraries/clib/native/Thread.c:1.1.1.5 kaffe/libraries/clib/native/Thread.c:1.5
--- kaffe/libraries/clib/native/Thread.c:1.1.1.5	Mon Sep  7 14:18:48 1998
+++ kaffe/libraries/clib/native/Thread.c	Wed Sep  9 05:23:04 1998
@@ -92,17 +92,17 @@
 void
 java_lang_Thread_suspend0(struct Hjava_lang_Thread* this)
 {
-	lockMutex(this);
+	lockObjMutex((Hjava_lang_Object*)this);
 	waitCond(this, 0);
-	unlockMutex(this);
+	unlockObjMutex((Hjava_lang_Object*)this);
 }
 
 void
 java_lang_Thread_resume0(struct Hjava_lang_Thread* this)
 {
-	lockMutex(this);
+	lockObjMutex((Hjava_lang_Object*)this);
 	signalCond(this);
-	unlockMutex(this);
+	unlockObjMutex((Hjava_lang_Object*)this);
 }
 
 jbool
