Changeset 27308 in webkit for trunk/JavaScriptCore/kjs/nodes.h
- Timestamp:
- Oct 31, 2007, 3:54:37 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.h
r27255 r27308 49 49 class FuncDeclNode; 50 50 class PropertyListNode; 51 class SourceElementsNode;52 51 class SourceStream; 53 52 class VarDeclNode; … … 1507 1506 class BlockNode : public StatementNode { 1508 1507 public: 1509 BlockNode( SourceElementsNode *s) KJS_FAST_CALL;1508 BlockNode(Vector<RefPtr<StatementNode> > *children) KJS_FAST_CALL; 1510 1509 virtual void optimizeVariableAccess(FunctionBodyNode*, DeclarationStacks::NodeStack&) KJS_FAST_CALL; 1511 1510 virtual Completion execute(ExecState*) KJS_FAST_CALL; … … 1513 1512 virtual void getDeclarations(DeclarationStacks&) KJS_FAST_CALL; 1514 1513 protected: 1515 RefPtr<SourceElementsNode> source;1514 OwnPtr<Vector<RefPtr<StatementNode> > > m_children; 1516 1515 }; 1517 1516 … … 1703 1702 class FunctionBodyNode : public BlockNode { 1704 1703 public: 1705 FunctionBodyNode( SourceElementsNode *) KJS_FAST_CALL;1704 FunctionBodyNode(Vector<RefPtr<StatementNode> > *children) KJS_FAST_CALL; 1706 1705 int sourceId() KJS_FAST_CALL { return m_sourceId; } 1707 1706 const UString& sourceURL() KJS_FAST_CALL { return m_sourceURL; } … … 1774 1773 }; 1775 1774 1776 // A linked list of source element nodes1777 class SourceElementsNode : public StatementNode {1778 public:1779 static int count;1780 SourceElementsNode(StatementNode*) KJS_FAST_CALL;1781 SourceElementsNode(SourceElementsNode*, StatementNode*) KJS_FAST_CALL;1782 1783 virtual void optimizeVariableAccess(FunctionBodyNode*, DeclarationStacks::NodeStack&) KJS_FAST_CALL;1784 Completion execute(ExecState*) KJS_FAST_CALL;1785 virtual void streamTo(SourceStream&) const KJS_FAST_CALL;1786 PassRefPtr<SourceElementsNode> releaseNext() KJS_FAST_CALL { return next.release(); }1787 virtual void getDeclarations(DeclarationStacks&) KJS_FAST_CALL;1788 private:1789 friend class BlockNode;1790 friend class CaseClauseNode;1791 RefPtr<StatementNode> node;1792 ListRefPtr<SourceElementsNode> next;1793 };1794 1795 1775 class CaseClauseNode : public Node { 1796 1776 public: 1797 1777 CaseClauseNode(Node *e) KJS_FAST_CALL : expr(e) { m_mayHaveDeclarations = true; } 1798 CaseClauseNode(Node *e, SourceElementsNode *s) KJS_FAST_CALL1799 : expr(e), source(s) { m_mayHaveDeclarations = true; }1778 CaseClauseNode(Node *e, Vector<RefPtr<StatementNode> > *children) KJS_FAST_CALL 1779 : expr(e), m_children(children) { m_mayHaveDeclarations = true; } 1800 1780 virtual void optimizeVariableAccess(FunctionBodyNode*, DeclarationStacks::NodeStack&) KJS_FAST_CALL; 1801 1781 JSValue* evaluate(ExecState*) KJS_FAST_CALL; … … 1806 1786 private: 1807 1787 RefPtr<Node> expr; 1808 RefPtr<SourceElementsNode> source;1788 OwnPtr<Vector<RefPtr<StatementNode> > > m_children; 1809 1789 }; 1810 1790 … … 1857 1837 class ProgramNode : public FunctionBodyNode { 1858 1838 public: 1859 ProgramNode( SourceElementsNode* s) KJS_FAST_CALL;1839 ProgramNode(Vector<RefPtr<StatementNode> > *children) KJS_FAST_CALL; 1860 1840 }; 1861 1841 … … 1885 1865 }; 1886 1866 1887 struct SourceElementList {1888 SourceElementsNode* head;1889 SourceElementsNode* tail;1890 };1891 1892 1867 struct ClauseList { 1893 1868 ClauseListNode* head;
Note:
See TracChangeset
for help on using the changeset viewer.