xo-interpreter2 stack: scaffold DClosure, DLocalEnv [WIP]
This commit is contained in:
parent
61d41a2298
commit
c9c43fbef2
14 changed files with 295 additions and 1 deletions
29
xo-interpreter2/src/interpreter2/DClosure.cpp
Normal file
29
xo-interpreter2/src/interpreter2/DClosure.cpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/** @file DClosure.cpp
|
||||
*
|
||||
* @author Roland Conybeare, Feb 2026
|
||||
**/
|
||||
|
||||
#include "DClosure.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
|
||||
DClosure::DClosure(const DLambdaExpr * lm,
|
||||
const DLocalEnv * env)
|
||||
: lambda_{lm}, env_{env}
|
||||
{}
|
||||
|
||||
DClosure *
|
||||
DClosure::make(obj<AAllocator> mm,
|
||||
const DLambdaExpr * lm,
|
||||
const DLocalEnv * env)
|
||||
{
|
||||
void * mem = mm.alloc_for<DClosure>();
|
||||
|
||||
return new (mem) DClosure(lm, env);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end DClosure.cpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue