08 September 2014

Undo / Redo and Optimization Level features in Runtime Compiled C++.

I've just merged the code for two new features I've been working on into the master branch & repo for RCC++. Check out the video for a quick introduction to what these do - for HD video click on the vimeo link.


The Undo / Redo feature allows developers to move backwards and forwards between changes made to code in their running program, and as this doesn't involve compilation it can be extremely fast. I find this very useful for comparing subtle changes, and for performance profiling. Note that by default the history size is 0, so the feature is disabled, and this doesn't alter or keep any source code changes. For more details on how to use the new Undo / Redo feature see the wiki.

The Optimization Level feature, used in the video to get Optimize for Debug in Release code, is a simple set of optimization controls for Runtime Compiled C++. The enumeration RCppOptimizationLevel can be used to control what level of optimization is used; for example the video demonstrates switching between RCCPPOPTIMIZATIONLEVEL_DEBUG and RCCPPOPTIMIZATIONLEVEL_DEFAULT. For many advanced developers who wish to control their own optimizations, the RCCPPOPTIMIZATIONLEVEL_NOT_SET can be used so that they can control their own settings via the additional compile options. Once again see the wiki for more information on using Optmization Levels.

The latest code also corrects a bug where the additional compile and link options were not being sent to the Posix (Linux / Mac OS X) compiler. Posix (gcc and clang++) compile options are appended to the compile string, and link options are appended with a preceding -Wl, so should use comma separated parameters.

No comments:

Post a Comment