Update of /cvsroot/monetdb/pathfinder/compiler/core
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv19085/core

Modified Files:
        coreopt.brg 
Log Message:

 -- `none' should be a subtype of every other type.  (This partially
    reverts a checkin I did some time ago.)  `none' is something
    like an illegal, non-existing type, so it seems odd that it is
    a subtype of every other type.  It is, however, consistent with
    `none' being the identity with respect to `|' (choice of two types):

      ( t1 | t2 )  <:  t3    ==>   t1 <: t3 /\ t2 <: t3

    now, since `t1 | none' == `t1':

      (t1 | none)  <:  t1    ==>   t1 <: t1 /\ none <: t1

    This fixes bug #1579510 (at least, it improves Pathfinder's
    behavior; a nice fix would print a more meaningful message).

 -- There was a rewrite rule in coreopt.brg which rewrote

      main (..., e) 

    into
    
      empty

    if the entire expression had static type empty.  This rewrite rule

     (a) never did anything until now, since the main() node does not
         have a static type, hence, could never be a subtype of empty
         and
     (b) would have broken the compilation if it did anything.
         Rewriting the main() node into an empty() node makes the whole
         thing an invalid Core tree!

    My typing changes turned (a) into its opposite and I removed the
    rewrite to avoid (b).


Index: coreopt.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/core/coreopt.brg,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- coreopt.brg 7 Feb 2007 09:46:51 -0000       1.43
+++ coreopt.brg 20 Feb 2007 14:25:46 -0000      1.44
@@ -427,20 +427,6 @@
                 rewritten |= reduce (kids[1], nts[1]);
                 rewritten |= reduce (kids[0], nts[0]);
 
-                /*
-                 * If we know (from static typing) that we are iterating
-                 * over the empty sequence, replace the whole thing by
-                 * the empty sequence.
-                 */
-                if (PFty_subtype (TY(p), PFty_empty ())) {
-                    *p = *empty ();
-
-                    /* assign new node a state label */
-                    relabel (p, kids);
-                    rewritten = true;
-                    break;
-                }
-
                 break;
 
             /* CoreExpr:           flwr (OptBindExpr,


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to