Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba.
Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/99248 fixed bug #872234 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/99248 Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog' --- ChangeLog 2012-03-23 21:47:51 +0000 +++ ChangeLog 2012-03-26 02:39:19 +0000 @@ -2,6 +2,7 @@ version 2.5 * Fixed bug in window iterator + * Fixed bug #872234 (prevent a rewritting to take place in case of sequential expr) version 2.2 === modified file 'src/compiler/rewriter/rules/flwor_rules.cpp' --- src/compiler/rewriter/rules/flwor_rules.cpp 2012-03-23 17:32:07 +0000 +++ src/compiler/rewriter/rules/flwor_rules.cpp 2012-03-26 02:39:19 +0000 @@ -894,6 +894,7 @@ if (ifReturnExpr != NULL && whereExpr == NULL && !condExpr->is_sequential() && + !thenExpr->is_sequential() && (elseExpr->is_simple() || elseExpr->is_vacuous()) && !elseExpr->isNonDiscardable() && TypeOps::is_empty(tm, *elseExpr->get_return_type())) === added file 'test/rbkt/ExpQueryResults/zorba/scripting/flwor15.xml.res' --- test/rbkt/ExpQueryResults/zorba/scripting/flwor15.xml.res 1970-01-01 00:00:00 +0000 +++ test/rbkt/ExpQueryResults/zorba/scripting/flwor15.xml.res 2012-03-26 02:39:19 +0000 @@ -0,0 +1,1 @@ +0 1 2 3 === added file 'test/rbkt/Queries/zorba/scripting/flwor15.xq' --- test/rbkt/Queries/zorba/scripting/flwor15.xq 1970-01-01 00:00:00 +0000 +++ test/rbkt/Queries/zorba/scripting/flwor15.xq 2012-03-26 02:39:19 +0000 @@ -0,0 +1,34 @@ + + +import module namespace map = "http://www.zorba-xquery.com/modules/store/data-structures/unordered-map"; + +declare namespace ann = "http://www.zorba-xquery.com/annotations"; + +declare variable $local:processed-internal-links as xs:QName := +xs:QName("processed-internal-links"); + + +declare variable $result := (); + + +declare %ann:sequential function local:f1($n as xs:string) +{ + map:insert($local:processed-internal-links, $n, $n); + + $result := ($result, $n); + + for $x in ("1", "2", "3") + return + if(fn:empty(map:get($local:processed-internal-links, $x))) then + local:f1($x) + else + () +}; + + +map:create($local:processed-internal-links, xs:QName("xs:string")); + +local:f1("0"); + +$result +
-- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp