[kaffe] CVS kaffe (robilad): Small cleanup in exception.[ch]

Kaffe CVS cvs-commits at kaffe.org
Sun Feb 6 15:34:19 PST 2005


PatchSet 5492 
Date: 2005/02/06 23:29:17
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Small cleanup in exception.[ch]

2005-02-06  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/kaffevm/exception.c (vmExcept_isJNIFrame,
        vmExcept_JNIContains, vmExcept_setJNIFrame,
        vmExcept_jumpToHandler, vmExcept_setSyncObj,
        vmExcept_getSyncObj, vmExcept_setPC,
        vmExcept_getPC): Moved over here from
        kaffe/kaffevm/exception.h, and made static when
        appropriate.

Members: 
	ChangeLog:1.3537->1.3538 
	kaffe/kaffevm/exception.c:1.91->1.92 
	kaffe/kaffevm/exception.h:1.30->1.31 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3537 kaffe/ChangeLog:1.3538
--- kaffe/ChangeLog:1.3537	Sun Feb  6 20:45:06 2005
+++ kaffe/ChangeLog	Sun Feb  6 23:29:17 2005
@@ -1,5 +1,15 @@
 2005-02-06  Dalibor Topic  <robilad at kaffe.org>
 
+	* kaffe/kaffevm/exception.c (vmExcept_isJNIFrame,
+	vmExcept_JNIContains, vmExcept_setJNIFrame,
+	vmExcept_jumpToHandler, vmExcept_setSyncObj,
+	vmExcept_getSyncObj, vmExcept_setPC,
+	vmExcept_getPC): Moved over here from 
+	kaffe/kaffevm/exception.h, and made static when 
+	appropriate.
+
+2005-02-06  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/clib/native/java_lang_ref_Reference.c
 	(Java_java_lang_ref_Reference_create):
 	Removed unused variables.
Index: kaffe/kaffe/kaffevm/exception.c
diff -u kaffe/kaffe/kaffevm/exception.c:1.91 kaffe/kaffe/kaffevm/exception.c:1.92
--- kaffe/kaffe/kaffevm/exception.c:1.91	Sun Dec 19 06:25:08 2004
+++ kaffe/kaffe/kaffevm/exception.c	Sun Feb  6 23:29:20 2005
@@ -73,6 +73,75 @@
 
 static bool findExceptionBlockInMethod(uintp, Hjava_lang_Class*, Method*, uintp*);
 
+bool
+vmExcept_isJNIFrame(VmExceptHandler* eh)
+{
+	assert(eh);
+	return (eh->meth == VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
+}
+
+static bool
+vmExcept_JNIContains(VmExceptHandler* eh, uintp fp)
+{
+	assert(eh);
+	assert(eh->meth == VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
+	assert(fp);
+
+	return (eh->frame.jni.fp == fp);
+}
+
+void 
+vmExcept_setJNIFrame(VmExceptHandler* eh, uintp fp)
+{
+	assert(eh);
+	assert(fp != 0);
+
+	eh->meth = VMEXCEPTHANDLER_KAFFEJNI_HANDLER;
+	eh->frame.jni.fp = fp;
+}
+
+static void
+vmExcept_jumpToHandler(VmExceptHandler* frame)
+{
+	JTHREAD_LONGJMP(frame->jbuf, 1);
+}
+
+void 
+vmExcept_setSyncObj(VmExceptHandler* eh, struct Hjava_lang_Object* syncobj)
+{
+	assert(eh);
+	assert(eh->meth != 0);
+	assert(eh->meth != VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
+	eh->frame.intrp.syncobj = syncobj;
+}
+
+static struct Hjava_lang_Object*
+vmExcept_getSyncObj(VmExceptHandler* eh)
+{
+	assert(eh);
+	assert(eh->meth != 0);
+	assert(eh->meth != VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
+	return eh->frame.intrp.syncobj;
+}
+
+void 
+vmExcept_setPC(volatile VmExceptHandler* eh, u4 pc)
+{
+	assert(eh);
+	assert(eh->meth != 0);
+	assert(eh->meth != VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
+	eh->frame.intrp.pc = pc;
+}
+
+u4 
+vmExcept_getPC(const VmExceptHandler* eh)
+{
+	assert(eh);
+	assert(eh->meth != 0);
+	assert(eh->meth != VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
+	return eh->frame.intrp.pc;
+}
+
 /*
  * Create an exception from error information.
  */
Index: kaffe/kaffe/kaffevm/exception.h
diff -u kaffe/kaffe/kaffevm/exception.h:1.30 kaffe/kaffe/kaffevm/exception.h:1.31
--- kaffe/kaffe/kaffevm/exception.h:1.30	Sat Feb  5 09:22:41 2005
+++ kaffe/kaffe/kaffevm/exception.h	Sun Feb  6 23:29:21 2005
@@ -105,89 +105,11 @@
 
 extern void initExceptions(void);
 
-static inline bool
-vmExcept_isJNIFrame(VmExceptHandler* eh)
-{
-	assert(eh);
-	return (eh->meth == VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
-}
-
-static inline bool
-vmExcept_JNIContains(VmExceptHandler* eh, uintp fp)
-{
-	assert(eh);
-	assert(eh->meth == VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
-	assert(fp);
-
-	return (eh->frame.jni.fp == fp);
-}
-
-static inline void 
-vmExcept_setJNIFrame(VmExceptHandler* eh, uintp fp)
-{
-	assert(eh);
-	assert(fp != 0);
-
-	eh->meth = VMEXCEPTHANDLER_KAFFEJNI_HANDLER;
-	eh->frame.jni.fp = fp;
-}
-
-static inline void
-vmExcept_jumpToHandler(VmExceptHandler* frame)
-{
-	JTHREAD_LONGJMP(frame->jbuf, 1);
-}
-
-static inline void 
-vmExcept_setSyncObj(VmExceptHandler* eh, struct Hjava_lang_Object* syncobj)
-{
-	assert(eh);
-	assert(eh->meth != 0);
-	assert(eh->meth != VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
-	eh->frame.intrp.syncobj = syncobj;
-}
-
-static inline struct Hjava_lang_Object*
-vmExcept_getSyncObj(VmExceptHandler* eh)
-{
-	assert(eh);
-	assert(eh->meth != 0);
-	assert(eh->meth != VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
-	return eh->frame.intrp.syncobj;
-}
-
-static inline void 
-vmExcept_setMeth(VmExceptHandler* eh, struct _methods* meth)
-{
-	assert(eh);
-	assert(meth);
-	eh->meth = meth;
-}
-
-static inline struct _methods* 
-vmExcept_getMeth(VmExceptHandler* eh)
-{
-	assert(eh);
-	return eh->meth;
-}
-
-static inline void 
-vmExcept_setPC(volatile VmExceptHandler* eh, u4 pc)
-{
-	assert(eh);
-	assert(eh->meth != 0);
-	assert(eh->meth != VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
-	eh->frame.intrp.pc = pc;
-}
-
-static inline u4 
-vmExcept_getPC(const VmExceptHandler* eh)
-{
-	assert(eh);
-	assert(eh->meth != 0);
-	assert(eh->meth != VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
-	return eh->frame.intrp.pc;
-}
+bool vmExcept_isJNIFrame(VmExceptHandler* eh);
+void vmExcept_setJNIFrame(VmExceptHandler* eh, uintp fp);
+void vmExcept_setSyncObj(VmExceptHandler* eh, struct Hjava_lang_Object* syncobj);
+void vmExcept_setPC(volatile VmExceptHandler* eh, u4 pc);
+u4 vmExcept_getPC(const VmExceptHandler* eh);
 
 #endif
 




More information about the kaffe mailing list