Paste number 63921: parser patch

Paste number 63921: parser patch
Pasted by: ggaren
2 months, 3 weeks ago
#webkit | Context in IRC logs
Paste contents:
Raw Source | XML | Display As
Index: ChangeLog
===================================================================
--- ChangeLog        (revision 35237)
+++ ChangeLog        (working copy)
@@ -2,6 +2,16 @@
 
         Reviewed by Oliver Hunt.
         
+        Removed some defunct data members and code from the parse tree. Should
+        reduce footprint a bit.
+
+        * kjs/nodes.cpp:
+        * kjs/nodes.h:
+
+2008-07-18  Geoffrey Garen  <ggaren@apple.com>
+
+        Reviewed by Oliver Hunt.
+        
         Optimized <= for immediate number cases.
         
         SunSpider reports no overall change, but a 10% speedup on access-nsieve.
Index: kjs/nodes.cpp
===================================================================
--- kjs/nodes.cpp        (revision 35236)
+++ kjs/nodes.cpp        (working copy)
@@ -998,33 +998,6 @@ static inline RegisterID* statementListE
     return 0;
 }
 
-static inline void statementListPushFIFO(StatementVector& statements, DeclarationStacks::NodeStack& stack)
-{
-    StatementVector::iterator it = statements.end();
-    StatementVector::iterator begin = statements.begin();
-    while (it != begin) {
-        --it;
-        stack.append((*it).get());
-    }
-}
-
-static inline Node* statementListInitializeVariableAccessStack(StatementVector& statements, DeclarationStacks::NodeStack& stack)
-{
-    if (statements.isEmpty())
-        return 0;
-
-    StatementVector::iterator it = statements.end();
-    StatementVector::iterator begin = statements.begin();
-    StatementVector::iterator beginPlusOne = begin + 1;
-
-    while (it != beginPlusOne) {
-        --it;
-        stack.append((*it).get());
-    }
-
-    return (*begin).get();
-}
-
 // ------------------------------ BlockNode ------------------------------------
 
 BlockNode::BlockNode(JSGlobalData* globalData, SourceElements* children)
Index: kjs/nodes.h
===================================================================
--- kjs/nodes.h        (revision 35236)
+++ kjs/nodes.h        (working copy)
@@ -369,8 +369,6 @@ namespace KJS {
 
     protected:
         Identifier m_ident;
-        int m_index; // Used by LocalVarAccessNode and ScopedVarAccessNode.
-        size_t m_scopeDepth; // Used by ScopedVarAccessNode
     };
 
     class ElementNode : public Node {
@@ -683,8 +681,6 @@ namespace KJS {
     protected:
         Identifier m_ident;
         RefPtr<ArgumentsNode> m_args;
-        size_t m_index; // Used by LocalVarFunctionCallNode.
-        size_t m_scopeDepth; // Used by ScopedVarFunctionCallNode and NonLocalVarFunctionCallNode
     };
     
     class FunctionCallBracketNode : public ExpressionNode {
@@ -737,7 +733,6 @@ namespace KJS {
 
     protected:
         Identifier m_ident;
-        size_t m_index; // Used by LocalVarPostfixNode.
     };
 
     class PostfixResolveNode : public PrePostResolveNode {
@@ -920,7 +915,6 @@ namespace KJS {
 
     protected:
         Identifier m_ident;
-        size_t m_index; // Used by LocalTypeOfNode.
     };
 
     class TypeOfValueNode : public ExpressionNode {
@@ -1455,7 +1449,6 @@ namespace KJS {
     protected:
         Identifier m_ident;
         RefPtr<ExpressionNode> m_right;
-        size_t m_index; // Used by ReadModifyLocalVarNode.
         Operator m_operator : 31;
         bool m_rightHasAssignments : 1;
     };
@@ -1478,7 +1471,6 @@ namespace KJS {
     protected:
         Identifier m_ident;
         RefPtr<ExpressionNode> m_right;
-        size_t m_index; // Used by ReadModifyLocalVarNode.
         bool m_rightHasAssignments;
     };
 

This paste has no annotations.

Colorize as:
Show Line Numbers

Ads absolutely not by Google

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.