harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlyd...@apache.org
Subject svn commit: r396867 - in /incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src: bytegames.c cfmsgs.c class.c classfile.c object.c object.h
Date Tue, 25 Apr 2006 12:37:16 GMT
Author: dlydick
Date: Tue Apr 25 05:37:13 2006
New Revision: 396867

URL: http://svn.apache.org/viewcvs?rev=396867&view=rev
Log:
Minor naming changes

Modified:
    incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/bytegames.c
    incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/cfmsgs.c
    incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/class.c
    incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/classfile.c
    incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/object.c
    incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/object.h

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/bytegames.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/bytegames.c?rev=396867&r1=396866&r2=396867&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/bytegames.c
(original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/bytegames.c
Tue Apr 25 05:37:13 2006
@@ -188,7 +188,7 @@
  * The 2- and 4-byte functions are typically used for absorbing class
  * file stream data into a ClassFile structure.  Of particular
  * interest is
- * @link #classfile_loadclassdata() classfile_loadclassdata()@endlink,
+ * @link #classfile_load_classdata() classfile_load_classdata()@endlink,
  * where it is used to retrieve many different types of 2- and 4-byte
  * data.  The 8-byte functions are used by @link
    #class_get_constant_field_attribute()
@@ -479,7 +479,7 @@
  * The 2- and 4-byte functions are typically used for swapping class
  * file stream data as it is being absorbed into a ClassFile structure,
  * as well as for other general uses.  Of particular interest is
- * @link #classfile_loadclassdata() classfile_loadclassdata()@endlink,
+ * @link #classfile_load_classdata() classfile_load_classdata()@endlink,
  * where they are used to swap many different types of 2- and 4-byte
  * data.  The 8-byte functions are provided for completeness.
  *

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/cfmsgs.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/cfmsgs.c?rev=396867&r1=396866&r2=396867&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/cfmsgs.c (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/cfmsgs.c Tue
Apr 25 05:37:13 2006
@@ -553,7 +553,7 @@
  *                @b SIGSEGV.  Such logic is already taken care
  *                of by virtue of it being an (attribute_info_dup *)
  *                type instead of as (attribute_info *).  This
- *                processing happens in cfattrib_loadattribute()
+ *                processing happens in cfattrib_load_attribute()
  *                after reading an attribute from the class file
  *                and storing it into the heap, which is properly
  *                aligned.

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/class.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/class.c?rev=396867&r1=396866&r2=396867&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/class.c (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/class.c Tue
Apr 25 05:37:13 2006
@@ -1035,8 +1035,8 @@
    @endverbatim
  *
  *   where @b name is a null-terminated string passed as the only parm,
- *   and @b b is the byte array read in by classfile_readclassfile()
- *   or classfile_readjarfile(), and @b off is zero, and @b len being
+ *   and @b b is the byte array read in by classfile_read_classfile()
+ *   or classfile_read_jarfile(), and @b off is zero, and @b len being
  *   discovered by classfile_read_XXXfile().
  *
  * @todo  HARMONY-6-jvm-class.c-7 Spec section 5.3.4
@@ -1256,11 +1256,11 @@
              */
             if (rtrue == classpath_isjar(pcname))
             {
-                pcfd = classfile_readjarfile(pcname);
+                pcfd = classfile_read_jarfile(pcname);
             }
             else
             {
-                pcfd = classfile_readclassfile(pcname);
+                pcfd = classfile_read_classfile(pcname);
             }
 
             GENERIC_FAILURE1_THROWERROR((rnull == pcfd),
@@ -1279,7 +1279,7 @@
              */
 
             /* Parse out the class file input stream */
-            pcfs = classfile_loadclassdata(pcfd);
+            pcfs = classfile_load_classdata(pcfd);
 
             /* Load into class and object tables */
             clsidx = class_static_new(CLASS_STATUS_EMPTY,
@@ -1354,7 +1354,7 @@
 
                 /*
                  * If error above, neither HEAP_FREE_DATA(super_name)
-                 * nor classfile_unloadclassdata(pcfs) will be called.
+                 * nor classfile_unload_classdata(pcfs) will be called.
                  *
                  */
             }

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/classfile.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/classfile.c?rev=396867&r1=396866&r2=396867&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/classfile.c
(original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/classfile.c
Tue Apr 25 05:37:13 2006
@@ -353,9 +353,9 @@
  *
  */
 
-ClassFile *classfile_loadclassdata(u1       *pclassfile_image)
+ClassFile *classfile_load_classdata(u1       *pclassfile_image)
 {
-    ARCH_FUNCTION_NAME(classfile_loadclassdata);
+    ARCH_FUNCTION_NAME(classfile_load_classdata);
 
     rint misc_adj; /* For ALLOC_xxx macros */
 
@@ -1133,7 +1133,7 @@
                      */
 
                     pfbytes =
-                        cfattrib_loadattribute(
+                        cfattrib_load_attribute(
                             pcfs,
                             &pcfs->fields[fldidx]->attributes[atridx],
                             (attribute_info *) pfbytes);
@@ -1297,7 +1297,7 @@
                      */
 
                     pmbytes =
-                        cfattrib_loadattribute(
+                        cfattrib_load_attribute(
                             pcfs,
                             &pcfs->methods[mthidx]->attributes[atridx],
                             (attribute_info *) pmbytes);
@@ -1417,7 +1417,7 @@
              */
 
             pcbytes =
-                cfattrib_loadattribute(
+                cfattrib_load_attribute(
                     pcfs,
                     &pcfs->attributes[atridx],
                     (attribute_info *) pcbytes);
@@ -1441,7 +1441,7 @@
 
     return(pcfs);
 
-} /* END of classfile_loadclassdata() */
+} /* END of classfile_load_classdata() */
 
 
 /*!
@@ -1457,9 +1457,9 @@
  *          when a bad pointer was passed in.
  *
  */ 
-rvoid classfile_unloadclassdata(ClassFile *pcfs)
+rvoid classfile_unload_classdata(ClassFile *pcfs)
 {
-    ARCH_FUNCTION_NAME(classfile_unloadclassdata);
+    ARCH_FUNCTION_NAME(classfile_unload_classdata);
 
     if (rnull == pcfs)
     { 
@@ -1494,7 +1494,7 @@
                 continue;
             }
 
-           cfattrib_unloadattribute(pcfs, pcfs->attributes[atridx]);
+           cfattrib_unload_attribute(pcfs, pcfs->attributes[atridx]);
         }
     }
 
@@ -1531,7 +1531,7 @@
                         continue;
                     }
 
-                    cfattrib_unloadattribute(pcfs,
+                    cfattrib_unload_attribute(pcfs,
                              pcfs->methods[mthidx]->attributes[atridx]);
                 }
             }
@@ -1574,7 +1574,7 @@
                         continue;
                     }
 
-                    cfattrib_unloadattribute(pcfs,
+                    cfattrib_unload_attribute(pcfs,
                               pcfs->fields[fldidx]->attributes[atridx]);
                 }
             }
@@ -1609,7 +1609,7 @@
 
     return;
 
-} /* end of classfile_unloadclassdata() */
+} /* end of classfile_unload_classdata() */
 
 
 /*******************************************************************/
@@ -1666,9 +1666,9 @@
  * containing its Java class image.
  *
  */
-u1 *classfile_readclassfile(rchar *filename)
+u1 *classfile_read_classfile(rchar *filename)
 {
-    ARCH_FUNCTION_NAME(classfile_readclassfile);
+    ARCH_FUNCTION_NAME(classfile_read_classfile);
 
     off_t filesize = 0;
 
@@ -1717,7 +1717,7 @@
     /* Proper completion when entire file is read in */
     return(pclassfile_image);
 
-} /* END of classfile_readclassfile() */
+} /* END of classfile_read_classfile() */
 
 
 /*!
@@ -1731,9 +1731,9 @@
  * @b CLASSPATH.
  *
  */
-u1 *classfile_readjarfile(rchar *filename)
+u1 *classfile_read_jarfile(rchar *filename)
 {
-    ARCH_FUNCTION_NAME(classfile_readjarfile);
+    ARCH_FUNCTION_NAME(classfile_read_jarfile);
 
     rvoid *statbfr; /* Portability library does (struct stat) part */
 
@@ -1872,13 +1872,13 @@
      * in heap-allocated bfr
      */
 
-    rvoid *pvrc = classfile_readclassfile(start_class_tmpfile);
+    rvoid *pvrc = classfile_read_classfile(start_class_tmpfile);
 
     HEAP_FREE_DATA(start_class_tmpfile);
 
     return(pvrc);
 
-} /* END of classfile_readjarfile() */
+} /* END of classfile_read_jarfile() */
 
 /*@} */ /* End of grouped definitions */
 

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/object.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/object.c?rev=396867&r1=396866&r2=396867&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/object.c (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/object.c Tue
Apr 25 05:37:13 2006
@@ -1346,8 +1346,8 @@
         /* Unload class file if no other references to it */
         if (rfalse == object_locate_pcfs(objhash))
         {
-            classfile_unloadclassdata(OBJECT(objhash)
-                                        .table_linkage.pcfs);
+            classfile_unload_classdata(OBJECT(objhash)
+                                         .table_linkage.pcfs);
         }
 
         /* Disables @link jvm/src/linkage.h linkage.h@endlink

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/object.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/object.h?rev=396867&r1=396866&r2=396867&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/object.h (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/object.h Tue
Apr 25 05:37:13 2006
@@ -128,7 +128,21 @@
  *
  * The macro OBJECT_THREAD_LINKAGE() is designed to access this
  * structure given any object hash.
+ *
+ *
+ * @internal The JVM spec compliance of much code depends
+ *           code depends on packed structures, especially
+ *           in the class file arena, yet the use of global
+ *           project-wide -fpack-struct (GCC version of
+ *           structure packing option) conflicts with issues
+ *           such as portability.  Since the largest structures
+ *           of the code are not inherently portably, they
+ *           are packed here with a pragma and the compiler
+ *           is free to not pack anything else.
+ *
  */
+#pragma pack(1)
+
 typedef struct
 {
     ClassFile      *pcfs;      /**< Class file storage area */
@@ -144,10 +158,31 @@
                                 */
 } jvm_table_linkage;
 
+/*!
+ * @internal Remove effects of packing pragma on other code.
+ *
+ */
+#pragma pack()
+
 
 /*!
  * @brief General object slot definition.
+ *
+ *
+ * @internal The JVM spec compliance of much code depends
+ *           code depends on packed structures, especially
+ *           in the class file arena, yet the use of global
+ *           project-wide -fpack-struct (GCC version of
+ *           structure packing option) conflicts with issues
+ *           such as portability.  Since the largest structures
+ *           of the code are not inherently portably, they
+ *           are packed here with a pragma and the compiler
+ *           is free to not pack anything else.
+ *
  */
+#pragma pack(1)
+
+
 typedef struct
 {
     rushort status;      /**< Runtime status of object, bitwise */
@@ -320,6 +355,12 @@
                                  */
 
 } robject;
+
+/*!
+ * @internal Remove effects of packing pragma on other code.
+ *
+ */
+#pragma pack()
 
 #ifndef LOCAL_STATUS_REFERENCE
 /*!



Mime
View raw message