Update of /cvsroot/monetdb/pathfinder/compiler/core
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11917/core

Modified Files:
        coreopt.brg 
Log Message:
-- Try to fix NaN issues in selections on the XQuery core level
   (where we still have a bigger context).

   This might fix issues reported in bug #2876948.


U coreopt.brg
Index: coreopt.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/core/coreopt.brg,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- coreopt.brg 7 May 2009 14:26:43 -0000       1.76
+++ coreopt.brg 12 Oct 2009 16:15:14 -0000      1.77
@@ -287,7 +287,7 @@
                            CoreExpr)                            =   48(10);
                                                                      
 CoreExpr:           if_ (CoreExpr,
-                         then_else (CoreExpr, CoreExpr))        =   49(10);
+                         then_else (CoreExpr, CoreExpr))        =  35 (10);
                                                                      
 CoreExpr:           if_ (CoreExpr,
                          then_else (CoreExpr, empty))           =  31 (10);
@@ -829,6 +829,34 @@
                  */
                 PFcoreopt_label (p);
             }
+            /* fall through */
+
+        /* CoreExpr:           if_ (CoreExpr,
+                                    then_else (CoreExpr, CoreExpr)) */
+        case 35:
+            if (L(p)->kind == c_apply &&
+                (!PFqname_eq (L(p)->sem.fun->qname, PFqname (PFns_op, "eq")) ||
+                 !PFqname_eq (L(p)->sem.fun->qname, PFqname (PFns_op, "lt")) ||
+                 !PFqname_eq (L(p)->sem.fun->qname, PFqname (PFns_op, "gt")))) 
{
+                if (LLL(p)->kind == c_apply &&
+                    !PFqname_eq (LLL(p)->sem.fun->qname,
+                                 PFqname (PFns_fn, "number"))) {
+                    LLL(p)->sem.fun
+                        = PFcore_function (PFqname (PFns_pf, "number"));
+                    /* don't need to re-label here,
+                     * change does not affect structure */
+                    rewritten = true;
+                }
+                if (LLRL(p)->kind == c_apply &&
+                    !PFqname_eq (LLRL(p)->sem.fun->qname,
+                                 PFqname (PFns_fn, "number"))) {
+                    LLRL(p)->sem.fun
+                        = PFcore_function (PFqname (PFns_pf, "number"));
+                    /* don't need to re-label here,
+                     * change does not affect structure */
+                    rewritten = true;
+                }
+            }
             break;
 
         /* CoreExpr:           seq (seq (CoreExpr, CoreExpr), CoreExpr) */


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to