zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #03199
[Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
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/87341
fixed bug in destruction of exit_catcher_expr
--
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/87341
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog 2012-01-03 12:10:06 +0000
+++ ChangeLog 2012-01-03 12:35:38 +0000
@@ -7,6 +7,8 @@
%ann:must-copy-input-nodes to be used by the no-copy optimization.
* Caching of results for recursive functions with atomic parameter and return types.
* Added %ann:cache and %ann:no-cache to enable or disable caching of results of functions with atomic parameter and return types.
+ * Fixed bug 909126 (bug in cloning of var_expr)
+ * Fixed bug in destruction of exit_catcher_expr
* Added index management function to the C++ api's StaticCollectionManager.
* Fixed bug #905041 (allow for the default element and function namespaces to be
set multiple times via the c++ api).
=== modified file 'src/compiler/expression/script_exprs.cpp'
--- src/compiler/expression/script_exprs.cpp 2012-01-03 12:10:06 +0000
+++ src/compiler/expression/script_exprs.cpp 2012-01-03 12:35:38 +0000
@@ -447,6 +447,17 @@
}
+exit_catcher_expr::~exit_catcher_expr()
+{
+ std::vector<expr*>::const_iterator ite = theExitExprs.begin();
+ std::vector<expr*>::const_iterator end = theExitExprs.end();
+ for (; ite != end; ++ite)
+ {
+ static_cast<exit_expr*>(*ite)->setCatcherExpr(NULL);
+ }
+}
+
+
void exit_catcher_expr::serialize(::zorba::serialization::Archiver& ar)
{
serialize_baseclass(ar, (expr*)this);
=== modified file 'src/compiler/expression/script_exprs.h'
--- src/compiler/expression/script_exprs.h 2012-01-03 12:10:06 +0000
+++ src/compiler/expression/script_exprs.h 2012-01-03 12:35:38 +0000
@@ -380,6 +380,8 @@
const expr_t& inExpr,
std::vector<expr*>& exitExprs);
+ ~exit_catcher_expr();
+
expr* get_expr() const { return theExpr.getp(); }
std::vector<expr*>::const_iterator exitExprsBegin() const
=== added file 'test/rbkt/ExpQueryResults/zorba/no-copy/test1.xml.res'
=== added file 'test/rbkt/Queries/zorba/no-copy/test1.xq'
--- test/rbkt/Queries/zorba/no-copy/test1.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/no-copy/test1.xq 2012-01-03 12:35:38 +0000
@@ -0,0 +1,17 @@
+
+declare function local:clone-node($source as node())
+{
+ local:generate-map($source);
+};
+
+
+declare function local:generate-map($source as node()*)
+{
+ variable $sources := $source//node();
+
+ for $source at $i in $sources
+ return trace($source, "source")
+};
+
+
+local:clone-node(<a/>)
Follow ups