소스 검색

more progress

Matt Coles 8 년 전
부모
커밋
890548e796
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      tac/main.c

+ 2 - 0
tac/main.c

@@ -138,6 +138,7 @@ void print_tac(TLIST* tac_list) {
138 138
     if (op == AUTO) printf("param %s\n", stok(ptr->elem->dst));
139 139
     if (op == APPLY) printf("call %s, %s\n", stok(ptr->elem->dst), stok(ptr->elem->tgt));
140 140
     if (op == 278) printf("arg %s\n", stok(ptr->elem->dst));
141
+    if (op == 279) printf("end %s\n", stok(ptr->elem->dst));
141 142
     ptr = ptr->next;
142 143
   }
143 144
 }
@@ -262,6 +263,7 @@ TOKEN* build_tac(NODE *tree, TACS* tac) {
262 263
       }
263 264
     }
264 265
     build_tac(tree->right, tac);
266
+    new_tac(tac, (TOKEN*) tree->left->right->left->left, NULL, NULL, 279);
265 267
   } else if (type == APPLY) {
266 268
     TOKEN* ret_val = gen_tmp();
267 269
     if (tree->right != NULL) {