Commit 1109788a authored by oliver@apple.com's avatar oliver@apple.com

2011-03-16 Oliver Hunt <oliver@apple.com>

        Reviewed by Darin Adler.

        Remove unnecessary caller tracking shenanigans from CodeBlock
        https://bugs.webkit.org/show_bug.cgi?id=56483

        This removes some leftover cruft from when we made CodeBlock
        mark its callees.  Removing it gives us a 0.7% progression,
        reducing the overall regression to ~1.3%.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::shrinkToFit):
        * bytecode/CodeBlock.h:
        (JSC::CallLinkInfo::CallLinkInfo):
        * jit/JIT.cpp:
        (JSC::JIT::linkCall):
        (JSC::JIT::linkConstruct):

git-svn-id: svn://svn.chromium.org/blink/trunk@81276 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5cf87dc1
2011-03-16 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
Remove unnecessary caller tracking shenanigans from CodeBlock
https://bugs.webkit.org/show_bug.cgi?id=56483
This removes some leftover cruft from when we made CodeBlock
mark its callees. Removing it gives us a 0.7% progression,
reducing the overall regression to ~1.3%.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
(JSC::CallLinkInfo::CallLinkInfo):
* jit/JIT.cpp:
(JSC::JIT::linkCall):
(JSC::JIT::linkConstruct):
2011-03-15 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
......
......@@ -1620,7 +1620,6 @@ void CodeBlock::shrinkToFit()
m_structureStubInfos.shrinkToFit();
m_globalResolveInfos.shrinkToFit();
m_callLinkInfos.shrinkToFit();
m_linkedCallerList.shrinkToFit();
#endif
m_identifiers.shrinkToFit();
......
......@@ -101,8 +101,7 @@ namespace JSC {
#if ENABLE(JIT)
struct CallLinkInfo {
CallLinkInfo()
: position(0)
, hasSeenShouldRepatch(0)
: hasSeenShouldRepatch(false)
{
}
......@@ -110,8 +109,7 @@ namespace JSC {
CodeLocationDataLabelPtr hotPathBegin;
CodeLocationNearCall hotPathOther;
WriteBarrier<JSFunction> callee;
unsigned position : 31;
unsigned hasSeenShouldRepatch : 1;
bool hasSeenShouldRepatch;
void setUnlinked() { callee.clear(); }
bool isLinked() { return callee; }
......@@ -292,12 +290,6 @@ namespace JSC {
void expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int& divot, int& startOffset, int& endOffset);
#if ENABLE(JIT)
void addCaller(JSGlobalData& globalData, CallLinkInfo* caller, JSFunction* callee)
{
caller->callee.set(globalData, ownerExecutable(), callee);
caller->position = m_linkedCallerList.size();
m_linkedCallerList.append(caller);
}
StructureStubInfo& getStubInfo(ReturnAddressPtr returnAddress)
{
......@@ -572,7 +564,6 @@ namespace JSC {
Vector<GlobalResolveInfo> m_globalResolveInfos;
Vector<CallLinkInfo> m_callLinkInfos;
Vector<MethodCallLinkInfo> m_methodCallLinkInfos;
Vector<CallLinkInfo*> m_linkedCallerList;
#endif
Vector<unsigned> m_jumpTargets;
......
......@@ -596,10 +596,7 @@ void JIT::linkCall(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBlock* ca
// If this is a native call calleeCodeBlock is null so the number of parameters is unimportant
if (!calleeCodeBlock || (callerArgCount == calleeCodeBlock->m_numParameters)) {
ASSERT(!callLinkInfo->isLinked());
if (calleeCodeBlock)
calleeCodeBlock->addCaller(*globalData, callLinkInfo, callee);
callLinkInfo->callee.set(*globalData, callerCodeBlock->ownerExecutable(), callee);
repatchBuffer.repatch(callLinkInfo->hotPathBegin, callee);
repatchBuffer.relink(callLinkInfo->hotPathOther, code);
}
......@@ -616,10 +613,7 @@ void JIT::linkConstruct(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBloc
// If this is a native call calleeCodeBlock is null so the number of parameters is unimportant
if (!calleeCodeBlock || (callerArgCount == calleeCodeBlock->m_numParameters)) {
ASSERT(!callLinkInfo->isLinked());
if (calleeCodeBlock)
calleeCodeBlock->addCaller(*globalData, callLinkInfo, callee);
callLinkInfo->callee.set(*globalData, callerCodeBlock->ownerExecutable(), callee);
repatchBuffer.repatch(callLinkInfo->hotPathBegin, callee);
repatchBuffer.relink(callLinkInfo->hotPathOther, code);
}
......
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