summaryrefslogtreecommitdiff
path: root/src/core/parser/stack
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-04-12 02:50:18 +0200
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2016-04-25 22:24:15 +0200
commitc7cb92f43f97ef5558eee0d7be6f18192134f3ec (patch)
tree6475300d3f1ad862a7d4e4514084770e33ce2775 /src/core/parser/stack
parentc917381e5eb5700326d2389ffe0874565fc970ac (diff)
Replace NodeVector by ManagedVector where NodeVector functionality is not needed. Reduces calls to "Manager.registerEvent" to <10% of original value
Diffstat (limited to 'src/core/parser/stack')
-rw-r--r--src/core/parser/stack/DocumentHandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/parser/stack/DocumentHandler.cpp b/src/core/parser/stack/DocumentHandler.cpp
index ce5d8a2..e6af615 100644
--- a/src/core/parser/stack/DocumentHandler.cpp
+++ b/src/core/parser/stack/DocumentHandler.cpp
@@ -144,7 +144,7 @@ void DocumentChildHandler::pushScopeTokens()
// Fetch the current scope stack and search the first non-transparent field
// or structure
- const NodeVector<Node> &stack = scope().getStack();
+ const ManagedVector<Node> &stack = scope().getStack();
for (auto sit = stack.crbegin(); sit != stack.crend(); sit++) {
Rooted<Node> nd = *sit;
@@ -586,7 +586,7 @@ bool DocumentChildHandler::startToken(Handle<Node> node)
EndTokenResult DocumentChildHandler::endToken(Handle<Node> node, size_t maxStackDepth)
{
// Fetch the current scope stack
- const NodeVector<Node> &stack = scope().getStack();
+ const ManagedVector<Node> &stack = scope().getStack();
bool found = false; // true once the given node has been found
bool repeat = false;
@@ -686,7 +686,7 @@ bool DocumentChildHandler::fieldStart(bool &isDefault, size_t fieldIdx)
preamble(parentNode, dummy, parent);
- NodeVector<FieldDescriptor> fields =
+ ManagedVector<FieldDescriptor> fields =
parent->getDescriptor()->getFieldDescriptors();
if (isDefault) {
@@ -780,7 +780,7 @@ bool DocumentChildHandler::data()
// Search through all permitted default fields of the parent class that
// allow primitive content at this point and could be constructed via
// transparent intermediate entities.
- NodeVector<FieldDescriptor> defaultFields = field->getDefaultFields();
+ ManagedVector<FieldDescriptor> defaultFields = field->getDefaultFields();
// Try to parse the data using the type specified by the respective field.
// If that does not work we proceed to the next possible field.