cvsuser 03/11/03 16:02:46
Modified: imcc class.h symbol.h unit.h
Log:
Flush some cleanups.
Revision Changes Path
1.6 +2 -0 parrot/imcc/class.h
Index: class.h
===================================================================
RCS file: /cvs/public/parrot/imcc/class.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -r1.5 -r1.6
--- class.h 25 Oct 2003 05:49:16 -0000 1.5
+++ class.h 4 Nov 2003 00:02:45 -0000 1.6
@@ -21,6 +21,7 @@
typedef struct _Method {
Symbol * sym; /* Circular reference */
+ Symbol * label;
} Method;
@@ -34,6 +35,7 @@
Class * new_class(Symbol *);
+Method * new_method(Symbol * sym, Symbol * label);
void store_field_symbol(Class * cl, Symbol * sym);
void store_method_symbol(Class * cl, Symbol * sym);
Symbol * lookup_field_symbol(Class *cl, const char * name);
1.7 +1 -0 parrot/imcc/symbol.h
Index: symbol.h
===================================================================
RCS file: /cvs/public/parrot/imcc/symbol.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -r1.6 -r1.7
--- symbol.h 25 Oct 2003 05:49:17 -0000 1.6
+++ symbol.h 4 Nov 2003 00:02:45 -0000 1.7
@@ -29,6 +29,7 @@
typedef struct _Symbol {
char * name;
+ int type; /* PIR type (int, string, float, pmc) */
/* A symbol can belong to exactly one table and/or one list but no more */
struct _Symbol * nextintable;
1.2 +15 -12 parrot/imcc/unit.h
Index: unit.h
===================================================================
RCS file: /cvs/public/parrot/imcc/unit.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- unit.h 27 Oct 2003 07:26:52 -0000 1.1
+++ unit.h 4 Nov 2003 00:02:45 -0000 1.2
@@ -3,20 +3,21 @@
#ifndef IMCC_UNIT_H
#define IMCC_UNIT_H
-/* A PIR compilation unit or atomic metadata item.
+/* A IMC compilation unit or atomic metadata item.
* The unit holds the instruction list as well as
* all of the compiler state info, (reg allocator, cfg, etc.)
* for the unit of instructions.
*/
typedef enum {
- PIR_sub = 1,
- PIR_class = 2
-} PIR_Unit_Type;
+ IMC_PASM = 0,
+ IMC_SUB = 1,
+ IMC_CLASS = 2
+} IMC_Unit_Type;
-typedef struct _PIR_Unit {
- PIR_Unit_Type type;
+typedef struct _IMC_Unit {
+ IMC_Unit_Type type;
Instruction * instructions;
Symbol * sym;
int bb_list_size;
@@ -32,14 +33,16 @@
SymReg** interference_graph;
SymReg** reglist;
int n_symbols;
- struct _PIR_Unit * prev;
- struct _PIR_Unit * next;
-} PIR_Unit;
+ struct _IMC_Unit * prev;
+ struct _IMC_Unit * next;
+} IMC_Unit;
-void pir_unit_close(void);
-PIR_Unit * pir_unit_open(void);
-PIR_Unit * pir_order_for_emit(PIR_Unit * list);
+void imc_unit_close(void);
+IMC_Unit * imc_open_unit(IMC_Unit_Type);
+void imc_close_unit(Parrot_Interp);
+IMC_Unit * imc_new_unit(IMC_Unit_Type);
+IMC_Unit * imc_order_for_emit(IMC_Unit * list);
#endif