Fix miscompilation of non-ASCII Latin-1 strings.
authorLudovic Courtès <ludo@gnu.org>
Sun, 7 Mar 2010 22:45:14 +0000 (23:45 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sun, 7 Mar 2010 22:45:14 +0000 (23:45 +0100)
commit1caa6341b0832ebe2173ba16d6132fa79b042d9e
treee8fa7e87b2fd4b39876aab2a64da1339f9660796
parentbd5a75dcd8436ebe077c9ce52300d013e9519d94
Fix miscompilation of non-ASCII Latin-1 strings.

The bug was introduced dad6817f ("Use the R6RS I/O API in
`write-bytecode'.").

* module/language/assembly/compile-bytecode.scm
  (write-bytecode)[write-string]: Rename to...
  [write-latin1-string]: ... this.  Add the `write-loader-len' call.
  Write each character individually instead of using `string->utf8'.
  [write-loader]: Remove.

* test-suite/tests/asm-to-bytecode.test ("compiler")[load-string "æ"]:
  New test.
module/language/assembly/compile-bytecode.scm
test-suite/tests/asm-to-bytecode.test