Changeset 223891 in webkit


Ignore:
Timestamp:
Oct 24, 2017 9:36:37 AM (7 years ago)
Author:
Yusuke Suzuki
Message:

[JSC] Drop ArityCheckData
https://bugs.webkit.org/show_bug.cgi?id=178648

Reviewed by Mark Lam.

ArityCheckData is used to return a pair of slotsToAdd and thunkToCall.
However, use of thunkToCall is removed in 64bit environment at r189575.

We remove thunkToCall and align 32bit implementation to 64bit implementation.
Since we no longer need to have the above pair, we can remove ArityCheckData too.

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):
(JSC::setupArityCheckData): Deleted.

  • runtime/CommonSlowPaths.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
Location:
trunk/Source/JavaScriptCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r223875 r223891  
     12017-10-22  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        [JSC] Drop ArityCheckData
     4        https://bugs.webkit.org/show_bug.cgi?id=178648
     5
     6        Reviewed by Mark Lam.
     7
     8        ArityCheckData is used to return a pair of `slotsToAdd` and `thunkToCall`.
     9        However, use of `thunkToCall` is removed in 64bit environment at r189575.
     10
     11        We remove `thunkToCall` and align 32bit implementation to 64bit implementation.
     12        Since we no longer need to have the above pair, we can remove ArityCheckData too.
     13
     14        * llint/LowLevelInterpreter32_64.asm:
     15        * llint/LowLevelInterpreter64.asm:
     16        * runtime/CommonSlowPaths.cpp:
     17        (JSC::SLOW_PATH_DECL):
     18        (JSC::setupArityCheckData): Deleted.
     19        * runtime/CommonSlowPaths.h:
     20        * runtime/VM.cpp:
     21        (JSC::VM::VM):
     22        * runtime/VM.h:
     23
    1242017-10-23  Keith Miller  <keith_miller@apple.com>
    225
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm

    r223738 r223891  
    580580
    581581.noError:
    582     # r1 points to ArityCheckData.
    583     loadp CommonSlowPaths::ArityCheckData::thunkToCall[r1], t3
    584     btpz t3, .proceedInline
    585    
    586     loadp CommonSlowPaths::ArityCheckData::paddedStackSpace[r1], a0
    587     call t3
    588     if ASSERT_ENABLED
    589         loadp ReturnPC[cfr], t0
    590         loadp [t0], t0
    591     end
    592     jmp .continue
    593 
    594 .proceedInline:
    595     loadi CommonSlowPaths::ArityCheckData::paddedStackSpace[r1], t1
     582    move r1, t1 # r1 contains slotsToAdd.
    596583    btiz t1, .continue
    597584    loadi PayloadOffset + ArgumentCount[cfr], t2
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm

    r223738 r223891  
    515515
    516516.noError:
    517     loadi CommonSlowPaths::ArityCheckData::paddedStackSpace[r1], t1
     517    move r1, t1 # r1 contains slotsToAdd.
    518518    btiz t1, .continue
    519519    loadi PayloadOffset + ArgumentCount[cfr], t2
  • trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp

    r223715 r223891  
    168168    } while (false)
    169169
    170 static CommonSlowPaths::ArityCheckData* setupArityCheckData(VM& vm, int slotsToAdd)
    171 {
    172     CommonSlowPaths::ArityCheckData* result = vm.arityCheckData.get();
    173     result->paddedStackSpace = slotsToAdd;
    174 #if ENABLE(JIT)
    175     if (vm.canUseJIT())
    176         result->thunkToCall = vm.getCTIStub(arityFixupGenerator).code().executableAddress();
    177     else
    178 #endif
    179         result->thunkToCall = 0;
    180     return result;
    181 }
    182 
    183170SLOW_PATH_DECL(slow_path_call_arityCheck)
    184171{
     
    193180        RETURN_TWO(bitwise_cast<void*>(static_cast<uintptr_t>(1)), exec);
    194181    }
    195     RETURN_TWO(0, setupArityCheckData(vm, slotsToAdd));
     182    RETURN_TWO(0, bitwise_cast<void*>(static_cast<uintptr_t>(slotsToAdd)));
    196183}
    197184
     
    207194        RETURN_TWO(bitwise_cast<void*>(static_cast<uintptr_t>(1)), exec);
    208195    }
    209     RETURN_TWO(0, setupArityCheckData(vm, slotsToAdd));
     196    RETURN_TWO(0, bitwise_cast<void*>(static_cast<uintptr_t>(slotsToAdd)));
    210197}
    211198
  • trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h

    r221822 r223891  
    4545
    4646namespace CommonSlowPaths {
    47 
    48 struct ArityCheckData {
    49     unsigned paddedStackSpace;
    50     void* thunkToCall;
    51 };
    5247
    5348ALWAYS_INLINE int numberOfExtraSlots(int argumentCountIncludingThis)
  • trunk/Source/JavaScriptCore/runtime/VM.cpp

    r223875 r223891  
    293293    jitStubs = std::make_unique<JITThunks>();
    294294#endif
    295     arityCheckData = std::make_unique<CommonSlowPaths::ArityCheckData>();
    296295
    297296#if ENABLE(FTL_JIT)
  • trunk/Source/JavaScriptCore/runtime/VM.h

    r223875 r223891  
    148148}
    149149#endif // ENABLE(FTL_JIT)
    150 namespace CommonSlowPaths {
    151 struct ArityCheckData;
    152 }
    153150namespace Profiler {
    154151class Database;
     
    481478
    482479#endif // ENABLE(JIT)
    483     std::unique_ptr<CommonSlowPaths::ArityCheckData> arityCheckData;
    484480#if ENABLE(FTL_JIT)
    485481    std::unique_ptr<FTL::Thunks> ftlThunks;
Note: See TracChangeset for help on using the changeset viewer.