From: George H. <geo...@us...> - 2006-01-05 11:04:10
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21770/win32forth/src Modified Files: Class.f PRIMHASH.F Log Message: gah: Added warning for method hash clashes Index: Class.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Class.f,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Class.f 29 Oct 2005 09:42:31 -0000 1.7 --- Class.f 5 Jan 2006 11:03:55 -0000 1.8 *************** *** 13,16 **** --- 13,20 ---- only forth also definitions + -4105 constant warn_clash + + throw_msgs link, warn_clash , ," has a hash value that is already recognised by this class." + true value ?win-error-enabled \ initially errors are enabled *************** *** 566,573 **** \ -------------------- Method Compiler -------------------- : method ( SelID -- ) \ Build a methods dictionary entry for selector ?Class ?Exec ! dup pocket count rot add-hash ^Class MFA link, \ link , \ name is selector's hashed value --- 570,578 ---- \ -------------------- Method Compiler -------------------- + variable new-method : method ( SelID -- ) \ Build a methods dictionary entry for selector ?Class ?Exec ! dup pocket count rot new-method on add-hash ^Class MFA link, \ link , \ name is selector's hashed value *************** *** 577,580 **** --- 582,594 ---- !csp ] ; \ start compiler + : _clash ( hash-val -- ) + new-method @ warning @ and if + ^Class mfa ((findm)) if + drop warn_clash warnmsg then + else drop + then new-method off ; + + _clash is clash + \ For Windows messages, we would like the selector to be a constant \ defined as the Window message number. :M will support both types of Index: PRIMHASH.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/PRIMHASH.F,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PRIMHASH.F 19 May 2005 07:49:22 -0000 1.3 --- PRIMHASH.F 5 Jan 2006 11:03:55 -0000 1.4 *************** *** 251,255 **** 2dup link> >body @ = if nip ( discard hash value ) ! l>name dup LATEST-NFA ! \ save nfa for other use (Sonntag, März 13 2005 dbu) count ( addr len ) --- 251,255 ---- 2dup link> >body @ = if nip ( discard hash value ) ! l>name dup LATEST-NFA ! \ save nfa for other use (Sonntag, März 13 2005 dbu) count ( addr len ) *************** *** 268,271 **** --- 268,275 ---- IN-SYSTEM + defer clash ( hash-val -- ) + + ' drop is clash + : add-hash ( addr len hash-val -- ) >r 2dup hash-wid search-wordlist *************** *** 276,282 **** "header docon , r> set-current ! r> , then ; ! 0 value obj-save --- 280,286 ---- "header docon , r> set-current ! r> dup , clash then ; ! 0 value obj-save *************** *** 305,307 **** - |