From 8f57d15eac72fbb5f265efcd0050207d1b15c38b Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Wed, 19 Jun 2024 18:34:52 -0400 Subject: [PATCH] xo-pyjit: cosmetic: drop OBSOLETE code --- src/pyjit/pyjit.cpp | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/pyjit/pyjit.cpp b/src/pyjit/pyjit.cpp index e905c43c..959f0931 100644 --- a/src/pyjit/pyjit.cpp +++ b/src/pyjit/pyjit.cpp @@ -195,7 +195,7 @@ namespace xo { auto factory = pycaller_store::instance()->lookup_prototype(prototype); if (!factory) { - throw std::runtime_error(tostr("MachPipeline.lookup_fn: unknown function prototype", + throw std::runtime_error(tostr("MachPipeline.lookup_fn: unknown function prototype p", xtag("p", prototype))); } @@ -204,23 +204,14 @@ namespace xo { throw std::runtime_error(tostr("MachPipeline.lookup_fn: lookup on symbol S failed", xtag("S", symbol))); } - }) + }, + py::arg("prototype"), py::arg("symbol"), + py::doc("lookup_fn(proto,sym) fetches function associated with sym in jit,\n" + "and wraps it as a callable python function.\n" + "proto *must* match (with exact spelling) pycaller registered at compile time with pycaller_store::instance,\n" + "for example 'int (*)(int, int)'")) ; - -#ifdef OBSOLETE - py::class_>(m, "XferDbl2DblFn") - .def("__call__", - [](XferDbl2DblFn & self, double x) { return self(x); } - ) - ; - py::class_>(m, "XferDblDbl2DblFn") - .def("__call__", - [](XferDblDbl2DblFn & self, double x, double y) { return self(x, y); } - ) - ; -#endif - py::class_>(m, "llvm_Value") .def("print",