Log initialization of super classes and interfaces.
authortwisti <none@none>
Tue, 6 Jan 2004 15:29:14 +0000 (15:29 +0000)
committertwisti <none@none>
Tue, 6 Jan 2004 15:29:14 +0000 (15:29 +0000)
loader.c
src/vm/loader.c

index f7854032139b05c8a616df1486c177320a78b3f8..ae7540c59162521f2a6dfbb5d88b20ccf028ea06 100644 (file)
--- a/loader.c
+++ b/loader.c
@@ -30,7 +30,7 @@
             Mark Probst
                        Edwin Steiner
 
-   $Id: loader.c 849 2004-01-05 21:27:29Z stefan $
+   $Id: loader.c 852 2004-01-06 15:29:14Z twisti $
 
 */
 
@@ -2611,10 +2611,31 @@ void class_init(classinfo *c)
        count_class_inits++;
 #endif
 
-       if (c->super)
+       /* initialize super class */
+       if (c->super) {
+               if (initverbose) {
+                       char logtext[MAXLOGTEXT];
+                       sprintf(logtext, "Initialize super class ");
+                       utf_sprint(logtext + strlen(logtext), c->super->name);
+                       sprintf(logtext + strlen(logtext), " from ");
+                       utf_sprint(logtext + strlen(logtext), c->name);
+                       log_text(logtext);
+               }
                class_init(c->super);
-       for (i = 0; i < c->interfacescount; i++)
+       }
+
+       /* initialize interface classes */
+       for (i = 0; i < c->interfacescount; i++) {
+               if (initverbose) {
+                       char logtext[MAXLOGTEXT];
+                       sprintf(logtext, "Initialize interface class ");
+                       utf_sprint(logtext + strlen(logtext), c->interfaces[i]->name);
+                       sprintf(logtext + strlen(logtext), " from ");
+                       utf_sprint(logtext + strlen(logtext), c->name);
+                       log_text(logtext);
+               }
                class_init(c->interfaces[i]);  /* real */
+       }
 
        m = class_findmethod(c, utf_clinit, utf_fidesc);
        if (!m) {
index f7854032139b05c8a616df1486c177320a78b3f8..ae7540c59162521f2a6dfbb5d88b20ccf028ea06 100644 (file)
@@ -30,7 +30,7 @@
             Mark Probst
                        Edwin Steiner
 
-   $Id: loader.c 849 2004-01-05 21:27:29Z stefan $
+   $Id: loader.c 852 2004-01-06 15:29:14Z twisti $
 
 */
 
@@ -2611,10 +2611,31 @@ void class_init(classinfo *c)
        count_class_inits++;
 #endif
 
-       if (c->super)
+       /* initialize super class */
+       if (c->super) {
+               if (initverbose) {
+                       char logtext[MAXLOGTEXT];
+                       sprintf(logtext, "Initialize super class ");
+                       utf_sprint(logtext + strlen(logtext), c->super->name);
+                       sprintf(logtext + strlen(logtext), " from ");
+                       utf_sprint(logtext + strlen(logtext), c->name);
+                       log_text(logtext);
+               }
                class_init(c->super);
-       for (i = 0; i < c->interfacescount; i++)
+       }
+
+       /* initialize interface classes */
+       for (i = 0; i < c->interfacescount; i++) {
+               if (initverbose) {
+                       char logtext[MAXLOGTEXT];
+                       sprintf(logtext, "Initialize interface class ");
+                       utf_sprint(logtext + strlen(logtext), c->interfaces[i]->name);
+                       sprintf(logtext + strlen(logtext), " from ");
+                       utf_sprint(logtext + strlen(logtext), c->name);
+                       log_text(logtext);
+               }
                class_init(c->interfaces[i]);  /* real */
+       }
 
        m = class_findmethod(c, utf_clinit, utf_fidesc);
        if (!m) {