New source tree.
[cacao.git] / src / vm / jit / inline / parseRT.h
index 9ba3a487e587bfb09bc4cb9480c3d18f3add99b1..2a1b07131c191b652f3c5e1e957fd3c113e7976a 100644 (file)
 
    Authors: Carolyn Oates
 
-   $Id: parseRT.h 662 2003-11-21 18:06:25Z jowenn $
+   $Id: parseRT.h 1621 2004-11-30 13:06:55Z twisti $
 
 */
 
-
 #ifndef _PARSERT_H
 #define _PARSERT_H
 
-#include "global.h"
-#include <stdio.h>  
-#include <string.h>
-#include "jit.h"
-#include "parse.h"
-#include "loader.h"
-#include "natcalls.h"
-
-#include "parseRTprint.h"
-#include "parseRTstats.h"
-#include "sets.h"
-
-#include "tables.h"
-#include"toolbox/loging.h"
-#include "toolbox/memory.h"
-
-#include "types.h"
-
-extern bool XTAOPTbypass;
-extern bool XTAOPTbypass2;
-extern bool XTAOPTbypass3;
-extern int XTAdebug;
-extern int XTAfld;
-
-extern int pWhenMarked;
-extern int pCallgraph;  /* 0 - dont print 1 - print at end from main                             */
-                        /* 2 - print at end of RT parse call                                     */
-                        /* 3- print after each method RT parse                                   */
-extern int pClassHeir;  /* 0 - dont print 1 - print at end from main                             */
-                        /* 2 - print at end of RT parse call  3-print after each method RT parse */
-extern int pClassHeirStatsOnly;  /* usually 2 Print only the statistical summary info for class heirarchy     */
-
-extern int pOpcodes;    /* 0 - don't print 1- print in parse RT 2- print in parse                */
-                        /* 3 - print in both                                                     */
-extern int pWhenMarked; /* 0 - don't print 1 - print when added to callgraph + when native parsed*/
-                        /* 2 - print when marked+methods called                                  */
-                        /* 3 - print when class/method looked at                                 */
-extern int pStats;       
-
-
-extern int methRT;
-extern int methRTlast;
-extern int methRTmax;
-extern methodinfo **callgraph;
-extern int methXTA;
-extern int methXTAlast;
-extern int methXTAmax;
-extern methodinfo **XTAcallgraph;
-
-extern void RT_jit_parse(methodinfo *m);
+#include "vm/global.h"
+
+
+extern FILE *rtMissed;   /* Methods missed during RTA parse of Main  */
+
+typedef struct {
+        listnode linkage;
+        methodinfo *method;
+        } rtaNode ;
+
+
+extern int RT_jit_parse(methodinfo *m);
+
+#define METHINFOx(mm) \
+    { \
+       printf("<c%i/m%i/p%i>\t", \
+               mm->class->classUsed,mm->methodUsed, mm->monoPoly); \
+       method_display_w_class(mm); }
+
+#define METHINFO(mm,flg) \
+if (flg) { \
+       printf("<c%i/m%i/p%i>\t", \
+               mm->class->classUsed,mm->methodUsed, mm->monoPoly); \
+       method_display_w_class(mm); }
+
+#define METHINFOtx(mm,TXT) \
+                { \
+                printf(TXT); \
+               METHINFOx(mm) \
+               }
+
+#define METHINFOt(mm,TXT,flg) \
+if (flg) { \
+                printf(TXT); \
+               METHINFO(mm,flg) \
+               }
+
+#define CLASSNAME1(cls,TXT,flg) \
+if (flg) {printf(TXT); \
+       printf("<c%i>\t",cls->classUsed); \
+       utf_display(cls->name); fflush(stdout);}
+
+#define CLASSNAMEop(cls,flg) \
+if (flg) {printf("\t%s: ",opcode_names[opcode]);\
+       printf("<c%i>\t",cls->classUsed); \
+       utf_display(cls->name); printf("\n");fflush(stdout);}
+
+#define CLASSNAME(cls,TXT,flg) \
+if (flg) { printf(TXT); \
+               printf("<c%i>\t",cls->classUsed); \
+               utf_display(cls->name); printf("\n");fflush(stdout);} 
+
+#define SHOWOPCODE \
+if (DEBUGopcodes== true) {printf("Parse p=%i<%i<   opcode=<%i> %s\n", \
+                          p, m->jcodelength,opcode,opcode_names[opcode]);}
+
+
 
 #endif /* _PARSERT_H */
 
@@ -100,3 +105,4 @@ extern void RT_jit_parse(methodinfo *m);
  * tab-width: 4
  * End:
  */
+