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--
|
matchchars--
|
||||||
while dentry
|
while dentry
|
||||||
if ^dentry == matchlen
|
if ^dentry == matchlen
|
||||||
|
|
||||||
for i = matchlen downto 1
|
for i = matchlen downto 1
|
||||||
if ^(matchchars + i) <> ^(dentry + i)
|
if ^(matchchars + i) <> ^(dentry + i)
|
||||||
break
|
break
|
||||||
@ -1260,7 +1261,7 @@ def newdict#0
|
|||||||
namechars++
|
namechars++
|
||||||
namelen--
|
namelen--
|
||||||
loop
|
loop
|
||||||
^bldptr = 0 // Flags
|
^bldptr = 0 // Flags
|
||||||
bldptr++
|
bldptr++
|
||||||
*bldptr = plist; // Link ptr
|
*bldptr = plist; // Link ptr
|
||||||
bldptr = bldptr + 2
|
bldptr = bldptr + 2
|
||||||
@ -1268,11 +1269,11 @@ def newdict#0
|
|||||||
bldptr = bldptr + 2
|
bldptr = bldptr + 2
|
||||||
*bldptr = bldptr + 2 // Point CFA to PFA
|
*bldptr = bldptr + 2 // Point CFA to PFA
|
||||||
heapalloc(bldptr - vlist + 2)
|
heapalloc(bldptr - vlist + 2)
|
||||||
addhash(vlist)
|
|
||||||
end
|
end
|
||||||
def _plasma_(a)#0
|
def _plasma_(a)#0
|
||||||
newdict
|
newdict
|
||||||
*(_cfa_(vlist)) = a // PLASMA code address
|
*(_cfa_(vlist)) = a // PLASMA code address
|
||||||
|
addhash(vlist)
|
||||||
end
|
end
|
||||||
def _var_(a)#0
|
def _var_(a)#0
|
||||||
newdict
|
newdict
|
||||||
@ -1282,6 +1283,7 @@ def _var_(a)#0
|
|||||||
pfillw(heapmark + 3) // Poiner to variable in PFA
|
pfillw(heapmark + 3) // Poiner to variable in PFA
|
||||||
pfillb($5C) // RET
|
pfillb($5C) // RET
|
||||||
pfillw(a) // Variable storage
|
pfillw(a) // Variable storage
|
||||||
|
addhash(vlist)
|
||||||
end
|
end
|
||||||
def _const_(a)#0
|
def _const_(a)#0
|
||||||
newdict
|
newdict
|
||||||
@ -1290,6 +1292,7 @@ def _const_(a)#0
|
|||||||
pfillb($2C) // CONSTANT WORD
|
pfillb($2C) // CONSTANT WORD
|
||||||
pfillw(a)
|
pfillw(a)
|
||||||
pfillb($5C) // RET
|
pfillb($5C) // RET
|
||||||
|
addhash(vlist)
|
||||||
end
|
end
|
||||||
def _create_#0
|
def _create_#0
|
||||||
newdict
|
newdict
|
||||||
@ -1314,6 +1317,7 @@ def _itcdoes_(a)#0
|
|||||||
^(_ffa_(vlist)) = ^(_ffa_(vlist)) | itc_flag
|
^(_ffa_(vlist)) = ^(_ffa_(vlist)) | itc_flag
|
||||||
*(_cfa_(vlist)) = @_dodoes_
|
*(_cfa_(vlist)) = @_dodoes_
|
||||||
*(_pfa_(vlist)) = a // Fill in DOES code address
|
*(_pfa_(vlist)) = a // Fill in DOES code address
|
||||||
|
addhash(vlist)
|
||||||
end
|
end
|
||||||
def _pbcdoes_(a)#0
|
def _pbcdoes_(a)#0
|
||||||
//
|
//
|
||||||
@ -1321,6 +1325,7 @@ def _pbcdoes_(a)#0
|
|||||||
//
|
//
|
||||||
^(_pfa_(vlist) + 6) = $C4 // JUMP DOES> directly
|
^(_pfa_(vlist) + 6) = $C4 // JUMP DOES> directly
|
||||||
*(_pfa_(vlist) + 7) = a
|
*(_pfa_(vlist) + 7) = a
|
||||||
|
addhash(vlist)
|
||||||
end
|
end
|
||||||
def _does_#0
|
def _does_#0
|
||||||
if state & comp_itc_flag
|
if state & comp_itc_flag
|
||||||
@ -1352,7 +1357,6 @@ def _colon_#0
|
|||||||
newdict
|
newdict
|
||||||
state = state | comp_mode
|
state = state | comp_mode
|
||||||
if state & comp_itc_flag
|
if state & comp_itc_flag
|
||||||
^(_ffa_(vlist)) = itc_flag
|
|
||||||
*(_cfa_(vlist)) = @_docolon_
|
*(_cfa_(vlist)) = @_docolon_
|
||||||
else // comp_pbc_flag
|
else // comp_pbc_flag
|
||||||
pfillb($20) // Hack - get VM entry vector from divmod
|
pfillb($20) // Hack - get VM entry vector from divmod
|
||||||
@ -1374,6 +1378,7 @@ def _exit_#0
|
|||||||
end
|
end
|
||||||
def _semi_#0
|
def _semi_#0
|
||||||
_exit_
|
_exit_
|
||||||
|
addhash(vlist)
|
||||||
state = state & ~comp_flag
|
state = state & ~comp_flag
|
||||||
end
|
end
|
||||||
def _forcecomp_#0
|
def _forcecomp_#0
|
||||||
|
Loading…
Reference in New Issue
Block a user