Changeset 4658


Ignore:
Timestamp:
11/06/03 17:10:55 (18 years ago)
Author:
piso
Message:

%DEFUN: preserve declarations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Primitives.java

    r4640 r4658  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.491 2003-11-04 03:12:00 piso Exp $
     5 * $Id: Primitives.java,v 1.492 2003-11-06 17:10:55 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    13141314                    body = body.cdr();
    13151315                }
     1316                LispObject decls = NIL;
     1317                while (body.car() instanceof Cons && body.car().car() == Symbol.DECLARE) {
     1318                    decls = new Cons(body.car(), decls);
     1319                    body = body.cdr();
     1320                }
    13161321                body = new Cons(symbol, body);
    13171322                body = new Cons(Symbol.BLOCK, body);
    13181323                body = new Cons(body, NIL);
     1324                while (decls != NIL) {
     1325                    body = new Cons(decls.car(), body);
     1326                    decls = decls.cdr();
     1327                }
    13191328                Closure closure = new Closure(symbol.getName(), arglist, body,
    13201329                                              env);
     
    20862095    // function-lambda-expression function => lambda-expression, closure-p, name
    20872096    private static final Primitive1 FUNCTION_LAMBDA_EXPRESSION =
    2088         new Primitive1("function-lambda-expression") {
     2097        new Primitive1("function-lambda-expression")
     2098    {
    20892099        public LispObject execute(LispObject arg) throws ConditionThrowable
    20902100        {
     
    40114021
    40124022    // ### nreverse
    4013     public static final Primitive1 NREVERSE = new Primitive1("nreverse") {
    4014         public LispObject execute (LispObject arg) throws ConditionThrowable {
     4023    public static final Primitive1 NREVERSE = new Primitive1("nreverse")
     4024    {
     4025        public LispObject execute (LispObject arg) throws ConditionThrowable
     4026        {
    40154027            if (arg instanceof AbstractVector) {
    40164028                ((AbstractVector)arg).nreverse();
Note: See TracChangeset for help on using the changeset viewer.