[kaffe] CVS kaffe (robilad): small cleanups

Kaffe CVS cvs-commits at kaffe.org
Sun Mar 5 06:45:30 PST 2006


PatchSet 7140 
Date: 2006/03/05 14:35:19
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
small cleanups

2006-03-05  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/kaffevm/kaffe.def: Small cleanup to
        make debugging Cygwin crash a little easier.

        * kaffe/kaffevm/soft.c: Include native.h.

        * kaffe/kaffevm/soft.c, kaffe/kaffevm/soft.h:
        (soft_lookupinterfacemethod) Added const qualifiers
        to parameters.

        * libraries/javalib/external/classpath/java/net/URI.java (quote):
        Reapplied patch from 2006-02-13  Dalibor Topic  <robilad at kaffe.org>

Members: 
	ChangeLog:1.4658->1.4659 
	kaffe/kaffevm/kaffe.def:1.42->1.43 
	kaffe/kaffevm/soft.c:1.80->1.81 
	kaffe/kaffevm/soft.h:INITIAL->1.20 
	libraries/javalib/external/classpath/java/net/URI.java:1.4->1.5 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4658 kaffe/ChangeLog:1.4659
--- kaffe/ChangeLog:1.4658	Sun Mar  5 14:03:45 2006
+++ kaffe/ChangeLog	Sun Mar  5 14:35:19 2006
@@ -1,3 +1,17 @@
+2006-03-05  Dalibor Topic  <robilad at kaffe.org>
+
+	* kaffe/kaffevm/kaffe.def: Small cleanup to
+	make debugging Cygwin crash a little easier.
+
+	* kaffe/kaffevm/soft.c: Include "native.h".
+
+	* kaffe/kaffevm/soft.c, kaffe/kaffevm/soft.h:
+	(soft_lookupinterfacemethod) Added const qualifiers
+	to parameters.
+
+        * libraries/javalib/external/classpath/java/net/URI.java (quote):
+	Reapplied patch from 2006-02-13  Dalibor Topic  <robilad at kaffe.org>
+
 2006-03-05  Guilhem Lavaux  <guilhem at kaffe.org>
 
 	* libraries/clib/native/java_lang_VMDouble.c: Removed spurious
Index: kaffe/kaffe/kaffevm/kaffe.def
diff -u kaffe/kaffe/kaffevm/kaffe.def:1.42 kaffe/kaffe/kaffevm/kaffe.def:1.43
--- kaffe/kaffe/kaffevm/kaffe.def:1.42	Wed Sep 28 02:02:12 2005
+++ kaffe/kaffe/kaffevm/kaffe.def	Sun Mar  5 14:35:26 2006
@@ -3177,7 +3177,8 @@
 					m->idx *
 					DTABLE_METHODSIZE);
 		} else {
-			softcall_lookupinterfacemethod(tmp, method_method(), stack(idx));
+			const Method const * method = method_method();
+			softcall_lookupinterfacemethod(tmp, method, stack(idx));
 		}
 		
 		/* Push arguments & object */
Index: kaffe/kaffe/kaffevm/soft.c
diff -u kaffe/kaffe/kaffevm/soft.c:1.80 kaffe/kaffe/kaffevm/soft.c:1.81
--- kaffe/kaffe/kaffevm/soft.c:1.80	Fri Sep  9 14:41:45 2005
+++ kaffe/kaffe/kaffevm/soft.c	Sun Mar  5 14:35:26 2006
@@ -40,6 +40,7 @@
 #include "machine.h"
 #include "fp.h"
 #include "jvmpi_kaffe.h"
+#include "native.h"
 
 void
 soft_null_call(void)
@@ -236,7 +237,7 @@
  * soft_lookupinterfacemethod.
  */
 void*
-soft_lookupinterfacemethod(Hjava_lang_Object* obj, Hjava_lang_Class* ifclass, int idx)
+soft_lookupinterfacemethod(const Hjava_lang_Object* obj, const struct Hjava_lang_Class* ifclass, int idx)
 {
 	Hjava_lang_Class* cls;
 	void*	ncode;
===================================================================
Checking out kaffe/kaffe/kaffevm/soft.h
RCS:  /home/cvs/kaffe/kaffe/kaffe/kaffevm/soft.h,v
VERS: 1.20
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/kaffe/kaffevm/soft.h	Sun Mar  5 14:45:29 2006
@@ -0,0 +1,107 @@
+/*
+ * soft.h
+ * Soft instruction prototypes.
+ *
+ * Copyright (c) 1996, 1997
+ *	Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ */
+
+#ifndef __soft_h
+#define	__soft_h
+
+#include "config.h"
+
+struct _dispatchTable;
+struct Hjava_lang_Class;
+struct Hjava_lang_Object;
+
+void	soft_null_call(void);
+void*	soft_new(struct Hjava_lang_Class*);
+void*	soft_newarray(jint, jint);
+void*	soft_anewarray(struct Hjava_lang_Class*, jint);
+void*   soft_vmultianewarray(struct Hjava_lang_Class* clazz, jint dims, va_list ap);
+void	soft_initialise_class(struct Hjava_lang_Class*);
+nativecode* soft_get_method_code (Method*);
+
+void*	soft_lookupinterfacemethod(const struct Hjava_lang_Object*, const struct Hjava_lang_Class*, int);
+void*	soft_checkcast(struct Hjava_lang_Class*, struct Hjava_lang_Object*);
+jint	soft_instanceof(struct Hjava_lang_Class*, struct Hjava_lang_Object*);
+
+void	soft_athrow(struct Hjava_lang_Object*);
+void	soft_badarrayindex(void);
+void	soft_nullpointer(void);
+void	soft_divzero(void);
+void	soft_nosuchmethod(struct Hjava_lang_Class*, Utf8Const*, Utf8Const*);
+void	soft_nosuchfield(Utf8Const*, Utf8Const*);
+void	soft_nosuchclass(Utf8Const*);
+void	soft_linkage(Utf8Const*, Utf8Const*);
+void	soft_illegalaccess(Utf8Const*, Utf8Const*);
+void	soft_incompatibleclasschange(Utf8Const*, Utf8Const*);
+void	soft_abstractmethod(Utf8Const*, Utf8Const*);
+void	soft_stackoverflow(void);
+void	soft_checkarraystore(struct Hjava_lang_Object*, struct Hjava_lang_Object*);
+void	soft_addreference(void*, void*);
+
+jint	soft_dcmpg(jdouble, jdouble);
+jint	soft_dcmpl(jdouble, jdouble);
+jint	soft_fcmpg(jfloat, jfloat);
+jint	soft_fcmpl(jfloat, jfloat);
+
+jint	soft_mul(jint, jint);
+jint	soft_div(jint, jint);
+jint	soft_rem(jint, jint);
+
+#if defined(INTERPRETER)
+struct _slots;
+void*	soft_multianewarray(struct Hjava_lang_Class*, jint, struct _slots*);
+#endif
+
+#if defined(TRANSLATOR)
+jlong	soft_lmul(jlong, jlong);
+jlong	soft_ldiv(jlong, jlong);
+jlong	soft_lrem(jlong, jlong);
+jfloat	soft_fadd(jfloat, jfloat);
+jdouble	soft_faddl(jdouble, jdouble);
+jfloat	soft_fsub(jfloat, jfloat);
+jdouble	soft_fsubl(jdouble, jdouble);
+jfloat	soft_fmul(jfloat, jfloat);
+jdouble	soft_fmull(jdouble, jdouble);
+jfloat	soft_fdiv(jfloat, jfloat);
+jdouble	soft_fdivl(jdouble, jdouble);
+jfloat	soft_frem(jfloat, jfloat);
+jdouble	soft_freml(jdouble, jdouble);
+jlong	soft_lshll(jlong, jint);
+jlong	soft_ashrl(jlong, jint);
+jlong	soft_lshrl(jlong, jint);
+jint	soft_lcmp(jlong, jlong);
+void*	soft_multianewarray(struct Hjava_lang_Class*, jint, ...);
+#endif
+
+jlong	soft_cvtil(jint);
+jfloat	soft_cvtif(jint);
+jdouble	soft_cvtid(jint);
+jint	soft_cvtli(jlong);
+jfloat	soft_cvtlf(jlong);
+jdouble	soft_cvtld(jlong);
+jint	soft_cvtfi(jfloat);
+jlong	soft_cvtfl(jfloat);
+jdouble	soft_cvtfd(jfloat);
+jint	soft_cvtdi(jdouble);
+jlong	soft_cvtdl(jdouble);
+jfloat	soft_cvtdf(jdouble);
+
+jint instanceof(struct Hjava_lang_Class*, struct Hjava_lang_Class*);
+jint instanceof_class(struct Hjava_lang_Class*, struct Hjava_lang_Class*);
+jint instanceof_interface(struct Hjava_lang_Class*, struct Hjava_lang_Class*);
+jint instanceof_array(struct Hjava_lang_Class*, struct Hjava_lang_Class*);
+
+void	soft_debug1(void*, void*, void*);
+void	soft_debug2(void*, void*, void*);
+void	soft_trace(Method*, void*);
+void	soft_enter_method(struct Hjava_lang_Object *obj, Method *meth);
+void	soft_exit_method(Method *meth);
+
+#endif
Index: kaffe/libraries/javalib/external/classpath/java/net/URI.java
diff -u kaffe/libraries/javalib/external/classpath/java/net/URI.java:1.4 kaffe/libraries/javalib/external/classpath/java/net/URI.java:1.5
--- kaffe/libraries/javalib/external/classpath/java/net/URI.java:1.4	Sun Mar  5 13:02:44 2006
+++ kaffe/libraries/javalib/external/classpath/java/net/URI.java	Sun Mar  5 14:35:26 2006
@@ -487,16 +487,14 @@
     for (int i = 0; i < str.length(); i++)
       {
 	char c = str.charAt(i);
-	if (legalCharacters.indexOf(c) == -1)
+	if ((legalCharacters.indexOf(c) == -1)
+	    && (c <= 127))
 	  {
-	    if (c <= 127)
-	      {
-		sb.append('%');
-		sb.append(HEX.charAt(c / 16));
-		sb.append(HEX.charAt(c % 16));
-	      }
+	    sb.append('%');
+	    sb.append(HEX.charAt(c / 16));
+	    sb.append(HEX.charAt(c % 16));
 	  }
-	else
+      	else
 	  sb.append(c);
       }
     return sb.toString();




More information about the kaffe mailing list