[m-dev.] IL grade broken
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Dec 3 11:21:03 AEDT 2003
On 02-Dec-2003, Peter Ross <pro at missioncriticalit.com> wrote:
> What is happening is that in mer_std.il for example we are generating
> the following code
>
> .method private static default
> bool
> 'special___Unify___array_1_0'(
> object[] 'TypeInfo_for_T_3',
> class ['mscorlib']'System'.'Array' 'HeadVar__1_1',
> class ['mscorlib']'System'.'Array' 'HeadVar__2_2'
> )
> {
> .maxstack 3
>
> .line 7 'array.int2'
>
> .line 7 'array.int2'
> { // #1
> ldarg.0
> ldarg.1
> ldarg.2
> call bool
> ['mer_std__csharp_code']'mer_std__csharp_code'.'mercury_code'::'special___Unify___array_1_0'(
> object[],
> class ['mscorlib']'System'.'Array',
> class ['mscorlib']'System'.'Array'
> )
> } // #1
> ret
> }
>
> ilasm barfs on this because we don't have an assembly reference to
> mer_std__csharp_code earlier,
Perhaps we should fix it to generate the appropriate assembly reference?
> however I don't think we should be
> generating this code at all because there is mer_std__csharp_code which
> contains special___Unify___array_1_0.
The method definition shown above is just a forwarding wrapper
that forwards calls to this procedure which assume that it is
defined in the Mercury code to the external definition in the C# code.
That is how we handle "external" procedures in the .NET back-end.
It looks OK to me. I don't see why you think this code is wrong.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list