diff options
Diffstat (limited to 'src/declarative/qml/parser/qdeclarativejsast_p.h')
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsast_p.h | 149 |
1 files changed, 3 insertions, 146 deletions
diff --git a/src/declarative/qml/parser/qdeclarativejsast_p.h b/src/declarative/qml/parser/qdeclarativejsast_p.h index 0623a2a..541ea7f 100644 --- a/src/declarative/qml/parser/qdeclarativejsast_p.h +++ b/src/declarative/qml/parser/qdeclarativejsast_p.h @@ -224,6 +224,9 @@ public: inline Node() : kind(Kind_Undefined) {} + // NOTE: node destructors are never called, + // instead we block free the memory + // (see the NodePool class) virtual ~Node() {} virtual ExpressionNode *expressionCast(); @@ -247,7 +250,6 @@ class QML_PARSER_EXPORT ExpressionNode: public Node { public: ExpressionNode() {} - virtual ~ExpressionNode() {} virtual ExpressionNode *expressionCast(); @@ -259,7 +261,6 @@ class QML_PARSER_EXPORT Statement: public Node { public: Statement() {} - virtual ~Statement() {} virtual Statement *statementCast(); @@ -379,7 +380,6 @@ public: QDECLARATIVEJS_DECLARE_AST_NODE(ThisExpression) ThisExpression() { kind = K; } - virtual ~ThisExpression() {} virtual void accept0(Visitor *visitor); @@ -401,8 +401,6 @@ public: IdentifierExpression(NameId *n): name (n) { kind = K; } - virtual ~IdentifierExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -422,7 +420,6 @@ public: QDECLARATIVEJS_DECLARE_AST_NODE(NullExpression) NullExpression() { kind = K; } - virtual ~NullExpression() {} virtual void accept0(Visitor *visitor); @@ -442,7 +439,6 @@ public: QDECLARATIVEJS_DECLARE_AST_NODE(TrueLiteral) TrueLiteral() { kind = K; } - virtual ~TrueLiteral() {} virtual void accept0(Visitor *visitor); @@ -462,7 +458,6 @@ public: QDECLARATIVEJS_DECLARE_AST_NODE(FalseLiteral) FalseLiteral() { kind = K; } - virtual ~FalseLiteral() {} virtual void accept0(Visitor *visitor); @@ -483,7 +478,6 @@ public: NumericLiteral(double v): value(v) { kind = K; } - virtual ~NumericLiteral() {} virtual void accept0(Visitor *visitor); @@ -506,8 +500,6 @@ public: StringLiteral(NameId *v): value (v) { kind = K; } - virtual ~StringLiteral() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -529,8 +521,6 @@ public: RegExpLiteral(NameId *p, int f): pattern (p), flags (f) { kind = K; } - virtual ~RegExpLiteral() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -562,8 +552,6 @@ public: elements (elts), elision (e) { kind = K; } - virtual ~ArrayLiteral() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -591,8 +579,6 @@ public: ObjectLiteral(PropertyNameAndValueList *plist): properties (plist) { kind = K; } - virtual ~ObjectLiteral() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -624,8 +610,6 @@ public: previous->next = this; } - virtual ~ElementList() {} - inline ElementList *finish () { ElementList *front = next; @@ -657,8 +641,6 @@ public: previous->next = this; } - virtual ~Elision() {} - virtual void accept0(Visitor *visitor); inline Elision *finish () @@ -690,8 +672,6 @@ public: previous->next = this; } - virtual ~PropertyNameAndValueList() {} - virtual void accept0(Visitor *visitor); inline PropertyNameAndValueList *finish () @@ -715,7 +695,6 @@ public: QDECLARATIVEJS_DECLARE_AST_NODE(PropertyName) PropertyName() { kind = K; } - virtual ~PropertyName() {} // attributes SourceLocation propertyNameToken; @@ -729,8 +708,6 @@ public: IdentifierPropertyName(NameId *n): id (n) { kind = K; } - virtual ~IdentifierPropertyName() {} - virtual void accept0(Visitor *visitor); // attributes @@ -744,7 +721,6 @@ public: StringLiteralPropertyName(NameId *n): id (n) { kind = K; } - virtual ~StringLiteralPropertyName() {} virtual void accept0(Visitor *visitor); @@ -759,7 +735,6 @@ public: NumericLiteralPropertyName(double n): id (n) { kind = K; } - virtual ~NumericLiteralPropertyName() {} virtual void accept0(Visitor *visitor); @@ -776,8 +751,6 @@ public: base (b), expression (e) { kind = K; } - virtual ~ArrayMemberExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -802,8 +775,6 @@ public: base (b), name (n) { kind = K; } - virtual ~FieldMemberExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -828,8 +799,6 @@ public: base (b), arguments (a) { kind = K; } - virtual ~NewMemberExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -854,8 +823,6 @@ public: NewExpression(ExpressionNode *e): expression (e) { kind = K; } - virtual ~NewExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -878,8 +845,6 @@ public: base (b), arguments (a) { kind = K; } - virtual ~CallExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -912,8 +877,6 @@ public: previous->next = this; } - virtual ~ArgumentList() {} - virtual void accept0(Visitor *visitor); inline ArgumentList *finish () @@ -937,8 +900,6 @@ public: PostIncrementExpression(ExpressionNode *b): base (b) { kind = K; } - virtual ~PostIncrementExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -960,8 +921,6 @@ public: PostDecrementExpression(ExpressionNode *b): base (b) { kind = K; } - virtual ~PostDecrementExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -982,7 +941,6 @@ public: DeleteExpression(ExpressionNode *e): expression (e) { kind = K; } - virtual ~DeleteExpression() {} virtual void accept0(Visitor *visitor); @@ -1005,8 +963,6 @@ public: VoidExpression(ExpressionNode *e): expression (e) { kind = K; } - virtual ~VoidExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1028,8 +984,6 @@ public: TypeOfExpression(ExpressionNode *e): expression (e) { kind = K; } - virtual ~TypeOfExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1051,8 +1005,6 @@ public: PreIncrementExpression(ExpressionNode *e): expression (e) { kind = K; } - virtual ~PreIncrementExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1074,8 +1026,6 @@ public: PreDecrementExpression(ExpressionNode *e): expression (e) { kind = K; } - virtual ~PreDecrementExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1097,8 +1047,6 @@ public: UnaryPlusExpression(ExpressionNode *e): expression (e) { kind = K; } - virtual ~UnaryPlusExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1120,8 +1068,6 @@ public: UnaryMinusExpression(ExpressionNode *e): expression (e) { kind = K; } - virtual ~UnaryMinusExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1143,8 +1089,6 @@ public: TildeExpression(ExpressionNode *e): expression (e) { kind = K; } - virtual ~TildeExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1166,8 +1110,6 @@ public: NotExpression(ExpressionNode *e): expression (e) { kind = K; } - virtual ~NotExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1190,8 +1132,6 @@ public: left (l), op (o), right (r) { kind = K; } - virtual ~BinaryExpression() {} - virtual BinaryExpression *binaryExpressionCast(); virtual void accept0(Visitor *visitor); @@ -1218,8 +1158,6 @@ public: expression (e), ok (t), ko (f) { kind = K; } - virtual ~ConditionalExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1244,8 +1182,6 @@ public: Expression(ExpressionNode *l, ExpressionNode *r): left (l), right (r) { kind = K; } - virtual ~Expression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1268,8 +1204,6 @@ public: Block(StatementList *slist): statements (slist) { kind = K; } - virtual ~Block() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1301,8 +1235,6 @@ public: previous->next = this; } - virtual ~StatementList() {} - virtual void accept0(Visitor *visitor); inline StatementList *finish () @@ -1326,8 +1258,6 @@ public: declarations (vlist) { kind = K; } - virtual ~VariableStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1351,8 +1281,6 @@ public: name (n), expression (e), readOnly(false) { kind = K; } - virtual ~VariableDeclaration() {} - virtual void accept0(Visitor *visitor); // attributes @@ -1379,8 +1307,6 @@ public: previous->next = this; } - virtual ~VariableDeclarationList() {} - virtual void accept0(Visitor *visitor); inline VariableDeclarationList *finish (bool readOnly) @@ -1407,7 +1333,6 @@ public: QDECLARATIVEJS_DECLARE_AST_NODE(EmptyStatement) EmptyStatement() { kind = K; } - virtual ~EmptyStatement() {} virtual void accept0(Visitor *visitor); @@ -1429,8 +1354,6 @@ public: ExpressionStatement(ExpressionNode *e): expression (e) { kind = K; } - virtual ~ExpressionStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1453,8 +1376,6 @@ public: expression (e), ok (t), ko (f) { kind = K; } - virtual ~IfStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1487,8 +1408,6 @@ public: statement (stmt), expression (e) { kind = K; } - virtual ~DoWhileStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1516,8 +1435,6 @@ public: expression (e), statement (stmt) { kind = K; } - virtual ~WhileStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1543,8 +1460,6 @@ public: initialiser (i), condition (c), expression (e), statement (stmt) { kind = K; } - virtual ~ForStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1574,8 +1489,6 @@ public: declarations (vlist), condition (c), expression (e), statement (stmt) { kind = K; } - virtual ~LocalForStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1606,8 +1519,6 @@ public: initialiser (i), expression (e), statement (stmt) { kind = K; } - virtual ~ForEachStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1635,8 +1546,6 @@ public: declaration (v), expression (e), statement (stmt) { kind = K; } - virtual ~LocalForEachStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1664,8 +1573,6 @@ public: ContinueStatement(NameId *l = 0): label (l) { kind = K; } - virtual ~ContinueStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1689,8 +1596,6 @@ public: BreakStatement(NameId *l = 0): label (l) { kind = K; } - virtual ~BreakStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1714,8 +1619,6 @@ public: ReturnStatement(ExpressionNode *e): expression (e) { kind = K; } - virtual ~ReturnStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1739,8 +1642,6 @@ public: expression (e), statement (stmt) { kind = K; } - virtual ~WithStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1766,8 +1667,6 @@ public: clauses (c), defaultClause (d), moreClauses (r) { kind = K; } - virtual ~CaseBlock() {} - virtual void accept0(Visitor *visitor); // attributes @@ -1787,8 +1686,6 @@ public: expression (e), block (b) { kind = K; } - virtual ~SwitchStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1822,8 +1719,6 @@ public: previous->next = this; } - virtual ~CaseClauses() {} - virtual void accept0(Visitor *visitor); inline CaseClauses *finish () @@ -1847,8 +1742,6 @@ public: expression (e), statements (slist) { kind = K; } - virtual ~CaseClause() {} - virtual void accept0(Visitor *visitor); // attributes @@ -1867,8 +1760,6 @@ public: statements (slist) { kind = K; } - virtual ~DefaultClause() {} - virtual void accept0(Visitor *visitor); // attributes @@ -1886,8 +1777,6 @@ public: label (l), statement (stmt) { kind = K; } - virtual ~LabelledStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1911,8 +1800,6 @@ public: ThrowStatement(ExpressionNode *e): expression (e) { kind = K; } - virtual ~ThrowStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -1936,8 +1823,6 @@ public: name (n), statement (stmt) { kind = K; } - virtual ~Catch() {} - virtual void accept0(Visitor *visitor); // attributes @@ -1958,8 +1843,6 @@ public: statement (stmt) { kind = K; } - virtual ~Finally() {} - virtual void accept0(Visitor *visitor); // attributes @@ -1984,8 +1867,6 @@ public: statement (stmt), catchExpression (c), finallyExpression (0) { kind = K; } - virtual ~TryStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -2017,8 +1898,6 @@ public: name (n), formals (f), body (b) { kind = K; } - virtual ~FunctionExpression() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -2048,8 +1927,6 @@ public: FunctionExpression(n, f, b) { kind = K; } - virtual ~FunctionDeclaration() {} - virtual void accept0(Visitor *visitor); }; @@ -2070,8 +1947,6 @@ public: previous->next = this; } - virtual ~FormalParameterList() {} - virtual void accept0(Visitor *visitor); inline FormalParameterList *finish () @@ -2097,8 +1972,6 @@ public: elements (elts) { kind = K; } - virtual ~FunctionBody() {} - virtual void accept0(Visitor *visitor); // attributes @@ -2114,8 +1987,6 @@ public: elements (elts) { kind = K; } - virtual ~Program() {} - virtual void accept0(Visitor *visitor); // attributes @@ -2139,8 +2010,6 @@ public: previous->next = this; } - virtual ~SourceElements() {} - virtual void accept0(Visitor *visitor); inline SourceElements *finish () @@ -2162,8 +2031,6 @@ public: inline SourceElement() { kind = K; } - - virtual ~SourceElement() {} }; class QML_PARSER_EXPORT FunctionSourceElement: public SourceElement @@ -2175,8 +2042,6 @@ public: declaration (f) { kind = K; } - virtual ~FunctionSourceElement() {} - virtual void accept0(Visitor *visitor); // attributes @@ -2192,8 +2057,6 @@ public: statement (stmt) { kind = K; } - virtual ~StatementSourceElement() {} - virtual void accept0(Visitor *visitor); // attributes @@ -2208,8 +2071,6 @@ public: DebuggerStatement() { kind = K; } - virtual ~DebuggerStatement() {} - virtual void accept0(Visitor *visitor); virtual SourceLocation firstSourceLocation() const @@ -2256,8 +2117,6 @@ public: previous->next = this; } - virtual ~UiQualifiedId() {} - UiQualifiedId *finish() { UiQualifiedId *head = next; @@ -2459,8 +2318,6 @@ public: previous->next = this; } - virtual ~UiParameterList() {} - virtual void accept0(Visitor *) {} inline UiParameterList *finish () |