about summary refs log tree commit diff
path: root/compilation/transform.e
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-10-05 02:14:58 -0700
committerIrene Knapp <ireneista@irenes.space>2026-10-05 02:14:58 -0700
commit589e56e26b8e997fa748ccc8fcd5b4bfcd2241a7 (patch)
tree30d366e1d87151726e642b16e9ef0475c1622a76 /compilation/transform.e
parente889b122cee2eb60cd1577c22560c8918b30d749 (diff)
implement x'
this word is like ' and is shorthand to look up an execution token

Force-Push: yes
Change-Id: I672eb0c56f8eadc02a8aca14c2b5c6028a218b1b
Diffstat (limited to 'compilation/transform.e')
-rw-r--r--compilation/transform.e18
1 files changed, 18 insertions, 0 deletions
diff --git a/compilation/transform.e b/compilation/transform.e
index fae9105..39c3bc5 100644
--- a/compilation/transform.e
+++ b/compilation/transform.e
@@ -2251,6 +2251,22 @@ allocate-transformation-state s" transformation-state" variable
   ; make-immediate
 
 
+: log-load-executable-tick-alternate
+  ' log-load-tick-alternate entry-to-execution-token execute
+
+  interpreter-flags @ 0x01 & {
+    s" entry-to-execution-token" log-load-compile-dynamic-word
+  } {
+    swap-transform-variables
+    L@' entry-to-execution-token
+    swap-transform-variables
+
+    offset-to-target-address-space ,
+    ~ : -8 entry-to-execution-token #-- (codeword pointer)
+  } if-else
+  ; make-immediate
+
+
 ~   Because docol requires it, we provide a special mini-version of the label
 ~ system. We only do L@' and L!', because that's all we need. Unlike the
 ~ version of this feature for the label transform, for the log-load transform,
@@ -2502,6 +2518,8 @@ allocate-transformation-state s" transformation-state" variable
     swap drop ' log-load-dot-string-alternate swap } if
   dup ' ' entry-to-name stringcmp 0 = {
     swap drop ' log-load-tick-alternate swap } if
+  dup ' x' entry-to-name stringcmp 0 = {
+    swap drop ' log-load-executable-tick-alternate swap } if
   dup s" L@'" stringcmp 0 = { swap drop ' log-load-L@'-alternate swap } if
   dup s" L!'" stringcmp 0 = { swap drop ' log-load-L!'-alternate swap } if
   dup s" {" stringcmp 0 = {