1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 05:30:21 +02:00
guile/module/system
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
..
base Add wasm32 and wasm64 CPU types 2023-08-17 14:16:12 +02:00
repl Fix typos throughout codebase. 2023-07-16 22:09:01 +02:00
vm Allow string->utf8 to constant-fold 2023-11-15 10:44:21 +01:00
foreign-library.scm foreign-library: fix darwin detection 2021-09-02 08:59:57 +02:00
foreign-object.scm Add #:static-slot-allocation? 2015-02-06 13:25:17 +01:00
foreign.scm Support C99 complex types conditionally in (system foreign) 2021-12-01 18:40:19 +01:00
syntax.scm Document syntax-sourcev 2021-03-09 20:50:08 +01:00
xref.scm Remove unnecessary module imports. 2023-02-24 16:49:00 +01:00