Update of /cvsroot/monetdb/pathfinder/compiler/core
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11665/compiler/core
Modified Files:
Tag: M5XQ
coreopt.brg
Log Message:
propagated changes of Monday Oct 12 2009 - Tuesday Oct 13 2009
from the development trunk to the M5XQ branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/10/12 - tsheyar: compiler/core/coreopt.brg,1.77
-- 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.75.4.1
retrieving revision 1.75.4.2
diff -u -d -r1.75.4.1 -r1.75.4.2
--- coreopt.brg 7 May 2009 14:45:33 -0000 1.75.4.1
+++ coreopt.brg 13 Oct 2009 14:51:55 -0000 1.75.4.2
@@ -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