[m-dev.] RTTI question?
Peter Ross
peter.ross at miscrit.be
Fri Feb 8 00:20:34 AEDT 2002
On Thu, Feb 07, 2002 at 03:36:09AM +1100, Fergus Henderson wrote:
> On 06-Feb-2002, Peter Ross <peter.ross at miscrit.be> wrote:
> > ldsfld object[]
> > ['mercury']'mercury'.'private_builtin__cpp_code'.'mercury_code'::'private_builtin__type_info_typeclass_info_1__type0_8___void_0'
> > castclass object
> > stelem.ref
> >
> > Where does private_builtin__type_info_typeclass_info_1__type0_8___void_0
> > come from?
>
> That mangled name means the type_info for the type
> `private_builtin:typeclass_info(builtin:void)', I think.
>
> It should be generated as a pseudo_type_info rtti_data by
> the RTTI code (type_ctor_info.m?),
> then converted to MLDS by rtti_to_mlds.m,
> then converted to IL by mlds_to_il(asm).m.
>
> > As it is not being generated.
>
> One thing to check is that the problem might be related to
> whether or not `void' is module qualified with `builtin__'.
>
I have tracked the problem down some more, but I am not sure what has
changed to cause it to go wrong.
Here is the snippet of code that causes the problem.
.line 0 ''
ldsfld object[]
['mercury']'mercury'.'private_builtin'.'mercury_code'::'private_builtin__field_types_sample_typeclass_info_0_0'
dup
ldc.i4.0
ldsfld object[]
['mercury']'mercury'.'private_builtin__cpp_code'.'mercury_code'::'private_builtin__type_info_typeclass_info_1__type0_8___void_0'
castclass object
stelem.ref
pop
The problem is not that the name is wrong, but that the namespace is
wrong. Here we refer to 'private_builtin__cpp_code' instead of
'private_builtin'. This incorrect namespace is being done by
mangle_dataname_module in make_static_fieldref. However none of this
code has changed in a long time, so why suddenly is this not working?
Any ideas?
It used to work on Jan 16. With my investigations I can't see anything
which has directly caused this problem. Does anyone have any ideas?
The easiest fix is to special case the code for mangle_dataname_module
for this case but I am sure that this is wrong for more then one reason.
--------------------------------------------------------------------------
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