Title: [161369] branches/jsCStack/Source/_javascript_Core
Revision
161369
Author
[email protected]
Date
2014-01-06 13:48:15 -0800 (Mon, 06 Jan 2014)

Log 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:

Modified Paths

Diff

Modified: branches/jsCStack/Source/_javascript_Core/ChangeLog (161368 => 161369)


--- branches/jsCStack/Source/_javascript_Core/ChangeLog	2014-01-06 21:31:06 UTC (rev 161368)
+++ branches/jsCStack/Source/_javascript_Core/ChangeLog	2014-01-06 21:48:15 UTC (rev 161369)
@@ -1,5 +1,21 @@
 2014-01-06  Mark Lam  <[email protected]>
 
+        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:
+
+2014-01-06  Mark Lam  <[email protected]>
+
         CStack: jsStackLimit fixup should not exceed native stack limit.
         https://bugs.webkit.org/show_bug.cgi?id=126487.
 
@@ -513,6 +529,9 @@
 
         Not yet reviewed.
 
+        This patch is so that we can distinguish firstEntryScope from topEntryScope
+        which will be introduced later in https://bugs.webkit.org/show_bug.cgi?id=126334.
+
         Also renamed VMEntryScope::m_prev to m_prevFirstEntryScope.
 
         * debugger/Debugger.cpp:

Modified: branches/jsCStack/Source/_javascript_Core/runtime/VMEntryScope.cpp (161368 => 161369)


--- branches/jsCStack/Source/_javascript_Core/runtime/VMEntryScope.cpp	2014-01-06 21:31:06 UTC (rev 161368)
+++ branches/jsCStack/Source/_javascript_Core/runtime/VMEntryScope.cpp	2014-01-06 21:48:15 UTC (rev 161369)
@@ -37,7 +37,6 @@
     , m_stack(wtfThreadData().stack())
     , m_globalObject(globalObject)
     , m_prevStackUsage(0)
-    , m_prevFirstEntryScope(vm.firstEntryScope)
     , m_prevTopEntryScope(vm.topEntryScope)
     , m_prevStackLimit(vm.stackLimit())
 #if !ENABLE(LLINT_C_LOOP)
@@ -83,7 +82,8 @@
 
 VMEntryScope::~VMEntryScope()
 {
-    m_vm.firstEntryScope = m_prevFirstEntryScope;
+    if (m_vm.firstEntryScope == this)
+        m_vm.firstEntryScope = nullptr;
     m_vm.topEntryScope = m_prevTopEntryScope;
     m_vm.setStackLimit(m_prevStackLimit);
 #if !ENABLE(LLINT_C_LOOP)

Modified: branches/jsCStack/Source/_javascript_Core/runtime/VMEntryScope.h (161368 => 161369)


--- branches/jsCStack/Source/_javascript_Core/runtime/VMEntryScope.h	2014-01-06 21:31:06 UTC (rev 161368)
+++ branches/jsCStack/Source/_javascript_Core/runtime/VMEntryScope.h	2014-01-06 21:48:15 UTC (rev 161369)
@@ -59,7 +59,6 @@
     size_t m_prevStackUsage;
 
     // The following pointers may point to a different thread's stack.
-    VMEntryScope* m_prevFirstEntryScope;
     VMEntryScope* m_prevTopEntryScope;
     void* m_prevStackLimit;
 #if !ENABLE(LLINT_C_LOOP)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to