From: George H. <geo...@us...> - 2006-08-03 13:08:28
|
Update of /cvsroot/win32forth/win32forth/src/kernel In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17644/win32forth/src/kernel Modified Files: fkernel.f Log Message: gah:Added code so that a warning is given if the Does> part of the defing word is in in-system and is used to create a word in-application (which would cause problems for TURNKEYed programs). NOTE needs the new FKERNEL.EXE from the CVS to build. Index: fkernel.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/kernel/fkernel.f,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** fkernel.f 22 May 2006 11:44:14 -0000 1.31 --- fkernel.f 3 Aug 2006 13:08:22 -0000 1.32 *************** *** 1984,1987 **** --- 1984,1988 ---- -4103 EQU WARN_STACK \ " stack depth increased" -4104 EQU WARN_DEPRECATEDWORD \ " is a deprecated word" + -4106 EQU WARN_SYSWORD3 \ " is an application word whose runtime is in a system word" VARIABLE THROW_MSGS 0 THROW_MSGS ! \ list header *************** *** 2020,2023 **** --- 2021,2025 ---- THROW_MSGS LINK, WARN_SYSWORD2 , ," is an application word set to a system word" THROW_MSGS LINK, WARN_DEPRECATEDWORD , ," is a deprecated word" + THROW_MSGS LINK, WARN_SYSWORD3 , ," is an application word whose runtime is in a system word" | CREATE NULLMSG ," " \ no message text *************** *** 4335,4338 **** --- 4337,4346 ---- R> @ LAST @ NAME> ! ; + : (DOES>) ( -- ) + LAST @ NAME> R> TUCK @ OVER ! + SYS-ADDR? 0= SWAP + SYS-ADDR? AND SYS-WARNING? AND + IF WARN_SYSWORD3 WARNMSG THEN ; + : #(;CODE) ( a1 -- ) R> @ SWAP ! ; *************** *** 5743,5749 **** : DOES> ( -- ) DOES>_A ! COMPILE (;CODE) ! DOES>_B ; IMMEDIATE : #DOES> ( -- ) \ "compile time" --- 5751,5758 ---- : DOES> ( -- ) + SYS-WARNING? SYS-WARNING-OFF DOES>_A ! COMPILE (DOES>) ! DOES>_B TO SYS-WARNING? ; IMMEDIATE : #DOES> ( -- ) \ "compile time" |