[m-rev.] for review: pragma foreign_import_module on the IL backend

Peter Ross pro at missioncriticalit.com
Thu Dec 12 21:15:25 AEDT 2002


fjh wrote:
> On 11-Dec-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> > fjh wrote:
> > > On 10-Dec-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> > > > compiler/ml_code_gen.m:
> > > > The wanted foreign imports are the imports for every backend
> > > > language.  This is because, for example, managed C++ can refer
> > > > to something defined in IL.
> > > >
> > > > compiler/mlds_to_managed.m:
> > > > For managed C++ output a #using for every module implied by the
> > > > pragma foreign_import_module.
> > >
> > > Hmm.  What about cyclic imports?
> >
> > Cyclic imports are a problem for the .NET implementations.
>
> Only for C# and MC++, not for IL or Mercury -- right?
>
Cyclic imports are a problem for all languages which check interface
definitions by obtainining the information from an assembly.  Neither pure
Mercury (but Mercury with foreign code does) or IL do that, so yes you are
right.

> If Mercury's foreign_import_module declaration does not permit cyclic
> imports for C# or MC++ code, this should be mentioned in the Mercury
> language reference manual.
>
I will add a mention of this.

> > This is a
> > general problem with using assemblies to hold both the interface and the
> > implementation.  The programmer must ensure that they don't introduce a
> > cyclic dependency.  Note that mmake will report a cyclic dependency
warning
> > and that combined with the failure to build a file because of a missing
> > assembly should be enough for the programmer to debug the problem.
>
> What happens with `mmc --make'?
> Will the user still get a warning about the cyclic dependency in that
case?
>
I don't know.  Do you Simon?  I will test it when I have a chance.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.419 / Virus Database: 235 - Release Date: 11/15/2002

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list