Mercurial > repos > tabletprog
comparison runtime/proghead.inc @ 34:a10f1b049193
Working closures, but need to rethink method call strategy
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 09 Jul 2012 08:57:50 -0700 |
parents | 668f533e5284 |
children | bf5e88f6419d |
comparison
equal
deleted
inserted
replaced
33:96e21f525b78 | 34:a10f1b049193 |
---|---|
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 | 5 |
6 object * main_module; | |
7 | |
6 object * no_impl(uint32_t method_id, uint32_t num_args, object ** params) | 8 object * no_impl(uint32_t method_id, uint32_t num_args, object ** params) |
7 { | 9 { |
8 printf("method %d is not implemented on object\n", method_id); | 10 printf("method %d is not implemented on object %p\n", method_id, params[0]); |
11 printf("main_module %p\n", main_module); | |
9 exit(0); | 12 exit(0); |
10 return NULL; | 13 return NULL; |
11 } | 14 } |
12 | 15 |
13 obj_meta lambda_meta = { | 16 obj_meta lambda_meta = { |
14 sizeof(closure), | 17 sizeof(closure), |
15 {no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, | 18 {no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, |
16 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} |
17 }; | 20 }; |
18 |