From: Chris Hanson Date: Thu, 18 Aug 1988 01:46:45 +0000 (+0000) Subject: Improve code generated for inputs like the following: X-Git-Tag: 20090517-FFI~12605 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=bcd66ff00bff9a7fa3ffc4d10a006464f6963445;p=mit-scheme.git Improve code generated for inputs like the following: (if (if (and (object-type? (ucode-type fixnum) r) (object-type? (ucode-type fixnum) l)) (fix:> r l) (> r l)) ...) Previously, the code generated for the call to `fix:>' was deficient in that it pushed a continuation, performed the inline coded comparison, then did a pop-return. In fact, since the continuation is known at that point, and is not being passed anywhere, there's no reason to push anything on the stack. These changes implement this. --- diff --git a/v7/src/compiler/machines/bobcat/make.scm-68040 b/v7/src/compiler/machines/bobcat/make.scm-68040 index 7b55d096e..88b2a529e 100644 --- a/v7/src/compiler/machines/bobcat/make.scm-68040 +++ b/v7/src/compiler/machines/bobcat/make.scm-68040 @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/make.scm-68040,v 4.20 1988/08/11 20:15:54 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/make.scm-68040,v 4.21 1988/08/18 01:45:48 cph Exp $ Copyright (c) 1988 Massachusetts Institute of Technology @@ -41,4 +41,4 @@ MIT in each case. |# ((package/reference (find-package name) 'INITIALIZE-PACKAGE!))) '((COMPILER MACROS) (COMPILER DECLARATIONS))) -(add-system! (make-system "Liar" 14 20 '())) \ No newline at end of file +(add-system! (make-system "Liar" 14 21 '())) \ No newline at end of file diff --git a/v7/src/compiler/rtlgen/rtlgen.scm b/v7/src/compiler/rtlgen/rtlgen.scm index a8cb8c6b4..ad6f9232c 100644 --- a/v7/src/compiler/rtlgen/rtlgen.scm +++ b/v7/src/compiler/rtlgen/rtlgen.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rtlgen.scm,v 4.6 1988/08/18 01:37:23 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rtlgen.scm,v 4.7 1988/08/18 01:46:45 cph Exp $ Copyright (c) 1988 Massachusetts Institute of Technology @@ -158,7 +158,7 @@ MIT in each case. |# (if (and (not (continuation/always-known-operator? continuation)) (block/dynamic-link? block)) (rtl:make-pop-link) - (make-null-cfg))))) + (make-null-cfg)))) (define (generate/node node) (let ((memoization (cfg-node-get node memoization-tag)))