docs: clarify which compiled-code literals go through datum-intern-literal

it's only strings and byte strings.
This commit is contained in:
Matthew Flatt 2020-12-02 17:24:16 -07:00
parent 977494552e
commit 8ec9bf72d7
2 changed files with 14 additions and 5 deletions

View File

@ -588,6 +588,12 @@ identifier; those functions lead to top-level and module variables
with @tech{unreadable symbol}ic names, and the names are deterministic
as long as expansion is otherwise deterministic.
When a compiled-form object has string and byte string literals, they
are @tech{interned} using @racket[datum-intern-literal] when the
compiled-object for is read back in. Numbers and other values that
@racket[read-syntax] would intern, however, are not interned when read
back as quoted literals in a compiled object.
A compiled form may contain path literals. Although paths are
not normally printed in a way that can be read back in, path literals
can be written and read as part of compiled code. The
@ -618,7 +624,7 @@ the conversion of the source field is to preserve some source
information but not expose or record a path that makes no sense on
a different filesystem or platform.
For internal testing purposes, when the
For internal testing purposes in the 3m and CGC variants of Racket, when the
@as-index{@envvar{PLT_VALIDATE_LOAD}} environment variable is set, the
reader runs a validator on bytecode parsed from @litchar{#~}. The
validator may catch miscompilations or bytecode-file corruption. The

View File

@ -43,10 +43,13 @@ numbers produced by the reader in @racket[read-syntax] mode are
@deftech{interned}, which means that such values in the result of
@racket[read-syntax] are always @racket[eq?] when they are
@racket[equal?] (whether from the same call or different calls to
@racket[read-syntax]). Symbols and keywords are @tech{interned} in
both @racket[read] and @racket[read-syntax] mode. Sending an
@tech{interned} value across a @tech{place channel} does not
necessarily produce an @tech{interned} value at the receiving
@racket[read-syntax]). Symbols and keywords are interned in
both @racket[read] and @racket[read-syntax] mode. When a quoted value
is in compiled code that written and then read back in (see
@secref["print-compiled"]), only strings and byte strings are
interned when reading the code. Sending an
interned value across a @tech{place channel} does not
necessarily produce an interned value at the receiving
@tech{place}. See also @racket[datum-intern-literal] and
@racket[datum->syntax].