Mercurial > hg > CbC > old > device
diff mc-inline.c @ 509:e58848f6ebc1
inline continue...
author | kono |
---|---|
date | Sun, 25 Dec 2005 16:07:45 +0900 |
parents | d8102a46b78d |
children | 2bd6ff6ee9a8 |
line wrap: on
line diff
--- a/mc-inline.c Sun Dec 25 10:52:54 2005 +0900 +++ b/mc-inline.c Sun Dec 25 16:07:45 2005 +0900 @@ -397,9 +397,9 @@ { int i; int pvartable = getfree(adisp-ldisp); // have to be local heap - pdisp = pvartable+adisp; - for(i=adisp-ldisp;i>=0;i--) { - heap[pvartable+i] = 0; + pdisp = pvartable-ldisp; + for(i=ldisp;i<0;i++) { + heap[pdisp+i] = 0; } return pvartable; } @@ -980,7 +980,8 @@ if (is_const(e4) /* ||(is_memory(e3)&&is_readonly(e3)) */ ) { heap[pdisp+narg]=e4; } else { - arg = heap[pdisp+narg]=list3(LVAR,new_lvar(size(t)),cadddr(e3)); + arg = heap[pdisp+narg]=list3(LVAR,new_lvar(size(t)),0); + // should contain correct argument variable name g_expr_u(assign_expr0(arg,e4,t,t)); } narg ++; @@ -989,6 +990,8 @@ e = pexpr(parse); pdisp = sdisp; pvartable = svartable; + // how to handle return value? + g_expr_u(e); return ret_type; }