Mercurial > repos > rhope
diff runtime/context.c @ 37:640f541e9116
Added support for type declarations on user defined workers and added a few more methods to Int32 in the runtime for the C backend
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 05 Oct 2009 23:12:43 -0400 |
parents | 31f8182f3433 |
children | 079200bc3e75 d2f9b0a9403d |
line wrap: on
line diff
--- a/runtime/context.c Sat Oct 03 03:18:15 2009 -0400 +++ b/runtime/context.c Mon Oct 05 23:12:43 2009 -0400 @@ -27,7 +27,10 @@ void * ret; stackchunk * current = ct->current_stack; if(size > STACK_CHUNK_SIZE) + { + fprintf(stderr, "%d is bigger than stack chunk size of %d\n", size, STACK_CHUNK_SIZE); return NULL; + } while(current && STACK_CHUNK_SIZE - current->used < size) { if(!current->next) @@ -38,7 +41,10 @@ current = current->next; } if(!current) + { + fprintf(stderr, "Failed to allocate stack chunk"); return NULL; + } ct->current_stack = current; ret = current->data + current->used; current->used += size;