Changeset 2075


Ignore:
Timestamp:
06/01/03 02:08:36 (20 years ago)
Author:
piso
Message:

eval(): switch (fun.getType()) => switch (fun.getFunctionalType())

File:
1 edited

Legend:

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

    r2071 r2075  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Lisp.java,v 1.73 2003-06-01 01:09:58 piso Exp $
     5 * $Id: Lisp.java,v 1.74 2003-06-01 02:08:36 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5959    static final int TYPE_COMPILED_FUNCTION = 0x00800000;
    6060
    61     static final int TYPE_MACRO_OBJECT      = 0x02000000;
    62 
    6361    // Composite types.
    6462    static final int TYPE_INTEGER  = TYPE_FIXNUM | TYPE_BIGNUM;
     
    6967    static final int TYPE_LIST     = TYPE_CONS | TYPE_NULL;
    7068    static final int TYPE_SEQUENCE = TYPE_VECTOR | TYPE_LIST;
     69
     70    // Functional types.
     71    static final int FTYPE_SPECIAL_OPERATOR = 1;
     72    static final int FTYPE_MACRO            = 2;
    7173
    7274    public static final LispObject funcall(LispObject fun, LispObject[] argv,
     
    174176                if (fun == null)
    175177                    throw new UndefinedFunctionError(first);
    176                 switch (fun.getType()) {
    177                     case TYPE_SPECIAL_OPERATOR: {
     178                switch (fun.getFunctionalType()) {
     179                    case FTYPE_SPECIAL_OPERATOR: {
    178180                        if (profiling)
    179181                            fun.incrementCallCount();
     
    181183                        return fun.execute(obj.cdr(), env);
    182184                    }
    183                     case TYPE_MACRO_OBJECT:
     185                    case FTYPE_MACRO:
    184186                        return eval(macroexpand(obj, env, thread), env, thread);
    185187                    default: {
Note: See TracChangeset for help on using the changeset viewer.