[kaffe] CVS kaffe (robilad): kaffevm/classPool.c,

Kaffe CVS cvs-commits at kaffe.org
Sat Sep 22 10:01:47 PDT 2007


PatchSet 7555 
Date: 2007/09/22 17:00:10
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
2007-09-22  Dalibor Topic  <robilad at kaffe.org>

        * kaffevm/classPool.c,
        kaffevm/intrp/machine.c,
        kaffevm/intrp/methodcalls.c,
        kaffevm/jit/machine.c,
        kaffevm/jit/methodcalls.c,
        kaffevm/jit3/machine.c,
        kaffevm/jni/jni.c,
        kaffevm/stackTrace.c,
        xprof/feedback.c: Use METHOD_IS_NATIVE rather than testing for ACC_NATIVE manually.

Members: 
	ChangeLog:1.5053->1.5054 
	kaffe/kaffevm/classPool.c:1.40->1.41 
	kaffe/kaffevm/stackTrace.c:1.53->1.54 
	kaffe/kaffevm/intrp/machine.c:1.57->1.58 
	kaffe/kaffevm/intrp/methodcalls.c:1.16->1.17 
	kaffe/kaffevm/jit/machine.c:1.87->1.88 
	kaffe/kaffevm/jit/methodcalls.c:1.12->1.13 
	kaffe/kaffevm/jit3/machine.c:1.84->1.85 
	kaffe/kaffevm/jni/jni.c:1.46->1.47 
	kaffe/xprof/feedback.c:1.6->1.7 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.5053 kaffe/ChangeLog:1.5054
--- kaffe/ChangeLog:1.5053	Wed Sep 19 14:27:56 2007
+++ kaffe/ChangeLog	Sat Sep 22 17:00:10 2007
@@ -1,3 +1,15 @@
+2007-09-22  Dalibor Topic  <robilad at kaffe.org>
+
+	* kaffevm/classPool.c,
+        kaffevm/intrp/machine.c,
+        kaffevm/intrp/methodcalls.c,
+        kaffevm/jit/machine.c,
+        kaffevm/jit/methodcalls.c,
+        kaffevm/jit3/machine.c,
+        kaffevm/jni/jni.c,
+        kaffevm/stackTrace.c,
+        xprof/feedback.c: Use METHOD_IS_NATIVE rather than testing for ACC_NATIVE manually.
+
 2007-09-19  Dalibor Topic  <robilad at kaffe.org>
 
 	* libraries/javalib/external/classpath/native/jni/native-lib/Makefile.am
Index: kaffe/kaffe/kaffevm/classPool.c
diff -u kaffe/kaffe/kaffevm/classPool.c:1.40 kaffe/kaffe/kaffevm/classPool.c:1.41
--- kaffe/kaffe/kaffevm/classPool.c:1.40	Sun Jun 11 23:12:10 2006
+++ kaffe/kaffe/kaffevm/classPool.c	Sat Sep 22 17:00:12 2007
@@ -619,7 +619,7 @@
 			miscfixed += SIZE_IFNONZERO(m->declared_exceptions);
 			misc += SIZE_IFNONZERO(m->exception_table);
 			/* bytecode or jitted code */
-			if ((m->accflags & ACC_NATIVE) == 0) {
+			if (!METHOD_IS_NATIVE(m)) {
 				if (METHOD_TRANSLATED(m)) {
 					jitmem += SIZE_IFNONZERO(getMethodCodeStart(m));
 				} else {
Index: kaffe/kaffe/kaffevm/stackTrace.c
diff -u kaffe/kaffe/kaffevm/stackTrace.c:1.53 kaffe/kaffe/kaffevm/stackTrace.c:1.54
--- kaffe/kaffe/kaffevm/stackTrace.c:1.53	Sat Jul  8 15:02:42 2006
+++ kaffe/kaffe/kaffevm/stackTrace.c	Sat Sep 22 17:00:12 2007
@@ -199,7 +199,7 @@
 				unhand(element)->methodName
 					= utf8Const2Java(meth->name);
 				unhand(element)->isNative
-					= meth->accflags & ACC_NATIVE;
+				  = METHOD_IS_NATIVE(meth);
 				unhand_array(result)->body[frame - first_frame]
 					= (Hjava_lang_Object*)element;
 			}
@@ -260,7 +260,7 @@
 				       + 64));
 
 		if (linenr == -1) {
-		  if (meth->accflags & ACC_NATIVE) {
+		  if (METHOD_IS_NATIVE(meth)) {
 		    sprintf(buf, "   at %s.%s (%s:native)",
 			    class_dot_name,
 			    meth->name->data, 
Index: kaffe/kaffe/kaffevm/intrp/machine.c
diff -u kaffe/kaffe/kaffevm/intrp/machine.c:1.57 kaffe/kaffe/kaffevm/intrp/machine.c:1.58
--- kaffe/kaffe/kaffevm/intrp/machine.c:1.57	Mon Apr 17 18:03:10 2006
+++ kaffe/kaffe/kaffevm/intrp/machine.c	Sat Sep 22 17:00:12 2007
@@ -184,7 +184,7 @@
 	  soft_enter_method(((jvalue*)arg)[0].l, meth);
 #endif
 
-	if (methaccflags & ACC_NATIVE) {
+	if (METHOD_IS_NATIVE(meth)) {
 NDBG(		dprintf("Call to native %s.%s%s.\n", meth->class->name->data, meth->name->data, METHOD_SIGD(meth)); );
 		if (methaccflags & ACC_STATIC) {
 			KaffeVM_callMethodA(meth, meth, 0, (jvalue*)arg, (jvalue*)retval, 1);
Index: kaffe/kaffe/kaffevm/intrp/methodcalls.c
diff -u kaffe/kaffe/kaffevm/intrp/methodcalls.c:1.16 kaffe/kaffe/kaffevm/intrp/methodcalls.c:1.17
--- kaffe/kaffe/kaffevm/intrp/methodcalls.c:1.16	Mon Aug  6 12:49:01 2007
+++ kaffe/kaffe/kaffevm/intrp/methodcalls.c	Sat Sep 22 17:00:12 2007
@@ -88,7 +88,7 @@
 {
 	Method *meth = (Method *)call->function;
 
-	if ((meth->accflags & ACC_NATIVE) == 0) {
+	if (!METHOD_IS_NATIVE(meth)) {
 	  jint i;
 	  jint numArgs;
 	  errorInfo einfo;
Index: kaffe/kaffe/kaffevm/jit/machine.c
diff -u kaffe/kaffe/kaffevm/jit/machine.c:1.87 kaffe/kaffe/kaffevm/jit/machine.c:1.88
--- kaffe/kaffe/kaffevm/jit/machine.c:1.87	Sun Jun 11 23:12:11 2006
+++ kaffe/kaffe/kaffevm/jit/machine.c	Sat Sep 22 17:00:13 2007
@@ -241,7 +241,7 @@
     );
 
 	/* If this code block is native, then just set it up and return */
-	if ((meth->accflags & ACC_NATIVE) != 0) {
+	if (METHOD_IS_NATIVE(meth) {
 		void *func = native(meth, einfo);
 
 		if (func == NULL) {
Index: kaffe/kaffe/kaffevm/jit/methodcalls.c
diff -u kaffe/kaffe/kaffevm/jit/methodcalls.c:1.12 kaffe/kaffe/kaffevm/jit/methodcalls.c:1.13
--- kaffe/kaffe/kaffevm/jit/methodcalls.c:1.12	Sat Mar  4 18:36:55 2006
+++ kaffe/kaffe/kaffevm/jit/methodcalls.c	Sat Sep 22 17:00:13 2007
@@ -117,7 +117,7 @@
 	 *
 	 * NB: If we'll ever support CNI, revisit this.
 	 */
-	if (CLASS_GCJ((meth)->class) && (meth->accflags & ACC_NATIVE) &&
+	if (CLASS_GCJ((meth)->class) && METHOD_IS_NATIVE(meth) &&
 		meth->idx != -1)
 		return (true);
 
@@ -173,7 +173,7 @@
 		 * anchors so we can patch them up before they're invoked.
 		 */
 		if (!(CLASS_GCJ((meth)->class)
-			&& (meth->accflags & ACC_NATIVE)))
+			&& METHOD_IS_NATIVE(meth)))
 		{
 			assert(*where == NULL ||
 				!!!"Cannot override trampoline anchor");
Index: kaffe/kaffe/kaffevm/jit3/machine.c
diff -u kaffe/kaffe/kaffevm/jit3/machine.c:1.84 kaffe/kaffe/kaffevm/jit3/machine.c:1.85
--- kaffe/kaffe/kaffevm/jit3/machine.c:1.84	Sun Jun 11 23:12:11 2006
+++ kaffe/kaffe/kaffevm/jit3/machine.c	Sat Sep 22 17:00:13 2007
@@ -237,7 +237,7 @@
 	}
 
 	/* If this code block is native, then just set it up and return */
-	if ((xmeth->accflags & ACC_NATIVE) != 0) {
+	if (METHOD_IS_NATIVE(xmeth)) {
 		void *func = native(xmeth, einfo);
 		if (func != NULL) {
 			engine_create_wrapper(xmeth, func);
Index: kaffe/kaffe/kaffevm/jni/jni.c
diff -u kaffe/kaffe/kaffevm/jni/jni.c:1.46 kaffe/kaffe/kaffevm/jni/jni.c:1.47
--- kaffe/kaffe/kaffevm/jni/jni.c:1.46	Fri Sep 22 20:14:28 2006
+++ kaffe/kaffe/kaffevm/jni/jni.c	Sat Sep 22 17:00:13 2007
@@ -697,7 +697,7 @@
 		for (i = 0; i < nmeth; i++) {
 			if (strcmp(meth[i].name->data, methodArray[j].name) == 0 &&
 			    strcmp(METHOD_SIGD(&meth[i]), methodArray[j].signature) == 0 &&
-			    (meth[i].accflags & ACC_NATIVE) != 0) {
+			    METHOD_IS_NATIVE(&meth[i])) {
 				meth[i].kFlags |= KFLAG_JNI;
 				engine_create_wrapper(&meth[i], methodArray[j].fnPtr); 
 				goto found;
Index: kaffe/kaffe/xprof/feedback.c
diff -u kaffe/kaffe/xprof/feedback.c:1.6 kaffe/kaffe/xprof/feedback.c:1.7
--- kaffe/kaffe/xprof/feedback.c:1.6	Mon Dec 26 20:06:36 2005
+++ kaffe/kaffe/xprof/feedback.c	Sat Sep 22 17:00:13 2007
@@ -156,7 +156,7 @@
 					if( (meth = findMethodLocal(cls,
 								    u8mname,
 								    u8sig)) &&
-					    !(meth->accflags & ACC_NATIVE) )
+					    !METHOD_IS_NATIVE(meth) )
 					{
 						if( translate(meth, &info) )
 						{




More information about the kaffe mailing list