[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, master, updated. release_1-9-0-42-g443
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] GNU Guile branch, master, updated. release_1-9-0-42-g44362a1 |
Date: |
Tue, 14 Jul 2009 14:07:20 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=44362a1086b778efb47b7c64a8ed38db5f82d0ae
The branch, master has been updated
via 44362a1086b778efb47b7c64a8ed38db5f82d0ae (commit)
from c4b681fdacc57de0b2a9584c1f6a195cf2629b32 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 44362a1086b778efb47b7c64a8ed38db5f82d0ae
Author: Ludovic Courtès <address@hidden>
Date: Tue Jul 14 16:07:13 2009 +0200
Fix tests that assumed little endian.
* test-suite/tests/asm-to-bytecode.test (u32->u8-list): New procedure.
("compiler")[(load-program 3 2 1 0 () 3 #f (make-int8 3) (return)),
(load-program 3 2 1 0 () 3 (load-program 3 2 1 0 ...))]: Make these
tests work on hosts whose endianness is not little endian.
-----------------------------------------------------------------------
Summary of changes:
test-suite/tests/asm-to-bytecode.test | 41 +++++++++++++++++++++++---------
1 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/test-suite/tests/asm-to-bytecode.test
b/test-suite/tests/asm-to-bytecode.test
index 1c2a599..01ba846 100644
--- a/test-suite/tests/asm-to-bytecode.test
+++ b/test-suite/tests/asm-to-bytecode.test
@@ -15,6 +15,7 @@
;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
(define-module (test-suite tests asm-to-bytecode)
+ #:use-module (rnrs bytevector)
#:use-module (test-suite lib)
#:use-module (system vm instruction)
#:use-module (language assembly compile-bytecode))
@@ -45,6 +46,14 @@
(lambda ()
(equal? v y)))))
+(define (u32->u8-list x)
+ ;; Return a 4 uint8 list corresponding to the host's native representation
+ ;; of X, a uint32.
+ (let ((bv (make-bytevector 4)))
+ (bytevector-u32-native-set! bv 0 x)
+ (bytevector->u8-list bv)))
+
+
(with-test-prefix "compiler"
(with-test-prefix "asm-to-bytecode"
@@ -75,22 +84,30 @@
(comp-test '(load-keyword "qux")
(vector 'load-keyword 0 0 3 (char->integer #\q) (char->integer
#\u)
(char->integer #\x)))
-
- ;; fixme: little-endian test.
+
(comp-test '(load-program 3 2 1 0 () 3 #f (make-int8 3) (return))
- (vector 'load-program 3 2 1 0 3 0 0 0 0 0 0 0
- (instruction->opcode 'make-int8) 3
- (instruction->opcode 'return)))
+ (list->vector
+ `(load-program
+ 3 2 1 0 ;; nargs, nrest, nlocs, nexts
+ ,@(u32->u8-list 3) ;; len
+ ,@(u32->u8-list 0) ;; metalen
+ make-int8 3
+ return)))
- ;; fixme: little-endian test.
(comp-test '(load-program 3 2 1 0 () 3
(load-program 3 2 1 0 () 3
#f
(make-int8 3) (return))
(make-int8 3) (return))
- (vector 'load-program 3 2 1 0 3 0 0 0 (+ 3 12) 0 0 0
- (instruction->opcode 'make-int8) 3
- (instruction->opcode 'return)
- 3 2 1 0 3 0 0 0 0 0 0 0
- (instruction->opcode 'make-int8) 3
- (instruction->opcode 'return)))))
+ (list->vector
+ `(load-program
+ 3 2 1 0 ;; nargs, nrest, nlocs, nexts
+ ,@(u32->u8-list 3) ;; len
+ ,@(u32->u8-list (+ 3 12)) ;; metalen
+ make-int8 3
+ return
+ 3 2 1 0 ;; nargs, nrest, nlocs, nexts
+ ,@(u32->u8-list 3) ;; len
+ ,@(u32->u8-list 0) ;; metalen
+ make-int8 3
+ return)))))
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, master, updated. release_1-9-0-42-g44362a1,
Ludovic Courtès <=