Make ClosureFrame safe & cleanup

TODO: make anonymous-funcs associated with tables capture closures,
implement copy constructor for Frame, & other cleanup.
This commit is contained in:
Zeke Medley 2019-06-26 15:05:57 -07:00
parent 670816ad48
commit 8ed18ca194
10 changed files with 150 additions and 149 deletions

View file

@ -4339,11 +4339,7 @@ Val* LambdaExpr::Eval(Frame* f) const
lamb->AddClosure(outer_ids, f);
ingredients->id->SetVal((new Val(lamb))->Ref());
ingredients->id->SetConst();
ingredients->id->ID_Val()->AsFunc()->SetScope(ingredients->scope);
return ingredients->id->ID_Val();
return (new Val(lamb));
}
void LambdaExpr::ExprDescribe(ODesc* d) const