xo-interpreter2 stack: support op!= + trial numeric refactor
This commit is contained in:
parent
243ad12869
commit
77c5f625ff
12 changed files with 161 additions and 14 deletions
|
|
@ -50,6 +50,14 @@ namespace xo {
|
|||
x->value() == DFloat::value_type(y->value()));
|
||||
}
|
||||
|
||||
obj<AGCObject>
|
||||
FloatIntegerOps::cmp_notequal(obj<ARuntimeContext> rcx,
|
||||
DFloat * x, DInteger * y)
|
||||
{
|
||||
return DBoolean::box<AGCObject>(rcx.allocator(),
|
||||
x->value() != DFloat::value_type(y->value()));
|
||||
}
|
||||
|
||||
// ----- Integer op Float -----
|
||||
|
||||
obj<AGCObject>
|
||||
|
|
@ -84,8 +92,16 @@ namespace xo {
|
|||
IntegerFloatOps::cmp_equal(obj<ARuntimeContext> rcx,
|
||||
DInteger * x, DFloat * y)
|
||||
{
|
||||
return DFloat::box<AGCObject>(rcx.allocator(),
|
||||
DFloat::value_type(x->value() == y->value()));
|
||||
return DBoolean::box<AGCObject>(rcx.allocator(),
|
||||
DFloat::value_type(x->value()) == y->value());
|
||||
}
|
||||
|
||||
obj<AGCObject>
|
||||
IntegerFloatOps::cmp_notequal(obj<ARuntimeContext> rcx,
|
||||
DInteger * x, DFloat * y)
|
||||
{
|
||||
return DBoolean::box<AGCObject>(rcx.allocator(),
|
||||
DFloat::value_type(x->value()) != y->value());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue