Commit f0eac6ef authored by ggaren@apple.com's avatar ggaren@apple.com
Browse files

2011-01-18 Geoffrey Garen <ggaren@apple.com>

        Reviewed by Darin Adler.

        Removed RegisterFile::markGlobals because it was obtuse, and it
        unnecessarily relied on conservative marking.
        https://bugs.webkit.org/show_bug.cgi?id=52668

        * interpreter/RegisterFile.h: Removed markGlobals.

        * runtime/JSActivation.cpp:
        (JSC::JSActivation::markChildren): Added a comment explaning why some
        JSActivations don't always mark their registers arrays.

        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::markChildren): Instead of calling markGlobals, mark
        the registers array directly.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6b22b706
2011-01-18 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
Removed RegisterFile::markGlobals because it was obtuse, and it
unnecessarily relied on conservative marking.
https://bugs.webkit.org/show_bug.cgi?id=52668
* interpreter/RegisterFile.h: Removed markGlobals.
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren): Added a comment explaning why some
JSActivations don't always mark their registers arrays.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::markChildren): Instead of calling markGlobals, mark
the registers array directly.
2011-01-18 Michael Saboff <msaboff@apple.com>
 
Reviewed by Oliver Hunt.
......
......@@ -131,7 +131,6 @@ namespace JSC {
Register* lastGlobal() const { return m_start - m_numGlobals; }
void markGlobals(MarkStack& markStack, Heap* heap) { heap->markConservatively(markStack, lastGlobal(), m_start); }
void markCallFrames(MarkStack& markStack, Heap* heap) { heap->markConservatively(markStack, m_start, m_end); }
static size_t committedByteCount();
......
......@@ -53,6 +53,7 @@ void JSActivation::markChildren(MarkStack& markStack)
{
Base::markChildren(markStack);
// No need to mark our registers if they're still in the RegisterFile.
Register* registerArray = d()->registerArray.get();
if (!registerArray)
return;
......
......@@ -349,10 +349,6 @@ void JSGlobalObject::markChildren(MarkStack& markStack)
for (HashSet<GlobalCodeBlock*>::const_iterator it = codeBlocks().begin(); it != end; ++it)
(*it)->markAggregate(markStack);
RegisterFile& registerFile = globalData().interpreter->registerFile();
if (registerFile.globalObject() == this)
registerFile.markGlobals(markStack, &globalData().heap);
markIfNeeded(markStack, d()->regExpConstructor);
markIfNeeded(markStack, d()->errorConstructor);
markIfNeeded(markStack, d()->evalErrorConstructor);
......@@ -397,12 +393,7 @@ void JSGlobalObject::markChildren(MarkStack& markStack)
// No need to mark the other structures, because their prototypes are all
// guaranteed to be referenced elsewhere.
Register* registerArray = d()->registerArray.get();
if (!registerArray)
return;
size_t size = d()->registerArraySize;
markStack.appendValues(reinterpret_cast<JSValue*>(registerArray), size);
markStack.appendValues(d()->registers - symbolTable().size(), symbolTable().size());
}
ExecState* JSGlobalObject::globalExec()
......
Supports Markdown
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