Changeset 75405 in webkit


Ignore:
Timestamp:
Jan 10, 2011 12:13:38 PM (13 years ago)
Author:
Adam Roben
Message:

Roll out r75289

It was causing assertion failures. See <http://webkit.org/b/52156>.

  • wtf/StackBounds.cpp:

(WTF::StackBounds::initialize):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r75343 r75405  
     12011-01-10  Adam Roben  <aroben@apple.com>
     2
     3        Roll out r75289
     4
     5        It was causing assertion failures. See <http://webkit.org/b/52156>.
     6
     7        * wtf/StackBounds.cpp:
     8        (WTF::StackBounds::initialize):
     9
    1102011-01-08  Patrick Gansterer  <paroga@webkit.org>
    211
  • trunk/Source/JavaScriptCore/wtf/StackBounds.cpp

    r75289 r75405  
    6161//
    6262// These platforms should now be working correctly:
    63 //     DARWIN, WINDOWS-CPU(X86), QNX, UNIX, WINCE
     63//     DARWIN, QNX, UNIX
    6464// These platforms are not:
    65 //     WINDOWS-CPU(X86_64), SOLARIS, OPENBSD, SYMBIAN, HAIKU
     65//     WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
    6666//
    6767// FIXME: remove this! - this code unsafely guesses at stack sizes!
    68 #if (OS(WINDOWS) && CPU(X86_64)) || OS(SOLARIS) || OS(OPENBSD) || OS(SYMBIAN) || OS(HAIKU)
     68#if OS(WINDOWS) || OS(SOLARIS) || OS(OPENBSD) || OS(SYMBIAN) || OS(HAIKU)
    6969// Based on the current limit used by the JSC parser, guess the stack size.
    7070static const ptrdiff_t estimatedStackSize = 128 * sizeof(void*) * 1024;
     
    248248}
    249249
    250 #elif OS(WINDOWS) && (CPU(X86) || CPU(X86_64))
    251 
    252 void StackBounds::initialize()
    253 {
    254 #if CPU(X86)
    255     // Offset 0x18 from the FS segment register gives a pointer to
    256     // the thread information block for the current thread.
     250#elif OS(WINDOWS)
     251
     252void StackBounds::initialize()
     253{
     254#if CPU(X86) && COMPILER(MSVC)
     255    // offset 0x18 from the FS segment register gives a pointer to
     256    // the thread information block for the current thread
    257257    NT_TIB* pTib;
    258 #if COMPILER(MSVC)
    259258    __asm {
    260259        MOV EAX, FS:[18h]
    261260        MOV pTib, EAX
    262261    }
    263 #else
     262    m_origin = static_cast<void*>(pTib->StackBase);
     263#elif CPU(X86) && COMPILER(GCC)
     264    // offset 0x18 from the FS segment register gives a pointer to
     265    // the thread information block for the current thread
     266    NT_TIB* pTib;
    264267    asm ( "movl %%fs:0x18, %0\n"
    265268          : "=r" (pTib)
    266269        );
    267 #endif
    268     // See http://en.wikipedia.org/wiki/Win32_Thread_Information_Block for more information!
    269     void* pDeallocationStack = reinterpret_cast<char*>(pTib) + 0xE0C;
    270270    m_origin = static_cast<void*>(pTib->StackBase);
    271     m_bound = *static_cast<void**>(pDeallocationStack);
    272271#elif CPU(X86_64)
    273272    PNT_TIB64 pTib = reinterpret_cast<PNT_TIB64>(NtCurrentTeb());
    274273    m_origin = reinterpret_cast<void*>(pTib->StackBase);
    275     m_bound = estimateStackBound(m_origin);
    276 #endif
    277 }
    278 
    279274#else
    280 #error Need a way to get the stack bounds on this platform.
     275#error Need a way to get the stack bounds on this platform (Windows)
     276#endif
     277    // Looks like we should be able to get pTib->StackLimit
     278    m_bound = estimateStackBound(m_origin);
     279}
     280
     281#else
     282#error Need a way to get the stack bounds on this platform
    281283#endif
    282284
Note: See TracChangeset for help on using the changeset viewer.