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=bb0c8157411586fa9bb661cf9497892a1b3f7c90 The branch, master has been updated via bb0c8157411586fa9bb661cf9497892a1b3f7c90 (commit) via 2a8a127bbec7d9d4dfc0c39cfa0452650f74ab35 (commit) from b92041856024f11a3cf2ecc430a4645c8f2c2e37 (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 bb0c8157411586fa9bb661cf9497892a1b3f7c90 Author: Andy Wingo <wi...@pobox.com> Date: Sun Jun 13 20:17:49 2010 +0200 attempted microoptimization in eval.scm. * module/ice-9/eval.scm (primitive-eval): Try using list-ref instead of cdring in the vm. We'll check the hydra build times to see if this has any actual merit. Surely the best solution is another representation of environments, though. commit 2a8a127bbec7d9d4dfc0c39cfa0452650f74ab35 Author: Andy Wingo <wi...@pobox.com> Date: Fri Jun 11 23:04:42 2010 +0200 compile (ice-9 deprecated) earlier * module/Makefile.am (ICE_9_SOURCES): Reorder placement of (ice-9 deprecated), as it's getting bigger, so we should compile it earlier. ----------------------------------------------------------------------- Summary of changes: module/Makefile.am | 2 +- module/ice-9/eval.scm | 31 ++++++++++++++----------------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/module/Makefile.am b/module/Makefile.am index 0d0463c..d762b62 100644 --- a/module/Makefile.am +++ b/module/Makefile.am @@ -174,6 +174,7 @@ SYSTEM_BASE_SOURCES = \ ICE_9_SOURCES = \ ice-9/r4rs.scm \ ice-9/r5rs.scm \ + ice-9/deprecated.scm \ ice-9/and-let-star.scm \ ice-9/calling.scm \ ice-9/common-list.scm \ @@ -223,7 +224,6 @@ ICE_9_SOURCES = \ ice-9/ftw.scm \ ice-9/gap-buffer.scm \ ice-9/weak-vector.scm \ - ice-9/deprecated.scm \ ice-9/list.scm \ ice-9/serialize.scm \ ice-9/gds-server.scm \ diff --git a/module/ice-9/eval.scm b/module/ice-9/eval.scm index c16f08e..30a373a 100644 --- a/module/ice-9/eval.scm +++ b/module/ice-9/eval.scm @@ -46,6 +46,9 @@ (eval-when (compile) (define-syntax capture-env (syntax-rules () + ((_ (exp ...)) + (let ((env (exp ...))) + (capture-env env))) ((_ env) (if (null? env) (current-module) @@ -340,11 +343,8 @@ (define (eval exp env) (memoized-expression-case exp (('lexical-ref n) - (let lp ((n n) (env env)) - (if (zero? n) - (car env) - (lp (1- n) (cdr env))))) - + (list-ref env n)) + (('call (f nargs . args)) (let ((proc (eval f env))) (call eval proc nargs args env))) @@ -353,10 +353,10 @@ (variable-ref (if (variable? var-or-sym) var-or-sym - (let lp ((env env)) - (if (pair? env) - (lp (cdr env)) - (memoize-variable-access! exp (capture-env env))))))) + (memoize-variable-access! exp + (capture-env (if (pair? env) + (cdr (last-pair env)) + env)))))) (('if (test consequent . alternate)) (if (eval test env) @@ -391,10 +391,7 @@ (('lexical-set! (n . x)) (let ((val (eval x env))) - (let lp ((n n) (env env)) - (if (zero? n) - (set-car! env val) - (lp (1- n) (cdr env)))))) + (list-set! env n val))) (('call-with-values (producer . consumer)) (call-with-values (eval producer env) @@ -416,10 +413,10 @@ (variable-set! (if (variable? var-or-sym) var-or-sym - (let lp ((env env)) - (if (pair? env) - (lp (cdr env)) - (memoize-variable-access! exp (capture-env env))))) + (memoize-variable-access! exp + (capture-env (if (pair? env) + (cdr (last-pair env)) + env)))) (eval x env))) (('dynwind (in exp . out)) hooks/post-receive -- GNU Guile