If class is not initialized in put/getstatic we generate a call, thus
[cacao.git] / main.c
diff --git a/main.c b/main.c
index 108651b793c3a4c75d544bc0319a1e4c32122c80..c5e3676834fec8b864cb556109f87c3d6f1de644 100644 (file)
--- a/main.c
+++ b/main.c
@@ -37,7 +37,7 @@
      - Calling the class loader
      - Running the main method
 
-   $Id: main.c 841 2004-01-05 00:43:03Z twisti $
+   $Id: main.c 862 2004-01-06 23:42:01Z stefan $
 
 */
 
@@ -849,13 +849,10 @@ int main(int argc, char **argv)
 
        heap_init(heapsize, heapstartsize, &dummy);
 
-       log_text("calling jit_init");
        jit_init();
 
-       log_text("calling loader_init");
        loader_init((u1 *) &dummy);
 
-       log_text("calling native_loadclasses");
        native_loadclasses();
 
 
@@ -870,14 +867,14 @@ int main(int argc, char **argv)
        topclass = loader_load(utf_new_char(cp));
        /*class_showmethods(topclass);  */
 
-       if (exceptionptr != 0) {
+       if (*exceptionptr != 0) {
                printf("Exception in thread \"main\" ");
-               utf_display(exceptionptr->vftbl->class->name);
+               utf_display((*exceptionptr)->vftbl->class->name);
                printf(": ");
-               utf_display(javastring_toutf(((java_lang_Throwable *) exceptionptr)->detailMessage, false));
+               utf_display(javastring_toutf(((java_lang_Throwable *) *exceptionptr)->detailMessage, false));
                printf("\n");
 
-               exceptionptr = 0;
+               *exceptionptr = 0;
        }
 
        if (topclass == 0) {
@@ -927,14 +924,14 @@ int main(int argc, char **argv)
                /* here we go... */
                asm_calljavafunction(mainmethod, a, NULL, NULL, NULL);
        
-               if (exceptionptr) {
+               if (*exceptionptr) {
                        printf("Exception in thread \"main\" ");
-                       utf_display(exceptionptr->vftbl->class->name);
+                       utf_display((*exceptionptr)->vftbl->class->name);
 
                        /* do we have a detail message? */
-                       if (((java_lang_Throwable *) exceptionptr)->detailMessage) {
+                       if (((java_lang_Throwable *) *exceptionptr)->detailMessage) {
                                printf(": ");
-                               utf_display(javastring_toutf(((java_lang_Throwable *) exceptionptr)->detailMessage, false));
+                               utf_display(javastring_toutf(((java_lang_Throwable *) *exceptionptr)->detailMessage, false));
                        }
                        printf("\n");
                }