Fix bug in rule for this expression:
authorChris Hanson <org/chris-hanson/cph>
Wed, 18 Jan 1989 04:04:07 +0000 (04:04 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 18 Jan 1989 04:04:07 +0000 (04:04 +0000)
(ASSIGN (OFFSET (REGISTER (? a)) (? n)) (FIXNUM->OBJECT (REGISTER (? source))))

There was a non-obvious order of argument evaluation problem here.

v7/src/compiler/machines/bobcat/rules1.scm

index d7c7fa20f9765f64694f4636623e324ae38527bb..254024e5c7a9b1657bff7209698a3f4ea7d2fd3a 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/rules1.scm,v 4.18 1988/11/04 21:49:26 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/rules1.scm,v 4.19 1989/01/18 04:04:07 cph Exp $
 
-Copyright (c) 1988 Massachusetts Institute of Technology
+Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -281,10 +281,10 @@ MIT in each case. |#
 (define-rule statement
   (ASSIGN (OFFSET (REGISTER (? a)) (? n))
          (FIXNUM->OBJECT (REGISTER (? source))))
-  (let ((target (indirect-reference! a n))
-       (temporary (move-to-temporary-register! source 'DATA)))
-    (LAP ,@(fixnum->object temporary)
-        (MOV L ,temporary ,target))))
+  (let ((target (indirect-reference! a n)))
+    (let ((temporary (move-to-temporary-register! source 'DATA)))
+      (LAP ,@(fixnum->object temporary)
+          (MOV L ,temporary ,target)))))
 \f
 ;;;; Transfers to Memory