I hit the MLton-wall! :)

Anoq of the Sun anoq@HardcoreProcessing.com
Thu, 25 Jan 2001 03:42:37 +0100


Hello!


"Stephen Weeks" wrote:
> We have split C files manually before, but have never written code to do it.
> The C file that MLton generates consists of a bunch of global declarations
> followed by C procedures, each of which can be placed in a separate file that
> includes the global declarations.  You have to make the right things extern, but
> it's not hard.
> 
> Another possibility is to turn down some of the optimizations that cause the
> code size to increase, although this will cost you performance.  Try
> -no-polyvariance and/or -inline 25 (or something else smaller than 50).  You can
> get some amount of shrinkage there.

Thanks! I think I can use this as a good temporary workaround -
but in the long run I wouldn't want to sacrifice

> 
> > Also - it happened when adding just a few more lines
> > of code, so I'm not sure if some of the few differences
> > in the Windows vs. Linux runtime system makes the
> > difference - and that a similar limit on Linux is
> > close...
> 
> I don't think so.  The compiler itself is up to 85,000 lines of code and we've
> compiled it as one C file with no problems, although the assembler gets very
> slow on large files.

OK...

> As to doing things automatically, our new native backend, which is about to be
> released, generates separate assembly files, so it should eliminate this
> problem.  Hopefully you can easily turn it into a cross compiler as well?

I don't know - right now the gcc crosscompiler is doing
everything for me - I just modified the MLton runtime a little.


Cheers
-- 
http://www.HardcoreProcessing.com