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

Modified Files:
        opt_general.brg opt_algebra_cse.c opt_complex.c opt_const.c 
        opt_dom.c opt_guide.c opt_icol.c opt_join_graph.c 
        opt_join_pd.c opt_key.c opt_mvd.c opt_reqval.c 
Log Message:
-- Extracted defines for child node accesses (e.g. L(p), LRLR(p), ...)
   and placed them in a new file child_mnemonic.h.


Index: opt_algebra_cse.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_algebra_cse.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- opt_algebra_cse.c   13 Feb 2008 20:51:42 -0000      1.19
+++ opt_algebra_cse.c   15 Feb 2008 12:15:56 -0000      1.20
@@ -49,14 +49,8 @@
 #include <string.h> /* strcmp */
 #include <stdio.h>
 
-/*
- * Easily access subtree-parts.
- */
-
-/* starting from p, make a step left     */
-#define L(p)         ((p)->child[0])
-/* starting from p, make a right step    */
-#define R(p)         ((p)->child[1])
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
 
 /* prune already checked nodes           */
 #define SEEN(p)      ((p)->bit_dag)

Index: opt_join_pd.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_join_pd.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- opt_join_pd.c       6 Feb 2008 16:36:31 -0000       1.40
+++ opt_join_pd.c       15 Feb 2008 12:15:56 -0000      1.41
@@ -82,21 +82,8 @@
 /* mnemonic algebra constructors */
 #include "logical_mnemonic.h"
 
-/*
- * Easily access subtree-parts.
- */
-/** starting from p, make a step left */
-#define L(p) ((p)->child[0])
-/** starting from p, make a step right */
-#define R(p) ((p)->child[1])
-/** starting from p, make two steps left */
-#define LL(p) L(L(p))
-/** starting from p, make a step left, then a step right */
-#define LR(p) R(L(p))
-/** starting from p, make a step right, then a step left */
-#define RL(p) L(R(p))
-/** starting from p, make two steps right */
-#define RR(p) R(R(p))
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
 
 #define SEEN(p) ((p)->bit_dag)
 #define LEFT(p) ((p)->bit_in)

Index: opt_icol.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_icol.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- opt_icol.c  6 Feb 2008 16:36:31 -0000       1.21
+++ opt_icol.c  15 Feb 2008 12:15:56 -0000      1.22
@@ -43,20 +43,8 @@
 #include "alg_dag.h"
 #include "mem.h"          /* PFmalloc() */
 
-/*
- * Easily access subtree-parts.
- */
-/** starting from p, make a step left */
-#define L(p) ((p)->child[0])
-/** starting from p, make a step right */
-#define R(p) ((p)->child[1])
-/** starting from p, make two steps left */
-#define LL(p) L(L(p))
-/** and so on... */
-#define RL(p) L(R(p))
-#define LRL(p) L(R(L(p)))
-#define LLL(p) L(L(L(p)))
-#define LLR(p) R(L(L(p)))
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
 
 #define SEEN(p) ((p)->bit_dag)
 

Index: opt_reqval.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_reqval.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- opt_reqval.c        14 Jan 2008 14:03:25 -0000      1.13
+++ opt_reqval.c        15 Feb 2008 12:15:57 -0000      1.14
@@ -43,17 +43,8 @@
 #include "alg_dag.h"
 #include "mem.h"          /* PFmalloc() */
 
-/*
- * Easily access subtree-parts.
- */
-/** starting from p, make a step left */
-#define L(p) ((p)->child[0])
-/** starting from p, make a step right */
-#define R(p) ((p)->child[1])
-#define LL(p) (L(L(p)))
-#define RL(p) (L(R(p)))
-#define LR(p) (R(L(p)))
-#define RR(p) (R(R(p)))
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
 
 /* worker for PFalgopt_reqval */
 static void

Index: opt_guide.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_guide.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- opt_guide.c 11 Jan 2008 10:46:58 -0000      1.12
+++ opt_guide.c 15 Feb 2008 12:15:56 -0000      1.13
@@ -41,20 +41,14 @@
 #include "properties.h"
 #include "alg_dag.h"
 
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
+
 #define SEEN(n) ((n)->bit_dag)
 /* prop of n */
 #define PROP(n) ((n)->prop)
 /* axis of n, n must be a step */
 #define AXIS(n) ((n)->sem.step.axis)
-/*
- * Easily access subtree-parts.
- */
-/** starting from p, make a step left */
-#define L(p) ((p)->child[0])
-/** starting from p, make a step right */
-#define R(p) ((p)->child[1])
-/** starting from p, make two steps right */
-#define RR(p) (((p)->child[1])->child[1])
 
 /* Merge 2 guide_steps if it is possible */
 static void

Index: opt_const.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_const.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- opt_const.c 11 Jan 2008 10:46:57 -0000      1.28
+++ opt_const.c 15 Feb 2008 12:15:56 -0000      1.29
@@ -43,13 +43,8 @@
 #include "alg_dag.h"
 #include "mem.h"          /* PFmalloc() */
 
-/*
- * Easily access subtree-parts.
- */
-/** starting from p, make a step left */
-#define L(p) ((p)->child[0])
-/** starting from p, make a step right */
-#define R(p) ((p)->child[1])
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
 
 #define SEEN(p) ((p)->bit_dag)
 

Index: opt_general.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_general.brg,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- opt_general.brg     30 Jan 2008 17:38:06 -0000      1.46
+++ opt_general.brg     15 Feb 2008 12:15:56 -0000      1.47
@@ -44,6 +44,9 @@
 #include "mem.h"          /* PFmalloc() */
 #include "subtyping.h"
 
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
+
 /*
  * Accessors for the burg matcher
  */
@@ -335,22 +338,6 @@
 
 #include "algebra_mnemonic.h"
 
-/*
- * Easily access subtree-parts.
- */
-/** starting from p, make a step left */
-#define L(p) (LEFT_CHILD(p))
-/** starting from p, make a step right */
-#define R(p) (RIGHT_CHILD(p))
-/** starting from p, make two steps left */
-#define LL(p) L(L(p))
-/** starting from p, make two steps right */
-#define RR(p) R(R(p))
-/** and so on... */
-#define RL(p) (L(R(p)))
-#define LLL(p) (LL(L(p)))
-#define RLL(p) (LL(R(p)))
-
 #define MAX_KIDS 10
 
 #define SEEN(p) ((p)->bit_dag)

Index: opt_complex.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_complex.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- opt_complex.c       6 Feb 2008 16:22:07 -0000       1.40
+++ opt_complex.c       15 Feb 2008 12:15:56 -0000      1.41
@@ -43,21 +43,8 @@
 #include "alg_dag.h"
 #include "mem.h"          /* PFmalloc() */
 
-/*
- * Easily access subtree-parts.
- */
-/** starting from p, make a step left */
-#define L(p) ((p)->child[0])
-/** starting from p, make a step right */
-#define R(p) ((p)->child[1])
-#define LL(p) (L(L(p)))
-#define RL(p) (L(R(p)))
-#define LR(p) (R(L(p)))
-#define LLL(p) (LL(L(p)))
-#define LLR(p) (R(LL(p)))
-#define LRL(p) (L(LR(p)))
-#define LRLL(p) (LL(LR(p)))
-#define LLRL(p) (RL(LL(p)))
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
 
 #define SEEN(p) ((p)->bit_dag)
 

Index: opt_mvd.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_mvd.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- opt_mvd.c   6 Feb 2008 16:36:31 -0000       1.35
+++ opt_mvd.c   15 Feb 2008 12:15:56 -0000      1.36
@@ -56,26 +56,8 @@
 /* mnemonic algebra constructors */
 #include "logical_mnemonic.h"
 
-/*
- * Easily access subtree-parts.
- */
-/** starting from p, make a step left */
-#define L(p) ((p)->child[0])
-/** starting from p, make a step right */
-#define R(p) ((p)->child[1])
-/** starting from p, make two steps left */
-#define LL(p) L(L(p))
-/** starting from p, make a step left, then a step right */
-#define LR(p) R(L(p))
-/** starting from p, make a step right, then a step left */
-#define RL(p) L(R(p))
-/** starting from p, make two steps right */
-#define RR(p) R(R(p))
-/** and so on ... */
-#define LLL(p) L(L(L(p)))
-#define LRL(p) L(R(L(p)))
-#define RLL(p) L(L(R(p)))
-#define RRL(p) L(R(R(p)))
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
 
 #define SEEN(p) ((p)->bit_dag)
 

Index: opt_dom.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_dom.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- opt_dom.c   11 Jan 2008 10:46:57 -0000      1.10
+++ opt_dom.c   15 Feb 2008 12:15:56 -0000      1.11
@@ -43,13 +43,8 @@
 #include "alg_dag.h"
 #include "mem.h"          /* PFmalloc() */
 
-/*
- * Easily access subtree-parts.
- */
-/** starting from p, make a step left */
-#define L(p) ((p)->child[0])
-/** starting from p, make a step right */
-#define R(p) ((p)->child[1])
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
 
 #define SEEN(p) ((p)->bit_dag)
 

Index: opt_join_graph.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_join_graph.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- opt_join_graph.c    1 Feb 2008 13:32:00 -0000       1.10
+++ opt_join_graph.c    15 Feb 2008 12:15:56 -0000      1.11
@@ -49,16 +49,8 @@
 #include "alg_dag.h"
 #include "mem.h"          /* PFmalloc() */
 
-/*
- * Easily access subtree-parts.
- */
-/** starting from p, make a step left */
-#define L(p) ((p)->child[0])
-/** starting from p, make a step right */
-#define R(p) ((p)->child[1])
-#define LL(p) (L(L(p)))
-#define RL(p) (L(R(p)))
-#define LR(p) (R(L(p)))
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
 
 #define SEEN(p) ((p)->bit_dag)
 

Index: opt_key.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_key.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- opt_key.c   11 Jan 2008 10:46:58 -0000      1.18
+++ opt_key.c   15 Feb 2008 12:15:56 -0000      1.19
@@ -43,13 +43,8 @@
 #include "alg_dag.h"
 #include "mem.h"          /* PFmalloc() */
 
-/*
- * Easily access subtree-parts.
- */
-/** starting from p, make a step left */
-#define L(p) ((p)->child[0])
-/** starting from p, make a step right */
-#define R(p) ((p)->child[1])
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
 
 #define SEEN(p) ((p)->bit_dag)
 


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