1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 01:00:20 +02:00

add ability to compile uniform arrays

* module/rnrs/bytevector.scm (rnrs):
* libguile/bytevectors.h:
* libguile/bytevectors.c (scm_uniform_array_to_bytevector): New function.

* libguile/unif.h:
* libguile/unif.c (scm_from_contiguous_typed_array): New function.

* libguile/vm-i-loader.c (load-array): New instruction, for loading byte
  data into uniform vectors. Currently it copies out the data, though in
  the future we could avoid that.

* module/language/assembly.scm (align-code): New exported function,
  aligns code on some boundary.
  (align-program): Use align-code.

* module/language/assembly/compile-bytecode.scm (write-bytecode): Support
  the load-array instruction.

* module/language/glil/compile-assembly.scm (dump-object): Dump uniform
  arrays. Neat :)
This commit is contained in:
Andy Wingo 2009-06-05 16:31:38 +02:00
parent a9b0f876c1
commit 782a82eed1
9 changed files with 132 additions and 9 deletions

View file

@ -32,8 +32,9 @@
:export-syntax (endianness)
:export (native-endianness bytevector?
make-bytevector bytevector-length bytevector=? bytevector-fill!
bytevector-copy! bytevector-copy bytevector-u8-ref
bytevector-s8-ref
bytevector-copy! bytevector-copy
uniform-array->bytevector
bytevector-u8-ref bytevector-s8-ref
bytevector-u8-set! bytevector-s8-set! bytevector->u8-list
u8-list->bytevector
bytevector-uint-ref bytevector-uint-set!