Nuitka Release 0.5.2
This is a major release, with huge changes to code generation that improve performance in a significant way. It is a the result of a long development period, and therefore contains a huge jump ahead.
Added experimental support for Python 3.4, which is still work in progress.
Added support for virtualenv on macOS.
Added support for virtualenv on Windows.
Added support for macOS X standalone mode.
The code generation uses no header files anymore, therefore adding a module doesn’t invalidate all compiled object files from caches anymore.
Constants code creation is now distributed, and constants referenced in a module are declared locally. This means that changing a module doesn’t affect the validity of other modules object files from caches anymore.
C-ish code generation uses less C++ classes and generates more C-like code. Explicit temporary objects are now used for statement temporary variables.
The constants creation code is no more in a single file, but distributed across all modules, with only shared values created in a single file. This means improved scalability. There are remaining bad modules, but more often, standalone mode is now fast.
Exception handling no longer uses C++ exception, therefore has become much faster.
Loops that only break are eliminated.
Dead code after loops that do not break is now removed.
exceptconstructs are now eliminated, where that is possible.
finallypart of the re-formulation for
Tuples and lists are now generated with faster code.
Locals and global variables are now access with more direct code.
Added support for the anonymous
Added support for
Generators that statically return immediately, e.g. due to optimization results, are no longer using frame objects.
The complex call helpers use no pseudo frames anymore. Previous code generation required to have them, but with C-ish code generation that is no more necessary, speeding up those kind of calls.
Modules with only code that cannot raise, need not have a frame created for them. This avoids useless code size bloat because of them. Previously the frame stack entry was mandatory.
Windows: The resource files were cached by Scons and re-used, even if the input changed. The could lead to corrupted incremental builds. Fixed in 0.5.1.1 already.
Windows: For functions with too many local variables, the MSVC failed with an error “C1026: parser stack overflow, program too complex”. The rewritten code generation doesn’t burden the compiler as much.
Compatibility: The timing deletion of nested call arguments was different from C++. This shortcoming has been addressed in the rewritten code generation.
CO_FREECELLwere not present in frame flags. These were then not always properly inherited to
execin all cases.
Compatibility: Compiled frames for Python3 had
f_restrictedattribute, which is Python2 only. Removed it.
SyntaxErrorof having a
continuein a finally clause is now properly raised.
execstatement with no locals argument provided, was preventing list contractions to take closure variables.
Python2: Having the ASCII encoding declared in a module wasn’t working.
Standalone: Included the
idnaencoding as well.
Standalone: For virtualenv, the file
orig-prefix.txtneeds to be present, now it’s copied into the “dist” directory as well. Fixed in 0.5.1.1 already.
Windows: Handle cases, where Python and user program are installed on different volumes.
Compatibility: Can now finally use
execfileas an expression. One of our oldest issues, no 5, is finally fixed after all this time thanks to C-ish code generation.
Compatibility: The order or call arguments deletion is now finally compatible. This too is thanks to C-ish code generation.
Compatibility: Code object flags are now more compatible for Python3.
Standalone: Removing “rpath” settings of shared libraries and extension modules included. This makes standalone binaries more robust on Fedora 20.
Python2: Wasn’t falsely rejecting
unicodestrings as values for
longvariants with base argument provided.
Windows: For Python3.2 and 64 bits, global variable accesses could give false
NameErrorexceptions. Fixed in 0.5.1.6 already.
evaldetails have become more correctly, the argument handling is more compatible, and e.g. future flags are now passed along properly.
openwith no arguments is now giving the same error.
Replying to email from the issue tracker works now.
Added option name alias
Added option name alias
--python-debug, which actually might make it a bit more clear that it is about using the CPython debug run time.
--dump-tree, it had been broken for a long time and unused in favor of XML dumps.
New digital art folder with 3D version of Nuitka logo. Thanks to Juan Carlos for creating it.
Using “README.rst” instead of “README.txt” to make it look better on web pages.
More complete whitelisting of missing imports in standard library. These should give no warnings anymore.
Updated the Nuitka GUI to the latest version, with enhanced features.
The builds of releases and update of the downloads page is now driven by Buildbot. Page will be automatically updated as updated binaries arrive.
Temporary keeper variables and the nodes to handle them are now unified with normal temporary variables, greatly simplifying variable handling on that level.
Less code is coming from templates, more is actually derived from the node tree instead.
Releasing the references to temporary variables is now always explicit in the node tree.
The publishing and preservation of exceptions in frames was turned into explicit nodes.
Exception handling is now done with a single handle that checks with branches on the exception. This eliminates exception handler nodes.
dirbuilt-in with no arguments is now re-formulated to
Dramatic amounts of cleanups to code generation specialities, that got done right for the new C-ish code generation.
Warnings from MSVC are now error exits for
--debugmode too, expanding the coverage of these tests.
The outputs with
python-dbgcan now also be compared, allowing to expand test coverage for reference counts.
Many of the basic tests are now executable with Python3 directly. This allows for easier debug.
The library compilation test is now also executed with Python3.
This release would deserve more than a minor number increase. The C-ish code generation, is a huge body of work. In many ways, it lays ground to taking benefit of SSA results, that previously would not have been possible. In other ways, it’s incomplete in not yet taking full advantage yet.
The release contains so many improvements, that are not yet fully realized, but as a compiler, it also reflects a stable and improved state.
The important changes are about making SSA even more viable. Many of the problematic cases, e.g. exception handlers, have been stream lined. A whole class of variables, temporary keepers, has been eliminated. This is big news in this domain.
For the standalone users, there are lots of refinements. There is esp. a lot of work to create code that doesn’t show scalability issues. While some remain, the most important problems have been dealt with. Others are still in the pipeline.
More work will be needed to take full advantage. This has been explained in a separate post in greater detail.