From 73ff1e80435cb5fc2504c9b31c15be358b69a25e Mon Sep 17 00:00:00 2001 From: "Brian A. LaMacchia" Date: Tue, 12 Jan 1988 16:33:36 +0000 Subject: [PATCH] Fixed bug in instruction-insert! --- v7/src/compiler/machines/vax/assmd.scm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/v7/src/compiler/machines/vax/assmd.scm b/v7/src/compiler/machines/vax/assmd.scm index 7bfa5ca4d..65c7c05a9 100644 --- a/v7/src/compiler/machines/vax/assmd.scm +++ b/v7/src/compiler/machines/vax/assmd.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/vax/assmd.scm,v 4.2 1988/01/08 14:55:40 bal Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/vax/assmd.scm,v 4.3 1988/01/12 16:33:36 bal Exp $ Copyright (c) 1987 Massachusetts Institute of Technology @@ -80,16 +80,17 @@ MIT in each case. |# ;;; Machine dependent instruction order -;;; -;;; is this right? -;;; +;; These depend on the mapping between instruction streams and bit strings. +;; Depending on the byte order of the machine, instruction streams will grow +;; "forwards" or "backwards". + (define (instruction-initial-position block) 0) (define (instruction-insert! bits block position receiver) - (let* ((l (bit-string-length bits)) - (new-position (- position l))) - (bit-substring-move-right! bits 0 l block new-position) - (receiver new-position))) + (declare (integrate receiver)) + (let ((l (bit-string-length bits))) + (bit-substring-move-right! bits 0 l block position) + (receiver (+ position l)))) (set! instruction-append bit-string-append) -- 2.25.1