aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/parser/qqmljsast.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-02-28 15:11:36 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-03-14 09:18:58 +0000
commit744fe84d890479962ccb85d0ed6c4515a6ea11f4 (patch)
treeae54a2ba9c6e8feff3e3185c5dc83c071de5c403 /src/qml/parser/qqmljsast.cpp
parent70d726e91e4ef27002b2271805de19077e25809c (diff)
Save some stack space during code generation
Result objects are rather large, 96 bytes here. In a recursive algorithm such as our parser, we should not keep too many of them on the stack. Also, the size of Reference can be reduced by employing a bit field rather than a number of booleans. Also, try to convince the compiler to inline the accept() functions. The extra stack frames those create are unnecessary. Task-number: QTBUG-74087 Change-Id: I5c064491172366bb0abef99ffe9314080401a7d1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljsast.cpp')
-rw-r--r--src/qml/parser/qqmljsast.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/qml/parser/qqmljsast.cpp b/src/qml/parser/qqmljsast.cpp
index 4ebb2d3b5c..54a1200493 100644
--- a/src/qml/parser/qqmljsast.cpp
+++ b/src/qml/parser/qqmljsast.cpp
@@ -65,21 +65,6 @@ ClassExpression *asAnonymousClassDefinition(Node *n)
return c;
}
-
-void Node::accept(Visitor *visitor)
-{
- if (visitor->preVisit(this)) {
- accept0(visitor);
- }
- visitor->postVisit(this);
-}
-
-void Node::accept(Node *node, Visitor *visitor)
-{
- if (node)
- node->accept(visitor);
-}
-
ExpressionNode *Node::expressionCast()
{
return nullptr;