gd-hackers down?... problem with MI 
Author Message
 gd-hackers down?... problem with MI

I've been trying to send the following to GD-Hackers... not working...

I'm having trouble with some code under GD, and was able to boil it
down to a braindead example which will not compile with GD 2.3.10. (It
compiles under Apple Dylan TR).

Two examples:

define abstract class <a> (<object>)
        slot s1;
end class;

define abstract class <b> (<object>)
        slot s2;
end class;

define abstract class <c> (<a>, <b>)

end class;

upon compilation with d2c 2.3.10 I get:

Processing bugtest.dylan
......
No element -1 in #[]
make: *** [bugtest] Abort trap

If I change it slightly (class <c> no longer abstract) I get:

Processing bugtest.dylan
......
Expected an instance of {Class <cclass>}, but got #f, at
"defclass.dylan", line 4017, characters 8 through 54:
                  restrict-splits(possible-splits, best-test, #t));
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

make: *** [bugtest] Abort trap

What's the real problem?

Can this be caught with a more user-friendly diagnostic?

Thanks,

Paul



Sun, 01 Jan 2006 03:35:22 GMT  
 gd-hackers down?... problem with MI


Quote:
> I've been trying to send the following to GD-Hackers... not working...

Seems to be now.

Quote:
> Two examples:

> define abstract class <a> (<object>)
>         slot s1;
> end class;

> define abstract class <b> (<object>)
>         slot s2;
> end class;

> define abstract class <c> (<a>, <b>)

> end class;

That should clearly be OK.

Quote:
> What's the real problem?

> Can this be caught with a more user-friendly diagnostic?

No, we should fix the compiler bug.

-- Bruce



Sun, 01 Jan 2006 13:54:54 GMT  
 gd-hackers down?... problem with MI


Quote:
> If I change it slightly (class <c> no longer abstract) I get:

> Processing bugtest.dylan
> ......
> Expected an instance of {Class <cclass>}, but got #f, at
> "defclass.dylan", line 4017, characters 8 through 54:
>                   restrict-splits(possible-splits, best-test, #t));
>                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> make: *** [bugtest] Abort trap

I think the following patch may fix the second problem, so at least you
have a work-around for the first while we fix it :-)

===================================================================
RCS file: /var/lib/cvs/src/d2c/compiler/convert/defclass.dylan,v
retrieving revision 1.46
diff -c -r1.46 defclass.dylan
*** defclass.dylan      12 Mar 2003 22:44:09 -0000      1.46
--- defclass.dylan      16 Jul 2003 06:15:31 -0000
***************
*** 3970,3976 ****
        let best-yes-count = #f;
        let best-no-classes = #f;
        let best-no-count = #f;
!       let best-weight = 0;

        for (split :: <cclass> in possible-splits)
        let yes-classes = #();
--- 3970,3976 ----
        let best-yes-count = #f;
        let best-no-classes = #f;
        let best-no-count = #f;
!       let best-weight = -1;

        for (split :: <cclass> in possible-splits)
        let yes-classes = #();
***************
*** 4012,4020 ****
        let characteristic-class = best-yes-classes.first;
        thunk(lookup-position(characteristic-class, positions),
              lookup-position(characteristic-class, init?-positions));
!       else
!       split(best-yes-classes,
!             restrict-splits(possible-splits, best-test, #t));
        end if;

        build-else(builder, policy, source);
--- 4012,4020 ----
        let characteristic-class = best-yes-classes.first;
        thunk(lookup-position(characteristic-class, positions),
              lookup-position(characteristic-class, init?-positions));
!       elseif (best-test)
!         split(best-yes-classes,
!               restrict-splits(possible-splits, best-test, #t));
        end if;

        build-else(builder, policy, source);
***************
*** 4023,4031 ****
        let characteristic-class = best-no-classes.first;
        thunk(lookup-position(characteristic-class, positions),
              lookup-position(characteristic-class, init?-positions));
!       else
!       split(best-no-classes,
!             restrict-splits(possible-splits, best-test, #f));
        end if;

        end-body(builder);
--- 4023,4031 ----
        let characteristic-class = best-no-classes.first;
        thunk(lookup-position(characteristic-class, positions),
              lookup-position(characteristic-class, init?-positions));
!       elseif (best-test)
!         split(best-no-classes,
!               restrict-splits(possible-splits, best-test, #f));
        end if;

        end-body(builder);



Sun, 01 Jan 2006 14:17:37 GMT  
 gd-hackers down?... problem with MI

Quote:



> > If I change it slightly (class <c> no longer abstract) I get:

> > Processing bugtest.dylan
> > ......
> > Expected an instance of {Class <cclass>}, but got #f, at
> > "defclass.dylan", line 4017, characters 8 through 54:
> >                   restrict-splits(possible-splits, best-test, #t));
> >                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> > make: *** [bugtest] Abort trap

> I think the following patch may fix the second problem, so at least you
> have a work-around for the first while we fix it :-)

Thank you, the patch is working! I'll see if I can make a little more progress on
my project now.

Paul



Mon, 02 Jan 2006 04:40:37 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Intel shut down hacker's website

2. Intel shut down hacker's website

3. useful help on virus and hacker problems

4. GD transparency problem

5. GD installation problem

6. PHP GD install problem

7. Problem compiling php 4.3 with gd

8. php+gd problems

9. Problem compiling PHP 4.2.3 with GD

10. Redhat 8, PHP and GD Installation problem

11. GD beginner problem

12. gd version 1.62 -> 2.0 problem

 

 
Powered by phpBB® Forum Software