DEADSOFTWARE

Добавлена процедура NEW для аллокации обычных массивов
[dsw-obn.git] / oberon.h
index 9956fdc09d0a9bc77edff1d295ce48b7d4f35ee5..4b785453befda47bbdcfe1ccf9c7b9a67ccfd1cc 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;
@@ -157,6 +160,8 @@ struct oberon_object_s
 {
        char * name;
        int class;
+       int export;
+       int read_only;
 
        int local;
        int linked;
@@ -253,7 +258,8 @@ enum
        MODE_INDEX,
        MODE_FIELD,
        MODE_DEREF,
-       MODE_NIL
+       MODE_NIL,
+       MODE_NEWARR
 };
 
 enum
@@ -287,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;
@@ -297,6 +304,7 @@ struct oberon_item_s
 
        int num_args;
        oberon_expr_t * args;
+       oberon_type_t * type;
 };
 
 struct oberon_oper_s
@@ -304,6 +312,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;
@@ -316,6 +325,7 @@ union oberon_expr_u
                int is_item;
                oberon_type_t * result;
                oberon_expr_t * next;
+               int read_only;
        };
 
        oberon_item_t item;