forked from racket/racket
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
serialize
srcloc
s in bytecode; change expander to keep srcloc
s
To avoid recording absolute paths from a build environment in bytecode files, the bytecode writer converts paths to relative form based on `current-write-relative-directory`. For paths that cannot be made relative in that way and that are in source locations in syntax objects, the printer in v6.x converted those paths to strings that drop most of the path. The v7 expander serializes syntax objects as part of `compile` instead of `write`, so it can't truncate paths in the traditional way. To help out the expander, the core `write` function for compiled code now allows `srcloc` values --- as long as the source field is a path, string, byte string, symbol, or #f. (Constraining the source field avoids various problems, including problems that could be created by cyclic values.) As the core `write` for compiled code prints a path, it truncates a source path in the traditional way. The expander doesn't constrain source locations in syntax objects to have path, string, etc., source values. It can serialize syntax objects with non-path source values at `compile` time, so there's no loss of functionality. The end result is to fix abolute paths that were getting stored in the bytecode for compiled packages, since that's no good for installing packages in built form (which happens, for example, during a distribution build).
- Loading branch information
Showing
20 changed files
with
373 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.