* Merged executionstate branch.
[cacao.git] / src / vmcore / linker.h
index 44ba317be042a0d21b31da947ccc83fdec88e6c8..ad95bcccc824c6c9129e7a6bbcf84896cbc6c003 100644 (file)
@@ -22,7 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: linker.h 8123 2007-06-20 23:50:55Z michi $
 */
 
 
@@ -82,28 +81,28 @@ typedef struct primitivetypeinfo primitivetypeinfo;
    interfacetablelength = 4
 
                   | ...       |            +----------+
-                     +-----------+            | method 2 |---> method z
-                     | class     |            | method 1 |---> method y
-                     +-----------+            | method 0 |---> method x
-                     | ivftbl  0 |----------> +----------+
-       vftblptr ---> +-----------+
+                  +-----------+            | method 2 |---> method z
+                  | class     |            | method 1 |---> method y
+                  +-----------+            | method 0 |---> method x
+                  | ivftbl  0 |----------> +----------+
+    vftblptr ---> +-----------+
                   | ivftbl -1 |--> NULL    +----------+
                   | ivftbl -2 |--> NULL    | method 1 |---> method x
                   | ivftbl -3 |-----+      | method 0 |---> method a
                   +-----------+     +----> +----------+
      
                               +---------------+
-                                 | length 3 = 2  |
-                                 | length 2 = 0  |
-                                 | length 1 = 0  |
-                                 | length 0 = 3  |
-       interfacevftbllength ---> +---------------+
+                              | length 3 = 2  |
+                              | length 2 = 0  |
+                              | length 1 = 0  |
+                              | length 0 = 3  |
+    interfacevftbllength ---> +---------------+
 
 *******************************************************************************/
 
 struct _vftbl {
        methodptr   *interfacetable[1];    /* interface table (access via macro)  */
-       classinfo   *class;                /* class, the vtbl belongs to          */
+       classinfo   *clazz;                /* class, the vtbl belongs to          */
        arraydescriptor *arraydesc;        /* for array classes, otherwise NULL   */
        s4           vftbllength;          /* virtual function table length       */
        s4           interfacetablelength; /* interface table length              */
@@ -139,15 +138,13 @@ struct arraydescriptor {
 /* This lock must be taken while renumbering classes or while atomically      */
 /* accessing classes.                                                         */
 
-extern java_objectheader *linker_classrenumber_lock;
+extern java_object_t *linker_classrenumber_lock;
 
 
 /* function prototypes ********************************************************/
 
-/* initialize the linker subsystem */
-bool linker_init(void);
-
-/* link a class */
+void       linker_preinit(void);
+void       linker_init(void);
 classinfo *link_class(classinfo *c);
 
 #endif /* _LINKER_H */