Diff for /gforth/prims2x.fs between versions 1.90 and 1.91

version 1.90, 2001/03/11 21:47:27 version 1.91, 2001/03/18 10:33:25
Line 585  s" IP" save-mem w s" error don't use # o Line 585  s" IP" save-mem w s" error don't use # o
 : stores ( -- )  : stores ( -- )
     prim prim-effect-out prim prim-effect-out-end @ ['] store map-items ;      prim prim-effect-out prim prim-effect-out-end @ ['] store map-items ;
   
   : print-debug-arg { item -- }
       ." fputs(" quote space item item-name 2@ type ." =" quote ." , vm_out); "
       ." printarg_" item item-type @ print-type-prefix
       ." (" item item-name 2@ type ." );" cr ;
       
   : print-debug-args ( -- )
       ." #ifdef VM_DEBUG" cr
       ." if (vm_debug) {" cr
       prim prim-effect-in prim prim-effect-in-end @ ['] print-debug-arg map-items
   \    ." fputc('\n', vm_out);" cr
       ." }" cr
       ." #endif" cr ;
   
   : print-debug-result { item -- }
       item item-first @ if
           item print-debug-arg
       endif ;
   
   : print-debug-results ( -- )
       cr
       ." #ifdef VM_DEBUG" cr
       ." if (vm_debug) {" cr
       ." fputs(" quote ."  -- " quote ." , vm_out); "
       prim prim-effect-out prim prim-effect-out-end @ ['] print-debug-result map-items
       ." fputc('\n', vm_out);" cr
       ." }" cr
       ." #endif" cr ;
   
 : output-super-end ( -- )  : output-super-end ( -- )
     prim prim-c-code 2@ s" SET_IP" search if      prim prim-c-code 2@ s" SET_IP" search if
         ." SUPER_END;" cr          ." SUPER_END;" cr
Line 594  s" IP" save-mem w s" error don't use # o Line 622  s" IP" save-mem w s" error don't use # o
 : output-c-tail ( -- )  : output-c-tail ( -- )
     \ the final part of the generated C code      \ the final part of the generated C code
     output-super-end      output-super-end
       print-debug-results
     ." NEXT_P1;" cr      ." NEXT_P1;" cr
     stores      stores
     fill-tos      fill-tos
Line 612  s" IP" save-mem w s" error don't use # o Line 641  s" IP" save-mem w s" error don't use # o
     repeat      repeat
     2drop type ;      2drop type ;
   
 : print-debug-arg { item -- }  
     ." fputs(" quote space item item-name 2@ type ." =" quote ." , vm_out); "  
     ." printarg_" item item-type @ print-type-prefix  
     ." (" item item-name 2@ type ." );" cr ;  
       
 : print-debug-args ( -- )  
     ." #ifdef VM_DEBUG" cr  
     ." if (vm_debug) {" cr  
     prim prim-effect-in prim prim-effect-in-end @ ['] print-debug-arg map-items  
     ." fputc('\n', vm_out);" cr  
     ." }" cr  
     ." #endif" cr ;  
   
 : print-entry ( -- )  : print-entry ( -- )
     ." I_" prim prim-c-name 2@ type ." :" ;      ." I_" prim prim-c-name 2@ type ." :" ;
           
Line 666  s" IP" save-mem w s" error don't use # o Line 682  s" IP" save-mem w s" error don't use # o
     ."   fputs(" quote prim prim-name 2@ type quote ." , vm_out);" cr      ."   fputs(" quote prim prim-name 2@ type quote ." , vm_out);" cr
     disasm-args      disasm-args
     ."   ip += " inst-stream stack-in @ 1+ 0 .r ." ;" cr      ."   ip += " inst-stream stack-in @ 1+ 0 .r ." ;" cr
     ." } else " ;      ."   goto _endif_;" cr
       ." }" cr ;
   
 : output-profile ( -- )  : output-profile ( -- )
     \ generate code for postprocessing the VM block profile stuff      \ generate code for postprocessing the VM block profile stuff
Line 676  s" IP" save-mem w s" error don't use # o Line 693  s" IP" save-mem w s" error don't use # o
     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
         ."   return;" cr          ."   return;" cr
       else
           ."   goto _endif_;" cr
     endif      endif
     ." } else " cr ;      ." }" cr ;
   
 : gen-arg-parm { item -- }  : gen-arg-parm { item -- }
     item item-stack @ inst-stream = if      item item-stack @ inst-stream = if
Line 943  s" IP" save-mem w s" error don't use # o Line 962  s" IP" save-mem w s" error don't use # o
     fetches ;      fetches ;
   
 : part-output-c-tail ( -- )  : part-output-c-tail ( -- )
       print-debug-results
     stores ;      stores ;
   
 : output-combined-tail ( -- )  : output-combined-tail ( -- )

Removed from v.1.90  
changed lines
  Added in v.1.91


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