Mercurial > hg > CbC > old > device
changeset 506:96af6754acd3
*** empty log message ***
author | kono |
---|---|
date | Sat, 24 Dec 2005 21:01:50 +0900 |
parents | 5d4112735c5c |
children | 425f768aba68 |
files | Changes mc-inline.c mc-parse.c |
diffstat | 3 files changed, 19 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/Changes Sat Dec 24 12:58:20 2005 +0900 +++ b/Changes Sat Dec 24 21:01:50 2005 +0900 @@ -7475,7 +7475,6 @@ recursive inline の検出はやらないといけないわけね。 - (あぁ、なんかやっちゃったみたい.... また、風邪拾っちゃったよ〜) Fri Dec 23 19:37:42 JST 2005 @@ -7491,3 +7490,12 @@ return cadr(in); } みたいな感じ? + +Sat Dec 24 21:00:17 JST 2005 + +pfdecl で、inline を生成するんだけど、そこで引数のn->dspが arg_register +などで破壊されてしまう。すると、inline がinlineを含んでいた時に破綻します。 + + + +
--- a/mc-inline.c Sat Dec 24 12:58:20 2005 +0900 +++ b/mc-inline.c Sat Dec 24 21:01:50 2005 +0900 @@ -159,7 +159,7 @@ // conv->switch_(); slfree=lfree; svalue=csvalue1; /* save parents switch value */ - gexpr(caddr(e1),1); + gexpr(caddr(e1),1); /* switch value */ csvalue1=csvalue() ; // conv->switch_body_(); cslabel = control = 0; @@ -635,7 +635,11 @@ static int p_case(int e) { - return list3(ST_CASE,pexpr(cadr(e)),caddr(e)); + int new=0,clist = caddr(e); + // insert destory clist, we have to copy it now + for(;clist;clist=cadr(clist)) + new=glist3(car(clist),new,0); + return list3(ST_CASE,pexpr(cadr(e)),reverse0(new)); } static int
--- a/mc-parse.c Sat Dec 24 12:58:20 2005 +0900 +++ b/mc-parse.c Sat Dec 24 21:01:50 2005 +0900 @@ -2273,15 +2273,14 @@ while(sym==CASE) { conv->case_begin_(0,0); getsym(0); - if (inmode) - clist=list3(cexpr(expr(1)),clist,0); - else - clist=glist3(cexpr(expr(1)),clist,l); + // we have to make it global? + c = cexpr(expr(1)); + clist=glist3(c,clist,inmode?0:l); conv->case_(0,0); checksym(COLON); } if (inmode) { - parse = list3(ST_CASE,parse,clist); + parse = glist3(ST_CASE,parse,clist); control=1; return; }