about summary refs log tree commit diff
path: root/transform.e
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-09-18 15:12:50 -0700
committerIrene Knapp <ireneista@irenes.space>2026-09-18 15:12:50 -0700
commit31509055e11946ecc118ebbc6f72e458b17de918 (patch)
tree88c56d9bb9500526ca1912f38117675d2dfccdbb /transform.e
parentf7710d4de0626fb1ecbdfea2933198a494bfb77b (diff)
magic comments for a bunch more small stuff
especially in the label-transform output

there's more to do, but there are additional magic-comment features that would be handy, so we're checking this in now so that those can be cleanly kept in their own CL

Force-Push: yes
Change-Id: I97a67caddc3f3150c349b7956c1d715db909d1a9
Diffstat (limited to 'transform.e')
-rw-r--r--transform.e24
1 files changed, 16 insertions, 8 deletions
diff --git a/transform.e b/transform.e
index 167089b..13dce31 100644
--- a/transform.e
+++ b/transform.e
@@ -915,9 +915,10 @@ allocate-transformation-state s" transformation-state" variable
   ~ to map it to the target address space. It's stored in the host address
   ~ space to make immediate words work as expected, so the appropriate
   ~ conversion is host-address-space-to-target.
+  ~ : 8     (previous entry pointer)
   latest @ host-address-space-to-target pack64
-  0 pack8
-  0 pack8
+  0 pack8 ~ : -1     (entry flags)
+  0 pack8 ~ : -1     (null reverse-terminator)
   +
   8 packalign
   here @ latest !
@@ -942,6 +943,7 @@ allocate-transformation-state s" transformation-state" variable
   word value@ label-create-alternate dropstring
 
   ~ This looks up "docol" by label.
+  ~ : 8     (docol codeword)
   swap-transform-variables
   L@' docol-codeword-value
   L@' origin
@@ -977,7 +979,7 @@ allocate-transformation-state s" transformation-state" variable
   swap-transform-variables
   L@' exit
   swap-transform-variables
-  offset-to-target-address-space ,
+  offset-to-target-address-space ,     ~ : -8 exit    (codeword pointer)
   ~ : deindent
 
   latest @ dup entry-flags@ 0x80 invert & swap entry-flags!
@@ -1069,7 +1071,7 @@ allocate-transformation-state s" transformation-state" variable
     L@' litstring
     swap-transform-variables
 
-    offset-to-target-address-space ,     ~ litstring
+    offset-to-target-address-space ,   ~ : -8 litstring    (codeword pointer)
     here @ swap packstring 8 packalign here !
   } if
   ; make-immediate
@@ -1083,7 +1085,7 @@ allocate-transformation-state s" transformation-state" variable
     L@' emitstring
     swap-transform-variables
 
-    offset-to-target-address-space ,     ~ emitstring
+    offset-to-target-address-space ,   ~ : -8 emitstring    (codeword pointer)
   } { emitstring } if-else
   ; make-immediate
 
@@ -1444,7 +1446,11 @@ allocate-transformation-state s" transformation-state" variable
       ~ We look up "lit" as a label.
       swap-transform-variables L@' lit swap-transform-variables
       offset-to-target-address-space
-      , ,
+      ~ : 8 lit    (codeword pointer)
+      ,
+      ~ : provide-hex
+      ~ : 8 #    (integer literal)
+      ,
       0 exit
     } if
 
@@ -4100,10 +4106,11 @@ allocate-transformation-state s" transformation-state" variable
           fresh-line
           indentation-depth@ dup indent advance-current-column
 
-          ." ~ String literal with null terminator: "
+          ." ~ "
           0x22 value@ emitstring drop
           dup hex-output-metadata-entry-content @ emitstring
           0x22 value@ emitstring drop
+          ."    (string literal with null)"
 
           newline
           1 is-fresh-line!
@@ -4115,10 +4122,11 @@ allocate-transformation-state s" transformation-state" variable
           fresh-line
           indentation-depth@ dup indent advance-current-column
 
-          ." ~ String literal with no terminator: "
+          ." ~ "
           0x22 value@ emitstring drop
           dup hex-output-metadata-entry-content @ emitstring
           0x22 value@ emitstring drop
+          ."     (raw string literal)"
 
           newline
           1 is-fresh-line!