Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20494/mil
Modified Files:
mil.c milgen.brg milprint.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: milprint.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/milprint.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- milprint.c 31 Jan 2008 21:43:33 -0000 1.63
+++ milprint.c 15 Feb 2008 16:53:30 -0000 1.64
@@ -526,12 +526,12 @@
#endif
/**
- * Implementation of the grammar rules for `statements'.
+ * @brief Implementation of the grammar rules for `statements'.
*
* @param n MIL tree node
*/
static void
-print_statements (PFmil_t * n)
+print_statements (PFmil_t *n)
{
switch (n->kind) {
Index: mil.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/mil.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- mil.c 31 Jan 2008 21:43:33 -0000 1.51
+++ mil.c 15 Feb 2008 16:53:28 -0000 1.52
@@ -198,7 +198,7 @@
* (The result will be a MIL leaf node, with kind #m_lit_lng and
* semantic value @a i.)
*
- * @param i The integer value to represent in MIL
+ * @param l The long integer value to represent in MIL
*/
PFmil_t *
PFmil_lit_lng (long long int l)
@@ -300,6 +300,8 @@
case PF_MIL_VAR_KIND_PI: return "PI";
case PF_MIL_VAR_KIND_REF: return "REFERENCE";
+ case PF_MIL_VAR_GENTYPE: return "genType";
+
case PF_MIL_VAR_ATTR: return "ATTR";
case PF_MIL_VAR_ELEM: return "ELEM";
@@ -323,6 +325,7 @@
case PF_MIL_VAR_ATTR_CONT: return "ATTR_CONT";
case PF_MIL_VAR_QN_LOC: return "QN_LOC";
case PF_MIL_VAR_QN_URI: return "QN_URI";
+ case PF_MIL_VAR_QN_URI_LOC: return "QN_URI_LOC";
case PF_MIL_VAR_QN_PREFIX: return "QN_PREFIX";
case PF_MIL_VAR_PROP_VAL: return "PROP_VAL";
case PF_MIL_VAR_PROP_TEXT: return "PROP_TEXT";
@@ -560,12 +563,14 @@
*
* Example:
*
- * void | int void | int void | int
- * ------+----- append ------+----- = ------+-----
- * [EMAIL PROTECTED] | 10 [EMAIL PROTECTED] | 20 [EMAIL
PROTECTED] | 10
- * [EMAIL PROTECTED] | 11 [EMAIL PROTECTED] | 21 [EMAIL
PROTECTED] | 11
- * [EMAIL PROTECTED] | 20
- * [EMAIL PROTECTED] | 21
+ * @verbatim
+ void | int void | int void | int
+ ------+----- append ------+----- = ------+-----
+ [EMAIL PROTECTED] | 10 [EMAIL PROTECTED] | 20 [EMAIL
PROTECTED] | 10
+ [EMAIL PROTECTED] | 11 [EMAIL PROTECTED] | 21 [EMAIL
PROTECTED] | 11
+ [EMAIL PROTECTED] | 20
+ [EMAIL PROTECTED] | 21
+ @endverbatim
*/
PFmil_t *
PFmil_bappend (const PFmil_t *dest, const PFmil_t *src)
Index: milgen.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/milgen.brg,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- milgen.brg 6 Feb 2008 16:36:34 -0000 1.108
+++ milgen.brg 15 Feb 2008 16:53:29 -0000 1.109
@@ -1,9 +1,56 @@
/* -*- c-basic-offset:4; c-indentation-style:"k&r"; indent-tabs-mode:nil -*- */
-%{
-
-/*
- * Compile physical algebra tree into a MIL program.
+/**
+ * @file
+ *
+ * @brief Compile physical algebra tree into a MIL program
+ * (see also the @ref milgenDetail page).
+ *
[...9947 lines suppressed...]
var (PF_MIL_VAR_TIME_LOAD)),
lit_dbl (1000.0))),
assgn (var (PF_MIL_VAR_TIME_QUERY),
- div (
+ div_ (
cast (type (mty_dbl),
var (PF_MIL_VAR_TIME_QUERY)),
lit_dbl (1000.0))),
assgn (var (PF_MIL_VAR_TIME_PRINT),
- div (
+ div_ (
cast (type (mty_dbl),
var (PF_MIL_VAR_TIME_PRINT)),
lit_dbl (1000.0))));
@@ -9231,4 +9037,4 @@
return milprog;
}
-/* vim:set shiftwidth=4 expandtab filetype=c: */
+/* vim:set shiftwidth=4 expandtab filetype=c foldmarker=fold(,fold)
foldmethod=marker foldopen-=search: */
-------------------------------------------------------------------------
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