Commit 9ec40088 authored by pazsan's avatar pazsan

Fixed problems with different search methods. Hash now doesn't patch

it's own search method into vocabularies anymore.
parent bdea072d
......@@ -450,7 +450,7 @@ gforth.info: gforth.texi
html: gforth.texi
-$(RM) html/*
-mkdir html
cd html; $(TEXI2HTML) -menu -split_node gforth.texi
cd html; $(TEXI2HTML) -menu -split_node ../gforth.texi
doc: gforth.ps html
......
......@@ -499,7 +499,7 @@ ghost unloop ghost ;S 2drop
ghost lit ghost (compile) ghost ! 2drop drop
ghost (does>) ghost noop 2drop
ghost (.") ghost (S") ghost (ABORT") 2drop drop
ghost '
ghost ' drop
\ compile 10may93jaw
......
......@@ -111,17 +111,22 @@ Create hashsearch-map ( -- wordlist-map )
: (initvoc) ( addr -- )
cell+ dup @ 0< IF drop EXIT THEN
insRule @ >r insRule off hash-alloc
3 cells - hashsearch-map over cell+ ! dup
dup 2 cells - @ hashsearch-map <> IF drop EXIT THEN
insRule @ >r insRule off hash-alloc 3 cells - dup
BEGIN @ dup WHILE 2dup swap (reveal REPEAT
2drop r> insRule ! ;
' (initvoc) ' 'initvoc >body !
' (initvoc) IS 'initvoc
\ Hash-Find 01jan93py
addall \ Baum aufbauen
\ Baumsuche ist installiert.
: make-hash
Root hashsearch-map context @ cell+ !
Forth hashsearch-map context @ cell+ !
addall \ Baum aufbauen
;
make-hash \ Baumsuche ist installiert.
: hash-cold ( -- ) Defers 'cold
HashPointer off 0 TO HashTable HashIndex off
......
......@@ -38,8 +38,14 @@ Defer 'initvoc
Variable slowvoc slowvoc off
Forth-wordlist AConstant Forth-wordlist
: wordlist ( -- wid )
here 0 A, Forth-wordlist wordlist-map @ A, voclink @ A, slowvoc @ A,
here 0 A,
slowvoc @
IF [ Forth-wordlist wordlist-map @ ] ALiteral
ELSE Forth-wordlist wordlist-map @ THEN
A, voclink @ A, slowvoc @ A,
dup wordlist-link dup voclink ! 'initvoc ;
: Vocabulary ( -- ) Create wordlist drop DOES> context ! ;
......@@ -87,7 +93,7 @@ Create vocsearch ( -- wordlist-map )
\ Only root 14may93py
wordlist \ the wordlist structure
vocsearch over wordlist-map A! \ patch the map into it
vocsearch over wordlist-map ! \ patch the map into it
Vocabulary Forth
Vocabulary Root
......@@ -96,14 +102,14 @@ Vocabulary Root
\ set initial search order 14may93py
Forth-wordlist @ ' Forth >body A!
Forth-wordlist @ ' Forth >body !
vp off also Root also definitions
Only Forth also definitions
lookup A! \ our dictionary search order becomes the law
lookup ! \ our dictionary search order becomes the law
' Forth >body constant forth-wordlist \ "forth definitions get-current" and "forth-wordlist" should produce the same wid
' Forth >body to Forth-wordlist \ "forth definitions get-current" and "forth-wordlist" should produce the same wid
\ get-order set-order 14may93py
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment