diff options
Diffstat (limited to 'src/ssa')
-rw-r--r-- | src/ssa/ssa.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ssa/ssa.c b/src/ssa/ssa.c index 3433e8d..f5187af 100644 --- a/src/ssa/ssa.c +++ b/src/ssa/ssa.c @@ -1,6 +1,7 @@ #include "../../include/ssa/ssa.h" #include "../../include/std/mem.h" #include "../../include/std/log.h" +#include "../../include/ast.h" #include <assert.h> static int compare_number(const void *a, const void *b) { @@ -163,3 +164,19 @@ int ssa_ins_call(Ssa *self, SsaFuncIndex func, SsaRegister *result) { amal_log_debug("r%u = CALL f%u", *result, func); return 0; } + +static void ast_generate_ssa(Ast *self, SsaCompilerContext *context) { + /* TODO: Implement */ + (void)self; + (void)context; +} + +void scope_generate_ssa(Scope *self, SsaCompilerContext *context) { + Ast *ast; + Ast *ast_end; + ast = buffer_start(&self->ast_objects); + ast_end = buffer_end(&self->ast_objects); + for(; ast != ast_end; ++ast) { + ast_generate_ssa(ast, context); + } +} |