annotate runtime/proghead.inc @ 377:93c28eee141e tip

Merge
author Michael Pavone <pavone@retrodev.com>
date Sat, 15 Aug 2015 22:45:33 -0700
parents 632667d95d35
children
rev   line source
pavone@31 1 #include "object.h"
pavone@31 2 #include <stddef.h>
pavone@31 3 #include <stdlib.h>
pavone@31 4 #include <stdio.h>
pavone@78 5 #include <gc/gc.h>
pavone@31 6
pavone@34 7 object * main_module;
pavone@34 8
pavone@182 9 char * methodNames[];
pavone@182 10
pavone@35 11 object * no_impl(uint32_t method_id, uint32_t num_args, object * self, va_list args)
pavone@31 12 {
pavone@269 13 uint32_t *cur;
pavone@269 14 int slot;
pavone@182 15 fprintf(stderr, "method %s(%d) is not implemented on object %p\n", methodNames[method_id], method_id, self);
pavone@269 16 fputs("Object implements:\n", stderr);
pavone@269 17 for (slot = 0; slot < 16; slot++) {
pavone@269 18 if (self->meta->methods[slot]) {
pavone@269 19 for (cur = self->meta->methods[slot]; *cur != LAST_METHOD; cur++) {
pavone@269 20 fprintf(stderr, "\t%s\n", methodNames[*cur]);
pavone@269 21 }
pavone@269 22 }
pavone@269 23 }
pavone@78 24 exit(1);
pavone@31 25 return NULL;
pavone@31 26 }
pavone@78 27