Diff for /gforth/prims2x.fs between versions 1.103 and 1.104

version 1.103, 2001/12/24 20:39:29 version 1.104, 2002/02/10 14:02:25
Line 693  stack inst-stream IP Cell Line 693  stack inst-stream IP Cell
 : output-profile ( -- )  : output-profile ( -- )
     \ generate code for postprocessing the VM block profile stuff      \ generate code for postprocessing the VM block profile stuff
     ." if (VM_IS_INST(*ip, " function-number @ 0 .r ." )) {" cr      ." if (VM_IS_INST(*ip, " function-number @ 0 .r ." )) {" cr
     ."   add_inst(b, " quote  prim prim-name 2@ type quote ." );" cr      ."   add_inst(b, " quote prim prim-name 2@ type quote ." );" cr
     ."   ip += " inst-stream stack-in @ 1+ 0 .r ." ;" cr      ."   ip += " inst-stream stack-in @ 1+ 0 .r ." ;" cr
     prim prim-c-code 2@  s" SET_IP"    search nip nip      prim prim-c-code 2@  s" SET_IP"    search nip nip
     prim prim-c-code 2@  s" SUPER_END" search nip nip or if      prim prim-c-code 2@  s" SUPER_END" search nip nip or if
Line 703  stack inst-stream IP Cell Line 703  stack inst-stream IP Cell
     endif      endif
     ." }" cr ;      ." }" cr ;
   
   : output-profile-combined ( -- )
       \ generate code for postprocessing the VM block profile stuff
       ." if (VM_IS_INST(*ip, " function-number @ 0 .r ." )) {" cr
       num-combined @ 0 +do
           ."   add_inst(b, " quote
           combined-prims i th @ prim-name 2@ type
           quote ." );" cr
       loop
       ."   ip += " inst-stream stack-in @ 1+ 0 .r ." ;" cr
       combined-prims num-combined @ 1- th @ prim-c-code 2@  s" SET_IP"    search nip nip
       combined-prims num-combined @ 1- th @ prim-c-code 2@  s" SUPER_END" search nip nip or if
           ."   return;" cr
       else
           ."   goto _endif_;" cr
       endif
       ." }" cr ;
   
 : output-superend ( -- )  : output-superend ( -- )
     \ output flag specifying whether the current word ends a dynamic superinst      \ output flag specifying whether the current word ends a dynamic superinst
     prim prim-c-code 2@  s" SET_IP"    search nip nip      prim prim-c-code 2@  s" SET_IP"    search nip nip
Line 1228  Variable c-flag Line 1245  Variable c-flag
       line @ name-line ! filename 2@ name-filename 2!        line @ name-line ! filename 2@ name-filename 2!
       function-number @ prim prim-num !        function-number @ prim prim-num !
       start }} forth-ident {{ end 2dup prim prim-name 2! prim prim-c-name 2! }}  white ++        start }} forth-ident {{ end 2dup prim prim-name 2! prim prim-c-name 2! }}  white ++
      (( ` / white ** {{ start }} c-ident {{ end prim prim-c-name 2! }} white ** )) ??
    (( simple-primitive || combined-primitive )) {{ 1 function-number +! }}     (( simple-primitive || combined-primitive )) {{ 1 function-number +! }}
 )) <- primitive ( -- )  )) <- primitive ( -- )
   

Removed from v.1.103  
changed lines
  Added in v.1.104


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