Begin to codegen bytecode instructions
This commit is contained in:
10
main.cpp
10
main.cpp
@@ -161,8 +161,10 @@ want to export all the symbols, we can namespace them optionally.
|
||||
#include "parsing.cpp"
|
||||
#include "typechecking.h"
|
||||
#include "typechecking.cpp"
|
||||
#include "ccodegen.cpp"
|
||||
#include "c_codegen.cpp"
|
||||
|
||||
#include "bytecode_interpreter.cpp"
|
||||
#include "bytecode_codegen.cpp"
|
||||
|
||||
int main(int argument_count, char **arguments){
|
||||
|
||||
@@ -176,11 +178,9 @@ int main(int argument_count, char **arguments){
|
||||
test_intern_table();
|
||||
|
||||
test_interpreter();
|
||||
__debugbreak();
|
||||
exit(0);
|
||||
|
||||
emit_line_directives = true;
|
||||
String program_name = "main.kl"_s;
|
||||
String program_name = "vm.kl"_s;
|
||||
if(argument_count > 1){
|
||||
program_name = string_from_cstring(arguments[1]);
|
||||
}
|
||||
@@ -211,6 +211,8 @@ int main(int argument_count, char **arguments){
|
||||
|
||||
|
||||
arena_clear(&pctx->stage_arena);
|
||||
compile_to_bc();
|
||||
__debugbreak();
|
||||
String result = get_compilation_result();
|
||||
assert(os_write_file("program.c"_s, result));
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user