xo-interpreter2 stack: streamline op== impl + utests
This commit is contained in:
parent
9dca9a8c46
commit
243ad12869
12 changed files with 97 additions and 10 deletions
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue