Files
ivy/mie/include/mie/ir/module.h

38 lines
983 B
C

#ifndef MIE_MODULE_H_
#define MIE_MODULE_H_
#define MIE_MODULE(p) ((struct mie_module *)(p))
#include <blue/core/queue.h>
#include <blue/ds/hashmap.h>
#include <mie/ir/value.h>
#include <mie/name.h>
struct mie_func;
struct mie_module {
struct mie_value m_base;
struct mie_name_map *m_names;
b_queue m_records;
b_queue m_types;
b_queue m_func;
b_hashmap *m_data;
b_hashmap *m_data_strings;
};
extern struct mie_module *mie_module_create(void);
extern void mie_module_add_function(
struct mie_module *mod, struct mie_func *func, const char *name);
extern struct mie_data *mie_module_get_string_ptr(
struct mie_module *mod, const char *s);
extern struct mie_data *mie_module_get_data(
struct mie_module *mod, const char *name);
extern enum b_status mie_module_put_data(
struct mie_module *mod, struct mie_data *data, const char *name);
extern struct mie_value *mie_module_generate_value_name(
struct mie_module *mod, struct mie_value *val, const char *hint);
#endif