Use sequence-immediate-first instead of sequence-first.
authorJoe Marshall <eval.apply@gmail.com>
Wed, 25 Jan 2012 15:46:58 +0000 (07:46 -0800)
committerJoe Marshall <eval.apply@gmail.com>
Wed, 25 Jan 2012 15:46:58 +0000 (07:46 -0800)
src/compiler/fggen/fggen.scm
src/runtime/scomb.scm
src/runtime/unsyn.scm

index a3cce7eba42476146d11ce929ce0b1fde990a7c4..e04d116ab182405f286c30f2e128543fac6bcd86 100644 (file)
@@ -504,14 +504,15 @@ USA.
   (if (scode/sequence? expression)
       ;; This is done in a funny way to enforce processing in sequence order.
       ;; In this way, compile-by-procedures compiles in a predictable order.
-      (let ((first (generate/subproblem/effect
-                   block continuation context
-                   (scode/sequence-first expression) 'SEQUENCE-2-SECOND
-                   expression)))
+      (let ((first-action
+            (generate/subproblem/effect
+             block continuation context
+             (scode/sequence-immediate-first expression) 'SEQUENCE-2-SECOND
+             expression)))
        ((scfg*ctype->ctype! continuation)
-        first
+        first-action
         (generate/expression block continuation context
-                             (scode/sequence-second expression))))
+                             (scode/sequence-immediate-second expression))))
       (error "Not a sequence" expression)))
 
 (define (generate/conditional block continuation context expression)
index 1d715536069fb436b10d75474f7c3c3a3010fcc3..5a6ccdf961ddd225c07f860ec76af3140c529e9e 100644 (file)
@@ -38,8 +38,8 @@ USA.
 (define-integrable (sequence? object)
   (object-type? (ucode-type sequence-2) object))
 
-(define-integrable (%sequence-first sequence) (&pair-car sequence))
-(define-integrable (%sequence-second sequence) (&pair-cdr sequence))
+(define-integrable (%sequence-immediate-first sequence) (&pair-car sequence))
+(define-integrable (%sequence-immediate-second sequence) (&pair-cdr sequence))
 
 (define-guarantee sequence "SCode sequence")
 
@@ -53,29 +53,29 @@ USA.
 
 (define (sequence-first expression)
   (guarantee-sequence expression 'SEQUENCE-FIRST)
-  (%sequence-first expression))
+  (%sequence-immediate-first expression))
 
 (define (sequence-second expression)
   (guarantee-sequence expression 'SEQUENCE-SECOND)
-  (%sequence-second expression))
+  (%sequence-immediate-second expression))
 
 (define (sequence-immediate-first expression)
   (guarantee-sequence expression 'SEQUENCE-IMMEDIATE-FIRST)
-  (%sequence-first expression))
+  (%sequence-immediate-first expression))
 
 (define (sequence-immediate-second expression)
   (guarantee-sequence expression 'SEQUENCE-IMMEDIATE-SECOND)
-  (%sequence-second expression))
+  (%sequence-immediate-second expression))
 
 (define (sequence-immediate-actions expression)
   (guarantee-sequence expression 'SEQUENCE-IMMEDIATE-ACTIONS)
-  (list (%sequence-first expression)
-       (%sequence-second expression)))
+  (list (%sequence-immediate-first expression)
+       (%sequence-immediate-second expression)))
 
 (define (sequence-actions expression)
   (if (sequence? expression)
-      (append! (sequence-actions (%sequence-first expression))
-              (sequence-actions (%sequence-second expression)))
+      (append! (sequence-actions (%sequence-immediate-first expression))
+              (sequence-actions (%sequence-immediate-second expression)))
       (list expression)))
 
 (define (sequence-components expression receiver)
@@ -83,8 +83,8 @@ USA.
 
 (define (copy-sequence expression)
   (guarantee-sequence expression 'COPY-SEQUENCE)
-  (%make-sequence (%sequence-first expression)
-                 (%sequence-second expression)))
+  (%make-sequence (%sequence-immediate-first expression)
+                 (%sequence-immediate-second expression)))
 
 \f
 ;;;; Conditional
index e7f3cedd3a34c8aaf5856c4f6d71c94d4b14db2b..5dfa1c85e6b3d0b4096ddeba48c21b8fd17daa5a 100644 (file)
@@ -385,10 +385,10 @@ USA.
 
 (define (unsyntax-lambda-body-sequence body)
   (if (sequence? body)
-      (let ((first-action (sequence-first body)))
+      (let ((first-action (sequence-immediate-first body)))
        (if (block-declaration? first-action)
            `((DECLARE ,@(block-declaration-text first-action))
-             ,@(unsyntax-sequence (sequence-second body)))
+             ,@(unsyntax-sequence (sequence-immediate-second body)))
            (unsyntax-sequence body)))
       (list (unsyntax-object body))))
 \f