diff runtime/object.h @ 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
line wrap: on
line diff
--- a/runtime/object.h	Sun Jul 08 12:32:24 2012 -0700
+++ b/runtime/object.h	Mon Jul 09 08:57:50 2012 -0700
@@ -28,9 +28,12 @@
 	method   meth_lookup[16];
 };
 
+extern obj_meta lambda_meta;
+
 #define mcall(method_id, num_args, args) (args[0])->meta->meth_lookup[method_id & 0xF](method_id, num_args, args)
 #define ccall(clos, num_args, args) (((closure *)clos)->func(((closure *)clos)->env, num_args, args))
 
 object * make_object(obj_meta * meta, void * parent, int num_props, ...);
+object * make_closure(void * env, closure_func func);
 
 #endif //OBJECT_H_