xo-interpreter2 stack: use xo-numeric/ to support op*

This commit is contained in:
Roland Conybeare 2026-02-18 22:00:30 -08:00
commit 02f96d2e95
3 changed files with 11 additions and 0 deletions

View file

@ -15,12 +15,14 @@ namespace xo {
#endif
struct Primitives {
#ifdef OBSOLETE // see xo-numeric/src/numeric/NumericPrimitives.cpp
/** polymorphic multiply
*
* TODO: this will want to move to xo-numeric/
* so we can dispatch on vector, matrix, function types
**/
static DPrimitive_gco_2_gco_gco s_mul_gco_gco_pm;
#endif
/** polymorphic subtract
*

View file

@ -39,6 +39,7 @@ namespace xo {
}
#endif
#ifdef OBSOLETE // see xo-numeric/xo/numeric/NumericPrimitives.cpp
obj<AGCObject>
mul_gco_gco(obj<ARuntimeContext> rcx,
obj<AGCObject> x_gco,
@ -98,6 +99,7 @@ namespace xo {
xtag("y.tseq", y_tseq)));
return obj<AGCObject>();
}
#endif
obj<AGCObject>
sub_gco_gco(obj<ARuntimeContext> rcx,
@ -255,8 +257,10 @@ namespace xo {
}
#endif
#ifdef OSOLETE
DPrimitive_gco_2_gco_gco
Primitives::s_mul_gco_gco_pm("_mul", &mul_gco_gco);
#endif
DPrimitive_gco_2_gco_gco
Primitives::s_sub_gco_gco_pm("_sub", &sub_gco_gco);

View file

@ -46,6 +46,10 @@ namespace xo {
REQUIRE(s_init.evidence());
}
// MOVE THESE TO xo-numeric/
// Should work using NumericPrimitives::s_mul_gco_gco
#ifdef OBSOLETE
TEST_CASE("DPrimitive-n_args", "[procedure2][DPrimitive]")
{
// s_mul_gco_gco_pm takes 2 AGCObject args
@ -137,6 +141,7 @@ namespace xo {
CHECK(output.find("_mul") != std::string::npos);
}
#endif
} /*namespace ut*/
} /*namespace xo*/