Added cons.
[mozart2.git] / cons.cc
blob69d33b4fec8c573afb759c86d462fab5dbc51c68
1 void gcIntoCons(Node& it, GC& gc, Node& dest){
2 dest.vt=&consVT;
3 Cons& c=*(Cons*)new(vm) Cons();
4 Cons& oc=*(Cons*)it.c.ptr;
5 dest.c.ptr=&c;
6 new(&c.v[0]) StableNode(gc,oc.v[0]);
7 new(&c.v[1]) StableNode(gc,oc.v[1]);
9 const VTable consVT={
10 //PP_VTABLE_DEF(vtUnimplemented)
11 //PP_VTABLE_SET(«gcInto»,«&gcIntoCons»)
12 //PP_VTABLE_SET(«gc»,«&gcDef<&gcIntoCons>»)
13 //PP_VTABLE_PRODUCE