[MLton] Re: Type of _address?

Stephen Weeks MLton@mlton.org
Thu, 21 Jul 2005 06:37:42 -0700

> I've managed to get 'define' working for the c-codegen, but I have
> no idea what to do about the x86-codegen.

My guess as to the right way to do this is to get outputDeclarations,
defined in c-codegen.fun, to define symbols, just as it currently
declares exports.  Since outputDeclarations is shared by all the
codegens, you won't have to do anything architecture specific.  It
might even make sense to communicate the symbol definition information
from the elaborator to the codegen out-of-band via the Ffi structure,
just as we do for exports.  Simply add another function

      val addSymbol: {ty: CType.t vector, name: string} -> unit

and tweak the declareExports function to declare it.