working bytecode with call and a real stack and psudo abi. Found a bug where -= doesn't behave correctly when the lhs is a function returning a reference because it's lowered to a = a - b where a is the same ast_node, I think

This commit is contained in:
Nathan Braswell
2018-03-07 01:58:19 -05:00
parent 5b46089694
commit 8da84b56c2
3 changed files with 159 additions and 89 deletions

View File

@@ -190,8 +190,9 @@ fun main(argc: int, argv: **char):int {
/*call_main(name_ast_map)*/
printlnerr("Generating bytecode!")
var generator.construct(): bytecode_generator
var bytecode = generator.generate_bytecode(name_ast_map)
printlnerr(bytecode_to_string(bytecode))
/*var bytecode = generator.generate_bytecode(name_ast_map)*/
generator.generate_bytecode(name_ast_map)
/*printlnerr(bytecode_to_string(bytecode))*/
printlnerr("return code is ")
printlnerr(to_string(generator.evaluate()))
} else {