xo-interpreter2: + VsmApplyClosureFrame [WIP, not used]
This commit is contained in:
parent
5b97cddbcd
commit
0ab3b63a38
17 changed files with 410 additions and 12 deletions
59
xo-interpreter2/src/interpreter2/DVsmApplyClosureFrame.cpp
Normal file
59
xo-interpreter2/src/interpreter2/DVsmApplyClosureFrame.cpp
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/** @file DVsmApplyClosureFrame.cpp
|
||||
*
|
||||
* @author Roland Conybeare, Feb 2026
|
||||
**/
|
||||
|
||||
#include "DVsmApplyClosureFrame.hpp"
|
||||
|
||||
namespace xo {
|
||||
using xo::mm::AGCObject;
|
||||
|
||||
namespace scm {
|
||||
|
||||
DVsmApplyClosureFrame::DVsmApplyClosureFrame(obj<AGCObject> stack,
|
||||
VsmInstr cont,
|
||||
DLocalEnv * local_env)
|
||||
: stack_{stack},
|
||||
cont_{cont},
|
||||
local_env_{local_env}
|
||||
{}
|
||||
|
||||
std::size_t
|
||||
DVsmApplyClosureFrame::shallow_size() const noexcept
|
||||
{
|
||||
return sizeof(DVsmApplyClosureFrame);
|
||||
}
|
||||
|
||||
DVsmApplyClosureFrame *
|
||||
DVsmApplyClosureFrame::shallow_copy(obj<AAllocator> mm) const noexcept
|
||||
{
|
||||
DVsmApplyClosureFrame * copy
|
||||
= (DVsmApplyClosureFrame *)mm.alloc_copy((std::byte *)this);
|
||||
|
||||
if (copy)
|
||||
*copy = *this;
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
std::size_t
|
||||
DVsmApplyClosureFrame::forward_children(obj<ACollector> gc) noexcept
|
||||
{
|
||||
(void)gc;
|
||||
|
||||
return this->shallow_size();
|
||||
}
|
||||
|
||||
bool
|
||||
DVsmApplyClosureFrame::pretty(const ppindentinfo & ppii) const
|
||||
{
|
||||
return ppii.pps()->pretty_struct
|
||||
(ppii,
|
||||
"DVsmApplyClosureFrame",
|
||||
refrtag("cont", cont_),
|
||||
refrtag("env", local_env_));
|
||||
}
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end DVsmApplyClosureFrame.cpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue