Working on faster (execute)
parent
2630c4a95f
commit
27c84e89fe
|
@ -137,6 +137,9 @@ SYMBOL: jit-2dip-word
|
|||
SYMBOL: jit-2dip
|
||||
SYMBOL: jit-3dip-word
|
||||
SYMBOL: jit-3dip
|
||||
SYMBOL: jit-execute-word
|
||||
SYMBOL: jit-execute-jump
|
||||
SYMBOL: jit-execute-call
|
||||
SYMBOL: jit-epilog
|
||||
SYMBOL: jit-return
|
||||
SYMBOL: jit-profiling
|
||||
|
@ -173,6 +176,9 @@ SYMBOL: undefined-quot
|
|||
{ jit-2dip 47 }
|
||||
{ jit-3dip-word 48 }
|
||||
{ jit-3dip 49 }
|
||||
{ jit-execute-word 50 }
|
||||
{ jit-execute-jump 51 }
|
||||
{ jit-execute-call 52 }
|
||||
{ undefined-quot 60 }
|
||||
} ; inline
|
||||
|
||||
|
@ -486,6 +492,7 @@ M: quotation '
|
|||
\ dip jit-dip-word set
|
||||
\ 2dip jit-2dip-word set
|
||||
\ 3dip jit-3dip-word set
|
||||
\ (execute) jit-execute-word set
|
||||
[ undefined ] undefined-quot set
|
||||
{
|
||||
jit-code-format
|
||||
|
@ -506,6 +513,9 @@ M: quotation '
|
|||
jit-2dip
|
||||
jit-3dip-word
|
||||
jit-3dip
|
||||
jit-execute-word
|
||||
jit-execute-jump
|
||||
jit-execute-call
|
||||
jit-epilog
|
||||
jit-return
|
||||
jit-profiling
|
||||
|
|
|
@ -151,6 +151,18 @@ big-endian off
|
|||
jit-3r>
|
||||
] rc-relative rt-xt 23 rex-length 8 * + jit-3dip jit-define
|
||||
|
||||
: prepare-(execute) ( -- operand )
|
||||
! load from stack
|
||||
temp0 ds-reg [] MOV
|
||||
! pop stack
|
||||
ds-reg bootstrap-cell SUB
|
||||
! execute word
|
||||
temp0 word-xt-offset [+] ;
|
||||
|
||||
[ prepare-(execute) JMP ] f f f jit-execute-jump jit-define
|
||||
|
||||
[ prepare-(execute) CALL ] f f f jit-execute-call jit-define
|
||||
|
||||
[
|
||||
! unwind stack frame
|
||||
stack-reg stack-frame-size bootstrap-cell - ADD
|
||||
|
@ -170,15 +182,6 @@ big-endian off
|
|||
arg quot-xt-offset [+] JMP
|
||||
] f f f \ (call) define-sub-primitive
|
||||
|
||||
[
|
||||
! load from stack
|
||||
temp0 ds-reg [] MOV
|
||||
! pop stack
|
||||
ds-reg bootstrap-cell SUB
|
||||
! execute word
|
||||
temp0 word-xt-offset [+] JMP
|
||||
] f f f \ (execute) define-sub-primitive
|
||||
|
||||
! Objects
|
||||
[
|
||||
! load from stack
|
||||
|
|
Loading…
Reference in New Issue