Title: [163337] trunk/Source/_javascript_Core
Revision
163337
Author
akl...@apple.com
Date
2014-02-03 16:13:01 -0800 (Mon, 03 Feb 2014)

Log Message

Keep only captured symbols in CodeBlock symbol tables.
<https://webkit.org/b/128050>

Discard all uncaptured symbols at the end of codegen since only
the captured ones will be used after that point.

~2MB progression on Membuster OSUS.

Reviewed by Geoffrey Garen.

* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::setSymbolTable):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (163336 => 163337)


--- trunk/Source/_javascript_Core/ChangeLog	2014-02-04 00:00:46 UTC (rev 163336)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-02-04 00:13:01 UTC (rev 163337)
@@ -1,3 +1,20 @@
+2014-02-03  Andreas Kling  <akl...@apple.com>
+
+        Keep only captured symbols in CodeBlock symbol tables.
+        <https://webkit.org/b/128050>
+
+        Discard all uncaptured symbols at the end of codegen since only
+        the captured ones will be used after that point.
+
+        ~2MB progression on Membuster OSUS.
+
+        Reviewed by Geoffrey Garen.
+
+        * bytecode/UnlinkedCodeBlock.h:
+        (JSC::UnlinkedCodeBlock::setSymbolTable):
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::generate):
+
 2014-02-03  Mark Hahnenberg  <mhahnenb...@apple.com>
 
         Fix the LLInt C loop

Modified: trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h (163336 => 163337)


--- trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h	2014-02-04 00:00:46 UTC (rev 163336)
+++ trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h	2014-02-04 00:13:01 UTC (rev 163337)
@@ -383,6 +383,7 @@
     UnlinkedHandlerInfo& exceptionHandler(int index) { ASSERT(m_rareData); return m_rareData->m_exceptionHandlers[index]; }
 
     SymbolTable* symbolTable() const { return m_symbolTable.get(); }
+    void setSymbolTable(SymbolTable* table) { m_symbolTable.set(*m_vm, this, table); }
 
     VM* vm() const { return m_vm; }
 

Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (163336 => 163337)


--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp	2014-02-04 00:00:46 UTC (rev 163336)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp	2014-02-04 00:13:01 UTC (rev 163337)
@@ -115,6 +115,9 @@
 
     m_codeBlock->shrinkToFit();
 
+    if (m_codeBlock->symbolTable())
+        m_codeBlock->setSymbolTable(m_codeBlock->symbolTable()->cloneCapturedNames(*m_codeBlock->vm()));
+
     if (m_expressionTooDeep)
         return ParserError(ParserError::OutOfMemory);
     return ParserError(ParserError::ErrorNone);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to