From a9a6dce82770971b88082c4cdeec0e3d688b3a9e Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Sun, 9 Apr 1995 04:45:59 +0000 Subject: [PATCH] Hand coded SIMPLIFY/ENV/FRAME-LOOKUP rather than use ASSOCIATION-PROCEDURE to get better profiling info. --- v8/src/compiler/midend/simplify.scm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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 -- 2.25.1