mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-03-23 07:35:00 +00:00
Fix add to hashtable in CREATE DOES>
Signed-off-by: David Schmenk <dschmenk@sbcglobal.net>
This commit is contained in:
parent
75ef74b3ba
commit
1bf6c41be5
@ -314,18 +314,18 @@ word = @d_here, 0, @_pad_
|
||||
char d_allot = "ALLOT"
|
||||
byte = 0
|
||||
word = @d_pad, 0, @_allot_
|
||||
// BRANCH
|
||||
// BRANCH ( not in vocabulary )
|
||||
char d_branch = "(BRANCH)"
|
||||
byte = componly_flag | param_flag | inline_flag
|
||||
word = @d_allot, 0, @_branch_, $50
|
||||
// BRANCH IF 0
|
||||
word = 0, 0, @_branch_, $50
|
||||
// BRANCH IF 0 ( not in vocabulary )
|
||||
char d_0branch = "(0BRANCH)"
|
||||
byte = componly_flag | param_flag | inline_flag
|
||||
word = @d_branch, 0, @_0branch_, $4C
|
||||
word = 0, 0, @_0branch_, $4C
|
||||
// IF
|
||||
char d_if = "IF"
|
||||
byte = imm_flag
|
||||
word = @d_0branch, 0, @_if_
|
||||
word = @d_allot, 0, @_if_
|
||||
// ELSE
|
||||
char d_else = "ELSE"
|
||||
byte = imm_flag
|
||||
@ -350,34 +350,34 @@ word = @d_of, 0, @_endof_
|
||||
char d_endcase = "ENDCASE"
|
||||
byte = imm_flag
|
||||
word = @d_endof, 0, @_endcase_
|
||||
// COMPILED DO
|
||||
// COMPILED DO ( not in vocabulary )
|
||||
char d_dodo = "(DO)"
|
||||
byte = 0
|
||||
word = @d_endcase, 0, @_dodo_
|
||||
word = 0, 0, @_dodo_
|
||||
// DO
|
||||
char d_do = "DO"
|
||||
byte = imm_flag
|
||||
word = @d_dodo, 0, @_do_
|
||||
word = @d_endcase, 0, @_do_
|
||||
// LEAVE
|
||||
char d_leave = "LEAVE"
|
||||
byte = componly_flag
|
||||
word = @d_do, 0, @_leave_
|
||||
// COMPILED LOOP
|
||||
// COMPILED LOOP ( not in vocabulary )
|
||||
char d_doloop = "(DOLOOP)"
|
||||
byte = componly_flag | param_flag
|
||||
word = @d_leave, 0, @_doloop_
|
||||
word = 0, 0, @_doloop_
|
||||
// LOOP
|
||||
char d_loop = "LOOP"
|
||||
byte = imm_flag
|
||||
word = @d_doloop, 0, @_loop_
|
||||
// COMPILED LOOP+
|
||||
word = @d_leave, 0, @_loop_
|
||||
// COMPILED LOOP+ ( not in vocabulary )
|
||||
char d_doplusloop = "(+DOLOOP)"
|
||||
byte = componly_flag | param_flag
|
||||
word = @d_loop, 0, @_doplusloop_
|
||||
word = 0, 0, @_doplusloop_
|
||||
// LOOP
|
||||
char d_plusloop = "+LOOP"
|
||||
byte = imm_flag
|
||||
word = @d_doplusloop, 0, @_plusloop_
|
||||
word = @d_loop, 0, @_plusloop_
|
||||
// I
|
||||
char d_i = "I"
|
||||
byte = componly_flag
|
||||
@ -418,14 +418,14 @@ word = @d_forget, 0, @_create_
|
||||
char d_builds = "<BUILDS"
|
||||
byte = 0
|
||||
word = @d_create, 0, @_create_
|
||||
// RECREATE/DOES COMPILE TIME
|
||||
// RECREATE/DOES COMPILE TIME ( not in vocabulary )
|
||||
char d_createdoes = "(CREATEDOES)"
|
||||
byte = componly_flag
|
||||
word = @d_builds, 0, @_itcdoes_
|
||||
word = 0, 0, @_itcdoes_
|
||||
// DOES
|
||||
char d_does = "DOES>"
|
||||
byte = imm_flag
|
||||
word = @d_createdoes, 0, @_does_
|
||||
word = @d_builds, 0, @_does_
|
||||
// COMMA
|
||||
char d_comma = ","
|
||||
byte = 0
|
||||
@ -719,7 +719,6 @@ end
|
||||
// Find match in dictionary
|
||||
//
|
||||
def hashname(chars, len)#1
|
||||
|
||||
return (len ^ ((^chars << 1) ^ ^(chars + len / 2) << 2)) & HASH_MASK
|
||||
end
|
||||
def addhash(dentry)#0
|
||||
@ -1276,6 +1275,7 @@ def _itcdoes_(a)#0
|
||||
^(_ffa_(vlist)) = itc_flag
|
||||
*(_cfa_(vlist)) = @_dodoes_
|
||||
*(_pfa_(vlist)) = a // Fill in DOES code address
|
||||
addhash(vlist)
|
||||
end
|
||||
def _pbcdoes_(a)#0
|
||||
//
|
||||
@ -1284,6 +1284,7 @@ def _pbcdoes_(a)#0
|
||||
^(_pfa_(vlist) + 6) = $54 // CALL DOES> directly
|
||||
*(_pfa_(vlist) + 7) = a
|
||||
^(_pfa_(vlist) + 9) = $5C // RET
|
||||
addhash(vlist)
|
||||
end
|
||||
def _does_#0
|
||||
if state & comp_itc_flag
|
||||
|
Loading…
x
Reference in New Issue
Block a user