guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, syncase-in-boot-9, updated. 68623e8e78


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, syncase-in-boot-9, updated. 68623e8e7883077dbb26521fe6d9c185df3138ce
Date: Wed, 20 May 2009 15:42:40 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=68623e8e7883077dbb26521fe6d9c185df3138ce

The branch, syncase-in-boot-9 has been updated
       via  68623e8e7883077dbb26521fe6d9c185df3138ce (commit)
       via  9806a548fe1a9cca0f82ef4f2f08fbcba5eccfaa (commit)
      from  ad9b8c451b82f74cf88c5a6207ed3ea72c86f93e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 68623e8e7883077dbb26521fe6d9c185df3138ce
Author: Andy Wingo <address@hidden>
Date:   Wed May 20 17:41:21 2009 +0200

    remove compile-time-environment
    
    * module/ice-9/boot-9.scm (guile-user): Move the `compile' autoload to
      the guile-user module. Remove reference to compile-time-environment.
    
    * module/language/scheme/compile-ghil.scm:
    * module/language/tree-il/compile-glil.scm:
    * module/language/tree-il/optimize.scm:
    * module/system/base/compile.scm:
    * test-suite/tests/compiler.test: Remove definition of and references to
      compile-time-environment. While I do think that recompilation based on
      a lexical environment can be useful, I think it needs to be implemented
      differently. So for now we've lost nothing if we take it away, as it
      doesn't work with syncase anyway.

commit 9806a548fe1a9cca0f82ef4f2f08fbcba5eccfaa
Author: Andy Wingo <address@hidden>
Date:   Wed May 20 17:28:59 2009 +0200

    Fix a bug in the (ice-9 match) test
    
    * testsuite/t-match.scm (matches?): Fix match invocation. As far as I can
      tell, although (ice-9 match) does advertise a => form of clauses, it
      requires that the end of the => be a symbol. For some reason this
      works in the interpreter:
    
        ((lambda () (begin => #t)))
    
      It's part of the expansion of matches?. It also worked in the old
      compiler. Thinking that maybe toplevel references could cause side
      effects, I made the new compiler actually ref =>, which brought this to
      light.

-----------------------------------------------------------------------

Summary of changes:
 module/ice-9/boot-9.scm                  |   16 +---------
 module/language/scheme/compile-ghil.scm  |   10 -------
 module/language/tree-il/compile-glil.scm |    1 -
 module/language/tree-il/optimize.scm     |    1 -
 module/system/base/compile.scm           |    9 +-----
 test-suite/tests/compiler.test           |   43 +++---------------------------
 testsuite/t-match.scm                    |    2 +-
 7 files changed, 8 insertions(+), 74 deletions(-)

diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index cdd840f..6666f80 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -3009,19 +3009,6 @@ module '(ice-9 q) '(make-q q-length))}."
 
 
 
-;;; {Compiler interface}
-;;;
-;;; The full compiler interface can be found in (system). Here we put a
-;;; few useful procedures into the global namespace.
-
-(module-autoload! the-scm-module
-                  '(system base compile)
-                  '(compile
-                    compile-time-environment))
-
-
-
-
 ;;; {Parameters}
 ;;;
 
@@ -3448,6 +3435,7 @@ module '(ice-9 q) '(make-q q-length))}."
 ;;              (module-eval-closure (current-module))))
 ;;     (deannotate/source-properties (sc-expand (annotate exp)))))
 
-(define-module (guile-user))
+(define-module (guile-user)
+  #:autoload (system base compile) (compile))
 
 ;;; boot-9.scm ends here
diff --git a/module/language/scheme/compile-ghil.scm 
b/module/language/scheme/compile-ghil.scm
index 370488c..8d8332c 100644
--- a/module/language/scheme/compile-ghil.scm
+++ b/module/language/scheme/compile-ghil.scm
@@ -414,16 +414,6 @@
   (,args
    (-> (values (map retrans args)))))
 
-(define-scheme-translator compile-time-environment
-  ;; (compile-time-environment)
-  ;; => (MODULE LEXICALS . EXTERNALS)
-  (()
-   (-> (inline 'cons
-               (list (retrans '(current-module))
-                     (-> (inline 'cons
-                                 (list (-> (reified-env))
-                                       (-> (inline 'externals '()))))))))))
-
 (define (lookup-apply-transformer proc)
   (cond ((eq? proc values)
          (lambda (e l args)
diff --git a/module/language/tree-il/compile-glil.scm 
b/module/language/tree-il/compile-glil.scm
index c1e4cd8..226b7d4 100644
--- a/module/language/tree-il/compile-glil.scm
+++ b/module/language/tree-il/compile-glil.scm
@@ -31,7 +31,6 @@
 ;;; TODO:
 ;;
 ;; call-with-values -> mv-bind
-;; compile-time-environment
 ;; basic degenerate-case reduction
 
 ;; allocation:
diff --git a/module/language/tree-il/optimize.scm 
b/module/language/tree-il/optimize.scm
index c8c23c6..4f177a9 100644
--- a/module/language/tree-il/optimize.scm
+++ b/module/language/tree-il/optimize.scm
@@ -46,7 +46,6 @@
     call-with-values @call-with-values
     call-with-current-continuation @call-with-current-continuation
     values
-    ;; compile-time-environment
     eq? eqv? equal?
     = < > <= >= zero?
     + * - / 1- 1+ quotient remainder modulo
diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm
index 7d54947..d0ebde0 100644
--- a/module/system/base/compile.scm
+++ b/module/system/base/compile.scm
@@ -29,7 +29,7 @@
   #:export (syntax-error 
             *current-language*
             compiled-file-name compile-file compile-and-load
-            compile compile-time-environment
+            compile
             decompile)
   #:export-syntax (call-with-compile-error-catch))
 
@@ -152,13 +152,6 @@
         (receive (x e new-cenv) ((car passes) x e opts)
           (lp (cdr passes) x e (if first? new-cenv cenv) #f)))))
 
-(define (compile-time-environment)
-  "A special function known to the compiler that, when compiled, will
-return a representation of the lexical environment in place at compile
-time. Useful for supporting some forms of dynamic compilation. Returns
-#f if called from the interpreter."
-  #f)
-
 (define (find-language-joint from to)
   (let lp ((in (reverse (or (lookup-compilation-order from to)
                             (error "no way to compile" from "to" to))))
diff --git a/test-suite/tests/compiler.test b/test-suite/tests/compiler.test
index d83167f..7324d77 100644
--- a/test-suite/tests/compiler.test
+++ b/test-suite/tests/compiler.test
@@ -18,45 +18,10 @@
 (define-module (test-suite tests compiler)
   :use-module (test-suite lib)
   :use-module (test-suite guile-test)
-  :use-module (system vm program))
+  :use-module (system base compile))
   
 
-(with-test-prefix "environments"
+(with-test-prefix "basic"
 
-  (pass-if "compile-time-environment in evaluator"
-    (eq? (primitive-eval '(compile-time-environment)) #f))
-
-  (pass-if "compile-time-environment in compiler"
-    (equal? (compile '(compile-time-environment))
-            (cons (current-module)
-                  (cons '() '()))))
-
-  (let ((env (compile
-              '(let ((x 0)) (set! x 1) (compile-time-environment)))))
-    (pass-if "compile-time-environment in compiler, heap-allocated var"
-             (equal? env
-                     (cons (current-module)
-                           (cons '((x . 0)) '(1)))))
-
-    ;; fixme: compiling with #t or module
-    (pass-if "recompiling with environment"
-             (equal? ((compile '(lambda () x) #:env env))
-                     1))
-
-    (pass-if "recompiling with environment/2"
-             (equal? ((compile '(lambda () (set! x (1+ x)) x) #:env env))
-                     2))
-
-    (pass-if "recompiling with environment/3"
-             (equal? ((compile '(lambda () x) #:env env))
-                     2))
-    )
-
-  (pass-if "compile environment is #f"
-           (equal? ((compile '(lambda () 10)))
-                   10))
-
-  (pass-if "compile environment is a module"
-           (equal? ((compile '(lambda () 10) #:env (current-module)))
-                   10))
-  )
\ No newline at end of file
+  (pass-if "compile to value"
+    (equal? (compile 1) 1)))
diff --git a/testsuite/t-match.scm b/testsuite/t-match.scm
index 4b85f30..ed56ae7 100644
--- a/testsuite/t-match.scm
+++ b/testsuite/t-match.scm
@@ -12,7 +12,7 @@
 (define (matches? obj)
 ;  (format #t "matches? ~a~%" obj)
   (match obj
-        (($ stuff) => #t)
+        (($ stuff) #t)
 ;       (blurps    #t)
         ("hello"   #t)
         (else #f)))


hooks/post-receive
-- 
GNU Guile




reply via email to

[Prev in Thread] Current Thread [Next in Thread]