summaryrefslogtreecommitdiffstats
path: root/src/xmlpatterns/expr
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@nokia.com>2011-08-26 21:42:57 (GMT)
committerSergio Ahumada <sergio.ahumada@nokia.com>2011-08-26 21:42:57 (GMT)
commite028a54690f2fedfae6da19fb24b7401e4a71e56 (patch)
tree72c038e84d9fb1063c970a121949d898442c5648 /src/xmlpatterns/expr
parentd54407928be05781ede2358baba2f2f91749cc80 (diff)
parent6661f5c2222c145d854e225076195b37672637d2 (diff)
downloadQt-e028a54690f2fedfae6da19fb24b7401e4a71e56.zip
Qt-e028a54690f2fedfae6da19fb24b7401e4a71e56.tar.gz
Qt-e028a54690f2fedfae6da19fb24b7401e4a71e56.tar.bz2
Merge branch 4.7 into qt-4.8-from-4.7
Conflicts: doc/src/index.qdoc src/xmlpatterns/expr/qevaluationcache_p.h
Diffstat (limited to 'src/xmlpatterns/expr')
-rw-r--r--src/xmlpatterns/expr/qevaluationcache.cpp5
-rw-r--r--src/xmlpatterns/expr/qevaluationcache_p.h1
2 files changed, 3 insertions, 3 deletions
diff --git a/src/xmlpatterns/expr/qevaluationcache.cpp b/src/xmlpatterns/expr/qevaluationcache.cpp
index 67109eb..3b6fc92 100644
--- a/src/xmlpatterns/expr/qevaluationcache.cpp
+++ b/src/xmlpatterns/expr/qevaluationcache.cpp
@@ -49,10 +49,9 @@ template<bool IsForGlobal>
EvaluationCache<IsForGlobal>::EvaluationCache(const Expression::Ptr &op,
const VariableDeclaration *varDecl,
const VariableSlotID aSlot) : SingleContainer(op)
- , m_declaration(varDecl)
+ , m_declarationUsedByMany(varDecl->usedByMany())
, m_varSlot(aSlot)
{
- Q_ASSERT(m_declaration);
Q_ASSERT(m_varSlot > -1);
}
@@ -199,7 +198,7 @@ Expression::Ptr EvaluationCache<IsForGlobal>::compress(const StaticContext::Ptr
if(m_operand->is(IDRangeVariableReference))
return m_operand;
- if(m_declaration->usedByMany())
+ if (m_declarationUsedByMany)
{
/* If it's only an atomic value an EvaluationCache is overkill. However,
* it's still needed for functions like fn:current-time() that must adhere to
diff --git a/src/xmlpatterns/expr/qevaluationcache_p.h b/src/xmlpatterns/expr/qevaluationcache_p.h
index 4111634..67ee5c2 100644
--- a/src/xmlpatterns/expr/qevaluationcache_p.h
+++ b/src/xmlpatterns/expr/qevaluationcache_p.h
@@ -125,6 +125,7 @@ namespace QPatternist
private:
static DynamicContext::Ptr topFocusContext(const DynamicContext::Ptr &context);
const VariableDeclaration* m_declaration;
+ bool m_declarationUsedByMany;
/**
* 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