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