diff options
author | Robin Templeton <robin@terpri.org> | 2014-06-10 18:48:07 -0400 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-04-04 16:19:00 +0200 |
commit | b04e79283ada9a6af05552dda6446a0934c0fbe2 (patch) | |
tree | 462af9da0e58fd4bdb861ca3301de6eae86ad662 /module/language/bytecode/spec.scm | |
parent | 823f43d9a432755399d5d13b4a4904954688aa61 (diff) |
intern arbitrary constants
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)
* libguile/loader.c (load_thunk_from_memory): Refactor, adding
"constants" argument and passing to "init" if appropriate.
(load_thunk_from_file): Call "load-thunk-from-memory" with
"constants" set to #f.
(scm_load_thunk_from_memory): Instead of a bytevector, accept
a cons of "(bytevector . constants)", where constants is either
a vector or #f. Pass this into "load_thunk_from_memory".
* module/language/bytecode/spec.scm: Adapt printer.
* module/language/cps/compile-bytecode.scm (compile-bytecode):
New variable.
* module/system/repl/command.scm (disassemble):
Adapt to expect pair which includes bytevector as its car.
* module/system/vm/assembler.scm <asm>: Add "to-file?" slot.
(fresh-block): New variable.
(make-assembler): Adapt to expect "to-file?" keyword argument.
(intern-constant): Support "asm-to-file?" in checks.
(emit-init-constants, link-data): Likewise.
(link-assembly): Update logic for handling "(bytevector . constants)"
pair, as well as the expectations of its invocation by compile-bytecode.
Diffstat (limited to 'module/language/bytecode/spec.scm')
-rw-r--r-- | module/language/bytecode/spec.scm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/language/bytecode/spec.scm b/module/language/bytecode/spec.scm index 89256c5c2..d368f6e34 100644 --- a/module/language/bytecode/spec.scm +++ b/module/language/bytecode/spec.scm @@ -37,6 +37,7 @@ (define-language bytecode #:title "Bytecode" #:compilers `((value . ,bytecode->value)) - #:printer (lambda (bytecode port) (put-bytevector port bytecode)) + #:printer (lambda (x port) + (put-bytevector port (car x))) #:reader get-bytevector-all #:for-humans? #f) |