Remove two unused CodeBlock functions.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Jan 2014 23:10:29 +0000 (23:10 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Jan 2014 23:10:29 +0000 (23:10 +0000)
<https://webkit.org/b/127235>

Kill copyPostParseDataFrom() and copyPostParseDataFromAlternative()
since they are not used.

Reviewed by Anders Carlsson.

* bytecode/CodeBlock.cpp:
* bytecode/CodeBlock.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162278 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/CodeBlock.cpp
Source/JavaScriptCore/bytecode/CodeBlock.h

index 97765c9e4451b3ed47b1e4a62cd53e660e08020c..0cad6c0ae9a0c9c9254b39f4cd134bfc28b675b6 100644 (file)
@@ -1,3 +1,16 @@
+2014-01-18  Andreas Kling  <akling@apple.com>
+
+        Remove two unused CodeBlock functions.
+        <https://webkit.org/b/127235>
+
+        Kill copyPostParseDataFrom() and copyPostParseDataFromAlternative()
+        since they are not used.
+
+        Reviewed by Anders Carlsson.
+
+        * bytecode/CodeBlock.cpp:
+        * bytecode/CodeBlock.h:
+
 2014-01-18  Andreas Kling  <akling@apple.com>
 
         CodeBlock: Size m_exceptionHandlers to fit from creation.
index fb774574614063db59badb13d514624fe0809dd0..7424371fecd074e1618af54aa977426733b9a790 100644 (file)
@@ -2698,31 +2698,6 @@ void CodeBlock::clearEvalCache()
     m_rareData->m_evalCodeCache.clear();
 }
 
-template<typename T, size_t inlineCapacity, typename U, typename V>
-inline void replaceExistingEntries(Vector<T, inlineCapacity, U>& target, Vector<T, inlineCapacity, V>& source)
-{
-    ASSERT(target.size() <= source.size());
-    for (size_t i = 0; i < target.size(); ++i)
-        target[i] = source[i];
-}
-
-void CodeBlock::copyPostParseDataFrom(CodeBlock* alternative)
-{
-    if (!alternative)
-        return;
-    
-    replaceExistingEntries(m_constantRegisters, alternative->m_constantRegisters);
-    replaceExistingEntries(m_functionDecls, alternative->m_functionDecls);
-    replaceExistingEntries(m_functionExprs, alternative->m_functionExprs);
-    if (!!m_rareData && !!alternative->m_rareData)
-        replaceExistingEntries(m_rareData->m_constantBuffers, alternative->m_rareData->m_constantBuffers);
-}
-
-void CodeBlock::copyPostParseDataFromAlternative()
-{
-    copyPostParseDataFrom(m_alternative.get());
-}
-
 void CodeBlock::install()
 {
     ownerExecutable()->installCode(this);
index 70f624557504eee70beca7c2b3e0f8afe6681de3..d49f3afcef0d0cc84962527f1e636a5e4d7f310e 100644 (file)
@@ -721,9 +721,6 @@ public:
     };
     void shrinkToFit(ShrinkMode);
 
-    void copyPostParseDataFrom(CodeBlock* alternative);
-    void copyPostParseDataFromAlternative();
-
     // Functions for controlling when JITting kicks in, in a mixed mode
     // execution world.