diff options
Diffstat (limited to 'interpret.e')
| -rw-r--r-- | interpret.e | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/interpret.e b/interpret.e index c1d88c4..92b2035 100644 --- a/interpret.e +++ b/interpret.e @@ -407,8 +407,14 @@ latest @ ~ The counterpart of : is ;. : ; - ~ See commentary on "literal", in dynamic.e, regarding "lit exit". - lit exit , + ~ See commentary on "literal", in dynamic.e, regarding "lit exit". + ~ + ~ In regard to the magic comment, this is in the same category as strings + ~ and high-level flow control, where it's implemented in the base code here + ~ because that could be relevant to end-user code that compiles things + ~ without using the transforms, but in the regular compiler it's not used + ~ because the transforms override this whole implementation. + lit exit , ~ : -8 exit (codeword pointer) make-visible ~ See above regarding [. Since it's an immediate word, we have to go to ~ extra trouble to compile it as part of ;. Since it's also hidden, we have @@ -457,7 +463,10 @@ latest @ consume interpreter-flags @ 0x01 & { [ s" litstring" find literal ] - entry-to-execution-token , + ~ The magic comment isn't active in the compiler as-written, since the + ~ transformations do this bit themselves, but should still be here for + ~ completeness; it could affect other things people compile. + entry-to-execution-token , ~ : -8 litstring (codeword pointer) } if here @ key { dup dup 0x22 != && } { pack8 key } while drop 0 pack8 @@ -472,8 +481,9 @@ latest @ ' s" entry-to-execution-token execute interpreter-flags @ 1 & { [ s" emitstring" find literal ] - entry-to-execution-token , } - { emitstring } if-else + ~ As with s", the magic comment is for completeness only. + entry-to-execution-token , ~ : -8 emitstring (codeword pointer) + } { emitstring } if-else ; make-immediate |