Register access (dynamic and static) wired up.

This commit is contained in:
Ben Vanik
2013-12-07 13:09:22 -08:00
parent e5d867a92f
commit d8cc9fb0b4
8 changed files with 337 additions and 38 deletions

View File

@@ -9,11 +9,13 @@
#include <alloy/backend/ivm/ivm_assembler.h>
#include <alloy/backend/backend.h>
#include <alloy/backend/tracing.h>
#include <alloy/backend/ivm/ivm_intcode.h>
#include <alloy/backend/ivm/ivm_function.h>
#include <alloy/hir/function_builder.h>
#include <alloy/hir/label.h>
#include <alloy/runtime/runtime.h>
using namespace alloy;
using namespace alloy::backend;
@@ -55,6 +57,7 @@ int IVMAssembler::Assemble(
IVMFunction* fn = new IVMFunction(symbol_info);
TranslationContext ctx;
ctx.access_callbacks = backend_->runtime()->access_callbacks();
ctx.register_count = 0;
ctx.intcode_count = 0;
ctx.intcode_arena = &intcode_arena_;