Mercurial > repos > rhope
diff runtime/rhopefuncs_epilog.c @ 162:bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 09 Jan 2011 22:51:10 -0500 |
parents | |
children | ba35ab624ec2 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/runtime/rhopefuncs_epilog.c Sun Jan 09 22:51:10 2011 -0500 @@ -0,0 +1,39 @@ + +DO_END: + for(idx = 0; idx < cdata->num_params; ++idx) + params[idx] = cdata->params[idx]; + free_context(ct); + return cdata->num_params; + +DO_END_THREAD: + for(idx = 0; idx < cdata->num_params; ++idx) + { release_ref(cdata->params[idx]); } + if(ct->runafter) + { + temp_ct = ct; + ct = ct->runafter; + free_context(temp_ct); + cdata = ct->resume_cdata; + func = cdata->func; + DISPATCH + } + free_context(ct); + if(ct = get_cqueue()) + { + cdata = ct->resume_cdata; + func = cdata->func; + DISPATCH + } +NOTHING_TO_DO: + return 0; + +_exception: + puts("Exception! Trace follows:"); + while(cdata && cdata->func < END) + { + printf("%d\n", cdata->func); + cdata = cdata->lastframe; + } + return -1; +} +