[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]Pnet trivia : how to typecast?
From: |
Gopal V |
Subject: |
Re: [DotGNU]Pnet trivia : how to typecast? |
Date: |
Fri, 24 Jan 2003 23:08:33 +0530 |
User-agent: |
Mutt/1.2.5i |
If memory serves me right, James Michael DuPont wrote:
> > I'm not really sure how to fix it ... because passing nodes into
> > ILResolveMethod
>
> What nodes do you need to pass? Please explain?
static ILMethod *FindUserBinaryOperator(ILGenInfo *info,
const char *name,
ILType *arg1Type,
ILType *arg2Type);
is what's being used right now .... the int->uint is not an implicit
conversion ... It is a literal value conversion, So getting ILType*
values are not enough.
You have to get the ILNode_Int node containing the value ``1'' into
the FindUserBinaryOperator function and down until I get to the
ILResolveMethod ... Then it's all downhill to coerce the node into
a ``uint''.
> > would mean I'd have to hack about all around cscc ...
> > Not something I would want to do right now due to lack of time in
> > general...
>
> Well, I am starting to learn. Please explain.
It's a quite major change of about 100 or more lines which is why I
haven't buckled down to it ... I've already got my hands full with
the Java compiler... (for which the existing codegen is overkill :)
But IMHO the entire ResolveMethod should be replaced with the
ILBetterConversion checks to pick the best conversion for the problem.
That would be the better idea , which is why I've not pushed myself
into the slot ... I need to talk to Rhys before messing around with
the design ...
I've actually got no idea how the changes I make for C# affect the
C compiler ... Which is why I've not fixed that issue yet...
And MarcusU can rest assured that it will be fixed...
Gopal
--
The difference between insanity and genius is measured by success