view runtime/proghead.inc @ 341:6871e72b6db2

Added int64 message to string type
author Michael Pavone <pavone@retrodev.com>
date Sun, 05 Apr 2015 22:48:59 -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;
}