diff options
Diffstat (limited to 'transform.e')
| -rw-r--r-- | transform.e | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/transform.e b/transform.e index 581cb0b..723484c 100644 --- a/transform.e +++ b/transform.e @@ -1466,6 +1466,7 @@ allocate-transform-state s" transform-state" variable swap-transform-variables ~ As usual, we do these in reverse. L@' log-load-comma + L@' lit L@' log-load-comma L@' log-load-find-execution-token L@' litstring @@ -1476,6 +1477,7 @@ allocate-transform-state s" transform-state" variable here @ s" lit" packstring 8 packalign here ! offset-to-target-address-space , ~ log-load-find-execution-token offset-to-target-address-space , ~ log-load-comma + offset-to-target-address-space , ~ lit swap , ~ the value offset-to-target-address-space , ~ log-load-comma @@ -1587,16 +1589,26 @@ allocate-transform-state s" transform-state" variable ~ below. It is likely to be extremely useful to read and understand ";asm" in ~ interpret.e before attempting to understand "log-load;asm". : log-load-semicolon-assembly-alternate - ~ TODO this is just unimplemented, which seems bad :D - ~ here @ pack-next 8 packalign here ! - ~ latest @ dup unhide-entry entry-to-execution-token - ~ ~ The codeword needs to be transformed to the target address space. - ~ dup 8 + host-address-space-to-target - ~ swap ! - - ~ ~ Since [ is an immediate word, we have to go to extra trouble to compile - ~ ~ it as part of ;asm. - ~ [ ' [ entry-to-execution-token , ] + ~ We generate code that statically invokes log-load-semicolon-assembly, + ~ which does all the actual work. There's quite a few steps, so it makes + ~ sense to have a word that bundles them up. + log-load-roll-log-address + + swap-transform-variables + ~ As usual, we do these in reverse. + L@' log-load-semicolon-assembly + swap-transform-variables + + ~ The stack delta of this call is 0. + offset-to-target-address-space , ~ log-load-semicolon-assembly + + log-load-unroll-log-address + + ~ This is where we would unhide the entry, but again, we don't do that. + + ~ Since [ is an immediate word, we have to go to extra trouble to compile + ~ it as part of ;. + [ ' [ entry-to-execution-token , ] ; make-immediate |