Changeset 13304 in webkit for trunk/JavaScriptCore/kjs/nodes.h
- Timestamp:
- Mar 15, 2006, 2:21:48 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.h
r13153 r13304 81 81 virtual void streamTo(SourceStream &s) const = 0; 82 82 virtual void processVarDecls(ExecState *) {} 83 int lineNo() const { return line; }84 85 // reference counting mechanism86 void ref() { ++m_refcount; }87 void deref() { --m_refcount; if (!m_refcount) delete this; }88 unsigned int refcount() { return m_refcount; }83 int lineNo() const { return m_line; } 84 85 void ref(); 86 void deref(); 87 unsigned int refcount(); 88 static void clearNewNodes(); 89 89 90 90 virtual Node *nodeInsideAllParens(); … … 113 113 void setExceptionDetailsIfNeeded(ExecState *); 114 114 115 int line; 116 UString sourceURL; 117 unsigned int m_refcount; 118 virtual int sourceId() const { return -1; } 119 115 int m_line; 120 116 private: 121 117 // disallow assignment … … 127 123 public: 128 124 StatementNode(); 129 void setLoc(int line0, int line1, int sourceId); 130 int firstLine() const { return l0; } 131 int lastLine() const { return l1; } 132 int sourceId() const { return sid; } 125 void setLoc(int line0, int line1); 126 int firstLine() const { return lineNo(); } 127 int lastLine() const { return m_lastLine; } 133 128 bool hitStatement(ExecState *exec); 134 129 virtual Completion execute(ExecState *exec) = 0; … … 139 134 private: 140 135 JSValue *evaluate(ExecState */*exec*/) { return jsUndefined(); } 141 int l0, l1; 142 int sid; 136 int m_lastLine; 143 137 }; 144 138 … … 1054 1048 class FunctionBodyNode : public BlockNode { 1055 1049 public: 1056 FunctionBodyNode(SourceElementsNode *s); 1057 void processFuncDecl(ExecState *exec); 1050 FunctionBodyNode(SourceElementsNode *); 1051 virtual void processFuncDecl(ExecState *exec); 1052 int sourceId() { return m_sourceId; } 1053 const UString& sourceURL() { return m_sourceURL; } 1054 private: 1055 UString m_sourceURL; 1056 int m_sourceId; 1058 1057 }; 1059 1058
Note:
See TracChangeset
for help on using the changeset viewer.