From 9f4eeb55f9397dccdf08d1ee4acca4eaf3431268 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 17 Oct 2011 21:38:49 -0700 Subject: [PATCH] Revert "Optimize byte-reverse macro in alien.endian -- it was shifting each byte to the 0th bit place, bitand-ing it with HEX: ff, then shifting it to its final destination -- now we immediately shift to the proper location and bitand with the proper bitmask." This reverts commit c701a39e89bb159ba59120639d17f6e737f05fca. --- basis/alien/endian/endian.factor | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/basis/alien/endian/endian.factor b/basis/alien/endian/endian.factor index b905e4b66b..bc2919bb6e 100644 --- a/basis/alien/endian/endian.factor +++ b/basis/alien/endian/endian.factor @@ -18,21 +18,13 @@ ERROR: invalid-signed-conversion n ; [ invalid-signed-conversion ] } case ; inline - - MACRO: byte-reverse ( n signed? -- quot ) [ drop [ dup iota [ [ 1 + - -8 * ] [ nip 8 * ] 2bi - [ + ] [ nip byte-mask ] 2bi - '[ _ shift _ bitand ] + '[ _ shift HEX: ff bitand _ shift ] ] with map ] [ 1 - [ bitor ] n*quot ] bi ] [