summary refs log tree commit diff
path: root/execution.e
diff options
context:
space:
mode:
Diffstat (limited to 'execution.e')
-rw-r--r--execution.e21
1 files changed, 17 insertions, 4 deletions
diff --git a/execution.e b/execution.e
index bd27f7e..6af9e2c 100644
--- a/execution.e
+++ b/execution.e
@@ -310,7 +310,7 @@
 ~
 ~ (output memory start, current output point
 ~  -- output memory start, current output point)
-: cold-start
+: output-cold-start
   current-offset L' cold-start set-label
   cld                                      ~ clear the DF flag
 
@@ -466,6 +466,7 @@
   L@' warm-start L@' origin + :rsi mov-reg64-imm64
   pack-next ;
 
+
 ~ Routine warm-start
 ~ ~~~~~~~~~~~~~~~~~~
 ~
@@ -473,15 +474,23 @@
 ~ been initialized, and the structure of this routine is an array of codeword
 ~ pointers. It was directly jumped to from cold-start. There's nowhere to
 ~ return to, so it needs to never return.
-: warm-start
+~
+~ (output buffer start, output point, input string pointer
+~  -- output buffer start, output point)
+: output-warm-start
   ~   While it's not actually a requirement that codeword pointers be
   ~ word-aligned, it's highly likely that it helps performance. (Whether it
   ~ does is up to Intel's microcode.)
+  3unroll
   8 packalign
   current-offset L!' warm-start
+  3roll
+
+  ~ log-load-transform
+  drop
 
   ~ TODO this is tied to the specific example in evoke
-  L@' happy-path L@' origin + pack64
+  ~ L@' happy-path L@' origin + pack64
 
   ~   Before handing off to us, cold-start pushed a single value onto the
   ~ stack, a pointer to the beginning of the heap. Now, we load our entire
@@ -607,11 +616,15 @@
 ~ We pop the control stack, and then, since this is threaded execution, we
 ~ do the next thing the caller wants to do, by inlining "next".
 ~
+~   This word would work fine with the label transformation, so we could put
+~ it in core.e, but we choose to define it here because it's easier to
+~ understand when it's close to the rest of the execution stuff.
+~
 ~ (previous entry address, output point
 ~  -- new entry address, output point)
 : output-exit
   s" exit" output-create
-  L!' exit
+  current-offset L!' exit
   :rsi pack-popcontrol
   pack-next
   ;