Mercurial > repos > tabletprog
annotate runtime/proghead.inc @ 69:ba032565c7a5
Fix handling of variable style access to self and parent object messages defined with lambdas. Improve test case for this bug to include parent object access as well as self object access.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 14 Jul 2012 19:24:04 -0700 |
parents | 2a9c6eed0c70 |
children | abc6f3d644a4 |
rev | line source |
---|---|
31
668f533e5284
Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 #include "object.h" |
668f533e5284
Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 #include <stddef.h> |
668f533e5284
Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 #include <stdlib.h> |
668f533e5284
Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 #include <stdio.h> |
668f533e5284
Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 |
34
a10f1b049193
Working closures, but need to rethink method call strategy
Mike Pavone <pavone@retrodev.com>
parents:
31
diff
changeset
|
6 object * main_module; |
a10f1b049193
Working closures, but need to rethink method call strategy
Mike Pavone <pavone@retrodev.com>
parents:
31
diff
changeset
|
7 |
35
bf5e88f6419d
Use a function/method call strategy that actually works
Mike Pavone <pavone@retrodev.com>
parents:
34
diff
changeset
|
8 object * no_impl(uint32_t method_id, uint32_t num_args, object * self, va_list args) |
31
668f533e5284
Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 { |
35
bf5e88f6419d
Use a function/method call strategy that actually works
Mike Pavone <pavone@retrodev.com>
parents:
34
diff
changeset
|
10 printf("method %d is not implemented on object %p\n", method_id, self); |
34
a10f1b049193
Working closures, but need to rethink method call strategy
Mike Pavone <pavone@retrodev.com>
parents:
31
diff
changeset
|
11 printf("main_module %p\n", main_module); |
31
668f533e5284
Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 exit(0); |
668f533e5284
Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
13 return NULL; |
668f533e5284
Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
14 } |
45
2a9c6eed0c70
Move closure/lambda object def into compiler rather than runtime code. Add while:do method to lambda
Mike Pavone <pavone@retrodev.com>
parents:
35
diff
changeset
|
15 /* |
31
668f533e5284
Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
16 obj_meta lambda_meta = { |
668f533e5284
Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
17 sizeof(closure), |
668f533e5284
Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
18 {no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, |
668f533e5284
Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
19 no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl} |
45
2a9c6eed0c70
Move closure/lambda object def into compiler rather than runtime code. Add while:do method to lambda
Mike Pavone <pavone@retrodev.com>
parents:
35
diff
changeset
|
20 };*/ |