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

@@ -14,6 +14,7 @@
#include <alloy/hir/instr.h>
#include <alloy/hir/opcodes.h>
#include <alloy/runtime/register_access.h>
namespace alloy { namespace runtime { class ThreadState; } }
@@ -43,6 +44,7 @@ typedef struct {
uint8_t* context;
uint8_t* membase;
int8_t did_carry;
runtime::RegisterAccessCallbacks* access_callbacks;
runtime::ThreadState* thread_state;
uint64_t return_address;
} IntCodeState;
@@ -85,6 +87,8 @@ typedef struct LabelRef_s {
typedef struct {
runtime::RegisterAccessCallbacks* access_callbacks;
uint32_t register_count;
size_t intcode_count;
Arena* intcode_arena;