calculate object size from type

This commit is contained in:
Yuichi Nishiwaki
2017-04-12 13:18:06 +09:00
parent 8d886db1db
commit 619a014adf
15 changed files with 53 additions and 30 deletions
+1 -1
View File
@@ -416,7 +416,7 @@ codegen_context_destroy(pic_state *pic, codegen_context *cxt)
struct irep *irep;
/* create irep */
irep = (struct irep *)pic_obj_alloc(pic, sizeof(struct irep), PIC_TYPE_IREP);
irep = (struct irep *)pic_obj_alloc(pic, PIC_TYPE_IREP);
irep->varg = pic_sym_p(pic, cxt->rest);
irep->argc = pic_vec_len(pic, cxt->args) + 1;
irep->localc = pic_vec_len(pic, cxt->locals);