view runtime/proghead.inc @ 251:2557ce4e671f

Fix a couple of compiler bugs. topenv was getting initialized in multiple places. This resulted in multiple copies of modules getting created which caused problems for macro expansion. Additionally, arguments were not being marked as declared during code generation so assigning to an argument that was not closed over generated invalid C code.
author Michael Pavone <pavone@retrodev.com>
date Fri, 11 Apr 2014 22:29:32 -0700
parents ab7c142090a0
children 632667d95d35
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)
{
	fprintf(stderr, "method %s(%d) is not implemented on object %p\n", methodNames[method_id], method_id, self);
	fprintf(stderr, "main_module %p\n", main_module);
	exit(1);
	return NULL;
}