summaryrefslogtreecommitdiff
path: root/src/xmlpatterns
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlpatterns')
-rw-r--r--src/xmlpatterns/expr/qevaluationcache_p.h2
-rw-r--r--src/xmlpatterns/expr/qevaluationcache_tpl_p.h2
-rw-r--r--src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h16
-rw-r--r--src/xmlpatterns/xmlpatterns.pro9
4 files changed, 9 insertions, 20 deletions
diff --git a/src/xmlpatterns/expr/qevaluationcache_p.h b/src/xmlpatterns/expr/qevaluationcache_p.h
index 6c2efc7..d3ac422 100644
--- a/src/xmlpatterns/expr/qevaluationcache_p.h
+++ b/src/xmlpatterns/expr/qevaluationcache_p.h
@@ -120,7 +120,7 @@ namespace QPatternist
private:
static DynamicContext::Ptr topFocusContext(const DynamicContext::Ptr &context);
- const VariableDeclaration* m_declaration;
+ const VariableDeclaration::Ptr m_declaration;
/**
* This variable must not be called m_slot. If it so, a compiler bug on
* HP-UX-aCC-64 is triggered in the constructor initializor. See the
diff --git a/src/xmlpatterns/expr/qevaluationcache_tpl_p.h b/src/xmlpatterns/expr/qevaluationcache_tpl_p.h
index 26f53b5..b8e09a9 100644
--- a/src/xmlpatterns/expr/qevaluationcache_tpl_p.h
+++ b/src/xmlpatterns/expr/qevaluationcache_tpl_p.h
@@ -58,7 +58,7 @@ template<bool IsForGlobal>
EvaluationCache<IsForGlobal>::EvaluationCache(const Expression::Ptr &op,
const VariableDeclaration::Ptr &varDecl,
const VariableSlotID aSlot) : SingleContainer(op)
- , m_declaration(varDecl.constData())
+ , m_declaration(varDecl)
, m_varSlot(aSlot)
{
Q_ASSERT(m_declaration);
diff --git a/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h b/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h
index 1cb2e72..9277c1b 100644
--- a/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h
+++ b/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h
@@ -359,19 +359,14 @@ XsdStateMachine<TransitionType> XsdStateMachine<TransitionType>::toDFA() const
QList< QSet<StateId> > workStates;
// add the start state to the list of to processed state sets
- workStates.append(epsilonClosure(QSet<StateId>() << startState));
+ auto firstDfaState = epsilonClosure(QSet<StateId>() << startState);
+ workStates.append(firstDfaState);
+ isMarked.append(firstDfaState);
while (!workStates.isEmpty()) { // as long as there are state sets to process left
-
// enqueue set of states
const QSet<StateId> states = workStates.takeFirst();
- if (isMarked.contains(states)) // we processed this state set already
- continue;
-
- // mark as processed
- isMarked.append(states);
-
// select a list of all inputs that are possible for
// the 'states' set
QList<TransitionType> input;
@@ -395,7 +390,10 @@ XsdStateMachine<TransitionType> XsdStateMachine<TransitionType>::toDFA() const
dfa.addTransition(dfaBegin, input.at(i), dfaEnd);
// add the 'followStates' to the list of to be processed state sets
- workStates.append(followStates);
+ if (!isMarked.contains(followStates)) {
+ workStates.append(followStates);
+ isMarked.append(followStates); // only needs to be processed once
+ }
}
}
diff --git a/src/xmlpatterns/xmlpatterns.pro b/src/xmlpatterns/xmlpatterns.pro
index 5244bb1..eae2ea8 100644
--- a/src/xmlpatterns/xmlpatterns.pro
+++ b/src/xmlpatterns/xmlpatterns.pro
@@ -26,13 +26,4 @@ include($$PWD/type/type.pri)
include($$PWD/utils/utils.pri)
include($$PWD/qobjectmodel/qobjectmodel.pri, "", true)
-wince* {
- # The Microsoft MIPS compiler crashes if /Og is specified.
- # -O2/1 expands to /Og plus additional arguments.
- contains(DEFINES, MIPS) {
- QMAKE_CXXFLAGS_RELEASE ~= s/-O2/-Oi -Ot -Oy -Ob2/
- QMAKE_CXXFLAGS_RELEASE ~= s/-O1/-Os -Oy -Ob2/
- }
-}
-
load(qt_module)