Re: Precompiled include files
- Posted by jaygade Aug 12, 2013
- 1401 views
I don't know anything about inlining.
It does seem to me, though, that the Translator can be at least as smart as Make when it comes to which files have been modified.
It may not be a simple change, but it should be a doable change.
Scenario:
- Make is building the interpreter.
- One of the interpreter files includes std/convert.e.
- The translator accepts a command flag that says "reuse compiled library files".
- But that the library file hasn't been translated yet, or the .e file is newer than the .c or .o file.
- The translator translates and compiles the file, and saves it to a known location. It does this for all std/*.e files included in the project. (I don't whether it's worthwhile for project-specific or all .e files in a project?)
- The translator finishes its build of the interpreter and deletes all of its old files EXCEPT the compiled library files.
- Make is building the translator.
- One of the translator files includes std/convert.e
- The translator accepts a command flag that says "reuse compiled library files".
- The translator finds the precompiled .c or .o file and compares it to the .e file, and sees that it's newer.
- The translator uses the precompiled file in its build of the translator, saving cycles and time.
- The translator finishes its build of the interpreter and deletes all of its old files EXCEPT the compiled library files.
And finally, the developer makes some changes to some project file or other and does another build; but he saves a lot cycles and time because a third or so of the project is already built. If there's a conflict, there can be a 'make clean' target which removes the precompiled files from the build directory.
Again, this is just brainstorming. If this ONLY affects building of Euphoria and not other projects then it might not be worth doing.