[m-dev.] foreign_import_module

Julien Fischer jfischer at opturion.com
Thu Jun 20 11:21:53 AEST 2019

On Wed, 19 Jun 2019, Zoltan Somogyi wrote:

> Attached is a proposed diff of the documentation of foreign_import_module,
> for review by anyone. I would particularly like to know if anyone knows the answer
> to the question in the XXX it adds.

> diff --git a/doc/reference_manual.texi b/doc/reference_manual.texi
> index dfdab3431..ced2017ce 100644


> + at c XXX Does anyone know what does sentence means? I can't ask Fergus.
>  A cycle of @samp{pragma foreign_import_module}, where the language is
>  @samp{"C#"} or @samp{"Java"}, is not permitted.

I've just had a dig through the revision history for this bit.

That line (minus the bit about the Java) grade was added by Peter Ross
in commit e868b11d.  At the time, it was with reference to the old IL
backend, the foreign languages involved were IL, C# and MC++.

I suspect the restriction on foreign_import_module cycles may have
arisen because C# and MC++ were secondary (i.e. non-target) foreign
languages.  Compilation of secondary foreign languages is handled by
hoisting the code out to a separate source file and that requires
the foreign_import_module graph to be acyclic.

None of that line is applicable to C# and Java when they are the target


More information about the developers mailing list