You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
diff --git a/include/chibi/features.h b/include/chibi/features.h
index 9431514f..35d91fed 100644
--- a/include/chibi/features.h+++ b/include/chibi/features.h@@ -244,7 +244,7 @@
/* uncomment this to disable the string-set! opcode */
/* By default (non-literal) strings are mutable. */
/* Making them immutable allows for packed UTF-8 strings. */
-/* #define SEXP_USE_MUTABLE_STRINGS 0 */+#define SEXP_USE_MUTABLE_STRINGS 0
/* uncomment this to enable precomputed index->cursor tables for strings */
/* This makes string-ref faster at the expensive of making string */
LD_LIBRARY_PATH=".:" DYLD_LIBRARY_PATH=".:" CHIBI_IGNORE_SYSTEM_PATH=1 CHIBI_MODULE_PATH=lib ./chibi-scheme tests/r7rs-tests.scm
�[1mR7RS: �[22m
�[1m4.1 Primitive expression types: �[22m
...........................
�[32m27 out of 27 (100.0%)�[39m tests passed in 0.007436990737915039 seconds.
�[1m4.2 Derived expression types: �[22m
..........................................................................
�[32m74 out of 74 (100.0%)�[39m tests passed in 0.035043954849243164 seconds.
�[1m4.3 Macros: �[22m
.........................
�[32m25 out of 25 (100.0%)�[39m tests passed in 0.023190975189208984 seconds.
�[1m5 Program structure: �[22m
...............
�[32m15 out of 15 (100.0%)�[39m tests passed in 0.007798910140991211 seconds.
�[1m6.1 Equivalence Predicates: �[22m
.........................
�[32m25 out of 25 (100.0%)�[39m tests passed in 0.00926518440246582 seconds.
�[1m6.2 Numbers: �[22m
..........................................................................
..........................................................................
...............................................................
�[32m211 out of 211 (100.0%)�[39m tests passed in 0.059996843338012695 seconds.
�[1m6.3 Booleans: �[22m
..................
�[32m18 out of 18 (100.0%)�[39m tests passed in 0.0037419795989990234 seconds.
�[1m6.4 Lists: �[22m
.................................................................
�[32m65 out of 65 (100.0%)�[39m tests passed in 0.02360391616821289 seconds.
�[1m6.5 Symbols: �[22m
.................
�[32m17 out of 17 (100.0%)�[39m tests passed in 0.00618290901184082 seconds.
�[1m6.6 Characters: �[22m
..........................................................................
.....
�[32m79 out of 79 (100.0%)�[39m tests passed in 0.02087998390197754 seconds.
�[1m6.7 Strings: �[22m
...............�[4m�[31m!�[39m�[24m�[4m�[31m!�[39m�[24m.........................................................
..............................................�[4m�[31m!�[39m�[24m�[4m�[31m!�[39m�[24m�[4m�[31m!�[39m�[24m�[4m�[31m!�[39m�[24m�[4m�[31m!�[39m�[24m�[4m�[31m!�[39m�[24m�[4m�[31m!�[39m�[24m�[4m�[31m!�[39m�[24m�[4m�[31m!�[39m�[24m�[4m�[31m!�[39m�[24m
118 out of 130 (90.8%) tests passed in 0.039335012435913086 seconds.
�[4m�[31m12 errors (9.2%).�[39m�[24m
�[31mERROR: �[39m(let ((str (string #\a #\b #\c))) (string-set! str 1 #\-) str)
Exception: undefined variable: string-set!
on line 1320 of file "tests/r7rs-tests.scm"
�[31mERROR: �[39m(let ((s (string #\a #\b #\c))) (string-set! s 1 #\🜀) s)
Exception: undefined variable: string-set!
on line 1323 of file "tests/r7rs-tests.scm"
�[31mERROR: �[39m(let ((str (make-string 5 #\x))) (string-fill! str #\-) str)
Exception: undefined variable: string-set!
on line 1457 of file "tests/r7rs-tests.scm"
�[31mERROR: �[39m(let ((str (make-string 5 #\x))) (string-fill! str #\- 2) str)
Exception: undefined variable: string-set!
on line 1459 of file "tests/r7rs-tests.scm"
�[31mERROR: �[39m(let ((str (make-string 5 #\x))) (string-fill! str #\- 2 3) str)
Exception: undefined variable: string-set!
on line 1461 of file "tests/r7rs-tests.scm"
�[31mERROR: �[39m...str
Exception: undefined variable: string-set!
on line 1464 of file "tests/r7rs-tests.scm"
�[31mERROR: �[39m(let ((str (make-string 5 #\x))) (string-copy! str 0 "-----") str)
Exception: undefined variable: string-set!
on line 1466 of file "tests/r7rs-tests.scm"
�[31mERROR: �[39m...str
Exception: undefined variable: string-set!
on line 1468 of file "tests/r7rs-tests.scm"
�[31mERROR: �[39m...str
Exception: undefined variable: string-set!
on line 1470 of file "tests/r7rs-tests.scm"
�[31mERROR: �[39m...str
Exception: undefined variable: string-set!
on line 1472 of file "tests/r7rs-tests.scm"
�[31mERROR: �[39m...str
Exception: undefined variable: string-set!
on line 1476 of file "tests/r7rs-tests.scm"
�[31mERROR: �[39m...str
Exception: undefined variable: string-set!
on line 1478 of file "tests/r7rs-tests.scm"
�[1m6.8 Vectors: �[22m
...........................................
�[32m43 out of 43 (100.0%)�[39m tests passed in 0.017297983169555664 seconds.
�[1m6.9 Bytevectors: �[22m
................................�[31mx�[39m�[31mx�[39m�[31mx�[39m....
36 out of 39 (92.3%) tests passed in 0.012196063995361328 seconds.
�[31m3 failures (7.7%).�[39m
�[31mFAIL: �[39m(utf8->string #u8(0 #x41 #x42 #x43) 1)
expected "ABC" but got "ABC�[32m\x00;�[39m"
on line 1627 of file "tests/r7rs-tests.scm"
�[31mFAIL: �[39m(utf8->string #u8(0 #x41 #x42 #x43 0) 1 4)
expected "ABC" but got "ABC�[32m\x00;�[39m"
on line 1628 of file "tests/r7rs-tests.scm"
�[31mFAIL: �[39m(utf8->string #u8(0 #xCE #xBB 0) 1 3)
expected "λ" but got "λ�[32m\x00;�[39m"
on line 1629 of file "tests/r7rs-tests.scm"
�[1m6.10 Control Features: �[22m
..................................
�[32m34 out of 34 (100.0%)�[39m tests passed in 0.016185998916625977 seconds.
�[1m6.11 Exceptions: �[22m
..............................
�[32m30 out of 30 (100.0%)�[39m tests passed in 0.015750885009765625 seconds.
�[1m6.12 Environments and evaluation: �[22m
....
�[32m4 out of 4 (100.0%)�[39m tests passed in 0.0019350051879882812 seconds.
�[1m6.13 Input and output: �[22m
...............................................................
�[1mRead syntax: �[22m
......................................................................
.......................
�[32m93 out of 93 (100.0%)�[39m tests passed in 0.030590057373046875 seconds.
�[1mNumeric syntax: �[22m
......................................................................
......................................................................
......................................................................
..........
�[32m220 out of 220 (100.0%)�[39m tests passed in 0.09760308265686035 seconds.
�[32m376 out of 376 (100.0%)�[39m tests passed in 0.15198516845703125 seconds.
�[32m2 out of 2 (100.0%)�[39m subgroups passed.
�[1m6.14 System interface: �[22m
.............
�[32m13 out of 13 (100.0%)�[39m tests passed in 0.005388975143432617 seconds.
1210 out of 1225 (98.8%) tests passed in 0.46364307403564453 seconds.
�[31m3 failures (0.2%).�[39m
�[4m�[31m12 errors (1.0%).�[39m�[24m
16 out of 18 (88.9%) subgroups passed.
And every REPL prompt and invocation of any kind, it spits out WARNING: reference to undefined variable string-set!
I think the failing tests and the warning should be disabled in case SEXP_USE_MUTABLE STRINGS 0.
The text was updated successfully, but these errors were encountered:
Chibi is built in layers, and states this in the documentation.
To get the full Chibi and R7RS support you need most of the default compiler options.
Toggling these options is intended only for custom builds, in most cases to strip the size down for embedded executables or extension language use. Given that, SEXP_USE_MUTABLE STRINGS 0 works surprisingly well here.
Enable the option:
Get mondo warnings, but it builds:
But then it fails rather a lot of the test suite:
And every REPL prompt and invocation of any kind, it spits out
WARNING: reference to undefined variable string-set!
I think the failing tests and the warning should be disabled in case
SEXP_USE_MUTABLE STRINGS 0
.The text was updated successfully, but these errors were encountered: