From: <br...@us...> - 2006-03-31 10:25:04
|
Revision: 3016 Author: brihaye Date: 2006-03-31 02:24:52 -0800 (Fri, 31 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3016&view=rev Log Message: ----------- Refactored previous commit. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java Modified: trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java 2006-03-31 09:45:48 UTC (rev 3015) +++ trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java 2006-03-31 10:24:52 UTC (rev 3016) @@ -156,8 +156,8 @@ // left expression returns node set if (Type.subTypeOf(getLeft().returnsType(), Type.NODE) && // and does not depend on the context item - (leftDeps & Dependency.CONTEXT_ITEM) == 0 && - (!inWhereClause || (leftDeps & Dependency.CONTEXT_VARS) == 0)) + !Dependency.dependsOn(leftDeps, Dependency.CONTEXT_ITEM) && + (!inWhereClause || !Dependency.dependsOn(leftDeps, Dependency.CONTEXT_VARS))) { return Dependency.CONTEXT_SET; } else { @@ -198,8 +198,8 @@ contextSequence = contextItem.toSequence(); - if (getRight().getDependencies() != Dependency.NO_DEPENDENCY && - !Dependency.dependsOn(getRight().getDependencies(), Dependency.CONTEXT_ITEM)) + if (!Dependency.dependsOn(getRight().getDependencies(), Dependency.CONTEXT_ITEM) && + Type.subTypeOf(getRight().returnsType(), Type.NODE)) { if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION CHOICE", "quickNodeSetCompare"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |