diff options
author | Daniel Llorens <daniel.llorens@bluewin.ch> | 2015-02-12 13:02:24 +0100 |
---|---|---|
committer | Daniel Llorens <daniel.llorens@bluewin.ch> | 2016-11-23 11:49:35 +0100 |
commit | d236d4d33fdab83127a4d72c2b561649a5c46b6c (patch) | |
tree | 04afbe0a47b156309b4213a164cf208f6d5d1cb6 /module/system/vm/assembler.scm | |
parent | 8b5f323330b0dcab0f48579a89a60f9a7cab1c64 (diff) | |
download | guile-d236d4d33fdab83127a4d72c2b561649a5c46b6c.tar.gz |
Fix compilation of rank 0 typed array literals
* module/system/vm/assembler.scm (simple-uniform-vector?): array-length
fails for rank 0 arrays; fix the shape condition.
* test-suite/tests/arrays.test: Test reading of #0f64(x) in compilation
context.
Diffstat (limited to 'module/system/vm/assembler.scm')
-rw-r--r-- | module/system/vm/assembler.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/module/system/vm/assembler.scm b/module/system/vm/assembler.scm index 96c6a633b..5b89b049b 100644 --- a/module/system/vm/assembler.scm +++ b/module/system/vm/assembler.scm @@ -1001,7 +1001,9 @@ immediate, and @code{#f} otherwise." (define (simple-uniform-vector? obj) (and (array? obj) (symbol? (array-type obj)) - (equal? (array-shape obj) (list (list 0 (1- (array-length obj))))))) + (match (array-shape obj) + (((0 n)) #t) + (else #f)))) (define (statically-allocatable? x) "Return @code{#t} if a non-immediate constant can be allocated |