Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1490/compiler/mil
Modified Files:
Tag: xquery-decomposition
milgen.brg
Log Message:
propagated changes of Thursday Mar 27 2008 - Friday Mar 28 2008
from the development trunk to the xquery-decomposition branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/03/27 - tsheyar: compiler/algebra/prop/prop_key.c,1.44
-- Fixed wrong property inference (-- we cannot get a key out of nowhere).
-- Extended property inference for positional selections to compensate the
``restriction'' for the above fix.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/03/27 - mr-meltdown:
NT/MonetDB4-XQuery/MonetDB4-XQuery-Installer.vdproj,1.12
NT/MonetDB4-XQuery64/MonetDB4-XQuery-Installer.vdproj,1.4
MCL jar release number has changed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/03/28 - tsheyar: compiler/mil/milgen.brg,1.123
-- Completed compile time changes to correctly cope with attribute
context nodes in {ancestor-or-|descendant-or-|}self steps.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/03/28 - tsheyar:
tests/XQuery/Tests/step_ancestor-or-self_attr.stable.out,1.2
-- Correct stable output
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/03/28 - sjoerd: compiler/algebra/core2alg.brg,1.69
propagated changes of Thursday Mar 27 2008 - Friday Mar 28 2008
from the XQuery_0-22 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/03/27 - tsheyar: compiler/algebra/core2alg.brg,1.61.2.2
-- Fixing bug triggered by proxy operator rewriting
(as e.g. in benchmarks/XBench/DC_MD/q04 observed).
An assumption for the proxy rewrite was not met. The problem is now
circumvented by generating algebra code that fulfills the assumption
(during Core to Logical Algebra translation).
Details: Moved rownum operator generating the numbers for the positional
for-loop variable outside the body. We thus avoid any reference
to an outer scope from an inner scope. We hopefully get rid of
(parts of) the proxy idea soon and thus do not have to rely any
more on the fragile assumptions ensured only by the code
generation.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/03/28 - tsheyar: compiler/core/coreopt.brg,1.64
-- Made Core optimization for path steps less aggressive
(-- too much steps got pruned).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
U milgen.brg
Index: milgen.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/milgen.brg,v
retrieving revision 1.96.2.10
retrieving revision 1.96.2.11
diff -u -d -r1.96.2.10 -r1.96.2.11
--- milgen.brg 21 Mar 2008 09:49:26 -0000 1.96.2.10
+++ milgen.brg 28 Mar 2008 14:55:15 -0000 1.96.2.11
@@ -740,7 +740,7 @@
/***********************************/
/** @brief Lookup the type of the @a att column in the schema of node @a n. */
static PFalg_simple_type_t
-type_of (PFpa_op_t *n, PFalg_att_t att)
+type_of (const PFpa_op_t *n, PFalg_att_t att)
{ /* fold( */
assert (n);
@@ -1682,27 +1682,18 @@
*map = new_var (1), /* mapping helper variable */
*ret_iter = new_var (p->refctr), /* the `iter' result variable */
*ret_frag = new_var (p->refctr), /* the `frag' result variable */
- *ret_pre = new_var (p->refctr), /* the `pre' result variable */
- *ret_attr = NULL; /* the `attr' result variable */
+ *ret_pre = new_var (p->refctr); /* the `pre' result variable */
PFalg_att_t pa_iter = p->sem.scjoin.iter;
PFalg_att_t pa_item = p->sem.scjoin.item;
- PFalg_simple_type_t item_ty = type_of (L(p), pa_item),
- iter_ty = type_of (L(p), pa_iter);
+ PFalg_simple_type_t iter_ty = type_of (L(p), pa_iter),
+ item_ty = type_of (L(p), pa_item),
+ item_res_ty = type_of (p, pa_item);
assert (iter_ty == aat_nat);
assert (p); assert (L(p)); assert (L(p)->env);
- /* add the result variables to the environment */
- env_add (p->env, pa_iter, aat_nat, ret_iter);
- env_add (p->env, pa_item, aat_pre, ret_pre);
- env_add (p->env, pa_item, aat_frag, ret_frag);
- if (p->sem.scjoin.spec.axis == alg_attr) {
- ret_attr = new_var (p->refctr);
- env_add (p->env, pa_item, aat_attr, ret_attr);
- }
-
/* collect all information to check *//* fold( */
/* translate axis information */
axis = NULL;
@@ -1828,10 +1819,20 @@
materialize (fetch (var (step->name), lit_int (0)),
var (ret_pre->name))));
- if (p->sem.scjoin.spec.axis == alg_attr)
+ /* add the result variables to the environment */
+ env_add (p->env, pa_iter, aat_nat, ret_iter);
+ env_add (p->env, pa_item, aat_pre, ret_pre);
+ env_add (p->env, pa_item, aat_frag, ret_frag);
+
+ if (item_res_ty & aat_attr) {
+ mvar_t *ret_attr = new_var (p->refctr);
+
execute (
assgn (var (ret_attr->name),
fetch (var (step->name), lit_int (3))));
+
+ env_add (p->env, pa_item, aat_attr, ret_attr);
+ }
unpin (step, 1);
unpin (map, 1);
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins