On 02/01/11 16:54, Blue Swirl wrote:
The Forth dictionary was relocated at run time, incurring also a copy operation. The source dictionary remained in memory. It was not possible to run forthstrap without any input files besides the base dictionary.
Make forthstrap generate a hex dump which can be included in C, but also contains relocations, so that relocations are performed by the linker at compile time. Allow dictionary compilation with no source files.
Don't allocate the dictionary dynamically; reduce ofmem supply accordingly.
This looks like a good idea in principle. My only comments would be that I think we should do it for all architectures, and also perhaps add some more comments in bootstrap.c explaining what is happening, particularly in relation to the relocation code section.
Oh - and I'm a little confused as to why there is a hard-coded filename for bootstrap.dict in there - should this be passed in as a parameter?
ATB,
Mark.