Added cons.
[mozart2.git] / abstraction.hh
blobdd732e4858a5bcca0e56030146a40d6204c76e49
1 struct Abstraction{
2 Abstraction(GC& gc, Abstraction* a);
3 Abstraction(size_t _arity, size_t _numG):arity(_arity), numG(_numG){}
4 size_t arity;
5 size_t numG;
6 StableNode code;
7 StableNode* G;
8 };
9 /*The block of G registers is constructed so that G[-1] is the abstraction itself so that it can be garbage collected from the stack frame.*/
10 extern const VTable abstractionVT;
11 StableNode* mkAbstraction(VM &vm, Node &target, StableNode &cb, size_t arity, size_t numG);