Internal data types

View: New views
3 Messages — Rating Filter:   Alert me  

Internal data types

by Bugzilla from pip88nl@gmail.com :: Rate this Message:

| View Threaded | Show Only this Message

Stephen,

in the compiler code, there are many questionable choices of data types
for variables. One case is 'i' in 'jflowUltimateGotos' in of_jflow.c,
which is of type 'int'. Is this variable allowed to be negative? What are
the semantics of a negative 'i' in this place? I am hitting a bug
(possibly my own) where the third loop in that function is endless. If i
cannot be negative, I would like to assert its positivity so instead of
hanging up, the compiler dies.

In order to hang it, I use bug1066.as and compile it like this:

  aldor -Q3 -Qinline-all -Wcheck -Qinline-limit:18 \
    -Mno-ALDOR_W_OverRideLibraryFile -Zdb -Iinclude \
    -fao -fmain -fc bug1066.as

Does this hang for anyone else?

Pippijn


----------- Here is my copy of bug1066.as, comments stripped -----------

#include "axllib"

Foo: with {
        foo: () -> %;
} == add {
        Rep == SingleInteger;
        import from Rep;

        foo(): % == {
                import from SingleInteger;
                y: Rep :=  1;
                for x in 1.. repeat y := y + 1;
                per y
        }
}


_______________________________________________
Aldor-l mailing list
Aldor-l@...
http://aldor.org/mailman/listinfo/aldor-l_aldor.org

signature.asc (196 bytes) Download Attachment

Re: Internal data types

by Ralf Hemmecke :: Rate this Message:

| View Threaded | Show Only this Message

aldor -Q3 -Qinline-all -Wcheck -Qinline-limit:18
-Mno-ALDOR_W_OverRideLibraryFile -Zdb -Iinclude  -fao -fmain -fc bug1066.as

Hangs for me.

But compiles for 'aldor -q1 bug1066.as'.

Ralf

> #include "axllib"
>
> Foo: with {
>         foo: () -> %;
> } == add {
>         Rep == SingleInteger;
>         import from Rep;
>
>         foo(): % == {
>                 import from SingleInteger;
>                 y: Rep :=  1;
>                 for x in 1.. repeat y := y + 1;
>                 per y
>         }
> }


_______________________________________________
Aldor-l mailing list
Aldor-l@...
http://aldor.org/mailman/listinfo/aldor-l_aldor.org

Re: Internal data types

by Bugzilla from pip88nl@gmail.com :: Rate this Message:

| View Threaded | Show Only this Message

On Fri, Aug 15, 2008 at 05:47:35PM +0200,  wrote:
> If i cannot be negative, I would like to assert its positivity so
> instead of hanging up, the compiler dies.

Actually, i doesn't matter here. It is always positive, but it still
loops forever.


_______________________________________________
Aldor-l mailing list
Aldor-l@...
http://aldor.org/mailman/listinfo/aldor-l_aldor.org

signature.asc (196 bytes) Download Attachment