Fix defer_lower to handle return statements, starting on obj_lower which has now taken over calling destruct for declared varaibles. Some of the code from the c_generator has been commented out or bypassed to use the new system - it should be removed when it's complete.

This commit is contained in:
Nathan Braswell
2016-06-22 01:41:57 -07:00
parent 26e7ee249a
commit 29eff2a23e
6 changed files with 169 additions and 26 deletions

View File

@@ -10,6 +10,7 @@ import interpreter:*
import os:*
import ast_transformation:*
import adt_lower:*
import obj_lower:*
import defer_lower:*
import c_line_control:*
import c_generator:*
@@ -102,6 +103,8 @@ fun main(argc: int, argv: **char):int {
// Passes
printlnerr("Lowering ADTs")
adt_lower(&importer.name_ast_map, &importer.ast_pass.ast_to_syntax)
printlnerr("Lowering Objects")
obj_lower(&importer.name_ast_map, &importer.ast_pass.ast_to_syntax)
printlnerr("Lowering Defer")
defer_lower(&importer.name_ast_map, &importer.ast_pass.ast_to_syntax)
if (interpret_instead) {