xo-reader2 stack: use NumericDispatch for *,/,+,- ops

This commit is contained in:
Roland Conybeare 2026-02-18 22:40:37 -08:00
commit 4cab102ff2
15 changed files with 207 additions and 23 deletions

View file

@ -25,6 +25,20 @@ namespace xo {
return DInteger::box<AGCObject>(rcx.allocator(), x->value() / y->value());
}
obj<AGCObject>
IntegerOps::add(obj<ARuntimeContext> rcx,
DInteger * x, DInteger * y)
{
return DInteger::box<AGCObject>(rcx.allocator(), x->value() + y->value());
}
obj<AGCObject>
IntegerOps::subtract(obj<ARuntimeContext> rcx,
DInteger * x, DInteger * y)
{
return DInteger::box<AGCObject>(rcx.allocator(), x->value() - y->value());
}
}
}