Diff for /gforth/prims2x.fs between versions 1.138 and 1.139

version 1.138, 2003/05/13 09:36:59 version 1.139, 2003/05/15 18:43:15
Line 1279  variable tail-nextp2 \ xt to execute for Line 1279  variable tail-nextp2 \ xt to execute for
 \ structure refers to?  By the order of cost structures, as in most  \ structure refers to?  By the order of cost structures, as in most
 \ other cases.  \ other cases.
   
   : super2-length ( -- n )
       combined if
           num-combined @
       else
           1
       endif ;
   
 : compute-costs { p -- nloads nstores nupdates }  : compute-costs { p -- nloads nstores nupdates }
     \ compute the number of loads, stores, and stack pointer updates      \ compute the number of loads, stores, and stack pointer updates
     \ of a primitive or combined instruction; does not take TOS      \ of a primitive or combined instruction; does not take TOS
     \ caching into account, nor that IP updates are combined with      \ caching into account
     \ other stuff  
     0 max-stacks 0 +do      0 max-stacks 0 +do
         p prim-stacks-in i th @ +          p prim-stacks-in i th @ +
     loop      loop
       super2-length 1- - \ don't count instruction fetches of subsumed insts
     0 max-stacks 0 +do      0 max-stacks 0 +do
         p prim-stacks-out i th @ +          p prim-stacks-out i th @ +
     loop      loop
     0 max-stacks 0 +do      0 max-stacks 1 +do \ don't count ip updates, therefore "1 +do"
         p prim-stacks-in i th @ p prim-stacks-out i th @ <> -          p prim-stacks-in i th @ p prim-stacks-out i th @ <> -
     loop ;      loop ;
   
 : output-num-part ( p -- )  : output-num-part ( p -- )
     prim-num @ 4 .r ." ," ;      prim-num @ 4 .r ." ," ;
   
 : super2-length ( -- n )  
     combined if  
         num-combined @  
     else  
         1  
     endif ;  
   
 : output-name-comment ( -- )  : output-name-comment ( -- )
     ."  /* " prim prim-name 2@ type ."  */" ;      ."  /* " prim prim-name 2@ type ."  */" ;
   

Removed from v.1.138  
changed lines
  Added in v.1.139


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>