From: Chris Hanson Date: Wed, 24 Apr 2002 19:20:32 +0000 (+0000) Subject: Implement LAMBDA-NAMES-VECTOR. X-Git-Tag: 20090517-FFI~2187 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=25a41553a3ebcd235e561494c853db38206918ef;p=mit-scheme.git Implement LAMBDA-NAMES-VECTOR. --- diff --git a/v7/src/runtime/lambda.scm b/v7/src/runtime/lambda.scm index 7b3343d7c..d0d4692e8 100644 --- a/v7/src/runtime/lambda.scm +++ b/v7/src/runtime/lambda.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: lambda.scm,v 14.16 2000/10/14 00:56:03 cph Exp $ +$Id: lambda.scm,v 14.17 2002/04/24 19:20:32 cph Exp $ -Copyright (c) 1988-2000 Massachusetts Institute of Technology +Copyright (c) 1988-2000, 2002 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +USA. |# ;;;; Lambda Abstraction @@ -84,6 +85,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. set-clambda-unwrapped-body! set-clexpr-unwrapped-body! set-xlambda-unwrapped-body!)) + (set! lambda-names-vector + (dispatch-0 'LAMBDA-NAME + slambda-names-vector + slexpr-names-vector + xlambda-names-vector)) (set! lambda-name (dispatch-0 'LAMBDA-NAME slambda-name @@ -325,6 +331,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (lambda-body-auxiliary (&triple-first xlambda))) (xlambda-unwrapped-body xlambda)))))))) +(define (xlambda-names-vector xlambda) + (&triple-second xlambda)) + (define (xlambda-name xlambda) (vector-ref (&triple-second xlambda) 0)) @@ -433,6 +442,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define lambda-unwrap-body!) (define lambda-body) (define set-lambda-body!) +(define lambda-names-vector) (define lambda-name) (define lambda-bound) @@ -459,6 +469,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (subvector->list bound 1 (vector-length bound)) (&pair-car slambda)))) +(define (slambda-names-vector slambda) + (&pair-cdr slambda)) + (define-integrable (slambda-name slambda) (vector-ref (&pair-cdr slambda) 0)) @@ -487,6 +500,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (subvector->list bound 1 (vector-length bound)) (&pair-car slexpr)))) +(define (slexpr-names-vector slexpr) + (&pair-cdr slexpr)) + (define-integrable (slexpr-name slexpr) (vector-ref (&pair-cdr slexpr) 0))