Mercurial > repos > tabletprog
view runtime/progfoot.inc @ 36:3b0503a67165
Add scripts for building programs via C using d8 rather than a browser
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 10 Jul 2012 19:22:19 -0700 |
parents | bf5e88f6419d |
children | e7be612fd3ae |
line wrap: on
line source
int main(int argc, char ** argv) { object * ret = mcall(METHOD_ID_MAIN, 1, mainModule()); if (ret->meta == &obj_int32_meta) { obj_int32 * reti32 = (obj_int32 *) ret; printf("%d\n", reti32->num); } else if(ret->meta == &lambda_meta) { puts("returned lambda????"); } else { int i = 0; for(; i < 16; ++i) { if (ret->meta->meth_lookup[i] != &no_impl) { printf("slot %d is set\n", i); } } } return 0; }