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> 2011-03-15 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen. Reviewed by Geoffrey Garen.
......
...@@ -1620,7 +1620,6 @@ void CodeBlock::shrinkToFit() ...@@ -1620,7 +1620,6 @@ void CodeBlock::shrinkToFit()
m_structureStubInfos.shrinkToFit(); m_structureStubInfos.shrinkToFit();
m_globalResolveInfos.shrinkToFit(); m_globalResolveInfos.shrinkToFit();
m_callLinkInfos.shrinkToFit(); m_callLinkInfos.shrinkToFit();
m_linkedCallerList.shrinkToFit();
#endif #endif
m_identifiers.shrinkToFit(); m_identifiers.shrinkToFit();
......
...@@ -101,8 +101,7 @@ namespace JSC { ...@@ -101,8 +101,7 @@ namespace JSC {
#if ENABLE(JIT) #if ENABLE(JIT)
struct CallLinkInfo { struct CallLinkInfo {
CallLinkInfo() CallLinkInfo()
: position(0) : hasSeenShouldRepatch(false)
, hasSeenShouldRepatch(0)
{ {
} }
...@@ -110,8 +109,7 @@ namespace JSC { ...@@ -110,8 +109,7 @@ namespace JSC {
CodeLocationDataLabelPtr hotPathBegin; CodeLocationDataLabelPtr hotPathBegin;
CodeLocationNearCall hotPathOther; CodeLocationNearCall hotPathOther;
WriteBarrier<JSFunction> callee; WriteBarrier<JSFunction> callee;
unsigned position : 31; bool hasSeenShouldRepatch;
unsigned hasSeenShouldRepatch : 1;
void setUnlinked() { callee.clear(); } void setUnlinked() { callee.clear(); }
bool isLinked() { return callee; } bool isLinked() { return callee; }
...@@ -292,12 +290,6 @@ namespace JSC { ...@@ -292,12 +290,6 @@ namespace JSC {
void expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int& divot, int& startOffset, int& endOffset); void expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int& divot, int& startOffset, int& endOffset);
#if ENABLE(JIT) #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) StructureStubInfo& getStubInfo(ReturnAddressPtr returnAddress)
{ {
...@@ -572,7 +564,6 @@ namespace JSC { ...@@ -572,7 +564,6 @@ namespace JSC {
Vector<GlobalResolveInfo> m_globalResolveInfos; Vector<GlobalResolveInfo> m_globalResolveInfos;
Vector<CallLinkInfo> m_callLinkInfos; Vector<CallLinkInfo> m_callLinkInfos;
Vector<MethodCallLinkInfo> m_methodCallLinkInfos; Vector<MethodCallLinkInfo> m_methodCallLinkInfos;
Vector<CallLinkInfo*> m_linkedCallerList;
#endif #endif
Vector<unsigned> m_jumpTargets; Vector<unsigned> m_jumpTargets;
......
...@@ -596,10 +596,7 @@ void JIT::linkCall(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBlock* ca ...@@ -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 this is a native call calleeCodeBlock is null so the number of parameters is unimportant
if (!calleeCodeBlock || (callerArgCount == calleeCodeBlock->m_numParameters)) { if (!calleeCodeBlock || (callerArgCount == calleeCodeBlock->m_numParameters)) {
ASSERT(!callLinkInfo->isLinked()); ASSERT(!callLinkInfo->isLinked());
callLinkInfo->callee.set(*globalData, callerCodeBlock->ownerExecutable(), callee);
if (calleeCodeBlock)
calleeCodeBlock->addCaller(*globalData, callLinkInfo, callee);
repatchBuffer.repatch(callLinkInfo->hotPathBegin, callee); repatchBuffer.repatch(callLinkInfo->hotPathBegin, callee);
repatchBuffer.relink(callLinkInfo->hotPathOther, code); repatchBuffer.relink(callLinkInfo->hotPathOther, code);
} }
...@@ -616,10 +613,7 @@ void JIT::linkConstruct(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBloc ...@@ -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 this is a native call calleeCodeBlock is null so the number of parameters is unimportant
if (!calleeCodeBlock || (callerArgCount == calleeCodeBlock->m_numParameters)) { if (!calleeCodeBlock || (callerArgCount == calleeCodeBlock->m_numParameters)) {
ASSERT(!callLinkInfo->isLinked()); ASSERT(!callLinkInfo->isLinked());
callLinkInfo->callee.set(*globalData, callerCodeBlock->ownerExecutable(), callee);
if (calleeCodeBlock)
calleeCodeBlock->addCaller(*globalData, callLinkInfo, callee);
repatchBuffer.repatch(callLinkInfo->hotPathBegin, callee); repatchBuffer.repatch(callLinkInfo->hotPathBegin, callee);
repatchBuffer.relink(callLinkInfo->hotPathOther, code); 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