mirror of
https://github.com/dschmenk/PLASMA.git
synced 2024-10-31 16:04:48 +00:00
Don't add new word to vocabulary until after it's done compiling
This commit is contained in:
parent
ca4cebf394
commit
38832640e7
Binary file not shown.
@ -809,6 +809,7 @@ def find(matchchars, matchlen)#1
|
||||
matchchars--
|
||||
while dentry
|
||||
if ^dentry == matchlen
|
||||
|
||||
for i = matchlen downto 1
|
||||
if ^(matchchars + i) <> ^(dentry + i)
|
||||
break
|
||||
@ -1260,7 +1261,7 @@ def newdict#0
|
||||
namechars++
|
||||
namelen--
|
||||
loop
|
||||
^bldptr = 0 // Flags
|
||||
^bldptr = 0 // Flags
|
||||
bldptr++
|
||||
*bldptr = plist; // Link ptr
|
||||
bldptr = bldptr + 2
|
||||
@ -1268,11 +1269,11 @@ def newdict#0
|
||||
bldptr = bldptr + 2
|
||||
*bldptr = bldptr + 2 // Point CFA to PFA
|
||||
heapalloc(bldptr - vlist + 2)
|
||||
addhash(vlist)
|
||||
end
|
||||
def _plasma_(a)#0
|
||||
newdict
|
||||
*(_cfa_(vlist)) = a // PLASMA code address
|
||||
addhash(vlist)
|
||||
end
|
||||
def _var_(a)#0
|
||||
newdict
|
||||
@ -1282,6 +1283,7 @@ def _var_(a)#0
|
||||
pfillw(heapmark + 3) // Poiner to variable in PFA
|
||||
pfillb($5C) // RET
|
||||
pfillw(a) // Variable storage
|
||||
addhash(vlist)
|
||||
end
|
||||
def _const_(a)#0
|
||||
newdict
|
||||
@ -1290,6 +1292,7 @@ def _const_(a)#0
|
||||
pfillb($2C) // CONSTANT WORD
|
||||
pfillw(a)
|
||||
pfillb($5C) // RET
|
||||
addhash(vlist)
|
||||
end
|
||||
def _create_#0
|
||||
newdict
|
||||
@ -1314,6 +1317,7 @@ def _itcdoes_(a)#0
|
||||
^(_ffa_(vlist)) = ^(_ffa_(vlist)) | itc_flag
|
||||
*(_cfa_(vlist)) = @_dodoes_
|
||||
*(_pfa_(vlist)) = a // Fill in DOES code address
|
||||
addhash(vlist)
|
||||
end
|
||||
def _pbcdoes_(a)#0
|
||||
//
|
||||
@ -1321,6 +1325,7 @@ def _pbcdoes_(a)#0
|
||||
//
|
||||
^(_pfa_(vlist) + 6) = $C4 // JUMP DOES> directly
|
||||
*(_pfa_(vlist) + 7) = a
|
||||
addhash(vlist)
|
||||
end
|
||||
def _does_#0
|
||||
if state & comp_itc_flag
|
||||
@ -1352,7 +1357,6 @@ def _colon_#0
|
||||
newdict
|
||||
state = state | comp_mode
|
||||
if state & comp_itc_flag
|
||||
^(_ffa_(vlist)) = itc_flag
|
||||
*(_cfa_(vlist)) = @_docolon_
|
||||
else // comp_pbc_flag
|
||||
pfillb($20) // Hack - get VM entry vector from divmod
|
||||
@ -1374,6 +1378,7 @@ def _exit_#0
|
||||
end
|
||||
def _semi_#0
|
||||
_exit_
|
||||
addhash(vlist)
|
||||
state = state & ~comp_flag
|
||||
end
|
||||
def _forcecomp_#0
|
||||
|
Loading…
Reference in New Issue
Block a user