[M3devel] latest longint file size diffs

Tony Hosking hosking at cs.purdue.edu
Sat Jan 9 06:37:42 CET 2010


Looking at your code, I think the assignability test for ordinals should be more like:

      IF (IsEqual (Base(a), Base(b), NIL)
          OR IsEqual (Base(a), Int.T, NIL) AND IsEqual (Base(b), LInt.T, NIL)
          OR IsEqual (Base(a), LInt.T, NIL) AND IsEqual (Base(b), Int.T, NIL))
         AND GetBounds (a, min_a, max_a)
         AND GetBounds (b, min_b, max_b) THEN
        (* check for a non-empty intersection *)
        min := min_a;  IF TInt.LT (min, min_b) THEN min := min_b; END;
        max := max_a;  IF TInt.LT (max_b, max) THEN max := max_b; END;
        RETURN TInt.LE (min, max);
      ELSE
        RETURN FALSE;
      END;

That way CARDINAL and other subranges fall right out.

Antony Hosking | Associate Professor | Computer Science | Purdue University
305 N. University Street | West Lafayette | IN 47907 | USA
Office +1 765 494 6001 | Mobile +1 765 427 5484




On 8 Jan 2010, at 06:13, Jay K wrote:

> Attached is my latest work here.
> With the compiler changes (in the diff), I was able to
> elminate most uses of VAL(expr, LONGINT).
> There's something slightly off such that I had
> to add a very small number, like two.
>  
>  
> The compiler change is newer than earlier.
> For example you can now assign CARDINAL to LONGINT.
> I didn't do it, but you should also be able to add/subtract/etc.
> mixing CARDINAL and LONGINT.
>  
> 
> FOR statements also don't allow the level of mixing
> that they should.
> 
>  
> I'm hoping to get agreement soon just from the diffs
> but if necessary I'll look how to create a branch.
> My general worry about branches is developers just
> go off on their own in a branch and it's impossible to
> get anyone to look at it, they are busy enough with one branch,
> let alone multiple..
>  
> 
>  - Jay
> <dif8.txt>




More information about the M3devel mailing list