Changeset 11771
- Timestamp:
- 04/20/09 18:32:46 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Closure.java
r11754 r11771 419 419 } 420 420 421 private final LispObject bindParametersAndExecute( 422 Environment ext, 423 LispThread thread, 424 SpecialBinding lastSpecialBinding) 421 private final LispObject bindParametersAndExecute(LispObject... objects) 425 422 throws ConditionThrowable 426 423 { 424 final LispThread thread = LispThread.currentThread(); 425 final SpecialBinding lastSpecialBinding = thread.lastSpecialBinding; 426 Environment ext = new Environment(environment); 427 bindRequiredParameters(ext, thread, objects); 427 428 if (arity != minArgs) 428 429 { … … 445 446 private final void bindRequiredParameters(Environment ext, 446 447 LispThread thread, 447 LispObject ...objects)448 LispObject[] objects) 448 449 throws ConditionThrowable 449 450 { … … 468 469 if (minArgs == 1) 469 470 { 470 final LispThread thread = LispThread.currentThread(); 471 SpecialBinding lastSpecialBinding = thread.lastSpecialBinding; 472 Environment ext = new Environment(environment); 473 bindRequiredParameters(ext, thread, arg); 474 return bindParametersAndExecute(ext, thread, 475 lastSpecialBinding); 471 return bindParametersAndExecute(arg); 476 472 } 477 473 else … … 487 483 if (minArgs == 2) 488 484 { 489 final LispThread thread = LispThread.currentThread(); 490 SpecialBinding lastSpecialBinding = thread.lastSpecialBinding; 491 Environment ext = new Environment(environment); 492 bindRequiredParameters(ext, thread, first, second); 493 return bindParametersAndExecute(ext, thread, 494 lastSpecialBinding); 485 return bindParametersAndExecute(first, second); 495 486 } 496 487 else … … 507 498 if (minArgs == 3) 508 499 { 509 final LispThread thread = LispThread.currentThread(); 510 SpecialBinding lastSpecialBinding = thread.lastSpecialBinding; 511 Environment ext = new Environment(environment); 512 bindRequiredParameters(ext, thread, first, second, third); 513 return bindParametersAndExecute(ext, thread, 514 lastSpecialBinding); 500 return bindParametersAndExecute(first, second, third); 515 501 } 516 502 else … … 527 513 if (minArgs == 4) 528 514 { 529 final LispThread thread = LispThread.currentThread(); 530 SpecialBinding lastSpecialBinding = thread.lastSpecialBinding; 531 Environment ext = new Environment(environment); 532 bindRequiredParameters(ext, thread, first, second, third, fourth); 533 return bindParametersAndExecute(ext, thread, 534 lastSpecialBinding); 515 return bindParametersAndExecute(first, second, third, fourth); 535 516 } 536 517 else … … 548 529 if (minArgs == 5) 549 530 { 550 final LispThread thread = LispThread.currentThread(); 551 SpecialBinding lastSpecialBinding = thread.lastSpecialBinding; 552 Environment ext = new Environment(environment); 553 bindRequiredParameters(ext, thread, first, second, third, fourth, 554 fifth); 555 return bindParametersAndExecute(ext, thread, 556 lastSpecialBinding); 531 return bindParametersAndExecute(first, second, third, fourth, 532 fifth); 557 533 } 558 534 else … … 570 546 if (minArgs == 6) 571 547 { 572 final LispThread thread = LispThread.currentThread(); 573 SpecialBinding lastSpecialBinding = thread.lastSpecialBinding; 574 Environment ext = new Environment(environment); 575 bindRequiredParameters(ext, thread, first, second, third, fourth, 576 fifth, sixth); 577 return bindParametersAndExecute(ext, thread, 578 lastSpecialBinding); 548 return bindParametersAndExecute(first, second, third, fourth, 549 fifth, sixth); 579 550 } 580 551 else … … 594 565 if (minArgs == 7) 595 566 { 596 final LispThread thread = LispThread.currentThread(); 597 SpecialBinding lastSpecialBinding = thread.lastSpecialBinding; 598 Environment ext = new Environment(environment); 599 bindRequiredParameters(ext, thread, first, second, third, fourth, 567 return bindParametersAndExecute(first, second, third, fourth, 600 568 fifth, sixth, seventh); 601 return bindParametersAndExecute(ext, thread,602 lastSpecialBinding);603 569 } 604 570 else … … 618 584 if (minArgs == 8) 619 585 { 620 final LispThread thread = LispThread.currentThread(); 621 SpecialBinding lastSpecialBinding = thread.lastSpecialBinding; 622 Environment ext = new Environment(environment); 623 bindRequiredParameters(ext, thread, first, second, third, fourth, 586 return bindParametersAndExecute(first, second, third, fourth, 624 587 fifth, sixth, seventh, eighth); 625 return bindParametersAndExecute(ext, thread,626 lastSpecialBinding);627 588 } 628 589 else
Note: See TracChangeset
for help on using the changeset viewer.