Re-order some code to eliminate forward references.
authorJoe Marshall <eval.apply@gmail.com>
Thu, 9 Jun 2011 20:52:35 +0000 (13:52 -0700)
committerJoe Marshall <eval.apply@gmail.com>
Thu, 9 Jun 2011 20:52:35 +0000 (13:52 -0700)
src/compiler/fggen/fggen.scm

index 274a2fd5a1b5c004dff1dfc308398c9d1949411a..afebe531d91281cb741e7521b873fb06de46c2e0 100644 (file)
@@ -31,7 +31,7 @@ USA.
 \f
 ;; 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)))
 \f
-(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))
+
 \f
 (define (generate/lambda block continuation context expression)
   (generate/lambda* block continuation