Changeset 215270 in webkit for trunk/Source/JavaScriptCore


Ignore:
Timestamp:
Apr 12, 2017, 10:19:57 AM (8 years ago)
Author:
Yusuke Suzuki
Message:

Use HAVE(MACHINE_CONTEXT) instead of USE(MACHINE_CONTEXT)
https://bugs.webkit.org/show_bug.cgi?id=170770

Rubber stamped by Mark Lam.

Source/JavaScriptCore:

  • heap/MachineStackMarker.cpp:

(JSC::MachineThreads::MachineThread::Registers::framePointer):
(JSC::MachineThreads::MachineThread::Registers::instructionPointer):
(JSC::MachineThreads::MachineThread::Registers::llintPC):

  • runtime/MachineContext.h:

(JSC::MachineContext::stackPointer):
(JSC::MachineContext::framePointer):
(JSC::MachineContext::instructionPointer):
(JSC::MachineContext::argumentPointer<1>):
(JSC::MachineContext::llintInstructionPointer):

Source/WTF:

  • wtf/Platform.h:
  • wtf/PlatformRegisters.h:
  • wtf/ThreadingPthreads.cpp:

(WTF::Thread::getRegisters):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r215269 r215270  
     12017-04-12  Yusuke Suzuki  <[email protected]>
     2
     3        Use HAVE(MACHINE_CONTEXT) instead of USE(MACHINE_CONTEXT)
     4        https://bugs.webkit.org/show_bug.cgi?id=170770
     5
     6        Rubber stamped by Mark Lam.
     7
     8        * heap/MachineStackMarker.cpp:
     9        (JSC::MachineThreads::MachineThread::Registers::framePointer):
     10        (JSC::MachineThreads::MachineThread::Registers::instructionPointer):
     11        (JSC::MachineThreads::MachineThread::Registers::llintPC):
     12        * runtime/MachineContext.h:
     13        (JSC::MachineContext::stackPointer):
     14        (JSC::MachineContext::framePointer):
     15        (JSC::MachineContext::instructionPointer):
     16        (JSC::MachineContext::argumentPointer<1>):
     17        (JSC::MachineContext::llintInstructionPointer):
     18
    1192017-04-12  Yusuke Suzuki  <[email protected]>
    220
  • trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp

    r215269 r215270  
    233233void* MachineThreads::MachineThread::Registers::framePointer() const
    234234{
    235 #if OS(WINDOWS) || USE(MACHINE_CONTEXT)
     235#if OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
    236236    return MachineContext::framePointer(regs);
    237237#else
     
    242242void* MachineThreads::MachineThread::Registers::instructionPointer() const
    243243{
    244 #if OS(WINDOWS) || USE(MACHINE_CONTEXT)
     244#if OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
    245245    return MachineContext::instructionPointer(regs);
    246246#else
     
    252252{
    253253    // LLInt uses regT4 as PC.
    254 #if OS(WINDOWS) || USE(MACHINE_CONTEXT)
     254#if OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
    255255    return MachineContext::llintInstructionPointer(regs);
    256256#else
  • trunk/Source/JavaScriptCore/runtime/MachineContext.h

    r215269 r215270  
    3838void* stackPointer(const PlatformRegisters&);
    3939
    40 #if OS(WINDOWS) || USE(MACHINE_CONTEXT)
     40#if OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
    4141void*& framePointer(PlatformRegisters&);
    4242void* framePointer(const PlatformRegisters&);
     
    4949void* llintInstructionPointer(const PlatformRegisters&);
    5050#endif // ENABLE(JIT)
    51 #if USE(MACHINE_CONTEXT)
     51#if HAVE(MACHINE_CONTEXT)
    5252void*& stackPointer(mcontext_t&);
    5353void* stackPointer(const mcontext_t&);
     
    6262void* llintInstructionPointer(const mcontext_t&);
    6363#endif // ENABLE(JIT)
    64 #endif // USE(MACHINE_CONTEXT)
    65 #endif // OS(WINDOWS) || USE(MACHINE_CONTEXT)
     64#endif // HAVE(MACHINE_CONTEXT)
     65#endif // OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
    6666
    6767inline void*& stackPointer(PlatformRegisters& regs)
     
    110110#endif
    111111
    112 #elif USE(MACHINE_CONTEXT)
     112#elif HAVE(MACHINE_CONTEXT)
    113113    return stackPointer(regs.machineContext);
    114114#else
     
    123123
    124124
    125 #if USE(MACHINE_CONTEXT)
     125#if HAVE(MACHINE_CONTEXT)
    126126inline void*& stackPointer(mcontext_t& machineContext)
    127127{
     
    166166    return stackPointer(const_cast<mcontext_t&>(machineContext));
    167167}
    168 #endif // USE(MACHINE_CONTEXT)
    169 
    170 
    171 #if OS(WINDOWS) || USE(MACHINE_CONTEXT)
     168#endif // HAVE(MACHINE_CONTEXT)
     169
     170
     171#if OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
    172172inline void*& framePointer(PlatformRegisters& regs)
    173173{
     
    216216#endif
    217217
    218 #elif USE(MACHINE_CONTEXT)
     218#elif HAVE(MACHINE_CONTEXT)
    219219    return framePointer(regs.machineContext);
    220220#endif
     
    225225    return framePointer(const_cast<PlatformRegisters&>(regs));
    226226}
    227 #endif // OS(WINDOWS) || USE(MACHINE_CONTEXT)
    228 
    229 
    230 #if USE(MACHINE_CONTEXT)
     227#endif // OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
     228
     229
     230#if HAVE(MACHINE_CONTEXT)
    231231inline void*& framePointer(mcontext_t& machineContext)
    232232{
     
    275275    return framePointer(const_cast<mcontext_t&>(machineContext));
    276276}
    277 #endif // USE(MACHINE_CONTEXT)
    278 
    279 
    280 #if OS(WINDOWS) || USE(MACHINE_CONTEXT)
     277#endif // HAVE(MACHINE_CONTEXT)
     278
     279
     280#if OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
    281281inline void*& instructionPointer(PlatformRegisters& regs)
    282282{
     
    319319#endif
    320320
    321 #elif USE(MACHINE_CONTEXT)
     321#elif HAVE(MACHINE_CONTEXT)
    322322    return instructionPointer(regs.machineContext);
    323323#endif
     
    328328    return instructionPointer(const_cast<PlatformRegisters&>(regs));
    329329}
    330 #endif // OS(WINDOWS) || USE(MACHINE_CONTEXT)
    331 
    332 
    333 #if USE(MACHINE_CONTEXT)
     330#endif // OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
     331
     332
     333#if HAVE(MACHINE_CONTEXT)
    334334inline void*& instructionPointer(mcontext_t& machineContext)
    335335{
     
    378378    return instructionPointer(const_cast<mcontext_t&>(machineContext));
    379379}
    380 #endif // USE(MACHINE_CONTEXT)
    381 
    382 
    383 #if OS(WINDOWS) || USE(MACHINE_CONTEXT)
    384 #if USE(MACHINE_CONTEXT)
     380#endif // HAVE(MACHINE_CONTEXT)
     381
     382
     383#if OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
     384#if HAVE(MACHINE_CONTEXT)
    385385template<> void*& argumentPointer<1>(mcontext_t&);
    386386#endif
     
    430430#endif
    431431
    432 #elif USE(MACHINE_CONTEXT)
     432#elif HAVE(MACHINE_CONTEXT)
    433433    return argumentPointer<1>(regs.machineContext);
    434434#endif
     
    440440    return argumentPointer<N>(const_cast<PlatformRegisters&>(regs));
    441441}
    442 #endif // OS(WINDOWS) || USE(MACHINE_CONTEXT)
    443 
    444 #if USE(MACHINE_CONTEXT)
     442#endif // OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
     443
     444#if HAVE(MACHINE_CONTEXT)
    445445template<>
    446446inline void*& argumentPointer<1>(mcontext_t& machineContext)
     
    491491    return argumentPointer<N>(const_cast<mcontext_t&>(machineContext));
    492492}
    493 #endif // USE(MACHINE_CONTEXT)
     493#endif // HAVE(MACHINE_CONTEXT)
    494494
    495495#if ENABLE(JIT)
    496 #if OS(WINDOWS) || USE(MACHINE_CONTEXT)
     496#if OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
    497497inline void*& llintInstructionPointer(PlatformRegisters& regs)
    498498{
     
    547547#endif
    548548
    549 #elif USE(MACHINE_CONTEXT)
     549#elif HAVE(MACHINE_CONTEXT)
    550550    return llintInstructionPointer(regs.machineContext);
    551551#endif
     
    556556    return llintInstructionPointer(const_cast<PlatformRegisters&>(regs));
    557557}
    558 #endif // OS(WINDOWS) || USE(MACHINE_CONTEXT)
    559 
    560 
    561 #if USE(MACHINE_CONTEXT)
     558#endif // OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
     559
     560
     561#if HAVE(MACHINE_CONTEXT)
    562562inline void*& llintInstructionPointer(mcontext_t& machineContext)
    563563{
     
    607607    return llintInstructionPointer(const_cast<mcontext_t&>(machineContext));
    608608}
    609 #endif // USE(MACHINE_CONTEXT)
     609#endif // HAVE(MACHINE_CONTEXT)
    610610#endif // ENABLE(JIT)
    611611
Note: See TracChangeset for help on using the changeset viewer.