Commit 2ef8a3fe authored by mhahnenberg@apple.com's avatar mhahnenberg@apple.com

Remove StackBounds from JSGlobalData

https://bugs.webkit.org/show_bug.cgi?id=76310

Reviewed by Sam Weinig.

Removed StackBounds and the stack() function from JSGlobalData since it no 
longer accessed any members of JSGlobalData.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::addCurrentThread):
(JSC::MachineThreads::gatherFromCurrentThread):
* parser/Parser.cpp:
(JSC::::Parser):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent bd81e4f9
2012-01-23 Mark Hahnenberg <mhahnenberg@apple.com>
Remove StackBounds from JSGlobalData
https://bugs.webkit.org/show_bug.cgi?id=76310
Reviewed by Sam Weinig.
Removed StackBounds and the stack() function from JSGlobalData since it no
longer accessed any members of JSGlobalData.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::addCurrentThread):
(JSC::MachineThreads::gatherFromCurrentThread):
* parser/Parser.cpp:
(JSC::::Parser):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
2012-01-23 Gavin Barraclough <barraclough@apple.com>
Implement a JIT-code aware sampling profiler for JSC
......@@ -217,7 +217,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, ScopeChainNode* s
#ifndef NDEBUG
, m_lastOpcodePosition(0)
#endif
, m_stack(m_globalData->stack())
, m_stack(wtfThreadData().stack())
, m_usesExceptions(false)
, m_expressionTooDeep(false)
{
......@@ -288,7 +288,7 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, ScopeChainN
#ifndef NDEBUG
, m_lastOpcodePosition(0)
#endif
, m_stack(m_globalData->stack())
, m_stack(wtfThreadData().stack())
, m_usesExceptions(false)
, m_expressionTooDeep(false)
{
......@@ -449,7 +449,7 @@ BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, ScopeChainNode* scopeCh
#ifndef NDEBUG
, m_lastOpcodePosition(0)
#endif
, m_stack(m_globalData->stack())
, m_stack(wtfThreadData().stack())
, m_usesExceptions(false)
, m_expressionTooDeep(false)
{
......
......@@ -193,7 +193,7 @@ void MachineThreads::addCurrentThread()
return;
pthread_setspecific(m_threadSpecific, this);
Thread* thread = new Thread(getCurrentPlatformThread(), m_heap->globalData()->stack().origin());
Thread* thread = new Thread(getCurrentPlatformThread(), wtfThreadData().stack().origin());
MutexLocker lock(m_registeredThreadsMutex);
......@@ -257,7 +257,7 @@ void MachineThreads::gatherFromCurrentThread(ConservativeRoots& conservativeRoot
conservativeRoots.add(registersBegin, registersEnd);
void* stackBegin = stackCurrent;
void* stackEnd = m_heap->globalData()->stack().origin();
void* stackEnd = wtfThreadData().stack().origin();
swapIfBackwards(stackBegin, stackEnd);
conservativeRoots.add(stackBegin, stackEnd);
}
......
......@@ -43,7 +43,7 @@ template <typename LexerType>
Parser<LexerType>::Parser(JSGlobalData* globalData, const SourceCode& source, FunctionParameters* parameters, JSParserStrictness strictness, JSParserMode parserMode)
: m_globalData(globalData)
, m_source(&source)
, m_stack(globalData->stack())
, m_stack(wtfThreadData().stack())
, m_error(false)
, m_errorMessage("Parse error")
, m_allowsIn(true)
......
......@@ -162,8 +162,6 @@ JSGlobalData::JSGlobalData(GlobalDataType globalDataType, ThreadStackType thread
#endif
{
interpreter = new Interpreter;
if (globalDataType == Default)
m_stack = wtfThreadData().stack();
// Need to be careful to keep everything consistent here
IdentifierTable* existingEntryIdentifierTable = wtfThreadData().setCurrentIdentifierTable(identifierTable);
......
......@@ -223,13 +223,6 @@ namespace JSC {
bool canUseJIT() { return m_canUseJIT; }
#endif
const StackBounds& stack()
{
return (globalDataType == Default)
? m_stack
: wtfThreadData().stack();
}
OwnPtr<ParserArena> parserArena;
OwnPtr<Keywords> keywords;
Interpreter* interpreter;
......@@ -359,7 +352,6 @@ namespace JSC {
#if ENABLE(JIT) && ENABLE(INTERPRETER)
bool m_canUseJIT;
#endif
StackBounds m_stack;
#if ENABLE(GC_VALIDATION)
bool m_isInitializingObject;
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment