--- gforth/prims2x.fs 2002/12/08 09:57:53 1.122 +++ gforth/prims2x.fs 2002/12/28 17:18:27 1.125 @@ -669,7 +669,7 @@ stack inst-stream IP Cell prim prim-effect-in prim prim-effect-in-end @ ['] fetch map-items ; : stack-pointer-update { stack -- } - \ stack grow downwards + \ stacks grow downwards stack stack-diff ?dup-if \ this check is not necessary, gcc would do this for us stack inst-stream = if @@ -724,6 +724,12 @@ stack inst-stream IP Cell endif 2drop ; +: output-nextp2 ( -- ) + ." NEXT_P2;" cr ; + +variable tail-nextp2 \ xt to execute for printing NEXT_P2 in INST_TAIL +' output-nextp2 tail-nextp2 ! + : output-label2 ( -- ) ." LABEL2(" prim prim-c-name 2@ type ." )" cr ." NEXT_P2;" cr ; @@ -745,13 +751,13 @@ stack inst-stream IP Cell xt execute ; : output-c-tail ( -- ) - ['] noop output-c-tail1 ; + tail-nextp2 @ output-c-tail1 ; : output-c-tail2 ( -- ) ['] output-label2 output-c-tail1 ; : output-c-tail-no-stores ( -- ) - ['] noop output-c-tail1-no-stores ; + tail-nextp2 @ output-c-tail1-no-stores ; : output-c-tail2-no-stores ( -- ) ['] output-label2 output-c-tail1-no-stores ; @@ -917,7 +923,7 @@ stack inst-stream IP Cell \ cr ; : output-label ( -- ) - ." INST_ADDR(" prim prim-c-name 2@ type ." )," cr ; + ." INST_ADDR(" prim prim-c-name 2@ type ." )" cr ; : output-alias ( -- ) ( primitive-number @ . ." alias " ) ." Primitive " prim prim-name 2@ type cr ; @@ -1166,7 +1172,7 @@ stack inst-stream IP Cell r> in-part ! ; : part-stack-pointer-updates ( -- ) - max-stacks 0 +do + next-stack-number @ 0 +do i part-num @ 1+ s-c-max-depth @ dup i num-combined @ s-c-max-depth @ = \ final depth swap i part-num @ s-c-max-depth @ <> \ just reached now @@ -1418,7 +1424,7 @@ Variable c-flag (( (( ` g || ` G )) {{ start }} nonl ** {{ end forth-flag @ IF ." group " type cr THEN - c-flag @ IF ." GROUP(" type ." )" cr THEN }} + c-flag @ IF ." GROUP(" type ." , " function-number @ 0 .r ." )" cr THEN }} )) <- group-comment (( (( eval-comment || forth-comment || c-comment || else-comment || if-comment || group-comment )) ?? nonl ** )) <- comment-body