Mercurial > hg > Papers > 2017 > mitsuki-prosym
view Paper/src/initcontext.c @ 15:4c7666f60b9b
fix
author | mir3636 |
---|---|
date | Sat, 23 Dec 2017 18:15:08 +0900 |
parents | 845b7c1fb066 |
children |
line wrap: on
line source
void initContext(struct Context* context) { context->heapLimit = sizeof(union Data)*ALLOCATE_SIZE; context->code = (__code(**) (struct Context*)) NEWN(ALLOCATE_SIZE, void*); context->data = NEWN(ALLOCATE_SIZE, union Data*); context->heapStart = NEWN(context->heapLimit, char); context->heap = context->heapStart; context->code[C_cs1] = cs1_stub; context->code[C_cs2] = cs2_stub; context->code[C_exit_code] = exit_code_stub; context->code[C_start_code] = start_code_stub; ALLOC_DATA(context, Context); ... }