ast_value **imm_string;
ast_value **imm_vector;
+ /* must be deleted first, they reference immediates and values */
+ ast_value **accessors;
+
ast_value *imm_float_zero;
ast_value *imm_vector_zero;
vec_push(func->blocks, body);
*out = fval;
+ vec_push(parser->accessors, fval);
+
return true;
}
void parser_cleanup()
{
size_t i;
+ for (i = 0; i < vec_size(parser->accessors); ++i) {
+ ast_delete(parser->accessors[i]->constval.vfunc);
+ parser->accessors[i]->constval.vfunc = NULL;
+ ast_delete(parser->accessors[i]);
+ }
for (i = 0; i < vec_size(parser->functions); ++i) {
ast_delete(parser->functions[i]);
}
ast_delete(parser->globals[i].var);
mem_d(parser->globals[i].name);
}
+ vec_free(parser->accessors);
vec_free(parser->functions);
vec_free(parser->imm_vector);
vec_free(parser->imm_string);