You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behavior you seek is not an easy improvement to do, and could have side effects with symbols and memory.
We would need to store two copies of ctoy__tcc and ctoy__src_path.
Releasing the previous program only after the new one compiles would fragment memory.
And I'm not sure if we can declare two copies of symbols sharing the same names.
This would be cool! Currently I can think of the following ways to approach this:
Maybe it would be possible to create such a shadow copy with all the symbol names changed. For example, the parsing phase could be adding some suffix like "_shadow" to each and every name in the program.
It could be spawned in a totally separate process? The separation and cleanup would be much simpler then?
A copy could be started as a separate program, probably without the render, and communicated with through network/http.
In cases 1 and 2 the copy would be used only for compilation test and entirely discarded right after that, without even ever running it. If no errors were found -- the real compilation of the same source would then occur.
In general this is much like presentation compilers in IDEs work -- and they serve the exact same purpose -- they are separate "simplified" compilation processes that are used for early detection and presentation of compilation errors, without any claim for anything else.
That, of course, would introduce some complexity which might be not what CToy is about.. but it's tooling, and good tooling is important too.
I'm not as proficient in coding in C, low-level stuff and this toolset though, so these are just wishful guesses.
That behavior allows to edit self code for example through Dear ImGui.
The text was updated successfully, but these errors were encountered: