harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r599384 - in /harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363: base/stackmap.h base/ver_utils.h java5/stackmap_5.h
Date Thu, 29 Nov 2007 11:17:25 GMT
Author: mloenko
Date: Thu Nov 29 03:17:23 2007
New Revision: 599384

URL: http://svn.apache.org/viewvc?rev=599384&view=rev
Log:
removing duplication in types and unnecessary headers

Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/base/stackmap.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/base/ver_utils.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/java5/stackmap_5.h

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/base/stackmap.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/base/stackmap.h?rev=599384&r1=599383&r2=599384&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/base/stackmap.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/base/stackmap.h Thu Nov 29 03:17:23
2007
@@ -26,12 +26,6 @@
 #include <assert.h>
 #include "ver_utils.h"
 
-#ifdef WIN32
-#define intptr int64
-#else
-#define intptr long
-#endif
-
 namespace CPVerifier {
 
     //predefined verification types

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/base/ver_utils.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/base/ver_utils.h?rev=599384&r1=599383&r2=599384&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/base/ver_utils.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/base/ver_utils.h Thu Nov 29 03:17:23
2007
@@ -22,7 +22,7 @@
 #define __VER_UTILS_H_
 
 #include <assert.h>
-#include "clog.h"
+#include "open/types.h"
 #include <iostream>
 using namespace std;
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/java5/stackmap_5.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/java5/stackmap_5.h?rev=599384&r1=599383&r2=599384&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/java5/stackmap_5.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/java5/stackmap_5.h Thu Nov 29
03:17:23 2007
@@ -26,12 +26,6 @@
 #include <assert.h>
 #include "../base/stackmap_x.h"
 
-#ifdef WIN32
-#define intptr int64
-#else
-#define intptr long
-#endif
-
 using namespace CPVerifier;
 
 namespace CPVerifier_5 {
@@ -149,7 +143,7 @@
         //return first IncomingType constraint
         IncomingType *firstIncoming() {
             //TODO: I have to store somewhere the "modified" bit. Sorry.
-            return (IncomingType*)( (intptr)incoming & ~3 );
+            return (IncomingType*)( (POINTER_SIZE_INT)incoming & ~3 );
         }
 
         //return first conatrint of any type except IncomingType
@@ -182,8 +176,8 @@
         void newIncomingType(Memory *mem, SmConstant value) {
             IncomingType *in = (IncomingType *)mem->malloc(sizeof(IncomingType));
 
-            intptr mask = (intptr)incoming & 3;
-            incoming = (IncomingType *) ((intptr)incoming & ~3);
+            POINTER_SIZE_INT mask = (POINTER_SIZE_INT)incoming & 3;
+            incoming = (IncomingType *) ((POINTER_SIZE_INT)incoming & ~3);
 
             in->nxt = value == SM_BOGUS ? 0 : incoming;
             //in->type = CT_INCOMING_VALUE;
@@ -191,7 +185,7 @@
 
             incoming = in;
 
-            incoming = (IncomingType *) ((intptr)incoming | mask);
+            incoming = (IncomingType *) ((POINTER_SIZE_INT)incoming | mask);
         }
 
         //add expected type with the 'value' value
@@ -223,19 +217,19 @@
         // return 'modified' flag for the stackmap. the flag is stored in the first bit of
the 'incoming' pointer
         // "modified" is about subroutines: you have to track which locals were changed
         int isJsrModified() {
-            return (int)(intptr)incoming & 1;
+            return (int)(POINTER_SIZE_INT)incoming & 1;
         }
 
         //set 'modified' flag for the stackmap. the flag is stored in the first bit of the
'incoming' pointer
         // "modified" is about subroutines: you have to track which locals were changed
         void setJsrModified() {
-            incoming = (IncomingType *) ((intptr)incoming | 1);
+            incoming = (IncomingType *) ((POINTER_SIZE_INT)incoming | 1);
         }
 
         //clear 'modified' flag for the stackmap. the flag is stored in the first bit of
the 'incoming' pointer
         // "modified" is about subroutines: you have to track which locals were changed
         void clearJsrModified() {
-            incoming = (IncomingType *) ((intptr)incoming & ~1);
+            incoming = (IncomingType *) ((POINTER_SIZE_INT)incoming & ~1);
         }
     };
 
@@ -252,7 +246,7 @@
         //is it a sub-definite (not constant) type?
         int isVariable() {
             assert(const_val != SM_NONE);
-            return !((intptr)var_ptr & 1);
+            return !((POINTER_SIZE_INT)var_ptr & 1);
         }
 
         //get value for the constant (known) verification type
@@ -262,7 +256,7 @@
 
         //get variable representing sub-definite verification type
         StackmapElement *getVariable() {
-            return (StackmapElement *) ((intptr)var_ptr & ~3);
+            return (StackmapElement *) ((POINTER_SIZE_INT)var_ptr & ~3);
         }
 
         //when we need to compae to some unmergable type we don;t need to interate thru the
list
@@ -277,13 +271,13 @@
         //"modified" is about subroutines: you have to track which locals were changed
         //it's easier to think of all the constants as "modified"
         int isJsrModified() {
-            return (int)(intptr)var_ptr & 3;
+            return (int)(POINTER_SIZE_INT)var_ptr & 3;
         }
 
         // set 'modified' flag for the workmap element. the flag is stored in the second
bit of the union
         void setJsrModified() {
             if( isVariable() ) {
-                var_ptr = (StackmapElement*)((intptr)var_ptr | 2);
+                var_ptr = (StackmapElement*)((POINTER_SIZE_INT)var_ptr | 2);
             }
         }
     };



Mime
View raw message