Mercurial > repos > tabletprog
view runtime/proghead.inc @ 294:d1dc2d70bdfd
Move OS module out of backend Javascript into a proper module file. Add normal bytearray to bytearray module. Add read:to method to os module for reading into a bytearray.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 24 Jul 2014 21:58:26 -0700 |
parents | 632667d95d35 |
children |
line wrap: on
line source
#include "object.h" #include <stddef.h> #include <stdlib.h> #include <stdio.h> #include <gc/gc.h> object * main_module; char * methodNames[]; object * no_impl(uint32_t method_id, uint32_t num_args, object * self, va_list args) { uint32_t *cur; int slot; fprintf(stderr, "method %s(%d) is not implemented on object %p\n", methodNames[method_id], method_id, self); fputs("Object implements:\n", stderr); for (slot = 0; slot < 16; slot++) { if (self->meta->methods[slot]) { for (cur = self->meta->methods[slot]; *cur != LAST_METHOD; cur++) { fprintf(stderr, "\t%s\n", methodNames[*cur]); } } } exit(1); return NULL; }