Mercurial > hg > Papers > 2023 > soto-master
view Paper/src/initContext.c @ 28:423f59b098ac
Add svg
author | soto <soto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 15 Feb 2023 17:18:23 +0900 |
parents | a72446879486 |
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); ... }