[Yhc] Still shrinking YHI for ARM7...question

Alexis Morris akmorris at gmail.com
Tue Jul 24 04:13:56 EDT 2007


Hi Tom,

Thanks alot for the information. Those are great places to start. As far as
loading the bytecode goes, for now I am still looking into that, but will
have to load directly from memory, as you mentioned.

Cheers,
</Alexis>

On 7/24/07, Tom Shackell <shackell at cs.york.ac.uk> wrote:
>
> Hi Alexis,
>
> Alexis Morris wrote:
> > Hi all,
> > So far this all compiles fine, and will fit into ROM but I have yet to
> > test it...I would like to figure out what else I can skim...I really
> > want to be able to run it from RAM (64KB) eventually.
> >
> > My question at the moment is whether I can remove stuff like pretty.c,
> > and sanity.c (and possibly jonkers) without having a major breakdown of
> > the system.
>
> >     $(VM_DIR)/profile.c \
> >     $(VM_DIR)/stable.c \
> >     $(VM_DIR)/pretty.c \
> >     $(VM_DIR)/sanity.c \
> >     $(VM_DIR)/stopcopy.c \
>
> These should be safe to remove, indeed stopcopy isn't used at all.
>
> >     $(VM_DIR)/Concurrent.c \
> >     $(VM_DIR)/IORef.c \
> >     $(VM_DIR)/PackedString.c \
> >     $(VM_DIR)/RuntimeAPI.c \
>
> These should be possible to remove, Concurrent may be a bit more tricky
> (but I think it's all optional).
>
> >     $(VM_DIR)/Array.c \
>
> It is used in Numeric but you'll probably never used the function that
> uses it (hence you should be able to remove it).
>
> >     $(VM_DIR)/WrapPrimitive.c \
>
> You can remove any definitions made redundant by removing other things.
>
> >     $(VM_DIR)/System.c \
>
> Might be able to trim it down, primExitWith is essential but everything
> else is not.
>
> You might try removing jonkers (and mark) but of course you'll lose
> garbage collection. Since you've only got a small amount of memory and
> Haskell programs allocate memory like crazy I suspect the garbage
> collector is going to be essential.
>
> The other question is how are you loading the bytecode program? In
> standard Yhi it's loaded from the filesystem but I'm guessing the
> embedded processor doesn't have a file system? In which case I guess you
> must load it directly from memory some how. If that's true then you
> might be able to remove some of the loading code (but maybe not, depends
> on how you do it).
>
> After that it starts getting hard to remove much more. Make sure debug
> information is not added and change gcc from "optimise for speed" to
> "optimize for size".
>
> Hope that helps :-)
>
>
> Tom
>



-- 
</Alexis>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/yhc/attachments/20070724/98b81ae3/attachment.htm


More information about the Yhc mailing list