Added cons.
[mozart2.git] / cons.hh
blob68b2422c6ef209e73e8370dd5f2d2e6f21af92ce
1 extern const VTable consVT;
2 struct Cons{
3 StableNode v[2];
4 };
5 StableNode* mkCons(VM& vm, Node& dest){
6 dest.vt=&consVT;
7 dest.c.ptr=new(vm) Cons();
8 return ((Cons*)dest.c.ptr)->v;