ir_builder* self;
self = (ir_builder*)mem_a(sizeof(*self));
+ if (!self)
+ return NULL;
+
MEM_VECTOR_INIT(self, functions);
MEM_VECTOR_INIT(self, globals);
self->name = NULL;
{
ir_function *self;
self = (ir_function*)mem_a(sizeof(*self));
+
+ if (!self)
+ return NULL;
+
self->name = NULL;
if (!ir_function_set_name(self, "<@unnamed>")) {
mem_d(self);
{
ir_block *self;
self = (ir_block*)mem_a(sizeof(*self));
+ if (!self)
+ return NULL;
+
+ memset(self, 0, sizeof(*self));
+
self->label = NULL;
if (!ir_block_set_label(self, name)) {
mem_d(self);
self->is_return = false;
self->run_id = 0;
MEM_VECTOR_INIT(self, living);
+
+ self->generated = false;
+
return self;
}
MEM_VEC_FUNCTIONS(ir_block, ir_instr*, instr)
{
ir_instr *self;
self = (ir_instr*)mem_a(sizeof(*self));
+ if (!self)
+ return NULL;
+
self->owner = owner;
self->context.file = "<@no context>";
self->context.line = 0;