Changeset 11883


Ignore:
Timestamp:
05/16/09 17:59:40 (9 years ago)
Author:
ehuelsmann
Message:

Remove CompiledClosure?;
Rename ClosureTemplateFunction? to CompiledClosure?,
as it is no longer a template: it holds the closure context.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/CompiledClosure.java

    r11882 r11883  
    11/*
    2  * ClosureTemplateFunction.java
     2 * CompiledClosure.java
    33 *
    44 * Copyright (C) 2004-2005 Peter Graves
     
    3434package org.armedbear.lisp;
    3535
    36 public class ClosureTemplateFunction extends Closure
     36public class CompiledClosure extends Closure
    3737        implements Cloneable
    3838{
     
    4040  public ClosureBinding[] ctx;
    4141
    42   public ClosureTemplateFunction(LispObject lambdaList)
     42  public CompiledClosure(LispObject lambdaList)
    4343    throws ConditionThrowable
    4444  {
     
    4646  }
    4747
    48   final public ClosureTemplateFunction setContext(ClosureBinding[] context)
     48  final public CompiledClosure setContext(ClosureBinding[] context)
    4949  {
    5050    ctx = context;
     
    5252  }
    5353
    54   final public ClosureTemplateFunction dup()
    55   {
    56       ClosureTemplateFunction result = null;
     54  final public CompiledClosure dup()
     55  {
     56      CompiledClosure result = null;
    5757      try {
    58     result = (ClosureTemplateFunction)super.clone();
     58    result = (CompiledClosure)super.clone();
    5959      } catch (CloneNotSupportedException e) {
    6060      }
  • trunk/abcl/src/org/armedbear/lisp/Lisp.java

    r11881 r11883  
    11901190    throws ConditionThrowable
    11911191  {
    1192     return ((ClosureTemplateFunction)template).dup().setContext(context);
     1192    return ((CompiledClosure)template).dup().setContext(context);
    11931193  }
    11941194
  • trunk/abcl/src/org/armedbear/lisp/Primitives.java

    r11881 r11883  
    24382438            value2 = T;
    24392439            LispObject name = ((CompiledClosure)arg).getLambdaName();
    2440             value3 = name != null ? name : NIL;
    2441           }
    2442         else if (arg instanceof ClosureTemplateFunction)
    2443           {
    2444             value1 = NIL;
    2445             value2 = T;
    2446             LispObject name = ((ClosureTemplateFunction)arg).getLambdaName();
    24472440            value3 = name != null ? name : NIL;
    24482441          }
  • trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

    r11882 r11883  
    241241(defconstant +lisp-return-class+ "org/armedbear/lisp/Return")
    242242(defconstant +lisp-go-class+ "org/armedbear/lisp/Go")
    243 (defconstant +lisp-ctf-class+ "org/armedbear/lisp/ClosureTemplateFunction")
     243(defconstant +lisp-compiled-closure-class+ "org/armedbear/lisp/CompiledClosure")
    244244(defconstant +lisp-compiled-function-class+ "org/armedbear/lisp/CompiledFunction")
    245245(defconstant +lisp-primitive-class+ "org/armedbear/lisp/Primitive")
     
    18171817           (emit-constructor-lambda-list args)
    18181818           (emit-invokespecial-init super (lisp-object-arg-types 2)))
    1819           ((equal super +lisp-ctf-class+)
     1819          ((equal super +lisp-compiled-closure-class+)
    18201820           (emit-constructor-lambda-list args)
    18211821           (emit-invokespecial-init super (lisp-object-arg-types 1)))
     
    30373037                                        ; Stack: template-function
    30383038             (when *closure-variables*
    3039                (emit 'checkcast +lisp-ctf-class+)
     3039               (emit 'checkcast +lisp-compiled-closure-class+)
    30403040               (duplicate-closure-array compiland)
    30413041               (emit-invokestatic +lisp-class+ "makeCompiledClosure"
     
    48574857      (dformat t "(compiland-closure-register parent) = ~S~%"
    48584858         (compiland-closure-register parent))
    4859       (emit 'checkcast +lisp-ctf-class+)
     4859      (emit 'checkcast +lisp-compiled-closure-class+)
    48604860      (duplicate-closure-array parent)
    48614861      (emit-invokestatic +lisp-class+ "makeCompiledClosure"
     
    50175017
    50185018               (when (compiland-closure-register *current-compiland*)
    5019                  (emit 'checkcast +lisp-ctf-class+)
     5019                 (emit 'checkcast +lisp-compiled-closure-class+)
    50205020                 (duplicate-closure-array *current-compiland*)
    50215021                 (emit-invokestatic +lisp-class+ "makeCompiledClosure"
     
    80528052        (progn
    80538053          (aload 0)
    8054           (emit 'getfield +lisp-ctf-class+ "ctx"
     8054          (emit 'getfield +lisp-compiled-closure-class+ "ctx"
    80558055                +closure-binding-array+)
    80568056          (when local-closure-vars
     
    82168216                       (setf (method-descriptor-index execute-method)
    82178217                             (pool-name (method-descriptor execute-method)))
    8218                        +lisp-ctf-class+)
     8218                       +lisp-compiled-closure-class+)
    82198219                     (if *hairy-arglist-p*
    82208220                         +lisp-compiled-function-class+
Note: See TracChangeset for help on using the changeset viewer.