DEADSOFTWARE

Добавлена конструкция IF-THEN-ELSE-END
[dsw-obn.git] / src / backends / jvm / generator-jvm.h
index 93575198278151531a4ac860f23c4ddb746df43b..3095a49070d204df2acb0fb2fa7a89ddfc9abc2a 100644 (file)
@@ -1,41 +1,73 @@
 #define MAX_REGISTERS 256
 
-struct gen_register_file {
+struct gen_register_file
+{
        struct
        {
                bool used;
+               bool wide;
        } reg[MAX_REGISTERS];
+       int num_used;
        int max_used;
 };
 
-struct gen_proc_t
+struct gen_stack
 {
-
+       int pointer;
+       int max_pointer;
 };
 
-struct gen_type_t
+struct gen_class
 {
-       int rec_id;
+       char * full_name;
        FILE * fp;
+       gen_proc_t * p;
+       struct gen_class * base;
 };
 
-struct gen_var_t
+enum gen_storage
 {
-       int reg;
+       JVM_STORAGE_UNKNOWN,
+       JVM_STORAGE_REGISTER,
+       JVM_STORAGE_STATIC,
+       JVM_STORAGE_FIELD
+};
+
+
+struct gen_proc_t
+{
+       int label_id;
+       struct gen_register_file * rf;
+       struct gen_stack * stack;
+       struct gen_class * class;
 };
 
-struct gen_block_t
+struct gen_type_t
 {
+       int rec_id;
+       struct gen_class * class;
+};
 
+struct gen_var_t
+{
+       enum gen_storage storage;
+       int reg;
+       char * full_name;
+       char * desc;
 };
 
 struct gen_context_t
 {
-       gen_module_t * m;
+       gen_module_t * current_m;
 };
 
 struct gen_module_t
 {
+       struct gen_class * class;
        int rec_id;
-       FILE * fp;
+};
+
+struct gen_label_t
+{
+       int id;
 };