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> 2013-08-12 Oliver Hunt <oliver@apple.com>
Build fix Build fix
......
...@@ -664,12 +664,6 @@ public: ...@@ -664,12 +664,6 @@ public:
return m_jitCode->dfgCommon()->dfgIdentifiers.size(); 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 const Identifier& identifier(int index) const
{ {
size_t unlinkedIdentifiers = m_unlinkedCode->numberOfIdentifiers(); size_t unlinkedIdentifiers = m_unlinkedCode->numberOfIdentifiers();
......
...@@ -62,12 +62,12 @@ StringImpl* DesiredIdentifiers::at(unsigned index) const ...@@ -62,12 +62,12 @@ StringImpl* DesiredIdentifiers::at(unsigned index) const
return result; return result;
} }
void DesiredIdentifiers::reallyAdd(VM& vm) void DesiredIdentifiers::reallyAdd(VM& vm, CommonData* commonData)
{ {
for (unsigned i = 0; i < m_addedIdentifiers.size(); ++i) { for (unsigned i = 0; i < m_addedIdentifiers.size(); ++i) {
StringImpl* rep = m_addedIdentifiers[i]; StringImpl* rep = m_addedIdentifiers[i];
ASSERT(rep->hasAtLeastOneRef()); ASSERT(rep->hasAtLeastOneRef());
m_codeBlock->addAdditionalIdentifier(Identifier(&vm, rep)); commonData->dfgIdentifiers.append(Identifier(&vm, rep));
} }
} }
......
...@@ -38,6 +38,8 @@ class CodeBlock; ...@@ -38,6 +38,8 @@ class CodeBlock;
namespace DFG { namespace DFG {
class CommonData;
class DesiredIdentifiers { class DesiredIdentifiers {
public: public:
DesiredIdentifiers(CodeBlock*); DesiredIdentifiers(CodeBlock*);
...@@ -50,7 +52,7 @@ public: ...@@ -50,7 +52,7 @@ public:
StringImpl* operator[](unsigned index) const { return at(index); } StringImpl* operator[](unsigned index) const { return at(index); }
void reallyAdd(VM&); void reallyAdd(VM&, CommonData*);
private: private:
CodeBlock* m_codeBlock; CodeBlock* m_codeBlock;
......
...@@ -271,10 +271,10 @@ bool Plan::isStillValid() ...@@ -271,10 +271,10 @@ bool Plan::isStillValid()
&& chains.areStillValid(); && chains.areStillValid();
} }
void Plan::reallyAdd() void Plan::reallyAdd(CommonData* commonData)
{ {
watchpoints.reallyAdd(); watchpoints.reallyAdd();
identifiers.reallyAdd(vm); identifiers.reallyAdd(vm, commonData);
} }
CompilationResult Plan::finalize(RefPtr<JSC::JITCode>& jitCode, MacroAssemblerCodePtr* jitCodeWithArityCheck) CompilationResult Plan::finalize(RefPtr<JSC::JITCode>& jitCode, MacroAssemblerCodePtr* jitCodeWithArityCheck)
...@@ -291,7 +291,7 @@ CompilationResult Plan::finalize(RefPtr<JSC::JITCode>& jitCode, MacroAssemblerCo ...@@ -291,7 +291,7 @@ CompilationResult Plan::finalize(RefPtr<JSC::JITCode>& jitCode, MacroAssemblerCo
if (!result) if (!result)
return CompilationFailed; return CompilationFailed;
reallyAdd(); reallyAdd(jitCode->dfgCommon());
return CompilationSuccessful; return CompilationSuccessful;
} }
......
...@@ -85,7 +85,7 @@ private: ...@@ -85,7 +85,7 @@ private:
CompilationPath compileInThreadImpl(LongLivedState&); CompilationPath compileInThreadImpl(LongLivedState&);
bool isStillValid(); bool isStillValid();
void reallyAdd(); void reallyAdd(CommonData*);
}; };
#else // ENABLE(DFG_JIT) #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