Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit a8e4f91

Browse files
committed
initial support for jiting del
1 parent c22137c commit a8e4f91

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/Service.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ struct DeferredService : public Deferred
4646

4747
void run()
4848
{
49+
#if 0
4950
switch(_op) {
5051
case REPLICATE: {
5152
const auto a = std::move(Registry::get(_a).get());
@@ -58,6 +59,23 @@ struct DeferredService : public Deferred
5859
default:
5960
throw(std::runtime_error("Unkown Service operation requested."));
6061
}
62+
#endif
63+
}
64+
65+
::mlir::Value generate_mlir(::mlir::OpBuilder & builder, ::mlir::Location loc, jit::IdValueMap & ivm) override
66+
{
67+
switch(_op) {
68+
case DROP:
69+
if(auto e = ivm.find(_a); e != ivm.end()) {
70+
ivm.erase(e);
71+
// FIXME create delete op and return it
72+
}
73+
break;
74+
default:
75+
throw(std::runtime_error("Unkown Service operation requested."));
76+
}
77+
78+
return {};
6179
}
6280

6381
FactoryId factory() const

0 commit comments

Comments
 (0)