mie: move op and type definition from dialect/ to ir/ and type/ respectively

This commit is contained in:
2026-01-08 22:16:50 +00:00
parent 27e42340de
commit e76e7c17db
35 changed files with 285 additions and 283 deletions

25
mie/ir/op-definition.c Normal file
View File

@@ -0,0 +1,25 @@
#include <blue/ds/string.h>
#include <mie/dialect/dialect.h>
#include <mie/ir/op-definition.h>
struct mie_op_definition *mie_op_definition_create(
struct mie_dialect *parent, const char *name)
{
struct mie_op_definition *out = malloc(sizeof *out);
if (!out) {
return NULL;
}
out->op_name = b_strdup(name);
if (!out->op_name) {
free(out);
return NULL;
}
out->op_parent = parent;
b_rope name_rope = B_ROPE_CSTR(name);
mie_id_map_put(&parent->d_ops, &out->op_id, &name_rope);
return out;
}