From: Stephen Adams Date: Sun, 9 Apr 1995 04:45:59 +0000 (+0000) Subject: Hand coded SIMPLIFY/ENV/FRAME-LOOKUP rather than use X-Git-Tag: 20090517-FFI~6487 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a9a6dce82770971b88082c4cdeec0e3d688b3a9e;p=mit-scheme.git Hand coded SIMPLIFY/ENV/FRAME-LOOKUP rather than use ASSOCIATION-PROCEDURE to get better profiling info. --- diff --git a/v8/src/compiler/midend/simplify.scm b/v8/src/compiler/midend/simplify.scm index 47fdcf960..205323f23 100644 --- a/v8/src/compiler/midend/simplify.scm +++ b/v8/src/compiler/midend/simplify.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: simplify.scm,v 1.9 1995/04/06 18:33:25 adams Exp $ +$Id: simplify.scm,v 1.10 1995/04/09 04:45:59 adams Exp $ Copyright (c) 1994 Massachusetts Institute of Technology @@ -594,8 +594,17 @@ MIT in each case. |# result)) -(define simplify/env/frame-lookup - (association-procedure (lambda (x y) (eq? x y)) simplify/binding/name)) +;; The profiler says a lot of time is being spent here in large programs: +;;(define simplify/env/frame-lookup +;; (association-procedure (lambda (x y) (eq? x y)) simplify/binding/name)) + +(define (simplify/env/frame-lookup name bindings) + (let loop ((bindings bindings)) + (if (pair? bindings) + (if (eq? name (simplify/binding/name (car bindings))) + (car bindings) + (loop (cdr bindings))) + #F))) (define (simplify/lookup*! env name reference kind) ;; kind = 'OPERATOR, 'ORDINARY or 'DBG-INFO