From: Chris Hanson Date: Fri, 16 Jun 1989 09:14:08 +0000 (+0000) Subject: Fix bug in calling sequence of known lexprs: when callee needs a X-Git-Tag: 20090517-FFI~12008 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=46626d8c87fbbf7dbd146902fa4a0785aa853b38;p=mit-scheme.git Fix bug in calling sequence of known lexprs: when callee needs a static link, the number of arguments pushed is one less than the frame size. Previously this case was not being handled specially, and the resulting code worked only because the compiled code interface had a bug which caused the wrong number of arguments to be popped. --- diff --git a/v7/src/compiler/rtlgen/rgcomb.scm b/v7/src/compiler/rtlgen/rgcomb.scm index f3362f999..8be2ca63e 100644 --- a/v7/src/compiler/rtlgen/rgcomb.scm +++ b/v7/src/compiler/rtlgen/rgcomb.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rgcomb.scm,v 4.10 1989/05/31 20:02:11 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rgcomb.scm,v 4.11 1989/06/16 09:14:08 cph Rel $ -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 @@ -90,12 +90,17 @@ MIT in each case. |# (generate/procedure-entry/inline callee)) (else (enqueue-procedure! callee) - ((if (procedure-rest callee) - rtl:make-invocation:lexpr - rtl:make-invocation:jump) - frame-size - continuation - (procedure-label callee))))))) + (if (procedure-rest callee) + (rtl:make-invocation:lexpr + (if (stack-block/static-link? (procedure-block callee)) + (-1+ frame-size) + frame-size) + continuation + (procedure-label callee)) + (rtl:make-invocation:jump + frame-size + continuation + (procedure-label callee)))))))) (define (invocation/apply model operator frame-size continuation prefix) model operator ; ignored