* patcher_get_putstatic: Replaced c->initialized by
authortwisti <none@none>
Sat, 3 Dec 2005 12:34:08 +0000 (12:34 +0000)
committertwisti <none@none>
Sat, 3 Dec 2005 12:34:08 +0000 (12:34 +0000)
  (c->state & CLASS_INITIALIZED).
* patcher_clinit: Likewise.

src/vm/jit/x86_64/patcher.c

index 9ec8b775ef5d8d7c63db7d4e18e695336f9d8714..12c301021a44fc48d650b043b09ba080ef802a3e 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: patcher.c 3812 2005-11-28 18:00:47Z edwin $
+   $Id: patcher.c 3852 2005-12-03 12:34:08Z twisti $
 
 */
 
@@ -93,10 +93,12 @@ bool patcher_get_putstatic(u1 *sp)
 
        /* check if the field's class is initialized */
 
-       if (!initialize_class(fi->class)) {
-               PATCHER_MONITOREXIT;
+       if (!(fi->class->state & CLASS_INITIALIZED)) {
+               if (!initialize_class(fi->class)) {
+                       PATCHER_MONITOREXIT;
 
-               return false;
+                       return false;
+               }
        }
 
        /* patch back original code */
@@ -931,10 +933,12 @@ bool patcher_clinit(u1 *sp)
 
        /* check if the class is initialized */
 
-       if (!initialize_class(c)) {
-               PATCHER_MONITOREXIT;
+       if (!(c->state & CLASS_INITIALIZED)) {
+               if (!initialize_class(c)) {
+                       PATCHER_MONITOREXIT;
 
-               return false;
+                       return false;
+               }
        }
 
        /* patch back original code */