From: Joe Marshall Date: Thu, 9 Jun 2011 20:52:35 +0000 (-0700) Subject: Re-order some code to eliminate forward references. X-Git-Tag: release-9.1.0~22^2~15 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=9b4b56b289b9e01cd3956786006d5171afe981d1;p=mit-scheme.git Re-order some code to eliminate forward references. --- diff --git a/src/compiler/fggen/fggen.scm b/src/compiler/fggen/fggen.scm index 274a2fd5a..afebe531d 100644 --- a/src/compiler/fggen/fggen.scm +++ b/src/compiler/fggen/fggen.scm @@ -31,7 +31,7 @@ USA. ;; Note: The C back end cannot dump objects, and instead generates ;; code to construct the objects. -;; Thus the unmapping of reference traps must be done late, +;; Thus the unmapping of reference traps must be done late ;; when generating such code, and not early, since the code ;; that destructures object will otherwise run into actual ;; reference traps. @@ -306,25 +306,6 @@ USA. (make-subproblem/canonical (make-return block continuation rvalue) continuation))) -(define-integrable (make-variable-generator extract-name safe?) - (lambda (block continuation context expression) - context ; ignored - (continue/rvalue block - continuation - (make-reference block - (find-name block - (extract-name expression)) - safe?)))) - -(define generate/variable - (make-variable-generator scode/variable-name #f)) - -(define generate/safe-variable - (make-variable-generator scode/safe-variable-name #t)) - -(define generate/global-variable - (make-variable-generator scode/global-variable-name #f)) - (define-integrable (scode/make-safe-variable name) (cons safe-variable-tag name)) @@ -375,6 +356,26 @@ USA. block (cons variable (block-variables-nontransitively-free block)))))) + +(define-integrable (make-variable-generator extract-name safe?) + (lambda (block continuation context expression) + context ; ignored + (continue/rvalue block + continuation + (make-reference block + (find-name block + (extract-name expression)) + safe?)))) + +(define generate/variable + (make-variable-generator scode/variable-name #f)) + +(define generate/safe-variable + (make-variable-generator scode/safe-variable-name #t)) + +(define generate/global-variable + (make-variable-generator scode/global-variable-name #f)) + (define (generate/lambda block continuation context expression) (generate/lambda* block continuation