Aria

A low-level systems programming language
git clone git://git.m21c.me/Aria.git
Log | Files | Refs | LICENSE

commit f31f7fb21f10513db4c9b126a607bf448b5f7ff2
parent e6fbea4aa2822078e52e9e5b99a1b6441f848b60
Author: m21c  <ho*******@gmail.com>
Date:   Sat,  2 Oct 2021 14:10:37 +0200

removed Field/Record strtucts

Diffstat:
Mcompiler.c | 41+----------------------------------------
1 file changed, 1 insertion(+), 40 deletions(-)

diff --git a/compiler.c b/compiler.c @@ -17,12 +17,6 @@ typedef struct Node Node; typedef -struct Field Field; - -typedef -struct Record Record; - -typedef struct Type Type; typedef @@ -119,13 +113,6 @@ isatomnode(Kind kind) typedef -enum FieldKind { - FENTRY = 0, - FALIAS, - FDEFAULT -} FieldKind; - -typedef enum TypeKind { TERRTYPE = 1, TUNDEFINED, @@ -241,32 +228,6 @@ struct Node { /* ASTMT: rhs points to next stmt (linked list) */ }; -struct Field { - FieldKind kind; - SrcLoc loc; - - int key; - - Type *type; - - size_t fieldoffset; - - Type *targetrecord; - Field *targetfield; - - /* TODO(m21c): maybe put this somewhere else */ - Env *parentenv, *contentenv; - Node *content; /* init or function body */ - - Field *prev, *next; - Field *useprev, *usenext; -}; - -struct Record { - Field *fieldshead, *fieldstail; - Field *usehead, *usetail; -}; - struct Type { TypeKind kind; SrcLoc loc; @@ -276,7 +237,7 @@ struct Type { size_t size, align; union { - Record *recorddata; + Env *recordenv; struct { int offset, size;