1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00
guile/module/language
Andy Wingo d08cc4f6e2 Allow string->utf8 to constant-fold
* module/language/tree-il/primitives.scm (*interesting-primitive-names*):
(*primitive-accessors*): Add string->utf8, utf8->string, and
string-utf8-length.
(primitive-module): New public function, moved here from (language
tree-il compile-bytecode).

* module/language/tree-il/compile-bytecode.scm: Use primitive-module
from (language tree-il primitives).

* module/language/tree-il/peval.scm (peval): A bugfix: load primitives
from their proper module.  Allows bytevector primitives to fold.

* module/language/cps/guile-vm/reify-primitives.scm:
* module/language/cps/effects-analysis.scm:
* module/language/cps/types.scm
* module/language/tree-il/primitives.scm:
* module/language/tree-il/cps-primitives.scm:
* module/language/tree-il/effects.scm (make-effects-analyzer):
Add string->utf8, utf8->string, and string-utf8-length.

* module/language/tree-il/compile-cps.scm (string->utf8)
(string-utf8-length, utf8->string): New custom lowerers, including type
checks and an unboxed result for string-utf8-length.

* module/system/vm/assembler.scm:
* libguile/intrinsics.h:
* libguile/intrinsics.c: Because string-utf8-length returns an unboxed
value, we need an intrinsic for it; go ahead and add an intrinsic for
string->utf8 and utf8->string too, as we will likely be able to use
these in the future.
2023-11-15 10:44:21 +01:00
..
brainfuck Add compiler chooser implementation; fix bugs with previous commit 2020-05-08 22:56:37 +02:00
bytecode linker: Do not store entire ELF in memory when writing to a file. 2023-01-17 17:49:05 +01:00
cps Allow string->utf8 to constant-fold 2023-11-15 10:44:21 +01:00
ecmascript Deprecate passing a non-zero size to make-module 2019-09-27 22:57:38 +02:00
elisp Mark some elisp runtime modules as non-declarative 2021-04-21 22:41:12 +02:00
scheme Read-in-scheme replaces boot "read" definition 2021-03-03 17:08:55 +01:00
tree-il Allow string->utf8 to constant-fold 2023-11-15 10:44:21 +01:00
value Add 'for-humans?' flag to <language> specifications. 2013-01-27 10:16:40 -05:00
bytecode.scm Add sign-extending make-immediate instruction 2020-07-30 17:36:11 +02:00
cps.scm Add new $calli expression type. 2023-08-17 14:16:12 +02:00
tree-il.scm Use tree-il-srcv instead of tree-il-src 2023-06-19 13:53:01 +02:00