Update of /cvsroot/monetdb/pathfinder/compiler/algebra/prop
In directory 
sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7084/compiler/algebra/prop

Modified Files:
      Tag: xrpcdemo
        prop_ori_names.c prop_req_node.c 
Log Message:
propagated changes of Saturday May 31 2008 - Monday Jun 02 2008
from the XQuery_0-24 branch to the xrpcdemo branch



U prop_ori_names.c
Index: prop_ori_names.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_ori_names.c,v
retrieving revision 1.33.4.1
retrieving revision 1.33.4.2
diff -u -d -r1.33.4.1 -r1.33.4.2
--- prop_ori_names.c    28 May 2008 20:54:41 -0000      1.33.4.1
+++ prop_ori_names.c    2 Jun 2008 20:54:20 -0000       1.33.4.2
@@ -60,6 +60,8 @@
 /* initial value for lists that encode free variables */
 #define ALL (~att_NULL)
 
+static bool out_of_names;
+
 /* worker for PFprop_ori_name* */
 static PFalg_att_t
 find_ori_name (PFarray_t *np_list, PFalg_att_t attr)
@@ -227,8 +229,18 @@
             PFalg_att_t ori = PFalg_ori_name (unq, FREE(n));
             add_name_pair (np_list, ori, unq);
             FREE(n) = diff (FREE(n), ori);
+            /* check if we run out of names */
+            if (!FREE(n)) {
+                out_of_names = true;
+                return np_list;
+            }
         }
     }
+    /* check if we run out of names */
+    if (!FREE(n)) {
+        out_of_names = true;
+        return np_list;
+    }
 
     /* create name pair lists for the child operators */
     switch (n->kind) {
@@ -710,9 +722,12 @@
 /**
  * Infer original names for a DAG rooted in root
  */
-void
+bool
 PFprop_infer_ori_names (PFla_op_t *root)
 {
+    /* reset out_of_names flag */
+    out_of_names = false;
+    
     /* collect number of incoming edges (parents) */
     PFprop_infer_refctr (root);
 
@@ -722,6 +737,8 @@
     /* infer new original names property */
     infer_ori_names (root,
                      PFarray (sizeof (name_pair_t), 0));
+
+    return out_of_names;
 }
 
 /* vim:set shiftwidth=4 expandtab: */

U prop_req_node.c
Index: prop_req_node.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_req_node.c,v
retrieving revision 1.6
retrieving revision 1.6.6.1
diff -u -d -r1.6 -r1.6.6.1
--- prop_req_node.c     9 Apr 2008 07:15:06 -0000       1.6
+++ prop_req_node.c     2 Jun 2008 20:54:21 -0000       1.6.6.1
@@ -448,6 +448,7 @@
             /* the output cannot be of type node */
             if (!n->sem.aggr.part) {
                 prop_infer_req_node_vals (L(n), NULL);
+                return; /* only infer once */
             }
             break;
 
@@ -803,7 +804,6 @@
             if (map) {
                 req_node_t map_item = *map;
                 map_item.col = n->sem.merge_adjacent.item_in;
-                assert (map_item.constr == true);
                 ADD(new_map, map_item);
             }
 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to