VM support for string-set!; slimmer read-string

* doc/ref/vm.texi (Inlined Scheme Instructions): Add string-set!.
* libguile/vm-engine.c (string-set!): New opcode.
* module/ice-9/rdelim.scm (read-string): Reimplement in terms of a
  geometrically growing list of strings, to reduce total heap usage when
  reading big files.
* module/language/cps/compile-bytecode.scm (compile-function): Add
  string-set! support.
* module/language/cps/types.scm (string-set!): Update for &u64 index.
* module/language/tree-il/compile-cps.scm (convert): Unbox index to
  string-set!.
* module/system/vm/assembler.scm (system): Export string-set!.
This commit is contained in:
Andy Wingo 2017-03-09 17:22:08 +01:00
commit c525aa6d95
7 changed files with 57 additions and 11 deletions

View file

@ -1355,6 +1355,12 @@ and store it in @var{dst}. The @var{idx} value should be an unboxed
unsigned 64-bit integer.
@end deftypefn
@deftypefn Instruction {} string-set! s8:@var{dst} s8:@var{idx} s8:@var{src}
Store the character @var{src} into the string @var{dst} at index
@var{idx}. The @var{idx} value should be an unboxed unsigned 64-bit
integer.
@end deftypefn
@deftypefn Instruction {} cons s8:@var{dst} s8:@var{car} s8:@var{cdr}
Cons @var{car} and @var{cdr}, and store the result in @var{dst}.
@end deftypefn