diff mc-codegen.c @ 117:2d5a203cc3a6

lvar reuse
author kono
date Fri, 21 Mar 2003 15:18:51 +0900
parents b14ff9671c90
children 07b91b625f84
line wrap: on
line diff
--- a/mc-codegen.c	Fri Mar 21 04:41:02 2003 +0900
+++ b/mc-codegen.c	Fri Mar 21 15:18:51 2003 +0900
@@ -590,6 +590,7 @@
     } else {
 	g_expr_u(assign_expr0((e1=list2(LVAR,new_lvar(sz))),s,ty,ty));
 	*target = append4(*target,t,ty,e1);
+	*use=list3(t,*use,e1);
     }
 }
 
@@ -788,6 +789,7 @@
 	}
 	if (!is_simple(car(s0))) {
 	    g_expr_u(assign_expr0((e4=list2(LVAR,new_lvar(sz))),s0,ty,ty));
+	    use=list3(ty,use,e1);
 	    cadddr(e2)=e4;
 	    s0=e4;
         } else if (is_same_type(t0,s0)) {
@@ -825,13 +827,14 @@
     }
 
     /* 並列代入を実行 */
-
     parallel_assign(&target,&source,&processing,&use);
     while (use) {
 	if (car(caddr(use))==REGISTER)
 	    free_register(cadr(caddr(use)));
 	else if (car(caddr(use))==DREGISTER)
 	    free_fregister(cadr(caddr(use)));
+	else if (car(caddr(use))==LVAR)
+	    free_lvar(cadr(caddr(use)));
 	use=cadr(use);
     }
     if(target) error(-1);