xo-interpreter2: + nil + cons
This commit is contained in:
parent
cb6df6c0d8
commit
2e1ae9bca3
30 changed files with 213 additions and 11 deletions
|
|
@ -17,7 +17,7 @@ namespace xo {
|
|||
using xo::print::APrintable;
|
||||
using xo::mm::AGCObject;
|
||||
using xo::facet::FacetRegistry;
|
||||
using xo::facet::typeseq;
|
||||
//using xo::facet::typeseq;
|
||||
|
||||
namespace scm {
|
||||
static DList s_null(obj<AGCObject>(), nullptr);
|
||||
|
|
@ -28,6 +28,12 @@ namespace xo {
|
|||
return &s_null;
|
||||
}
|
||||
|
||||
obj<AGCObject,DList>
|
||||
DList::nil()
|
||||
{
|
||||
return obj<AGCObject,DList>(_nil());
|
||||
}
|
||||
|
||||
DList *
|
||||
DList::_cons(obj<AAllocator> mm,
|
||||
obj<AGCObject> car,
|
||||
|
|
@ -38,6 +44,14 @@ namespace xo {
|
|||
return new (mem) DList(car, cdr);
|
||||
}
|
||||
|
||||
obj<AGCObject,DList>
|
||||
DList::cons(obj<AAllocator> mm,
|
||||
obj<AGCObject> car,
|
||||
DList * cdr)
|
||||
{
|
||||
return obj<AGCObject,DList>(_cons(mm, car, cdr));
|
||||
}
|
||||
|
||||
#ifdef OBSOLETE
|
||||
DList *
|
||||
DList::list(obj<AAllocator> mm,
|
||||
|
|
@ -137,8 +151,6 @@ namespace xo {
|
|||
obj<APrintable> elt
|
||||
= FacetRegistry::instance().variant<APrintable, AGCObject>(l->head_);
|
||||
|
||||
|
||||
|
||||
assert(elt.data());
|
||||
|
||||
if (!pps->print_upto(elt))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue