From: Taylor R Campbell Date: Sat, 28 Aug 2010 20:52:26 +0000 (+0000) Subject: In FLO:VECTOR-LENGTH, coerce length to fixnum before OBJECT->FIXNUM. X-Git-Tag: 20101212-Gtk~82 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6872861ccb2bc35478059c94d6ce34096790b59c;p=mit-scheme.git In FLO:VECTOR-LENGTH, coerce length to fixnum before OBJECT->FIXNUM. The previous open-coding worked whenever OBJECT->FIXNUM merely shifted left by the tag width, ignoring whatever tag was there before. The SVM does not do this, however. --- diff --git a/src/compiler/rtlgen/opncod.scm b/src/compiler/rtlgen/opncod.scm index 23964e978..f6dba116c 100644 --- a/src/compiler/rtlgen/opncod.scm +++ b/src/compiler/rtlgen/opncod.scm @@ -617,14 +617,14 @@ USA. (rtl:make-fixnum->object (rtl:make-fixnum-2-args 'FIXNUM-LSH - (rtl:make-object->fixnum (rtl:make-fetch locative)) + (rtl:make-object->fixnum (rtl:vector-length-fetch locative)) (rtl:make-object->fixnum (rtl:make-constant -1)) false))) (lambda (locative) (rtl:make-fixnum->object (rtl:make-fixnum-2-args 'FIXNUM-QUOTIENT - (rtl:make-object->fixnum (rtl:make-fetch locative)) + (rtl:make-object->fixnum (rtl:vector-length-fetch locative)) (rtl:make-object->fixnum (rtl:make-constant quantum)) false)))))))