DEADSOFTWARE

Добавлено вычисление размеров типа для аллокации
[dsw-obn.git] / oberon.h
index 86f95def78e74ccd07b87b82e8bdeefde13601eb..53693a79629e8b772c38497cfc0c00046891cbed 100644 (file)
--- a/oberon.h
+++ b/oberon.h
@@ -39,6 +39,7 @@ struct gen_context_s
        gcc_jit_result * gcc_result;
        gen_block_t * block;
        unsigned record_count;
+       gcc_jit_lvalue * gcc_alloc;
 };
 
 typedef struct oberon_type_s oberon_type_t;
@@ -114,6 +115,8 @@ struct oberon_type_s
        oberon_type_t * base;
        oberon_object_t * decl;
 
+       oberon_module_t * module;
+
        int recursive;
        int initialized;
        gen_type_t * gen_type;
@@ -255,7 +258,8 @@ enum
        MODE_INDEX,
        MODE_FIELD,
        MODE_DEREF,
-       MODE_NIL
+       MODE_NIL,
+       MODE_NEW
 };
 
 enum
@@ -289,6 +293,7 @@ struct oberon_item_s
        int is_item; // == 1
        oberon_type_t * result;
        oberon_expr_t * next;
+       int read_only;
 
        int mode;
        int integer;
@@ -306,6 +311,7 @@ struct oberon_oper_s
        int is_item; // == 0
        oberon_type_t * result;
        oberon_expr_t * next;
+       int read_only;
 
        int op;
        oberon_expr_t * left;
@@ -318,6 +324,7 @@ union oberon_expr_u
                int is_item;
                oberon_type_t * result;
                oberon_expr_t * next;
+               int read_only;
        };
 
        oberon_item_t item;