- initialize class only if the called function is static
authortwisti <none@none>
Mon, 2 Feb 2004 00:52:42 +0000 (00:52 +0000)
committertwisti <none@none>
Mon, 2 Feb 2004 00:52:42 +0000 (00:52 +0000)
- small variable size fix

jit/jit.c
src/vm/jit/jit.c

index c877520d9040298159a6d2f41b83a4ba1f16c3f7..059624af00588a0cefbadac42e6459f2293683f4 100644 (file)
--- a/jit/jit.c
+++ b/jit/jit.c
@@ -29,7 +29,7 @@
 
    Changes: Edwin Steiner
 
-   $Id: jit.c 897 2004-01-21 00:49:42Z stefan $
+   $Id: jit.c 909 2004-02-02 00:52:42Z twisti $
 
 */
 
@@ -1437,9 +1437,9 @@ static void* do_nothing_function()
 
 methodptr jit_compile(methodinfo *m)
 {
-       int dumpsize;
-       long starttime = 0;
-       long stoptime  = 0;
+       s4 dumpsize;
+       s8 starttime = 0;
+       s8 stoptime  = 0;
 
        count_jit_calls++;
 
@@ -1497,8 +1497,8 @@ methodptr jit_compile(methodinfo *m)
                log_text(logtext);
        }
 
-       /* initialize the function's class */
-       if (!m->class->initialized) {
+       /* initialize the static function's class */
+       if (m->flags & ACC_STATIC && !m->class->initialized) {
                if (initverbose) {
                        char logtext[MAXLOGTEXT];
                        sprintf(logtext, "Initialize class ");
index c877520d9040298159a6d2f41b83a4ba1f16c3f7..059624af00588a0cefbadac42e6459f2293683f4 100644 (file)
@@ -29,7 +29,7 @@
 
    Changes: Edwin Steiner
 
-   $Id: jit.c 897 2004-01-21 00:49:42Z stefan $
+   $Id: jit.c 909 2004-02-02 00:52:42Z twisti $
 
 */
 
@@ -1437,9 +1437,9 @@ static void* do_nothing_function()
 
 methodptr jit_compile(methodinfo *m)
 {
-       int dumpsize;
-       long starttime = 0;
-       long stoptime  = 0;
+       s4 dumpsize;
+       s8 starttime = 0;
+       s8 stoptime  = 0;
 
        count_jit_calls++;
 
@@ -1497,8 +1497,8 @@ methodptr jit_compile(methodinfo *m)
                log_text(logtext);
        }
 
-       /* initialize the function's class */
-       if (!m->class->initialized) {
+       /* initialize the static function's class */
+       if (m->flags & ACC_STATIC && !m->class->initialized) {
                if (initverbose) {
                        char logtext[MAXLOGTEXT];
                        sprintf(logtext, "Initialize class ");