Add call AM operation
This commit is contained in:
8
lib/am.c
8
lib/am.c
@@ -53,3 +53,11 @@ void am_assign(am_t *am, am_reg_t dest, am_reg_t src)
|
||||
{
|
||||
am->regs[dest] = am->regs[src];
|
||||
}
|
||||
|
||||
void am_call(am_t *am, am_reg_t proc)
|
||||
{
|
||||
assert(am->regs[proc]->is_atom);
|
||||
assert(am->regs[proc]->atom.type == ATOM_TYPE_PRIM_PROC);
|
||||
assert(am->regs[proc]->atom.prim_proc != NULL);
|
||||
am->regs[proc]->atom.prim_proc(am);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user