Changeset 11326


Ignore:
Timestamp:
09/22/08 20:06:00 (13 years ago)
Author:
ehuelsmann
Message:

Cleanup.

Patch by: Ville Voutilainen <Ville.Voutilainen at gmail dot com>

File:
1 edited

Legend:

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

    r11325 r11326  
    33 *
    44 * Copyright (C) 2002-2008 Peter Graves
     5 * Copyright (C) 2008 Ville Voutilainen
    56 * $Id$
    67 *
     
    437438  }
    438439
     440  private final void bindRequiredParameters(Environment ext,
     441                                            LispThread thread,
     442                                            LispObject... objects)
     443  throws ConditionThrowable
     444  {
     445    for (int i = 0; i < objects.length; ++i)
     446      {
     447        bindArg(requiredParameters[i].var, objects[i], ext, thread);
     448      }
     449  }
     450                                           
    439451  public LispObject execute(LispObject arg) throws ConditionThrowable
    440452  {
     
    444456        SpecialBinding lastSpecialBinding = thread.lastSpecialBinding;
    445457        Environment ext = new Environment(environment);
    446         bindArg(requiredParameters[0].var, arg, ext, thread);
    447   bindParameters(1, ext, thread);
     458        bindRequiredParameters(ext, thread, arg);
     459        bindParameters(1, ext, thread);
    448460        try
    449461          {
     
    471483        SpecialBinding lastSpecialBinding = thread.lastSpecialBinding;
    472484        Environment ext = new Environment(environment);
    473         bindArg(requiredParameters[0].var, first, ext, thread);
    474         bindArg(requiredParameters[1].var, second, ext, thread);
    475   bindParameters(2, ext, thread);
     485        bindRequiredParameters(ext, thread, first, second);
     486        bindParameters(2, ext, thread);
    476487        try
    477488          {
     
    501512        SpecialBinding lastSpecialBinding = thread.lastSpecialBinding;
    502513        Environment ext = new Environment(environment);
    503         bindArg(requiredParameters[0].var, first, ext, thread);
    504         bindArg(requiredParameters[1].var, second, ext, thread);
    505         bindArg(requiredParameters[2].var, third, ext, thread);
    506   bindParameters(3, ext, thread);
     514        bindRequiredParameters(ext, thread, first, second, third);
     515        bindParameters(3, ext, thread);
    507516        try
    508517          {
     
    533542        SpecialBinding lastSpecialBinding = thread.lastSpecialBinding;
    534543        Environment ext = new Environment(environment);
    535         bindArg(requiredParameters[0].var, first, ext, thread);
    536         bindArg(requiredParameters[1].var, second, ext, thread);
    537         bindArg(requiredParameters[2].var, third, ext, thread);
    538         bindArg(requiredParameters[3].var, fourth, ext, thread);
    539   bindParameters(4, ext, thread);       
     544        bindRequiredParameters(ext, thread, first, second, third, fourth);
     545        bindParameters(4, ext, thread);       
    540546        try
    541547          {
     
    568574        SpecialBinding lastSpecialBinding = thread.lastSpecialBinding;
    569575        Environment ext = new Environment(environment);
    570         bindArg(requiredParameters[0].var, first, ext, thread);
    571         bindArg(requiredParameters[1].var, second, ext, thread);
    572         bindArg(requiredParameters[2].var, third, ext, thread);
    573         bindArg(requiredParameters[3].var, fourth, ext, thread);
    574         bindArg(requiredParameters[4].var, fifth, ext, thread);
    575   bindParameters(5, ext, thread);
     576        bindRequiredParameters(ext, thread, first, second, third, fourth,
     577                               fifth);
     578        bindParameters(5, ext, thread);
    576579        try
    577580          {
     
    605608        SpecialBinding lastSpecialBinding = thread.lastSpecialBinding;
    606609        Environment ext = new Environment(environment);
    607         bindArg(requiredParameters[0].var, first, ext, thread);
    608         bindArg(requiredParameters[1].var, second, ext, thread);
    609         bindArg(requiredParameters[2].var, third, ext, thread);
    610         bindArg(requiredParameters[3].var, fourth, ext, thread);
    611         bindArg(requiredParameters[4].var, fifth, ext, thread);
    612         bindArg(requiredParameters[5].var, sixth, ext, thread);
    613   bindParameters(6, ext, thread);
     610        bindRequiredParameters(ext, thread, first, second, third, fourth,
     611                               fifth, sixth);
     612        bindParameters(6, ext, thread);
    614613        try
    615614          {
     
    645644        SpecialBinding lastSpecialBinding = thread.lastSpecialBinding;
    646645        Environment ext = new Environment(environment);
    647         bindArg(requiredParameters[0].var, first, ext, thread);
    648         bindArg(requiredParameters[1].var, second, ext, thread);
    649         bindArg(requiredParameters[2].var, third, ext, thread);
    650         bindArg(requiredParameters[3].var, fourth, ext, thread);
    651         bindArg(requiredParameters[4].var, fifth, ext, thread);
    652         bindArg(requiredParameters[5].var, sixth, ext, thread);
    653         bindArg(requiredParameters[6].var, seventh, ext, thread);
    654   bindParameters(7, ext, thread);
     646        bindRequiredParameters(ext, thread, first, second, third, fourth,
     647                               fifth, sixth, seventh);
     648        bindParameters(7, ext, thread);
    655649        try
    656650          {
     
    692686              ext.declareSpecial(specials[i]);
    693687          }
    694         bindArg(requiredParameters[0].var, first, ext, thread);
    695         bindArg(requiredParameters[1].var, second, ext, thread);
    696         bindArg(requiredParameters[2].var, third, ext, thread);
    697         bindArg(requiredParameters[3].var, fourth, ext, thread);
    698         bindArg(requiredParameters[4].var, fifth, ext, thread);
    699         bindArg(requiredParameters[5].var, sixth, ext, thread);
    700         bindArg(requiredParameters[6].var, seventh, ext, thread);
    701         bindArg(requiredParameters[7].var, eighth, ext, thread);
    702   bindParameters(8, ext, thread);
     688        bindRequiredParameters(ext, thread, first, second, third, fourth,
     689                               fifth, sixth, seventh, eighth);
     690        bindParameters(8, ext, thread);
    703691        try
    704692          {
Note: See TracChangeset for help on using the changeset viewer.