Add store into abstract machine struct
This commit is contained in:
12
lib/store.c
12
lib/store.c
@@ -1,14 +1,16 @@
|
||||
#include "store.h"
|
||||
|
||||
#include "am.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void store_init(store_t *store)
|
||||
void store_init(am_t *am)
|
||||
{
|
||||
memset(store, 0, sizeof(store_t));
|
||||
store->free = store->buffer;
|
||||
memset(&am->store, 0, sizeof(store_t));
|
||||
am->store.free = am->store.buffer;
|
||||
}
|
||||
|
||||
expr_t *store_alloc(store_t *store)
|
||||
expr_t *store_alloc(am_t *am)
|
||||
{
|
||||
return store->free++;
|
||||
return am->store.free++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user