mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-04-09 01:37:17 +00:00
Simplify DOES> with new JUMP bytecode
This commit is contained in:
parent
a067c3e804
commit
9e42e3d640
Binary file not shown.
@ -1289,17 +1289,16 @@ def _create_#0
|
||||
pfillb(^(@divmod)) // Hack - get VM entry vector from divmod
|
||||
pfillw(*(@divmod + 1))
|
||||
pfillb($2C) // CONSTANT WORD
|
||||
pfillw(heapmark + 6) // Pointer to rest of PFA
|
||||
pfillw(heapmark + 5) // Pointer to rest of PFA
|
||||
pfillb($5C) // RET
|
||||
// Reserve following in case of DOES>
|
||||
pfillw(0) // reserved word for DOES>
|
||||
pfillb(0) // Reserved byte for DOES>
|
||||
//
|
||||
// 10 bytes after PFA, data follows...
|
||||
// 9 bytes after PFA, data follows...
|
||||
//
|
||||
end
|
||||
def _dodoes_#0
|
||||
(@push)(W + 12)#0 // Pointer to PFA storage
|
||||
(@push)(W + 11)#0 // Pointer to PFA storage
|
||||
execwords(*(W + 2)) // Exec PFA ptr
|
||||
end
|
||||
def _itcdoes_(a)#0
|
||||
@ -1314,9 +1313,8 @@ def _pbcdoes_(a)#0
|
||||
//
|
||||
// Rewrite the end of CREATE
|
||||
//
|
||||
^(_pfa_(vlist) + 6) = $54 // CALL DOES> directly
|
||||
^(_pfa_(vlist) + 6) = $C4 // JUMP DOES> directly
|
||||
*(_pfa_(vlist) + 7) = a
|
||||
^(_pfa_(vlist) + 9) = $5C // RET
|
||||
end
|
||||
def _does_#0
|
||||
if state & comp_itc_flag
|
||||
@ -1332,8 +1330,6 @@ def _does_#0
|
||||
pfillw(@_pbcdoes_) // Fills in code address reserved in _compbuilds_
|
||||
pfillb($5C) // RET
|
||||
// End of BUILDS, beginning of DOES> code
|
||||
pfillb(^(@divmod)) // Hack - get VM entry vector from divmod
|
||||
pfillw(*(@divmod + 1))
|
||||
fin
|
||||
end
|
||||
def _literal_(a)#0
|
||||
|
Loading…
x
Reference in New Issue
Block a user