Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23023/runtime

Modified Files:
      Tag: PF_ROX
        pathfinder.mx serialize.mx 
Log Message:
propagated changes of Wednesday Jan 30 2008 - Saturday Feb 09 2008
from the development trunk to the PF_ROX branch


Index: serialize.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/serialize.mx,v
retrieving revision 1.105
retrieving revision 1.105.4.1
diff -u -d -r1.105 -r1.105.4.1
--- serialize.mx        11 Jan 2008 10:47:20 -0000      1.105
+++ serialize.mx        9 Feb 2008 08:40:43 -0000       1.105.4.1
@@ -380,6 +380,7 @@
  * Return true if there are still nodes on stack.
  */
 #define moreTags(ctx) ((ctx)->stackPtr > 0)
+#define someMoreTags(ctx,i) ((ctx)->stackPtr > (i))
 
 /**
  * Push the pre-value, namespace and nodename of stack
@@ -1126,7 +1127,8 @@
  * Generate the subtree ranging from node 'pre' to node 'to'.
  */
 static bool
-emitNodesInRange (XqueryCtx* ctx, oid pre, oid to, BAT* pre_cont, oid cont)
+emitNodesInRange_ (XqueryCtx* ctx, oid pre, oid to, BAT* pre_cont, oid cont,
+                   int stack_offset)
 {
     ptr res;
     chr kind;
@@ -1146,7 +1148,7 @@
         }
     
         /* print end element */
-        while( moreTags(ctx) && pre > topSF(ctx)->limit ) {
+        while( someMoreTags(ctx, stack_offset) && pre > topSF(ctx)->limit ) {
             if ( !ctx->driverFun->handle_endElement(
                                       ctx,
                                       topPrefix(ctx),
@@ -1247,9 +1249,28 @@
                     /* nothing to be done, here */
                     break;
                 }
+            case (char)6:
+                {   /* REFERENCE */
+                    /* recursively invoke node printing */
+                    oid pre = prop, pre_size;
+                    getWsValue(res, ctx, vCONT, PRE_SIZE, pre);
+                    pre_size = pre + *(int*) res;
+
+                    BAT *b;
+                    BATiter bi;
+                    getWsBAT(b, bi, ctx, vCONT, PRE_CONT);
+                    if ( !emitNodesInRange_ (ctx,
+                                             pre,
+                                             pre_size,
+                                             IS_FAKE_PROJECT(b)?NULL:b,
+                                             vCONT,
+                                             ctx->stackPtr) )
+                        return PROBLEM;
+                    break;
+                }
             default:
                 fatal_err (ctx,
-                           "Unknow kind %d IN xquery_node_print",
+                           "Unknown kind %d IN xquery_node_print",
                            (int)kind);
                 return PROBLEM;
         }
@@ -1258,7 +1279,7 @@
 
     /* in case the last nodes where deleted 
        we skipped the end element handling */
-    while( moreTags(ctx) ) {
+    while( someMoreTags(ctx, stack_offset) ) {
         if ( !ctx->driverFun->handle_endElement(
                                   ctx,
                                   topPrefix(ctx),
@@ -1269,6 +1290,11 @@
 
     return SUCCESS;
 }
+static bool
+emitNodesInRange (XqueryCtx* ctx, oid pre, oid to, BAT* pre_cont, oid cont)
+{
+    return emitNodesInRange_ (ctx, pre, to, pre_cont, cont, 0);
+}
 
 /**
  *

Index: pathfinder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
retrieving revision 1.395.2.1
retrieving revision 1.395.2.2
diff -u -d -r1.395.2.1 -r1.395.2.2
--- pathfinder.mx       30 Jan 2008 12:35:09 -0000      1.395.2.1
+++ pathfinder.mx       9 Feb 2008 08:40:41 -0000       1.395.2.2
@@ -81,7 +81,7 @@
 }
 else {
     if (monet_environment.find("monet_welcome") = "yes")
-        printf("%c PF/Tijah module v0.3.0 loaded. 
http://dbappl.cs.utwente.nl/pftijah\n";, int
+        printf("%c PF/Tijah module v0.5.0 loaded. 
http://dbappl.cs.utwente.nl/pftijah\n";, int
 (35));
 }
 
@@ -402,6 +402,7 @@
 @:[EMAIL PROTECTED](PI,        3,,,,,,.chr())@
 @:[EMAIL PROTECTED](DOCUMENT,  4,,,,,,.chr())@
 @:[EMAIL PROTECTED](COLLECTION,5,,,,,,.chr())@
+@:[EMAIL PROTECTED](REFERENCE ,6,,,,,,.chr())@
 
 @mil
 # zero
@@ -3984,7 +3985,7 @@
 
 mapi_register(xquery_frontend()); # open up mapi client access
 if (monet_environment.find("monet_welcome") = "yes") 
-    printf("%c MonetDB/XQuery module v0.21.0 loaded\n", int(35));
+    printf("%c MonetDB/XQuery module v0.23.0 loaded\n", int(35));
     #                                 ^^^^^^
     # Maintained via vertoo. Please don't modify by hand!
     # Contact [EMAIL PROTECTED] for details and/or assistance.
@@ -4382,7 +4383,7 @@
 #else /* ALGEBRA_IS_DEFAULT */
     if (!(ctx->mode & XQ_MILPRINT_SUMMER) && \
         ((ctx->mode & XQ_ALGEBRA) || \
-         (GDKgetenv("xquery_backend") == NULL) || 
(strcmp(GDKgetenv("xquery_backend"),"miprint_summer") != 0)))
+         (GDKgetenv("xquery_backend") == NULL) || 
(strcmp(GDKgetenv("xquery_backend"),"milprint_summer") != 0)))
         options |= COMPILE_OPTION_ALGEBRA;
 #endif
 


-------------------------------------------------------------------------
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