summary refs log tree commit diff
path: root/transform.e
diff options
context:
space:
mode:
Diffstat (limited to 'transform.e')
-rw-r--r--transform.e20
1 files changed, 20 insertions, 0 deletions
diff --git a/transform.e b/transform.e
index 7f3d9ef..0c39489 100644
--- a/transform.e
+++ b/transform.e
@@ -410,6 +410,24 @@ allocate-transform-state s" transform-state" variable
   ; make-immediate
 
 
+~ TODO there should really be an actual word that this alternate is replacing
+~
+~ (string pointer --)
+: label-keyword-alternate
+  Lcreate
+
+  here @ dup
+  ~ (self execution token, output point)
+  dup 8 + pack64
+  swap :rax mov-reg64-imm64
+  ~ (output point)
+  :rax push-reg64
+  pack-next
+  8 packalign
+  here !
+  ; 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. These are real
 ~ labels; there can be arbitrarily many of them, and they can have forward
@@ -482,6 +500,8 @@ allocate-transform-state s" transform-state" variable
   dup s" ;asm" stringcmp 0 = { swap drop ' L;asm swap } if
   dup s" L@'" stringcmp 0 = { swap drop ' label-L@'-alternate swap } if
   dup s" L!'" stringcmp 0 = { swap drop ' label-L!'-alternate swap } if
+  dup s" keyword" stringcmp 0 = {
+    swap drop ' label-keyword-alternate swap } if
   drop swap
   ~ (name as stack string, 0 or alternate entry pointer, name pointer)