Update of /cvsroot/monetdb/pathfinder/compiler/sql
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20494/sql
Modified Files:
lalg2sql.brg sql.c
Log Message:
-- Changed type bit representation of nodes and QNames.
o Nodes are now represented by the types aat_anode (attributes)
and aat_pnode (all other nodes) in the logical algebra.
The type aat_node furthermore represents a mix of attributes
and other nodes.
o In the MIL representation aat_anode is split up into
3 bits (aat_attr, aat_pre, and aat_frag) and aat_pnode
is split into 3 bits (aat_pre, aat_frag, and aat_nkind).
The last bit (aat_nkind) is only used to distinct the
types aat_anode and aat_node (aat_anode | aat_pnode).
In the MIL representation a type mask projects it away.
o In the MIL representation the logical QName type aat_qname
is represented by two bits: aat_qname_id and aat_qname_cont.
o In the SQL representation the logical QName type aat_qname
is represented by two bits: aat_qname_loc and aat_qname_uri.
-- Integrated new node and QName type representation in the MIL generation.
-- Completed, cleaned up, and fixed the implementation for
a large number of operators.
-- Removed fragment information from the physical algebra.
(MonetDB only works on a global working set anyway.)
-- Added physical primitive for count aggregates with default
value 0 (pa_count_ext) as this maps to the MIL primitive
'{count}(a,b)' where b represents the loop relation.
-- Replaced multiple physical path steps by a single path
step operator (pa_llscjoin).
-- Removed atom equality functions.
-- Removed dead code (e.g., planning for a nested loop join).
-- Added a genType MIL variable that sets the serialization string.
(Perhaps the mps magic in the embedded variant works.)
-- Added vim fold markers in milgen.brg to make the file more readable.
-- Added some comments on the MIL code generation
(using doxygen comment style).
Index: sql.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/sql/sql.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- sql.c 8 Feb 2008 22:38:24 -0000 1.51
+++ sql.c 15 Feb 2008 16:53:31 -0000 1.52
@@ -1374,7 +1374,6 @@
{
switch (type) {
case aat_pre:
- case aat_attr:
case aat_nat:
case aat_int:
/* we even translate boolean as INTEGER */
Index: lalg2sql.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/sql/lalg2sql.brg,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -d -r1.115 -r1.116
--- lalg2sql.brg 8 Feb 2008 22:38:21 -0000 1.115
+++ lalg2sql.brg 15 Feb 2008 16:53:30 -0000 1.116
@@ -45,6 +45,9 @@
#include "oops.h" /* PFoops() */
#include "subtyping.h"
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
+
/**
* Accessors for the burg pattern matcher
*/
@@ -306,22 +309,6 @@
#define MAX_KIDS 5
-/*
- * Easily access subtree parts.
- */
-/* starting from p, make a left step */
-#define L(p) (LEFT_CHILD(p))
-/* starting from p, make a right step */
-#define R(p) (RIGHT_CHILD(p))
-/* ... and so on */
-#define LL(p) L(L(p))
-#define LR(p) R(L(p))
-#define RL(p) L(R(p))
-#define RR(p) R(R(p))
-#define RLR(p) R(L(R(p)))
-#define RLL(p) L(L(R(p)))
-#define RLRL(p) L(R(L(R(p))))
-
/** Macro determining if a node was already visited */
#define SEEN(p) ((p)->bit_dag)
@@ -353,7 +340,7 @@
/* we "mask out" the flags regarding the generation of attributes,
* up to now we don't support attributes */
-#define TYPE_MASK(t) ((t) & ~(aat_afrag | aat_pfrag))
+#define TYPE_MASK(t) ((t) & ~(aat_frag | aat_attr | aat_nkind))
/* reference counter */
#define REFCTR(p) ((p)->refctr)
@@ -558,7 +545,7 @@
ty == aat_dbl || ty == aat_dec ||
ty == aat_str || ty == aat_uA ||
ty == aat_qname || ty == aat_bln ||
- ty == aat_pre || ty == aat_attr);
+ ty == aat_pre);
*(sql_column_env_t *) PFarray_add (env) =
(sql_column_env_t) { .type = ty,
-------------------------------------------------------------------------
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