* STATISTICS: Renamed to ENABLE_STATISTICS.
authortwisti <none@none>
Thu, 22 Dec 2005 14:05:01 +0000 (14:05 +0000)
committertwisti <none@none>
Thu, 22 Dec 2005 14:05:01 +0000 (14:05 +0000)
15 files changed:
src/native/vm/VMClassLoader.c
src/vm/jit/codegen.inc
src/vm/jit/inline/inline.c
src/vm/jit/inline/parseRT.c
src/vm/jit/inline/parseRTstats.c
src/vm/jit/inline/parseXTA.c
src/vm/jit/intrp/codegen.c
src/vm/jit/loop/analyze.c
src/vm/jit/loop/loop.h
src/vm/jit/lsra.inc
src/vm/jit/reg.h
src/vm/jit/reg.inc
src/vm/jit/schedule/schedule.c
src/vm/linker.c
src/vm/utf8.c

index 1a9b9a5336ffc492d0591ead8577251e3d604e6c..abc79247ea66ef17e25860a6e7dbe27b3a92b610 100644 (file)
@@ -30,7 +30,7 @@
             Christian Thalinger
             Edwin Steiner
 
-   $Id: VMClassLoader.c 3962 2005-12-20 23:28:13Z twisti $
+   $Id: VMClassLoader.c 4000 2005-12-22 14:05:01Z twisti $
 
 */
 
@@ -113,7 +113,7 @@ JNIEXPORT java_lang_Class* JNICALL Java_java_lang_VMClassLoader_defineClass(JNIE
 
        c = class_create_classinfo(utfname);
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        /* measure time */
 
        if (getloadingtime)
@@ -140,7 +140,7 @@ JNIEXPORT java_lang_Class* JNICALL Java_java_lang_VMClassLoader_defineClass(JNIE
 
        FREE(cb, classbuffer);
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        /* measure time */
 
        if (getloadingtime)
index e1d357b7f625c5181a78214a70d1179ef8a29118..684fafbc68a7ee2c8920e9c6bcdc8e051b0dc85d 100644 (file)
    memory. All functions writing values into the data area return the offset
    relative the begin of the code area (start of procedure).   
 
-   $Id: codegen.inc 3981 2005-12-21 16:43:21Z anton $
+   $Id: codegen.inc 4000 2005-12-22 14:05:01Z twisti $
 
 */
 
 
+#include "config.h"
+
 #include <assert.h>
 #include <string.h>
 
-#include "config.h"
 #include "vm/types.h"
 
 #include "mm/memory.h"
@@ -848,7 +849,7 @@ static void codegen_finish(methodinfo *m, codegendata *cd, s4 mcodelen)
        extralen = 0;
 #endif
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        if (opt_stat) {
                count_code_len += mcodelen;
                count_data_len += cd->dseglen;
@@ -1055,7 +1056,7 @@ u1 *codegen_createnativestub(functionptr f, methodinfo *m)
 
        m->entrypoint = createnativestub(f, m, cd, rd, nmd);
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        if (opt_stat)
                count_nstub_len += m->mcodelength;
 #endif
@@ -1228,19 +1229,21 @@ void removenativestub(u1 *stub)
 }
 
 
-/* reg_of_var:
-    This function determines a register, to which the result of an operation
-    should go, when it is ultimatively intended to store the result in
-    pseudoregister v.
-    If v is assigned to an actual register, this register will be returned.
-    Otherwise (when v is spilled) this function returns tempregnum.
-    If not already done, regoff and flags are set in the stack location.
-*/        
-/*  On ARM we have to check if a long/double variable is splitted
-    across reg/stack (HIGH_REG == REG_SPLIT). We return the actual register
-    of v for LOW_REG and the tempregnum for HIGH_REG in such cases.
-    (michi 2005/07/24)
-*/
+/* reg_of_var ******************************************************************
+
+   This function determines a register, to which the result of an
+   operation should go, when it is ultimatively intended to store the
+   result in pseudoregister v.  If v is assigned to an actual
+   register, this register will be returned.  Otherwise (when v is
+   spilled) this function returns tempregnum.  If not already done,
+   regoff and flags are set in the stack location.
+       
+   On ARM we have to check if a long/double variable is splitted
+   across reg/stack (HIGH_REG == REG_SPLIT). We return the actual
+   register of v for LOW_REG and the tempregnum for HIGH_REG in such
+   cases.  (michi 2005/07/24)
+
+*******************************************************************************/
 
 static int reg_of_var(registerdata *rd, stackptr v, int tempregnum)
 {
@@ -1289,11 +1292,14 @@ static int reg_of_var(registerdata *rd, stackptr v, int tempregnum)
                }
                break;
        }
-#ifdef STATISTICS
+
+#if defined(ENABLE_STATISTICS)
        if (opt_stat)
                count_spills_read++;
 #endif
+
        v->flags |= INMEMORY;
+
        return tempregnum;
 }
 
index 8f1fdfe62c77127fe0ecbb782f7d9ef81e532090..8d8861e2aa83245037a364a16a497ab719b71848 100644 (file)
@@ -26,7 +26,9 @@
 
    Authors: Dieter Thuernbeck
 
-   $Id: inline.c 3829 2005-12-01 19:47:56Z twisti $
+   Changes: Christian Thalinger
+
+   $Id: inline.c 4000 2005-12-22 14:05:01Z twisti $
 
 */
 
@@ -128,7 +130,7 @@ void inlining_init0(methodinfo *m, t_inlining_globals *inline_env)
        inline_env->inlining_stack = NULL;
        inline_env->inlining_rootinfo = NULL;
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        if (in_stats1) {
                int ii;
                for (ii=0; ii<512; ii++) count_in_not[ii]=0;
@@ -400,7 +402,7 @@ if ((inline_env->cummethods < INLINING_MAXMETHODS) &&
      ((opcode != JAVA_INVOKEVIRTUAL) ||
       (opcode != JAVA_INVOKEINTERFACE)) ) &&
     (inlineexceptions || (imi->exceptiontablelength == 0)))  {
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        count_in++;
        if (inlinevirtuals) { 
                if   (opcode == JAVA_INVOKEVIRTUAL) {
@@ -424,7 +426,7 @@ if (!can) {
 
 if  (imi->flags & ACC_NATIVE) return can; 
 if  (imi->flags & ACC_ABSTRACT) return can; 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
   count_in_rejected++;
 #endif
                                                if (opt_verbose) 
@@ -440,14 +442,14 @@ if  (imi->flags & ACC_ABSTRACT) return can;
 
   if  (!(inlineoutsiders) && (m->class->name != imr->classref->name)) {
        /*** if ((!mult) && (whycannot > 0)) mult = true;  *** First time not needed ***/
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        count_in_outsiders++;
 #endif
        whycannot = whycannot | IN_OUTSIDERS; /* outsider */ 
        }
   if (inline_env->cummethods >= INLINING_MAXMETHODS) { 
        if ((!mult) && (whycannot > 0)) mult = true; 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        count_in_maxDepth++;
 #endif
        whycannot = whycannot | IN_MAXDEPTH;  
@@ -470,13 +472,13 @@ if  (imi->flags & ACC_ABSTRACT) return can;
        if (uniqueVirt )   { 
                /* so know why (and that) a unique virtual was rejected for another reason */ 
                if (opcode == JAVA_INVOKEVIRTUAL) { 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
                        count_in_uniqueVirt_not_inlined++;
 #endif
                        whycannot = whycannot | IN_UNIQUEVIRT;  
                        }
                else    {
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
                        count_in_uniqueInterface_not_inlined++;
 #endif
                        whycannot = whycannot | IN_UNIQUE_INTERFACE;  
@@ -495,12 +497,12 @@ if  (imi->flags & ACC_ABSTRACT) return can;
 
   if  (inlineoutsiders && (m->class->name != imr->classref->name)) {
        whycannot = whycannot | IN_OUTSIDERS; /* outsider */ 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        count_in_outsiders++;
 #endif
        }
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
   if (mult)  
        count_in_rejected_mult++;
 #endif
@@ -508,7 +510,7 @@ if  (imi->flags & ACC_ABSTRACT) return can;
          log_text("Inline Whynot is too large???");
          assert(0);
   }
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
   count_in_not[whycannot]++; 
 #endif
   }
@@ -703,7 +705,7 @@ inlining_methodinfo *inlining_analyse_method(methodinfo *m,
                if (opt_stat) { 
                        if ((!isnotrootlevel) && !maxdepthHit) {
                                maxdepthHit = true;
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
                                count_in_maxDepth++;
 #endif
                        }
index cf643be2ad4add43678a9ca6903c97c7fbe1469a..128ca7fc64070a31620c28e42f7aa7ed0b834961 100644 (file)
@@ -29,7 +29,7 @@
 
    Changes: Christian Thalinger
 
-   $Id: parseRT.c 3829 2005-12-01 19:47:56Z twisti $
+   $Id: parseRT.c 4000 2005-12-22 14:05:01Z twisti $
 
 */
 
@@ -103,7 +103,7 @@ void addToRtaWorkList(methodinfo *meth, char *info) {
 if (meth->methodUsed == USED) return;
 
 if (!(meth->flags & ACC_ABSTRACT))  {
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
     count_methods_marked_used++;
 #endif
     METHINFOt(meth,info,RTA_DEBUGopcodes)
index ddd84a1554239b26348876f68e9e8a28856a1c0f..f0a17906f9e1aa2569330c16c45307dff8bcc0f0 100644 (file)
@@ -26,7 +26,9 @@
 
    Authors: Carolyn Oates
 
-   $Id: parseRTstats.c 3829 2005-12-01 19:47:56Z twisti $
+   Changes: Christian Thalinger
+
+   $Id: parseRTstats.c 4000 2005-12-22 14:05:01Z twisti $
 
 */
 
@@ -98,7 +100,7 @@ void printCallgraph (list *rtaWorkList)
     rtaNode    *rta;
     methodinfo *rt_meth;  
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
  printf("-*-*-*-*- RTA Callgraph Worklist:<%i>\n",count_methods_marked_used);
 #endif
 
index 24c5c917c2e8101abeb31b552896905038f9fa1d..e56b981122e95cd6a02cd1e9cd75b3e60a4c8639 100644 (file)
@@ -42,7 +42,7 @@ Now wondering if there is a memory corruption because XTA seems to finish ok
 
    Changes: Christian Thalinger
 
-   $Id: parseXTA.c 3829 2005-12-01 19:47:56Z twisti $
+   $Id: parseXTA.c 4000 2005-12-22 14:05:01Z twisti $
 
 */
 
@@ -365,7 +365,7 @@ xtainfo *xtainfoInit(methodinfo *m)
         if (m->xta != NULL)
                 return m->xta; /* already initialized */
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        count_methods_marked_used++;
 #endif
 
@@ -1790,7 +1790,7 @@ void XTAprintCallgraph (list *xtaWorkList, char * txt)
     methodinfo *xta_meth;
 
  printf("\n%s\n",txt);
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
  printf("-*-*-*-*- XTA Callgraph Worklist:<%i>\n",count_methods_marked_used);
 #endif
 
index 6b1e2ea59a5aca2eece39663e4f1f848a3657cc4..fead5144d6e7854a8290a9d458fd8a4fbae2b453 100644 (file)
@@ -30,7 +30,7 @@
    Changes: Christian Thalinger
             Anton Ertl
 
-   $Id: codegen.c 3979 2005-12-21 16:39:52Z anton $
+   $Id: codegen.c 4000 2005-12-22 14:05:01Z twisti $
 
 */
 
@@ -1770,7 +1770,7 @@ u1 *createcompilerstub (methodinfo *m)
        vm_block_insert(cd->mcodeptr);
 #endif
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        if (opt_stat)
                count_cstub_len += COMPILERSTUB_SIZE;
 #endif
index 3bc043587685554ec16510978720d939b3c0de99..48deea282993d2dab9be2f17181b8790375a5d30 100644 (file)
    bounds are never violated. The function to call is
    optimize_loops().
 
-   $Id: analyze.c 3028 2005-07-13 11:41:53Z twisti $
+   $Id: analyze.c 4000 2005-12-22 14:05:01Z twisti $
 
 */
 
 
+#include "config.h"
+
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
+#include "vm/types.h"
+
 #include "mm/memory.h"
 #include "toolbox/logging.h"
 #include "vm/jit/jit.h"
@@ -183,7 +187,7 @@ void show_tree(struct LoopContainer *lc, int tabs)
 
 #endif
 
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
 
 void show_loop_statistics(loopdata *ld)
 {
@@ -840,7 +844,7 @@ int analyze_or_exceptions(methodinfo *m, codegendata *cd, loopdata *ld, int head
                }
 
        if ((count > 1) && (flag == 0)){/* if all successors part of the loop, exit */
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                ld->c_stat_or++;
 #endif
                return 0;
@@ -882,7 +886,7 @@ int analyze_or_exceptions(methodinfo *m, codegendata *cd, loopdata *ld, int head
 
                                /* if array index variables are modified there, return 0                */
                                if (quick_scan(m, ld, m->basicblockindex[cd->exceptiontable[i].handlerpc]) > 0) {
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                                        ld->c_stat_exception++;
 #endif
                                        /* printf("C_INFO: loopVar modified in exception\n");           */
@@ -1389,7 +1393,7 @@ int insert_static(methodinfo *m, codegendata *cd, loopdata *ld, int arrayRef, st
        switch (index->type) {                          /* check index type                                             */
        case TRACE_IVAR:                                        /* it is a variable                                             */
                if (index->neg < 0) {                   /* if it's a negated var, return                */
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                        ld->c_stat_no_opt++;                    
 #endif
                        return OPT_NONE;
@@ -1457,28 +1461,28 @@ int insert_static(methodinfo *m, codegendata *cd, loopdata *ld, int arrayRef, st
                /* return the best possible optimization                                                                */
                if ((high > 0) && (low > 0)) {
                        /* printf("fully optimzed\n");                                                                          */
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                        ld->c_stat_full_opt++;                  
 #endif
                        return OPT_FULL;
                        }
                else if (high > 0) {
                        /* printf("upper optimzed\n");                                                                          */
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                        ld->c_stat_upper_opt++;                 
 #endif
                        return OPT_UPPER;
                        }
                else if (low > 0) {
                        /* printf("lower optimzed\n");                                                                          */
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                        ld->c_stat_lower_opt++;                 
 #endif
                        return OPT_LOWER;
                        }
                else {
                        /* printf("not optimzed\n");                                                                            */
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                        ld->c_stat_no_opt++;                    
 #endif
                        return OPT_NONE;
@@ -1487,14 +1491,14 @@ int insert_static(methodinfo *m, codegendata *cd, loopdata *ld, int arrayRef, st
 
        case TRACE_ICONST:                      /* if it is a constant, optimization is easy    */
                if (index->constant < 0) {
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                        ld->c_stat_no_opt++;                    
 #endif
                        return OPT_NONE;        /* negative index -> bad                                                */
                        }
                else {
                        add_new_constraint(m, cd, ld, TEST_CONST_ALENGTH, arrayRef, 0, index->constant);
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                        ld->c_stat_full_opt++;                  
 #endif
                        return OPT_FULL;        /* else just test constant against array length */
@@ -1504,7 +1508,7 @@ int insert_static(methodinfo *m, codegendata *cd, loopdata *ld, int arrayRef, st
        case TRACE_ALENGTH:                     /* else, no optimizations possible                              */
        case TRACE_UNKNOWN: 
        case TRACE_AVAR:    
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                ld->c_stat_no_opt++;                    
 #endif
                return OPT_NONE;
@@ -2593,7 +2597,7 @@ void create_static_checks(methodinfo *m, codegendata *cd, loopdata *ld, struct L
 
        bptr = NULL;
 
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
        /* show_loop_statistics(l); */ 
 #endif
 
@@ -3181,7 +3185,7 @@ void remove_boundchecks(methodinfo *m, codegendata *cd, loopdata *ld, int node,
                                show_trace(t_index);
                                */
 
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                                if (ip->op1 == OPT_UNCHECKED) {         /* found new access                     */
                                   ld->c_stat_array_accesses++;
                                   ip->op1 = OPT_NONE;
@@ -3196,7 +3200,7 @@ void remove_boundchecks(methodinfo *m, codegendata *cd, loopdata *ld, int node,
                                switch (t_index->type) {        /* now we look at the index                     */
                                case TRACE_ICONST:                      /* it is a constant value or an         */
                                case TRACE_ALENGTH:                     /* array length                                         */
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                                        switch (ip->op1) {              /* take back old optimzation            */
                                        case OPT_UNCHECKED:
                                                break;
@@ -3237,7 +3241,7 @@ void remove_boundchecks(methodinfo *m, codegendata *cd, loopdata *ld, int node,
                                                                ip->op1 = OPT_FULL;
                                                        break;
                                                case OPT_FULL:
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                                                        ld->c_stat_full_opt++;
 #endif
                                                        break;
@@ -3252,7 +3256,7 @@ void remove_boundchecks(methodinfo *m, codegendata *cd, loopdata *ld, int node,
                                        /* to set the changes back to the time, it is pushed onto       */
                                        /* the stack as an index variable.                                                      */
                                        t = backtrack_var(m, node, t_index->nr, i-1, t_index->var, tmp[t_index->var]);
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                                        switch (ip->op1) {              /* take back old optimzation            */
                                        case OPT_UNCHECKED:
                                                break;
@@ -3293,7 +3297,7 @@ void remove_boundchecks(methodinfo *m, codegendata *cd, loopdata *ld, int node,
                                                                ip->op1 = OPT_FULL;
                                                        break;
                                                case OPT_FULL:
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
                                                        ld->c_stat_full_opt++;
 #endif
                                                        break;
@@ -3555,7 +3559,7 @@ void optimize_single_loop(methodinfo *m, codegendata *cd, loopdata *ld, LoopCont
        /* else
                printf("No array accesses found\n");                                                                    */
 
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
        ld->c_stat_num_loops++;         /* increase number of loops                                                     */      
 
        ld->c_stat_sum_accesses += ld->c_stat_array_accesses;
@@ -3620,7 +3624,7 @@ void optimize_loops(methodinfo *m, codegendata *cd, loopdata *ld)
        if ((ld->c_constraints = (struct Constraint **) malloc((cd->maxlocals+1) * sizeof(struct Constraint *))) == NULL)
                c_mem_error();
 
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
        ld->c_stat_num_loops = 0;               /* set statistic vars to zero                                   */
        ld->c_stat_array_accesses = ld->c_stat_sum_accesses = 0;                
        ld->c_stat_full_opt = ld->c_stat_sum_full = 0;
index 9b2c05ae21d22d09a8743dabd3d7ef26a694ce10..ff17a7bd5076ec737cb9584b73870d68878daa2a 100644 (file)
@@ -26,7 +26,9 @@
 
    Authors: Christopher Kruegel
 
-   $Id: loop.h 1735 2004-12-07 14:33:27Z twisti $
+   Changes: Christian Thalinger
+
+   $Id: loop.h 4000 2005-12-22 14:05:01Z twisti $
 
 */
 
 #ifndef _LOOP_H
 #define _LOOP_H
 
+#include "config.h"
+#include "vm/types.h"
+
 #include "vm/global.h"
+#include "vm/method.h"
 #include "vm/jit/jit.h"
 
 
@@ -276,7 +282,7 @@ struct loopdata {
 
 
        /* declare statistic variables                                                                                                  */
-#ifdef STATISTICS
+#ifdef ENABLE_STATISTICS
 
        int c_stat_num_loops;                   /* number of loops                                                              */
 
@@ -311,10 +317,10 @@ struct loopdata {
 };
 
 
-/* function prototypes */
+/* function prototypes ********************************************************/
 
 void analyseGraph(methodinfo *m, loopdata *ld);
-void c_mem_error();
+void c_mem_error(void);
 
 #endif /* _LOOP_H */
 
index 279f946e25f57ec538fc95c691d5db825171edc2..77a0ed4ea69a5e5e3df51cd38be41fe239981f09 100644 (file)
 
    Authors: Christian Ullrich
 
-   $Id: lsra.inc 3732 2005-11-22 14:36:16Z christian $
+   Changes: Christian Thalinger
+
+   $Id: lsra.inc 4000 2005-12-22 14:05:01Z twisti $
 
 */
+
+
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
 
+#include "vm/types.h"
+
 #include "mm/memory.h"
 #include "vm/options.h"
+#include "vm/statistics.h"
 #include "vm/jit/lsra.h"
 #include "vm/jit/reg.h"
-#include "vm/statistics.h"
+
 
 void lsra(methodinfo *m, codegendata *cd, registerdata *rd,
                  t_inlining_globals *id)
 {
 
        lsradata *ls;
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        int locals_start;
        int i,j;
 #endif 
@@ -123,7 +132,7 @@ void lsra(methodinfo *m, codegendata *cd, registerdata *rd,
        
        lsra_setup(m, cd, rd, ls);
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        /* find conflicts between locals for statistics */
        if (opt_stat) {
                /* local Variable Lifetimes are at the end of the lifetime array and  */
index fc5a14911f57fedfdd506150d301e7d816c1ba80..fbde11c9bb0302e33a500cef76d0eb4c0d8069cb 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Christian Ullrich
 
-   $Id: reg.h 3219 2005-09-19 13:27:01Z twisti $
+   $Id: reg.h 4000 2005-12-22 14:05:01Z twisti $
 
 */
 
@@ -97,7 +97,7 @@ struct registerdata {
 
        int *argadrregs;                /* argument address registers             */
        int *tmpadrregs;                /* scratch address registers              */
-       int *savadrregs;               /* saved address registers                */
+       int *savadrregs;                /* saved address registers                */
        int *freeargadrregs;            /* free argument address registers        */
        int *freetmpadrregs;            /* free scratch address registers         */
        int *freesavadrregs;            /* free saved address registers           */
@@ -108,7 +108,7 @@ struct registerdata {
 
        int freetmpadrtop;              /* free scratch address register count    */
        int freesavadrtop;              /* free saved address register count      */
-       int freeargadrtop;              /* free argument address register count      */
+       int freeargadrtop;              /* free argument address register count   */
 #endif
 
 #if defined(HAS_4BYTE_STACKSLOT)
@@ -127,8 +127,8 @@ struct registerdata {
        int tmpfltreguse;               /* used scratch float register count      */
        int savfltreguse;               /* used saved float register count        */
 
-       int freearginttop;              /* free argument integer register count      */
-       int freeargflttop;              /* free argument float register count      */
+       int freearginttop;              /* free argument integer register count   */
+       int freeargflttop;              /* free argument float register count     */
        int freetmpinttop;              /* free scratch integer register count    */
        int freesavinttop;              /* free saved integer register count      */
        int freetmpflttop;              /* free scratch float register count      */
@@ -136,14 +136,15 @@ struct registerdata {
 };
 
 
-/* function prototypes */
+/* function prototypes ********************************************************/
 
-void reg_init();
+void reg_init(void);
 void reg_setup(methodinfo *m, registerdata *rd, t_inlining_globals *id);
 void reg_free(methodinfo *m, registerdata *rd);
-void reg_close();
+void reg_close(void);
 void regalloc(methodinfo *m, codegendata *cd, registerdata *rd);
-#ifdef STATISTICS
+
+#if defined(ENABLE_STATISTICS)
 void reg_make_statistics( methodinfo *, codegendata *, registerdata *);
 #endif
 
index 1d946b345e8e467fb48f97fcaa3204dcf4fdb4b5..6b93780505e7dea05e06ace34f9d2236d4ffb227 100644 (file)
                        Christian Ullrich
             Michael Starzinger
 
-   $Id: reg.inc 3969 2005-12-21 00:07:23Z twisti $
+   $Id: reg.inc 4000 2005-12-22 14:05:01Z twisti $
 
 */
 
 
+#include "config.h"
+#include "vm/types.h"
+
 #include "arch.h"
+
 #include "mm/memory.h"
 #include "vm/method.h"          
 #include "vm/resolve.h"
@@ -1627,7 +1631,7 @@ static void allocate_scratch_registers(methodinfo *m, registerdata *rd)
 }
 
 
-#ifdef STATISTICS
+#if defined(ENABLE_STATISTICS)
 void reg_make_statistics( methodinfo *m, codegendata *cd, registerdata *rd) {
        int i,type;
        s4 len;
@@ -1776,7 +1780,9 @@ void reg_make_statistics( methodinfo *m, codegendata *cd, registerdata *rd) {
                count_interface_size += size_interface; /* accummulate the size of the interface (between bb boundaries) */
                if (in_register) count_method_in_register++;
 }
-#endif
+#endif /* defined(ENABLE_STATISTICS) */
+
+
 /*
  * These are local overrides for various environment variables in Emacs.
  * Please do not remove this and leave it at the end of the file, where
index 74219eebec5dab02086887f49a89ffbaa540b08d..b372aecf93c77a4990046176ee9f74bacd7ea0d8 100644 (file)
 
    Changes:
 
-   $Id: schedule.c 2056 2005-03-22 11:21:32Z twisti $
+   $Id: schedule.c 4000 2005-12-22 14:05:01Z twisti $
 
 */
 
 
+#include "config.h"
+
 #include <stdio.h>
 
-#include "config.h"
+#include "vm/types.h"
+
 #include "disass.h"
 
 #include "mm/memory.h"
@@ -710,7 +713,7 @@ void schedule_do_schedule(scheduledata *sd)
                }
                printf("schedule end ---\n\n");
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
                if (opt_stat) {
                        count_schedule_basic_blocks++;
                        count_schedule_nodes += sd->micount;
index 0981baf388c1136be921905ddce28c308cafaac8..b313fbb99987025e4b36bc79289fc69196617ed2 100644 (file)
             Edwin Steiner
             Christian Thalinger
 
-   $Id: linker.c 3888 2005-12-05 22:08:45Z twisti $
+   $Id: linker.c 4000 2005-12-22 14:05:01Z twisti $
 
 */
 
 
+#include "config.h"
+
 #include <assert.h>
 
-#include "config.h"
 #include "vm/types.h"
 
 #include "mm/memory.h"
@@ -382,7 +383,7 @@ classinfo *link_class(classinfo *c)
                return c;
        }
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        /* measure time */
 
        if (getcompilingtime)
@@ -401,7 +402,7 @@ classinfo *link_class(classinfo *c)
        if (!r)
                c->state &= ~CLASS_LINKING;
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        /* measure time */
 
        if (getloadingtime)
@@ -699,7 +700,7 @@ static classinfo *link_class_intern(classinfo *c)
        }
 
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        if (opt_stat)
                count_vftbl_len +=
                        sizeof(vftbl_t) + (sizeof(methodptr) * (vftbllength - 1));
@@ -774,7 +775,7 @@ static classinfo *link_class_intern(classinfo *c)
        
        v->interfacevftbllength = MNEW(s4, interfacetablelength);
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        if (opt_stat)
                count_vftbl_len += (4 + sizeof(s4)) * v->interfacetablelength;
 #endif
@@ -1080,7 +1081,7 @@ static void linker_addinterface(classinfo *c, classinfo *ic)
                v->interfacevftbllength[i] = ic->methodscount;
                v->interfacetable[-i] = MNEW(methodptr, ic->methodscount);
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
                if (opt_stat)
                        count_vftbl_len += sizeof(methodptr) *
                                (ic->methodscount + (ic->methodscount == 0));
index caf508321697962e2c60c971a5d9337e2dfd6db7..465de033d04870d8c440e39decad1299a51ccc1c 100644 (file)
@@ -30,7 +30,7 @@
             Andreas Krall
             Christian Thalinger
 
-   $Id: utf8.c 3940 2005-12-11 01:06:16Z twisti $
+   $Id: utf8.c 4000 2005-12-22 14:05:01Z twisti $
 
 */
 
@@ -174,7 +174,7 @@ bool utf8_init(void)
 
        hashtable_create(&hashtable_utf, HASHTABLE_UTF_SIZE);
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        if (opt_stat)
                count_utf_len += sizeof(utf*) * hashtable_utf.size;
 #endif
@@ -480,7 +480,7 @@ utf *utf_new(const char *text, u2 length)
        builtin_monitorenter(lock_hashtable_utf);
 #endif
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        if (opt_stat)
                count_utf_new++;
 #endif
@@ -499,7 +499,7 @@ utf *utf_new(const char *text, u2 length)
                                if (text[i] != u->text[i])
                                        goto nomatch;
                        
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
                        if (opt_stat)
                                count_utf_new_found++;
 #endif
@@ -517,7 +517,7 @@ utf *utf_new(const char *text, u2 length)
                u = u->hashlink; /* next element in external chain */
        }
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
        if (opt_stat)
                count_utf_len += sizeof(utf) + length + 1;
 #endif
@@ -550,7 +550,7 @@ utf *utf_new(const char *text, u2 length)
                hashtable_create(&newhash, hashtable_utf.size * 2);
                newhash.entries = hashtable_utf.entries;
 
-#if defined(STATISTICS)
+#if defined(ENABLE_STATISTICS)
                if (opt_stat)
                        count_utf_len += sizeof(utf*) * hashtable_utf.size;
 #endif