Implement global bindings
[muddle-interpreter.git] / src / object.h
index 8ebd80704a39ebdf8a70ba378bb070d34d9f9164..54281f2396ebf7c629be3f6bdd7d4fad09d5ab73 100644 (file)
@@ -252,6 +252,7 @@ typedef union pool_object
   vector_object vector;
   uvector_object uvector;
   atom_object atom;
+  subr_object subr;
 } pool_object;
 
 union object
@@ -274,6 +275,7 @@ union object
   uvector_object uvector;
   atom_object atom;
   tuple_object tuple;
+  subr_object subr;
 };
 
 /**
@@ -380,6 +382,8 @@ Common object operations.
 
 uint32_t list_length (const list_object * o);
 
+dope_object *vec_dope (const vector_object * o);
+
 dope_object *uv_dope (const uvector_object * o);
 
 static inline evaltype
@@ -396,6 +400,12 @@ chtype (object * o, evaltype type)
   o->type = type;
 }
 
+// Allocate an vector of LOSEs and return a handle with length=0.
+vector_object vector_create (uint32_t capacity);
+
+// Stack-like interface to a VECTOR (with automatic GROW!)
+object *stack_push (vector_object * v);
+
 /**
 Checked downcasts.
 */