xo-interpreter2 stack: streamline op== impl + utests

This commit is contained in:
Roland Conybeare 2026-02-19 09:03:02 -08:00
commit 243ad12869
12 changed files with 97 additions and 10 deletions

View file

@ -5,8 +5,10 @@
#include "IntegerOps.hpp"
#include "integer/INumeric_DInteger.hpp"
#include <xo/object2/Boolean.hpp>
namespace xo {
using xo::scm::DBoolean;
using xo::mm::AGCObject;
namespace scm {
@ -39,6 +41,13 @@ namespace xo {
return DInteger::box<AGCObject>(rcx.allocator(), x->value() - y->value());
}
obj<AGCObject>
IntegerOps::cmp_equal(obj<ARuntimeContext> rcx,
DInteger * x, DInteger * y)
{
return DBoolean::box<AGCObject>(rcx.allocator(), x->value() == y->value());
}
}
}