diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-09-10 09:42:31 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-09-10 09:44:29 -0700 |
| commit | 544b79feb709b32590263280254a3b723237dc00 (patch) | |
| tree | b4ff839c7cf96b6579b6ab4ee1ebb42151b8c3e9 | |
| parent | 2eb637e63a9e5d8f87391beb4af6019963a7c36c (diff) | |
rename substring entries to subitem entries
also the -entry-string field is renamed to -entry-content, since it's an integer a lot of the time much clearer. hopefully. certainly more consistent. Force-Push: yes Change-Id: I82315a135422ef2fae5dd3d6e8ea025ccfa97cfd
| -rw-r--r-- | transform.e | 277 |
1 files changed, 139 insertions, 138 deletions
diff --git a/transform.e b/transform.e index b8afb1d..b466b58 100644 --- a/transform.e +++ b/transform.e @@ -2973,9 +2973,9 @@ allocate-transformation-state s" transformation-state" variable ~ before we can talk about how they work, but notice that one of them has the ~ space-separated word # inside it, while the others are commands whose names ~ start with provide-. Any line or suffix comment can have # in it, which will -~ consume a substring from somewhere else, replacing the # like it's a -~ template. The various provide- commands are the origins of those substrings. -~ Which # goes with which provide- command? Thereby hangs a tale. +~ consume a subitem from somewhere else, replacing the # like it's a template. +~ The various provide- commands are the origins of those subitems. Which # +~ goes with which provide- command? Thereby hangs a tale. ~ ~ So. Let's pretend for the moment that we've finished talking about things ~ that happen when magic comments execute. We haven't, quite, but to finish it @@ -3075,17 +3075,17 @@ allocate-transformation-state s" transformation-state" variable ~ left to right. ~ ~ Where do those items come from? Well, there's a separate stack, the -~ substring entry stack, which is kept in the hex output metadata header. The -~ substring entry stack has an extremely small, fixed maximum depth. The -~ maximum depth is deliberately small, so that any leaks onto it will be -~ detected somewhere close to their root causes, for ease of diagnosis. -~ Unusually for Evocation, if you underflow or overflow it, you'll get a -~ friendly error message rather than a segfault - how nice! Of course, the -~ error message will appear in the middle of your regular output and corrupt -~ it, but you can't have everything... +~ subitem entry stack, which is kept in the hex output metadata header. The +~ subitem entry stack has an extremely small, fixed maximum depth. The maximum +~ depth is deliberately small, so that any leaks onto it will be detected +~ somewhere close to their root causes, for ease of diagnosis. Unusually for +~ Evocation, if you underflow or overflow it, you'll get a friendly error +~ message rather than a segfault - how nice! Of course, the error message will +~ appear in the middle of your regular output and corrupt it, but you can't +~ have everything... ~ ~ Each time a comment template is being filled and encounters a # -~ placeholder, an item is popped off the substring entry stack and formatted +~ placeholder, an item is popped off the subitem entry stack and formatted ~ according to what type of entry it is. It's called an "entry stack" for a ~ reason: it's a stack of pointers to metadata entries, whose backing store ~ is in this very same entry array that we're executing. So, all the various @@ -3102,7 +3102,7 @@ allocate-transformation-state s" transformation-state" variable ~ likely. If you're reading all this, it's probably to touch that code, so ~ please keep those consequences in mind. ~ -~ How do entry pointers get pushed onto the substring entry stack, and where +~ How do entry pointers get pushed onto the subitem entry stack, and where ~ do the values inside them come from? Okay, now this is the payoff, the part ~ where you need to understand all these phases at once. Cast your mind all ~ the way back to the magic-comment execution, and take another look at the @@ -3113,12 +3113,12 @@ allocate-transformation-state s" transformation-state" variable ~ ~ The provide-* commands are deeper than that. They peek at the top item on ~ the stack OF THE COMPILER, the code being transformed. The -decimal and -~ -hex* variants create a corresponding -entry-type-push-substring- metadata +~ -hex* variants create a corresponding -entry-type-push-subitem- metadata ~ entry of the matching type, and copy the numeric value into it. The -keyword ~ variant expects to find a keyword (a word which, when executed, pushes its ~ own execution token onto the stack); the command extracts the name of the ~ keyword from the dictionary entry header, and saves a pointer to the name in -~ a push-substring-string metadata entry. +~ a push-subitem-string metadata entry. ~ ~ Admit it, you thought writing out "metadata entry" so many times instead ~ of just "entry" was silly because there was no other kind of entry in @@ -3128,30 +3128,30 @@ allocate-transformation-state s" transformation-state" variable ~ Anyway, notice that when the various provide-* commands execute, all ~ they're doing is capturing values and creating metadata entries. Like all ~ metadata entries, these are attached to the latest output point as of the -~ time the magic comment executes. In particular, the substring entry stack +~ time the magic comment executes. In particular, the subitem entry stack ~ isn't touched until all the way at the end, in the formatting phase. It's ~ only when the formatting reaches the address the entry is attached to that ~ the entry is executed, which has the effect of pushing a pointer to the -~ entry onto the substring entry stack. +~ entry onto the subitem entry stack. ~ ~ It's been said already, but just to bring it all full circle, the life ~ cycle of a push-* entry ends later in the formatting phase, when a comment -~ entry pops it off the substring entry stack and pretty-prints the value it +~ entry pops it off the subitem entry stack and pretty-prints the value it ~ holds. ~ ~ With all this context, it likely doesn't need much explanation, but the -~ drop-subitem command will create an -entry-type-drop-substring entry. When -~ this entry is executed, it will discard an item from the substring entry -~ stack. Similarly, swap-subitems creates an -entry-type-swap-substrings, -~ which swaps the top two items, and roll-subitems creates an -~ -entry-type-roll-substrings, which rolls them, or unrolls them with a -~ negative parameter. +~ drop-subitem command will create an -entry-type-drop-subitem entry. When +~ this entry is executed, it will discard an item from the subitem entry +~ stack. Similarly, swap-subitems creates an -entry-type-swap-subitems, which +~ swaps the top two items, and roll-subitems creates an +~ -entry-type-roll-subitems, which rolls them, or unrolls them with a negative +~ parameter. ~ ~ One more thing: The order in which provide-* commands execute will most ~ likely match the order in which the corresponding bytes are output. This may ~ not always match the order in which the comment template wants to ~ pretty-print them. Therefore, anywhere you can use # you can also use #swap -~ to manipulate the substring-entry stack. The #swap command must be its own +~ to manipulate the subitem-entry stack. The #swap command must be its own ~ separate space-delimited word within a comment body; the space immediately ~ following it is stripped from the output. ~ @@ -3185,15 +3185,15 @@ allocate-transformation-state s" transformation-state" variable : hex-output-metadata-is-fresh-line 5 8 * + ; : hex-output-metadata-indentation-depth 6 8 * + ; : hex-output-metadata-current-column 7 8 * + ; -: hex-output-metadata-substring-entry-stack-depth 8 8 * + ; -: hex-output-metadata-substring-entry-stack-zero 9 8 * + ; -: hex-output-metadata-substring-entry-stack-capacity 8 ; +: hex-output-metadata-subitem-entry-stack-depth 8 8 * + ; +: hex-output-metadata-subitem-entry-stack-zero 9 8 * + ; +: hex-output-metadata-subitem-entry-stack-capacity 8 ; : hex-output-metadata-first-entry - 9 hex-output-metadata-substring-entry-stack-capacity + 8 * + ; + 9 hex-output-metadata-subitem-entry-stack-capacity + 8 * + ; : hex-output-metadata-entry-data-start ; : hex-output-metadata-entry-data-length 8 + ; : hex-output-metadata-entry-type 2 8 * + ; -: hex-output-metadata-entry-string 3 8 * + ; +: hex-output-metadata-entry-content 3 8 * + ; : hex-output-metadata-next-entry 4 8 * + ; : hex-output-metadata-previous-entry 4 8 * - ; : hex-output-metadata-entry-type-line-comment 0 ; @@ -3204,16 +3204,16 @@ allocate-transformation-state s" transformation-state" variable : hex-output-metadata-entry-type-string-literal 5 ; : hex-output-metadata-entry-type-raw-string-literal 6 ; : hex-output-metadata-entry-type-alignment 7 ; -: hex-output-metadata-entry-type-push-substring-decimal 8 ; -: hex-output-metadata-entry-type-push-substring-hex 9 ; -: hex-output-metadata-entry-type-push-substring-hex8 10 ; -: hex-output-metadata-entry-type-push-substring-hex16 11 ; -: hex-output-metadata-entry-type-push-substring-hex32 12 ; -: hex-output-metadata-entry-type-push-substring-hex64 13 ; -: hex-output-metadata-entry-type-push-substring-string 14 ; -: hex-output-metadata-entry-type-drop-substring 15 ; -: hex-output-metadata-entry-type-swap-substrings 16 ; -: hex-output-metadata-entry-type-roll-substrings 17 ; +: hex-output-metadata-entry-type-push-subitem-decimal 8 ; +: hex-output-metadata-entry-type-push-subitem-hex 9 ; +: hex-output-metadata-entry-type-push-subitem-hex8 10 ; +: hex-output-metadata-entry-type-push-subitem-hex16 11 ; +: hex-output-metadata-entry-type-push-subitem-hex32 12 ; +: hex-output-metadata-entry-type-push-subitem-hex64 13 ; +: hex-output-metadata-entry-type-push-subitem-string 14 ; +: hex-output-metadata-entry-type-drop-subitem 15 ; +: hex-output-metadata-entry-type-swap-subitems 16 ; +: hex-output-metadata-entry-type-roll-subitems 17 ; ~ Initialize the contents of the output metadata to all zeroes. This is ~ called from hex-transform at its top level, at the very start, to make sure @@ -3231,7 +3231,7 @@ allocate-transformation-state s" transformation-state" variable dup hex-output-metadata-is-fresh-line 1 swap ! dup hex-output-metadata-indentation-depth 0 swap ! dup hex-output-metadata-current-column 0 swap ! - dup hex-output-metadata-substring-entry-stack-depth 0 swap ! + dup hex-output-metadata-subitem-entry-stack-depth 0 swap ! dup hex-output-metadata-first-entry 0 swap ! ; ~ (pointer -- boolean) @@ -3260,17 +3260,17 @@ allocate-transformation-state s" transformation-state" variable swap hex-output-metadata-entry-type-suffix-comment = || ; -: is-push-substring-entry - ~ Notably, the substring swap, drop, and roll entry types are not - ~ push-substring entries. +: is-push-subitem-entry + ~ Notably, the subitem swap, drop, and roll entry types are not + ~ push-subitem entries. hex-output-metadata-entry-type @ - dup hex-output-metadata-entry-type-push-substring-decimal = swap - dup hex-output-metadata-entry-type-push-substring-hex = 3roll || swap - dup hex-output-metadata-entry-type-push-substring-hex8 = 3roll || swap - dup hex-output-metadata-entry-type-push-substring-hex16 = 3roll || swap - dup hex-output-metadata-entry-type-push-substring-hex32 = 3roll || swap - dup hex-output-metadata-entry-type-push-substring-hex64 = 3roll || swap - hex-output-metadata-entry-type-push-substring-string = || ; + dup hex-output-metadata-entry-type-push-subitem-decimal = swap + dup hex-output-metadata-entry-type-push-subitem-hex = 3roll || swap + dup hex-output-metadata-entry-type-push-subitem-hex8 = 3roll || swap + dup hex-output-metadata-entry-type-push-subitem-hex16 = 3roll || swap + dup hex-output-metadata-entry-type-push-subitem-hex32 = 3roll || swap + dup hex-output-metadata-entry-type-push-subitem-hex64 = 3roll || swap + hex-output-metadata-entry-type-push-subitem-string = || ; : is-fresh-line@ transformation-state transformation-state-output-metadata @ @@ -3300,37 +3300,37 @@ allocate-transformation-state s" transformation-state" variable : advance-current-column current-column@ + current-column! ; -: describe-substring-entry-stack +: describe-subitem-entry-stack transformation-state transformation-state-output-metadata @ ." depth " - dup hex-output-metadata-substring-entry-stack-depth @ .hex64 newline + dup hex-output-metadata-subitem-entry-stack-depth @ .hex64 newline ." capacity " - hex-output-metadata-substring-entry-stack-capacity .hex64 newline - hex-output-metadata-substring-entry-stack-zero - hex-output-metadata-substring-entry-stack-capacity 8 * hexdump-from ; + hex-output-metadata-subitem-entry-stack-capacity .hex64 newline + hex-output-metadata-subitem-entry-stack-zero + hex-output-metadata-subitem-entry-stack-capacity 8 * hexdump-from ; -: substring-entry-stack-depth@ +: subitem-entry-stack-depth@ transformation-state transformation-state-output-metadata @ - hex-output-metadata-substring-entry-stack-depth @ ; + hex-output-metadata-subitem-entry-stack-depth @ ; -: substring-entry-stack-depth! +: subitem-entry-stack-depth! transformation-state transformation-state-output-metadata @ - hex-output-metadata-substring-entry-stack-depth ! ; + hex-output-metadata-subitem-entry-stack-depth ! ; -: is-substring-entry-stack-empty - substring-entry-stack-depth@ 0 = ; +: is-subitem-entry-stack-empty + subitem-entry-stack-depth@ 0 = ; -: is-substring-entry-stack-full - substring-entry-stack-depth@ - hex-output-metadata-substring-entry-stack-capacity = ; +: is-subitem-entry-stack-full + subitem-entry-stack-depth@ + hex-output-metadata-subitem-entry-stack-capacity = ; -: push-substring-entry-stack - is-substring-entry-stack-full not { +: push-subitem-entry-stack + is-subitem-entry-stack-full not { transformation-state transformation-state-output-metadata @ - hex-output-metadata-substring-entry-stack-zero - substring-entry-stack-depth@ 8 * + ! + hex-output-metadata-subitem-entry-stack-zero + subitem-entry-stack-depth@ 8 * + ! - substring-entry-stack-depth@ 1+ substring-entry-stack-depth! + subitem-entry-stack-depth@ 1+ subitem-entry-stack-depth! } { ~ We still consume the value, so that our caller doesn't crash. drop @@ -3338,13 +3338,13 @@ allocate-transformation-state s" transformation-state" variable ." Substring entry stack overflow." newline } if-else ; -: pop-substring-entry-stack - is-substring-entry-stack-empty not { - substring-entry-stack-depth@ 1- substring-entry-stack-depth! +: pop-subitem-entry-stack + is-subitem-entry-stack-empty not { + subitem-entry-stack-depth@ 1- subitem-entry-stack-depth! transformation-state transformation-state-output-metadata @ - hex-output-metadata-substring-entry-stack-zero - substring-entry-stack-depth@ 8 * + @ + hex-output-metadata-subitem-entry-stack-zero + subitem-entry-stack-depth@ 8 * + @ } { ." Substring entry stack underflow." newline @@ -3354,7 +3354,7 @@ allocate-transformation-state s" transformation-state" variable ~ (data start, data length, entry type, string pointer, entry pointer --) : hex-output-metadata-entry! - dup hex-output-metadata-entry-string 3roll swap ! + dup hex-output-metadata-entry-content 3roll swap ! dup hex-output-metadata-entry-type 3roll swap ! dup hex-output-metadata-entry-data-length 3roll swap ! dup hex-output-metadata-entry-data-start 3roll swap ! @@ -3786,7 +3786,7 @@ allocate-transformation-state s" transformation-state" variable ~ (input point, first non-word character or 0, word pointer) drop - pop-substring-entry-stack + pop-subitem-entry-stack ~ If we underflowed the stack, we got zero back, so make sure not to ~ crash. A crash here would be a pain to debug because it would be @@ -3794,43 +3794,43 @@ allocate-transformation-state s" transformation-state" variable ~ complex system. dup { dup hex-output-metadata-entry-type @ - hex-output-metadata-entry-type-push-substring-decimal = { - dup hex-output-metadata-entry-string @ . + hex-output-metadata-entry-type-push-subitem-decimal = { + dup hex-output-metadata-entry-content @ . } if dup hex-output-metadata-entry-type @ - hex-output-metadata-entry-type-push-substring-hex = { + hex-output-metadata-entry-type-push-subitem-hex = { ." 0x" - dup hex-output-metadata-entry-string @ .hex + dup hex-output-metadata-entry-content @ .hex } if dup hex-output-metadata-entry-type @ - hex-output-metadata-entry-type-push-substring-hex8 = { + hex-output-metadata-entry-type-push-subitem-hex8 = { ." 0x" - dup hex-output-metadata-entry-string @ .hex8 + dup hex-output-metadata-entry-content @ .hex8 } if dup hex-output-metadata-entry-type @ - hex-output-metadata-entry-type-push-substring-hex16 = { + hex-output-metadata-entry-type-push-subitem-hex16 = { ." 0x" - dup hex-output-metadata-entry-string @ .hex16 + dup hex-output-metadata-entry-content @ .hex16 } if dup hex-output-metadata-entry-type @ - hex-output-metadata-entry-type-push-substring-hex32 = { + hex-output-metadata-entry-type-push-subitem-hex32 = { ." 0x" - dup hex-output-metadata-entry-string @ .hex32 + dup hex-output-metadata-entry-content @ .hex32 } if dup hex-output-metadata-entry-type @ - hex-output-metadata-entry-type-push-substring-hex64 = { + hex-output-metadata-entry-type-push-subitem-hex64 = { ." 0x" - dup hex-output-metadata-entry-string @ .hex64 + dup hex-output-metadata-entry-content @ .hex64 } if dup hex-output-metadata-entry-type @ - hex-output-metadata-entry-type-push-substring-string = { - dup hex-output-metadata-entry-string @ emitstring + hex-output-metadata-entry-type-push-subitem-string = { + dup hex-output-metadata-entry-content @ emitstring } if } if @@ -3847,11 +3847,11 @@ allocate-transformation-state s" transformation-state" variable ~ discard the zeroes instead of pushing them. As above, the ~ reasoning is that it's easier to diagnose what's wrong with this ~ subsystem when it runs to completion. - pop-substring-entry-stack - pop-substring-entry-stack + pop-subitem-entry-stack + pop-subitem-entry-stack swap - dup { push-substring-entry-stack } { drop } if-else - dup { push-substring-entry-stack } { drop } if-else + dup { push-subitem-entry-stack } { drop } if-else + dup { push-subitem-entry-stack } { drop } if-else ~ We want to ignore the next character, so that this word can be ~ used without creating spurious spaces in the output. @@ -3920,7 +3920,7 @@ allocate-transformation-state s" transformation-state" variable indentation-depth@ dup indent advance-current-column ." ~ " - dup hex-output-metadata-entry-string @ hex-emit-template-string + dup hex-output-metadata-entry-content @ hex-emit-template-string newline 1 is-fresh-line! @@ -3932,7 +3932,7 @@ allocate-transformation-state s" transformation-state" variable 40 current-column@ - 1 max indent ." ~ " - dup hex-output-metadata-entry-string @ hex-emit-template-string + dup hex-output-metadata-entry-content @ hex-emit-template-string newline 1 is-fresh-line! @@ -3956,7 +3956,7 @@ allocate-transformation-state s" transformation-state" variable dup hex-output-metadata-entry-type @ hex-output-metadata-entry-type-indent = { - dup hex-output-metadata-entry-string @ + dup hex-output-metadata-entry-content @ indentation-depth@ + indentation-depth! } if @@ -3967,7 +3967,7 @@ allocate-transformation-state s" transformation-state" variable ." ~ String literal with null terminator: " 0x22 value@ emitstring drop - dup hex-output-metadata-entry-string @ emitstring + dup hex-output-metadata-entry-content @ emitstring 0x22 value@ emitstring drop newline @@ -3982,7 +3982,7 @@ allocate-transformation-state s" transformation-state" variable ." ~ String literal with no terminator: " 0x22 value@ emitstring drop - dup hex-output-metadata-entry-string @ emitstring + dup hex-output-metadata-entry-content @ emitstring 0x22 value@ emitstring drop newline @@ -3996,37 +3996,38 @@ allocate-transformation-state s" transformation-state" variable indentation-depth@ dup indent advance-current-column ." ~ Alignment padding to width " - dup hex-output-metadata-entry-string @ . + dup hex-output-metadata-entry-content @ . newline 1 is-fresh-line! 0 current-column! } if - dup is-push-substring-entry { - dup push-substring-entry-stack + dup is-push-subitem-entry { + dup push-subitem-entry-stack } if dup hex-output-metadata-entry-type @ - hex-output-metadata-entry-type-drop-substring = { - pop-substring-entry-stack drop + hex-output-metadata-entry-type-drop-subitem = { + pop-subitem-entry-stack drop } if dup hex-output-metadata-entry-type @ - hex-output-metadata-entry-type-swap-substrings = { + hex-output-metadata-entry-type-swap-subitems = { ~ Just like in hex-emit-template-string, we want to make sure to ~ discard the zeroes we get if we underflow the stack. - pop-substring-entry-stack - pop-substring-entry-stack + pop-subitem-entry-stack + pop-subitem-entry-stack swap - dup { push-substring-entry-stack } { drop } if-else - dup { push-substring-entry-stack } { drop } if-else + dup { push-subitem-entry-stack } { drop } if-else + dup { push-subitem-entry-stack } { drop } if-else } if dup hex-output-metadata-entry-type @ - hex-output-metadata-entry-type-roll-substrings = { - ~ The parameter giving the amount to roll by is in the string field. - dup hex-output-metadata-entry-string @ + hex-output-metadata-entry-type-roll-subitems = { + ~ The parameter giving the amount to roll by is in the content + ~ field. + dup hex-output-metadata-entry-content @ ~ (... amount to roll by) ~ We resist the temptation to do the memcopy math. We don't need @@ -4035,11 +4036,11 @@ allocate-transformation-state s" transformation-state" variable ~ In this scenario, we're rolling. The amount to roll by is also ~ the number of items. - 0 { 2dup < } { pop-substring-entry-stack 3unroll 1+ } while + 0 { 2dup < } { pop-subitem-entry-stack 3unroll 1+ } while drop ~ (... items, amount to roll by / number of items) - ~ Please notice that the items we have popped from the substring + ~ Please notice that the items we have popped from the subitem ~ entry stack are now, on the value stack, in the reverse of the ~ order they were on the entry stack. They will reverse again when ~ we push them back. @@ -4072,7 +4073,7 @@ allocate-transformation-state s" transformation-state" variable ~ of items. negate - 0 { 2dup < } { pop-substring-entry-stack 3unroll 1+ } while + 0 { 2dup < } { pop-subitem-entry-stack 3unroll 1+ } while drop ~ (... items, number of items) @@ -4093,7 +4094,7 @@ allocate-transformation-state s" transformation-state" variable 3roll ~ Again, if we underflowed we got zeros, and we discard them. - dup { push-substring-entry-stack } { drop } if-else + dup { push-subitem-entry-stack } { drop } if-else 1+ } while @@ -4933,76 +4934,76 @@ allocate-transformation-state s" transformation-state" variable exit } if - ~ Now we have some commands for the various provide-substring variants. + ~ Now we have some commands for the various -provide-subitem- variants. ~ Notice with all of these that we intentionally read one stack level deeper ~ than anything of ours, which will be a value provided by the code the ~ magic comment is embedded in. dup s" provide-decimal" stringcmp 0 = { - ~ Create a new "push substring decimal" entry. + ~ Create a new "push subitem decimal" entry. drop drop - 2 pick hex-output-metadata-entry-type-push-substring-decimal swap + 2 pick hex-output-metadata-entry-type-push-subitem-decimal swap add-hex-output-metadata-entry exit } if dup s" provide-hex" stringcmp 0 = { - ~ Create a new "push substring hex" entry. + ~ Create a new "push subitem hex" entry. drop drop - 2 pick hex-output-metadata-entry-type-push-substring-hex swap + 2 pick hex-output-metadata-entry-type-push-subitem-hex swap add-hex-output-metadata-entry exit } if dup s" provide-hex8" stringcmp 0 = { - ~ Create a new "push substring hex8" entry. + ~ Create a new "push subitem hex8" entry. drop drop - 2 pick hex-output-metadata-entry-type-push-substring-hex8 swap + 2 pick hex-output-metadata-entry-type-push-subitem-hex8 swap add-hex-output-metadata-entry exit } if dup s" provide-hex16" stringcmp 0 = { - ~ Create a new "push substring hex16" entry. + ~ Create a new "push subitem hex16" entry. drop drop - 2 pick hex-output-metadata-entry-type-push-substring-hex16 swap + 2 pick hex-output-metadata-entry-type-push-subitem-hex16 swap add-hex-output-metadata-entry exit } if dup s" provide-hex32" stringcmp 0 = { - ~ Create a new "push substring hex32" entry. + ~ Create a new "push subitem hex32" entry. drop drop - 2 pick hex-output-metadata-entry-type-push-substring-hex32 swap + 2 pick hex-output-metadata-entry-type-push-subitem-hex32 swap add-hex-output-metadata-entry exit } if dup s" provide-hex64" stringcmp 0 = { - ~ Create a new "push substring hex64" entry. + ~ Create a new "push subitem hex64" entry. drop drop - 2 pick hex-output-metadata-entry-type-push-substring-hex64 swap + 2 pick hex-output-metadata-entry-type-push-subitem-hex64 swap add-hex-output-metadata-entry exit } if dup s" provide-keyword" stringcmp 0 = { - ~ Create a new "push substring string" entry given a keyword pointer. + ~ Create a new "push subitem string" entry given a keyword pointer. drop drop 2 pick execution-token-to-entry entry-to-name - hex-output-metadata-entry-type-push-substring-string swap + hex-output-metadata-entry-type-push-subitem-string swap add-hex-output-metadata-entry exit } if dup s" drop-subitem" stringcmp 0 = { - ~ Create a new "drop substring" entry. - drop drop hex-output-metadata-entry-type-drop-substring 0 + ~ Create a new "drop subitem" entry. + drop drop hex-output-metadata-entry-type-drop-subitem 0 add-hex-output-metadata-entry exit } if dup s" swap-subitems" stringcmp 0 = { - ~ Create a new "swap substrings" entry. - drop drop hex-output-metadata-entry-type-swap-substrings 0 + ~ Create a new "swap subitem" entry. + drop drop hex-output-metadata-entry-type-swap-subitems 0 add-hex-output-metadata-entry exit } if dup s" roll-subitems" stringcmp 0 = { - ~ Create a new "roll substrings" entry. The parameter goes in the string + ~ Create a new "roll subitem" entry. The parameter goes in the string ~ field, and the length is always zero. - drop drop 0 swap hex-output-metadata-entry-type-roll-substrings swap + drop drop 0 swap hex-output-metadata-entry-type-roll-subitems swap add-hex-output-metadata-entry exit } if |