xo-reader2 stack: use NumericDispatch for *,/,+,- ops
This commit is contained in:
parent
43f120dd10
commit
9dca9a8c46
12 changed files with 167 additions and 17 deletions
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue