Mercurial > repos > rhope
diff runtime/context.h @ 186:ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 07 Oct 2011 00:10:02 -0700 |
parents | f2cb85c53ced |
children |
line wrap: on
line diff
--- a/runtime/context.h Wed Jul 27 21:32:40 2011 -0700 +++ b/runtime/context.h Fri Oct 07 00:10:02 2011 -0700 @@ -8,6 +8,11 @@ #define STACK_CHUNK_SIZE 4096-(sizeof(struct stackchunk *)*2+sizeof(char *)) +#ifdef RAW_FUNC +//hack +typedef int context; +#else + typedef struct stackchunk { struct stackchunk * next; struct stackchunk * prev; @@ -23,8 +28,10 @@ calldata *resume_cdata; int32_t resumeable; } context; +#endif Box(context *,ct,Context); +#ifndef RAW_FUNC stackchunk * new_stack(); context * new_context(); void * alloc_stack(context * ct, uint32_t size); @@ -34,5 +41,6 @@ void cqueue_init(); context * get_cqueue(); int32_t put_cqueue(context * ct); +#endif object * make_Context(context * ct); #endif //_CONTEXT_H_