Changeset 14024


Ignore:
Timestamp:
07/29/12 20:08:54 (8 years ago)
Author:
ehuelsmann
Message:

Fix #60 (Implement USE_FAST_CALLS properly) by deleting the USE_FAST_CALLS
infrastructure in LispThread?: The suggested alternative has existed in
the compiler for a looooong time already.

File:
1 edited

Legend:

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

    r13540 r14024  
    4646public final class LispThread extends LispObject
    4747{
    48     static boolean use_fast_calls = false;
     48//    static boolean use_fast_calls = false;
    4949
    5050    // use a concurrent hashmap: we may want to add threads
     
    626626    public LispObject execute(LispObject function)
    627627    {
    628         if (use_fast_calls)
    629             return function.execute();
    630 
    631628        pushStackFrame(new LispStackFrame(function));
    632629        try {
     
    640637    @Override
    641638    public LispObject execute(LispObject function, LispObject arg)
    642 
    643     {
    644         if (use_fast_calls)
    645             return function.execute(arg);
    646 
     639    {
    647640        pushStackFrame(new LispStackFrame(function, arg));
    648641        try {
     
    657650    public LispObject execute(LispObject function, LispObject first,
    658651                              LispObject second)
    659 
    660     {
    661         if (use_fast_calls)
    662             return function.execute(first, second);
    663 
     652    {
    664653        pushStackFrame(new LispStackFrame(function, first, second));
    665654        try {
     
    674663    public LispObject execute(LispObject function, LispObject first,
    675664                              LispObject second, LispObject third)
    676 
    677     {
    678         if (use_fast_calls)
    679             return function.execute(first, second, third);
    680 
     665    {
    681666        pushStackFrame(new LispStackFrame(function, first, second, third));
    682667        try {
     
    692677                              LispObject second, LispObject third,
    693678                              LispObject fourth)
    694 
    695     {
    696         if (use_fast_calls)
    697             return function.execute(first, second, third, fourth);
    698 
     679    {
    699680        pushStackFrame(new LispStackFrame(function, first, second, third, fourth));
    700681        try {
     
    710691                              LispObject second, LispObject third,
    711692                              LispObject fourth, LispObject fifth)
    712 
    713     {
    714         if (use_fast_calls)
    715             return function.execute(first, second, third, fourth, fifth);
    716 
     693    {
    717694        pushStackFrame(new LispStackFrame(function, first, second, third, fourth, fifth));
    718695        try {
     
    729706                              LispObject fourth, LispObject fifth,
    730707                              LispObject sixth)
    731 
    732     {
    733         if (use_fast_calls)
    734             return function.execute(first, second, third, fourth, fifth, sixth);
    735 
     708    {
    736709        pushStackFrame(new LispStackFrame(function, first, second,
    737710            third, fourth, fifth, sixth));
     
    749722                              LispObject fourth, LispObject fifth,
    750723                              LispObject sixth, LispObject seventh)
    751 
    752     {
    753         if (use_fast_calls)
    754             return function.execute(first, second, third, fourth, fifth, sixth,
    755                                     seventh);
    756 
     724    {
    757725        pushStackFrame(new LispStackFrame(function, first, second, third,
    758726            fourth, fifth, sixth, seventh));
     
    771739                              LispObject sixth, LispObject seventh,
    772740                              LispObject eighth)
    773 
    774     {
    775         if (use_fast_calls)
    776             return function.execute(first, second, third, fourth, fifth, sixth,
    777                                     seventh, eighth);
    778 
     741    {
    779742        pushStackFrame(new LispStackFrame(function, first, second, third,
    780743            fourth, fifth, sixth, seventh, eighth));
     
    789752
    790753    public LispObject execute(LispObject function, LispObject[] args)
    791 
    792     {
    793         if (use_fast_calls)
    794             return function.execute(args);
    795 
     754    {
    796755        pushStackFrame(new LispStackFrame(function, args));
    797756        try {
     
    12041163
    12051164
    1206     @DocString(name="use-fast-calls")
    1207     private static final Primitive USE_FAST_CALLS =
    1208         new Primitive("use-fast-calls", PACKAGE_SYS, true)
    1209     {
    1210         @Override
    1211         public LispObject execute(LispObject arg)
    1212         {
    1213             use_fast_calls = (arg != NIL);
    1214             return use_fast_calls ? T : NIL;
    1215         }
    1216     };
    1217 
    12181165    @DocString(name="synchronized-on", args="form &body body")
    12191166    private static final SpecialOperator SYNCHRONIZED_ON =
Note: See TracChangeset for help on using the changeset viewer.