Re: [Monetdb-developers] [Monetdb-pf-checkins] pathfinder/compiler/semantics xquery_fo.c, Feb2009, 1.177.2.1, 1.177.2.2
Ignore this commit, it is the wrong file, I will undo this and re
commit the correct file
On Sun, Feb 8, 2009 at 12:15 PM, Lefteris Sidirourgos
Update of /cvsroot/monetdb/pathfinder/compiler/semantics In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12467/compiler/semantics
Modified Files: Tag: Feb2009 xquery_fo.c Log Message: do not assume that if a function has multiple signatures then it is always the correct. It might be the case that later on the list a more specific function definition is found. Thus, keep around the multiple signature function and return it only if nothing more specific is found.
U xquery_fo.c Index: xquery_fo.c =================================================================== RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/xquery_fo.c,v retrieving revision 1.177.2.1 retrieving revision 1.177.2.2 diff -u -d -r1.177.2.1 -r1.177.2.2 --- xquery_fo.c 1 Feb 2009 10:57:08 -0000 1.177.2.1 +++ xquery_fo.c 8 Feb 2009 11:15:36 -0000 1.177.2.2 @@ -1597,20 +1597,88 @@ .ret_ty = PFty_opt (PFty_xs_daytimeduration ()) } }, .alg = NULL }
-#if 0 /* 10.6 Arithmetic Operators on Durations */ - - , /* op:add-yearMonthDurations */ - , /* op:subtract-yearMonthDurations */ - , /* op:multiply-yearMonthDuration */ - , /* op:divide-yearMonthDuration */ - , /* op:divide-yearMonthDuration-by-yearMonthDuration */ - , /* op:add-dayTimeDurations */ - , /* op:subtract-dayTimeDurations */ - , /* op:multiply-dayTimeDuration */ - , /* op:divide-dayTimeDuration */ - , /* op:divide-dayTimeDuration-by-dayTimeDuration */ - + , /* op:add-yearMonthDurations (yearMonthDuration, yearMonthDuration) + as yearMonthDuration */ + { .ns = PFns_op, .loc = "plus", + .arity = 2, .sig_count = 1, .sigs = { { + .par_ty = (PFty_t[]) { PFty_xs_yearmonthduration (), + PFty_xs_yearmonthduration () }, + .ret_ty = PFty_xs_yearmonthduration () } }, + .alg = PFbui_op_yearmonthduration_plus } + , /* op:subtract-yearMonthDurations (yearMonthDuration, yearMonthDuration) + as yearMonthDuration */ + { .ns = PFns_op, .loc = "minus", + .arity = 2, .sig_count = 1, .sigs = { { + .par_ty = (PFty_t[]) { PFty_xs_yearmonthduration (), + PFty_xs_yearmonthduration () }, + .ret_ty = PFty_xs_yearmonthduration () } }, + .alg = PFbui_op_yearmonthduration_minus } + , /* op:multiply-yearMonthDuration (yearMonthDuration, double) + as yearMonthDuration */ + { .ns = PFns_op, .loc = "times", + .arity = 2, .sig_count = 1, .sigs = { { + .par_ty = (PFty_t[]) { PFty_xs_yearmonthduration (), + PFty_xs_double () }, + .ret_ty = PFty_xs_yearmonthduration () } }, + .alg = PFbui_op_yearmonthduration_times } + , /* op:divide-yearMonthDuration (yearMonthDuration, double) + as yearMonthDuration */ + { .ns = PFns_op, .loc = "div", + .arity = 2, .sig_count = 1, .sigs = { { + .par_ty = (PFty_t[]) { PFty_xs_yearmonthduration (), + PFty_xs_double () }, + .ret_ty = PFty_xs_yearmonthduration () } }, + .alg = PFbui_op_yearmonthduration_div_dbl } + , /* op:divide-yearMonthDuration-by-yearMonthDuration (yearMonthDuration, + yearMonthDuration) as decimal */ + { .ns = PFns_op, .loc = "div", + .arity = 2, .sig_count = 1, .sigs = { { + .par_ty = (PFty_t[]) { PFty_xs_yearmonthduration (), + PFty_xs_yearmonthduration () }, + .ret_ty = PFty_xs_decimal () } }, + .alg = PFbui_op_yearmonthduration_div } + , /* op:add-dayTimeDurations (dayTimeDuration, dayTimeDuration) + as dayTimeDuration */ + { .ns = PFns_op, .loc = "plus", + .arity = 2, .sig_count = 1, .sigs = { { + .par_ty = (PFty_t[]) { PFty_xs_daytimeduration (), + PFty_xs_daytimeduration () }, + .ret_ty = PFty_xs_daytimeduration () } }, + .alg = PFbui_op_daytimeduration_plus } + , /* op:subtract-dayTimeDurations (dayTimeDuration, dayTimeDuration) + as dayTimeDuration */ + { .ns = PFns_op, .loc = "minus", + .arity = 2, .sig_count = 1, .sigs = { { + .par_ty = (PFty_t[]) { PFty_xs_daytimeduration (), + PFty_xs_daytimeduration () }, + .ret_ty = PFty_xs_daytimeduration () } }, + .alg = PFbui_op_daytimeduration_minus } + , /* op:multiply-dayTimeDuration (dayTimeDuration, double) + as dayTimeDuration */ + { .ns = PFns_op, .loc = "times", + .arity = 2, .sig_count = 1, .sigs = { { + .par_ty = (PFty_t[]) { PFty_xs_daytimeduration (), + PFty_xs_double () }, + .ret_ty = PFty_xs_daytimeduration () } }, + .alg = PFbui_op_daytimeduration_times } + , /* op:divide-dayTimeDuration (dayTimeDuration, double) + as dayTimeDuration */ + { .ns = PFns_op, .loc = "div", + .arity = 2, .sig_count = 1, .sigs = { { + .par_ty = (PFty_t[]) { PFty_xs_daytimeduration (), + PFty_xs_double () }, + .ret_ty = PFty_xs_daytimeduration () } }, + .alg = PFbui_op_daytimeduration_div_dbl } + , /* op:divide-dayTimeDuration-by-dayTimeDuration (dayTimeDuration, + dayTimeDuration) as decimal */ + { .ns = PFns_op, .loc = "div", + .arity = 2, .sig_count = 1, .sigs = { { + .par_ty = (PFty_t[]) { PFty_xs_daytimeduration (), + PFty_xs_daytimeduration () }, + .ret_ty = PFty_xs_decimal () } }, + .alg = PFbui_op_daytimeduration_div } +#if 0 /* 10.7 Timezone Adjustment Functions on Dates and Time Values */
, /* fn:adjust-dateTime-to-timezone */
------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Monetdb-pf-checkins mailing list Monetdb-pf-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins
participants (1)
-
Lefteris