Changeset 161369 in webkit


Ignore:
Timestamp:
Jan 6, 2014, 1:48:15 PM (12 years ago)
Author:
mark.lam@apple.com
Message:

Follow up patch to remove the need for VMEntryScope::m_prevFirstEntryScope.
https://bugs.webkit.org/show_bug.cgi?id=126266.

Reviewed by Geoffrey Garen.

There can only be one firstEntryScope. Instead of saving the previous value of
VM::firstEntryScope, we now check if the firstEntryScope is the same as this
VMEntryScope in its destructor. If so, we will set VM::firstEntryScope to 0.

  • runtime/VMEntryScope.cpp:

(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::~VMEntryScope):

  • runtime/VMEntryScope.h:
Location:
branches/jsCStack/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/jsCStack/Source/JavaScriptCore/ChangeLog

    r161361 r161369  
     12014-01-06  Mark Lam  <mark.lam@apple.com>
     2
     3        Follow up patch to remove the need for VMEntryScope::m_prevFirstEntryScope.
     4        https://bugs.webkit.org/show_bug.cgi?id=126266.
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        There can only be one firstEntryScope. Instead of saving the previous value of
     9        VM::firstEntryScope, we now check if the firstEntryScope is the same as this
     10        VMEntryScope in its destructor. If so, we will set VM::firstEntryScope to 0.
     11
     12        * runtime/VMEntryScope.cpp:
     13        (JSC::VMEntryScope::VMEntryScope):
     14        (JSC::VMEntryScope::~VMEntryScope):
     15        * runtime/VMEntryScope.h:
     16
    1172014-01-06  Mark Lam  <mark.lam@apple.com>
    218
     
    513529
    514530        Not yet reviewed.
     531
     532        This patch is so that we can distinguish firstEntryScope from topEntryScope
     533        which will be introduced later in https://bugs.webkit.org/show_bug.cgi?id=126334.
    515534
    516535        Also renamed VMEntryScope::m_prev to m_prevFirstEntryScope.
  • branches/jsCStack/Source/JavaScriptCore/runtime/VMEntryScope.cpp

    r161219 r161369  
    3838    , m_globalObject(globalObject)
    3939    , m_prevStackUsage(0)
    40     , m_prevFirstEntryScope(vm.firstEntryScope)
    4140    , m_prevTopEntryScope(vm.topEntryScope)
    4241    , m_prevStackLimit(vm.stackLimit())
     
    8483VMEntryScope::~VMEntryScope()
    8584{
    86     m_vm.firstEntryScope = m_prevFirstEntryScope;
     85    if (m_vm.firstEntryScope == this)
     86        m_vm.firstEntryScope = nullptr;
    8787    m_vm.topEntryScope = m_prevTopEntryScope;
    8888    m_vm.setStackLimit(m_prevStackLimit);
  • branches/jsCStack/Source/JavaScriptCore/runtime/VMEntryScope.h

    r161180 r161369  
    6060
    6161    // The following pointers may point to a different thread's stack.
    62     VMEntryScope* m_prevFirstEntryScope;
    6362    VMEntryScope* m_prevTopEntryScope;
    6463    void* m_prevStackLimit;
Note: See TracChangeset for help on using the changeset viewer.