comparison runtime/proghead.inc @ 78:abc6f3d644a4

Use Boehm-GC for garbage collection. Also make no_impl print on stderr rather than standard in and return a non-zero error code.
author Mike Pavone <pavone@retrodev.com>
date Sun, 15 Jul 2012 18:11:00 -0700
parents 2a9c6eed0c70
children ab7c142090a0
comparison
equal deleted inserted replaced
77:8a9b96888b7d 78:abc6f3d644a4
1 #include "object.h" 1 #include "object.h"
2 #include <stddef.h> 2 #include <stddef.h>
3 #include <stdlib.h> 3 #include <stdlib.h>
4 #include <stdio.h> 4 #include <stdio.h>
5 #include <gc/gc.h>
5 6
6 object * main_module; 7 object * main_module;
7 8
8 object * no_impl(uint32_t method_id, uint32_t num_args, object * self, va_list args) 9 object * no_impl(uint32_t method_id, uint32_t num_args, object * self, va_list args)
9 { 10 {
10 printf("method %d is not implemented on object %p\n", method_id, self); 11 fprintf(stderr, "method %d is not implemented on object %p\n", method_id, self);
11 printf("main_module %p\n", main_module); 12 fprintf(stderr, "main_module %p\n", main_module);
12 exit(0); 13 exit(1);
13 return NULL; 14 return NULL;
14 } 15 }
15 /* 16
16 obj_meta lambda_meta = {
17 sizeof(closure),
18 {no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl,
19 no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl}
20 };*/