dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]The type coercion for operators


From: Rhys Weatherley
Subject: Re: [DotGNU]The type coercion for operators
Date: Mon, 02 Sep 2002 08:00:58 +1000

Gopal V wrote:
> 
> uint x=0;
> uint y=x+1;
> 
> Does not compile on pnet ... and is a reported bug (and the major
> reason why pnetlib does not compile ...)
> 
> I had a peek at cs_oper.tc and tried to hack the addition operator
> to make this work ... I wanted to confirm if I was on the right
> track with this ..

On a right track, but not necessarily the best right one.
As I've said before, the semantic analysis system needs to
be overhauled to do this right.  e.g. if you look at the
C compiler, you'll see that the "CSemValue" object contains
information about constants.  Something similar must be
done for C#, over the entire "cscc/csharp" directory.

Please leave this one to me.  The reason why it has not
been done yet is that I needed to make sure that the new
approach would work.  The C compiler was my test bed for
this, as it wouldn't break anything if it didn't work.

Besides, it's not just constant evaluation that needs to
be fixed.  There are some odd cases of "base" that cannot
be done correctly without an overhaul of semantic analysis.
I plan to get all of these problems in one hit.

> I would like some comments on the above code and some help ... Also would
> someone like to typecast all operators in pnetlib to make it compilable
> with cscc ? Or are we going to fix up cscc first ?

Do not change pnetlib.  We are going to fix cscc.  If you
modify pnetlib, then we will no longer have an extensive
set of test cases to test the constant evaluation once
it works.

I have a release to put out (0.4.4), and then I will be
back into the C# compiler for a while.

Cheers,

Rhys.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]