// How a function reference to a non-builtin function is stored.
struct func : public callable {
lambda *body;
vmFrame *closure;
func () : body(), closure() {}
virtual void call (stack*);
virtual bool compare(callable*);
void print(ostream& out);
};
class bfunc : public callable
{
public:
bfunc(bltin b) : func(b) {}
virtual void call (stack *s) { func(s); }
virtual bool compare(callable*);
void print(ostream& out);
private:
bltin func;
};
class thunk : public callable
{
public:
thunk(callable *f, item i) : func(f), arg(i) {}
virtual void call (stack*);