]> git.mdlowis.com Git - proto/obnc.git/commitdiff
minor cleanup and update of TODO list
authorMichael D. Lowis <mike.lowis@gentex.com>
Fri, 16 Jul 2021 20:56:07 +0000 (16:56 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Fri, 16 Jul 2021 20:56:07 +0000 (16:56 -0400)
cerise/TODO.md
cerise/src/ast.c
cerise/src/sym.c

index ec0cbf38d05605087474eff9d3f896d6ba340886..d793b78116c3225c4befde1e2599de14fbd846ce 100644 (file)
@@ -1,19 +1,18 @@
 # Doing
 
-* Fix array access in structs
+* Implement symbol file generation and import
 
 # Up Next
 
-* Implement symbol file generation and import
-* Implement module scoped identifiers
-* Implement an SSA backend
-* Implement pointers
-    * Ownership semantics: Ownership you can count on
-    * Concurrency: Biased reference counting
+* Linearize the AST expression nodes
+* Split the AST into  basic blocks ala CFG representation
+* Convert the CFG representation to SSA form
 
 # Backlog
 
-* Cleanup the lexer
+* Implement pointers
+    * Ownership semantics: Ownership you can count on
+    * Concurrency: Biased reference counting
 * Implement record extension
 * Implement logical operators: and, or, not
 * Implement string types
@@ -21,6 +20,7 @@
 * Track uninitialized variables/globals
 * Nested procedure definitions
 * check that module name matches filename
+* Cleanup the lexer (and cruft in the rest of the code base)
 
 # Order of Operations for Implementing Memory Management
 
index 51760aa8ad7dad25db571f31938d1012e1d78f73..14defd44107c7b5857f4d0fef03f556ba2f3c9a8 100644 (file)
@@ -32,6 +32,7 @@ typedef struct {
         double f;
         char* s;
     } val;
+    long long tag;
 } AstValue;
 
 bool ast_isconst(AstNode* node)
index 687f4067802e4c56d6763c7665fa1330abd2c995..df1beddbaec213fd3b2437b1e0c28435a6b88220 100644 (file)
@@ -4,6 +4,9 @@
 
 /* TODO: module names should be shadowable but are not */
 
+/* Symbol Table Management
+ *****************************************************************************/
+
 static int sym_matches(Parser* p, int class, size_t module, char* name, Symbol* sym)
 {
     int mod_match = (sym->module == module);
@@ -181,7 +184,7 @@ void symbol_export(Parser* p, char* path)
     (void)path;
     for (size_t i = 0; i < p->ntypes; i++)
     {
-        printf("t %d %c\n", i, TypeIdents[p->types[i]->form]);
+        printf("t %ld %c\n", i, TypeIdents[p->types[i]->form]);
     }
 
     for (size_t i = 0; i < p->nsyms; i++)
@@ -190,7 +193,7 @@ void symbol_export(Parser* p, char* path)
         if (!sym->export) continue;
         printf("%c %s ", SymTypes[sym->class], sym->name);
         fflush(stdout);
-        printf("%d\n", typeid(p, sym->type));
+        printf("%ld\n", typeid(p, sym->type));
     }
 }