Commit b4345037 authored by oliver@apple.com's avatar oliver@apple.com

Remove CodeBlock's notion of adding identifiers entirely

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

Reviewed by Geoffrey Garen.

Remove addAdditionalIdentifier entirely, including the bogus assertion.
Move the addition of identifiers to DFGPlan::reallyAdd

* bytecode/CodeBlock.h:
* dfg/DFGDesiredIdentifiers.cpp:
(JSC::DFG::DesiredIdentifiers::reallyAdd):
* dfg/DFGDesiredIdentifiers.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::reallyAdd):
(JSC::DFG::Plan::finalize):
* dfg/DFGPlan.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e6928ed3
2013-08-12 Oliver Hunt <oliver@apple.com>
Remove CodeBlock's notion of adding identifiers entirely
https://bugs.webkit.org/show_bug.cgi?id=119708
Reviewed by Geoffrey Garen.
Remove addAdditionalIdentifier entirely, including the bogus assertion.
Move the addition of identifiers to DFGPlan::reallyAdd
* bytecode/CodeBlock.h:
* dfg/DFGDesiredIdentifiers.cpp:
(JSC::DFG::DesiredIdentifiers::reallyAdd):
* dfg/DFGDesiredIdentifiers.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::reallyAdd):
(JSC::DFG::Plan::finalize):
* dfg/DFGPlan.h:
2013-08-12 Oliver Hunt <oliver@apple.com>
Build fix
......
......@@ -664,12 +664,6 @@ public:
return m_jitCode->dfgCommon()->dfgIdentifiers.size();
}
void addAdditionalIdentifier(const Identifier& i)
{
ASSERT(JITCode::isOptimizingJIT(jitType()));
return m_jitCode->dfgCommon()->dfgIdentifiers.append(i);
}
const Identifier& identifier(int index) const
{
size_t unlinkedIdentifiers = m_unlinkedCode->numberOfIdentifiers();
......
......@@ -62,12 +62,12 @@ StringImpl* DesiredIdentifiers::at(unsigned index) const
return result;
}
void DesiredIdentifiers::reallyAdd(VM& vm)
void DesiredIdentifiers::reallyAdd(VM& vm, CommonData* commonData)
{
for (unsigned i = 0; i < m_addedIdentifiers.size(); ++i) {
StringImpl* rep = m_addedIdentifiers[i];
ASSERT(rep->hasAtLeastOneRef());
m_codeBlock->addAdditionalIdentifier(Identifier(&vm, rep));
commonData->dfgIdentifiers.append(Identifier(&vm, rep));
}
}
......
......@@ -38,6 +38,8 @@ class CodeBlock;
namespace DFG {
class CommonData;
class DesiredIdentifiers {
public:
DesiredIdentifiers(CodeBlock*);
......@@ -50,7 +52,7 @@ public:
StringImpl* operator[](unsigned index) const { return at(index); }
void reallyAdd(VM&);
void reallyAdd(VM&, CommonData*);
private:
CodeBlock* m_codeBlock;
......
......@@ -271,10 +271,10 @@ bool Plan::isStillValid()
&& chains.areStillValid();
}
void Plan::reallyAdd()
void Plan::reallyAdd(CommonData* commonData)
{
watchpoints.reallyAdd();
identifiers.reallyAdd(vm);
identifiers.reallyAdd(vm, commonData);
}
CompilationResult Plan::finalize(RefPtr<JSC::JITCode>& jitCode, MacroAssemblerCodePtr* jitCodeWithArityCheck)
......@@ -291,7 +291,7 @@ CompilationResult Plan::finalize(RefPtr<JSC::JITCode>& jitCode, MacroAssemblerCo
if (!result)
return CompilationFailed;
reallyAdd();
reallyAdd(jitCode->dfgCommon());
return CompilationSuccessful;
}
......
......@@ -85,7 +85,7 @@ private:
CompilationPath compileInThreadImpl(LongLivedState&);
bool isStillValid();
void reallyAdd();
void reallyAdd(CommonData*);
};
#else // ENABLE(DFG_JIT)
......
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