harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlyd...@apache.org
Subject svn commit: r391492 - /incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/class.c
Date Wed, 05 Apr 2006 05:07:31 GMT
Author: dlydick
Date: Tue Apr  4 22:07:30 2006
New Revision: 391492

URL: http://svn.apache.org/viewcvs?rev=391492&view=rev
Log:
Correct class array length initial value to 0.

Add primative class definitions for all primative
data type classes beyond 'char'.

Added TO DO item.

Small white space changes.

Modified:
    incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/class.c

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=391492&r1=391491&r2=391492&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  4 22:07:30 2006
@@ -98,7 +98,7 @@
      * Start out with no array allocation and no array dimensions
      */
     CLASS(clsidx).arraydims = LOCAL_CONSTANT_NO_ARRAY_DIMS;
-    CLASS(clsidx).arraylength = (jint *) rnull;
+    CLASS(clsidx).arraylength = 0;
     CLASS(clsidx).lower_dim_array = jvm_class_index_null;
 
     /* Start out with no object hash */
@@ -162,7 +162,14 @@
 
     pjvm->class_java_lang_Object = jvm_class_index_null;
 
+    pjvm->class_primative_byte   = jvm_class_index_null;
     pjvm->class_primative_char   = jvm_class_index_null;
+    pjvm->class_primative_double = jvm_class_index_null;
+    pjvm->class_primative_float  = jvm_class_index_null;
+    pjvm->class_primative_int    = jvm_class_index_null;
+    pjvm->class_primative_long   = jvm_class_index_null;
+    pjvm->class_primative_short  = jvm_class_index_null;
+    pjvm->class_primative_boolean= jvm_class_index_null;
 
     pjvm->class_java_lang_Class  = jvm_class_index_null;
 
@@ -459,7 +466,7 @@
         CLASS(clsidx).status |= CLASS_STATUS_ARRAY;
 
         CLASS(clsidx).arraydims         = arraydims;
-        CLASS(clsidx).arraylength       = arraylength;
+        CLASS(clsidx).arraylength       = arraylength[0];
         CLASS(clsidx).lower_dim_array   = lower_dim_array;
 
         /*!
@@ -1160,8 +1167,8 @@
     {
         rchar *pnextdim = utf_utf2prchar(PTR_THIS_CP_Utf8(clsname));
 
-        /*
-         * WARNING! RECURSIVE CALL! This call goes 1 level per
+        /*!
+         * @warning RECURSIVE CALL! This call goes 1 level per
          *          array dimension.
          */
         rc = class_load_from_prchar(&pnextdim[1 * sizeof(u1)],
@@ -1505,6 +1512,16 @@
  *        standard industry file naming practices, and/or (b) that
  *        no array processing happens in the lower levels.
  *
+ * @todo  HARMONY-6-jvm-class.c-20 Make a version of this function
+ *        that can accept a UTF8 class name, call class_load_from_utf(),
+ *        and call a common function that it shares with the existing
+ *        function that contains all further logic.  This will run
+ *        faster than converting UTF strings to (rchar *) and calling
+ *        the existing function.  This is a similar approach to what
+ *        is done in @link jvm/src/thread.c thread.c@endlink to create
+ *        a normal thread versus a system thread.
+ *        
+ *
  */
 
 
@@ -1734,7 +1751,8 @@
          switch (cfattrib_atr2enum(pcfs,
                                    pcfs->fields[fldidx]
                                          ->attributes[atridx]
-                                           ->ai.attribute_name_index))
+                                           ->ai
+                                             .attribute_name_index))
          {
              case LOCAL_SIGNATURE_ATTRIBUTE:
                  /*! 
@@ -1788,7 +1806,7 @@
                          pu4 = &PTR_CP_ENTRY_FLOAT(
                                     pcfs,
                                     constantvalue_index)
-                                ->bytes;
+                                  ->bytes;
 
                          valf = (jfloat) (jint) *pu4;
 
@@ -1831,7 +1849,7 @@
                          pu4 = &PTR_CP_ENTRY_INTEGER(
                                     pcfs,
                                     constantvalue_index)
-                                ->bytes;
+                                  ->bytes;
 
                          vali = (jint) *pu4;
 



Mime
View raw message