* The 3.11 with newer pip cannot build dependencies of older
astroid due to some breaking of pip, so we are kind of pushed
to update this.
* A few nice findings, but unfortunately arguments-differ no
longer is usable.
* Swap comparison arguments during code generation for mixed
types to the responsible one, removing useless duplicates. This
way the "LONG" and "INT" comparison only needs one variant, with
code generating changing the comparator used.
* Swap binary operation arguments for commutative operations
around for mixed number types.
* Comparisons and binary operations are now either "CBOOL" result
or "NBOOL" result, depending on wether they are know to raise or
not at compile time.
* Avoid "NBOOL" comparisons where possible, operations that never
raise now use "CBOOL" instead and produce the "NBOOL" out of it
should it be desired by using code.
* Added special comparisons for floats values with constant
values too. This should accelerate comparison of these value
with constant values by a lot. Integer constants are handled
via "CFLOAT" as well.
* Make sure we only use target types that ignore exceptions when
there cannot be one. This should catch inconsistencies if there
are any.
* Renamed some C type modules to better spellings for enhanced
readability.
* Avoids having many comparison helpers, because of reduced set
of operations or argument orders.
* For comparison operations that cannot raise, create the object
values from boolean values, but do not have a helper to do that
as it does nothing else.
* Also cleanup the C types somewhat, making "CBOOL" more usable as a
result type was now needed, and fixed spelling of "inplace" solving
a TODO for binary operations, where this was used in different
spellings.
* Give up on the suffix "_INPLACE" for inplace operations and instead
make it more clear by different prefix "INPLACE_", avoiding complexity
for the new helper selection code.
* Remove useless module for operator codes used for very little that
better should be where it's used.
* Remove "CBOOL" comparisons that can raise, using them is bug hiding
and there were unwarrented uses, that have been addressed now.
* Added mixed operations for "INT" and "CLONG" C types, the template
already could handle it, but we never had code generation capable
of deciding to use it.
* Changed comparison and binary operation helper selection to use a
much simpler protocol and be shared better.
* Enhanced usage of "CBOOL" comparison for argument names in compiled
type calls. These indeed cannot raise, but the helper was still not
a good idea to have.
* Also correct assign conversion code to take care of value release
or transfer during conversion operation consistently
* This is in preparation for 3.10 which will fail to work that work.
* Extended numeric values to be hexadecimal.
* Using tuples over strings in testing.
* This causes optimization for "not" to need the inverse operation
too, so add that, also for more compact node tree.
* This avoids using Py_True and Py_False in conditions, given a
slight performance increase due to the more direct check.
* Also the "not" exception_match code generates more direct code
without a manual inversion of the value, but simply other check.
* All helpers now have a target type added, mostly OBJECT now, but e.g.
also NBOOL and CBOOL can be used.
* The helpers for operations are now built with factory functions for their
consistency
* Added shapes for all operations for the common types.
* Added dedicated nodes for all in-place operations solving a TODO.
* Inplace operations to be created are now derived from the binary
operations.
* Conversions for missing target types instead of falling back to
most generic helper.
* Converted manual comparison helpers to new Jinja template for
generating code automatically.
* Added optimization for more operations and their types, e.g. tuples,
floats, and more operations.
* More generalized templates to allow more C types that are not objects.
* Added tests to cover in-place operations
* Test infrastructure for generated tests from Jinja2 templates.
* Type shapes are now all instances, avoid mixing classes and instances
for clarity of code and correctness.
* Enable warnings for all operations in case of specific shape
combinatations not defined.
* Some corrections to boolean C target type code, now applied in many
more test cases.
* Proper void C type added, to be used in code specialization later.
* Autoformat currently only sorts pylint disable comments, and does
not call black yet.
* This also adds a few doc strings that I failed to keep separate as a
commit, but who cares.
* Provide proper type shape of comparison results, for "in" and "is"
operations, bool is known definitely, for rich comparisons it's a
result of the input shapes, but now e.g. "int < int" will be known
to be a "bool" type shape.
* As an aside, this generalizes the "not" operation on comparisons
to be effective on all "bool" shape comparisons, where now some
of the rich comparisons can take part.
* Specialized all rich comparisons to dedicated nodes, saving to have
an actual "self.comparator" instance for future memory savings once
dual children nodes are using slots too.
* Added control flow escape descriptions to be returned by shape
operations to indicate exception possibilities and control flow
escape.
* Many more binary add shape provisions.
* Changing PyLint identifiers to symbolic instead of message ids, easier
to come up it and know.
* Make sure to error exit PyLint checking. This was regressed when making
it a tool.
* Some other PyLint cleanups.
* For Python3 that is the standard division operator and it was not
optimized yet, only the Python2 one was.
* Also use "true" division for in-place division operations. This was
not done before and is a bug fix.
* Also optimize floor division for both Python2 and Python3.
* This also solves a TODO by stopping to monkey patch "operators" module
for Python3 to work with the similar code.
* All statement and expression code generation now goes through some
dispatching instead of "elif" test chains. Should be much faster.
* More homegenous naming of generation functions all with the same
signature.
* Moved more generation functions to the topic modules and added more
of them.
* Cleanup of naming for break and continue nodes, more of that should
follow.
* Added more generation functions where they were missing and things
had been done in the "elif" chain directly.
* The dispatching will be faster, but it's unclear how much an issue
that was. Probably not important.
* Using python_version from the dedicated module instead of Utils is
also cleaner.
* These are reported in the --show-progress case and will help find out
about memory leaks of Nuitka at compile time.
* Finally make utils a package, moving the complete Utils to its inside,
but it's going to be split up over time. That cleanup will help to
structure things nicely.
* Added instance counter tools as utils package.
* Applied isort to all source files, harmonizing the format of import statements.
* PyLint stuff
* Packages should do relative imports to themselves only
* No up imports "from .."
* Use less C++ classes, and generate more C-like code. Temporary variables
are now used, where previously everything in a statement was wrapped in
C++ temporary objects.
* Exception handling is now pure C code, no more "throw" at all. That means
return codes are checked. This gives a huge performance increase for the
use of Python exceptions.
* Generation of tuples and lists is now done without helper functions, these
were only increasing code complexity.
* Access to local and global variables with more direct code.
* Less use of templates, more code is manually crafted.
* Moved publishing and preservation of exceptions to node tree.
* Enhanced handling of try/except and try/finally for Python3 by doing
reformulations for their handler semantics.
* Exception handling as now done via branching.
Huge simplification for SSA, as exception catching is now explicit
via normal branch analysis, removing handlers as special cases.
* Many asorted improvements.
* Many, many cleanups.
* Optimize the "not" operation through a new "computeNodeOperationNot"
method that handles it. Also covers all compile time constants now.
* Detect side effects of "not" operator from side effects of "bool"
operation, which avoids side effects being created.
* Explicitly invert conditional statements with empty yes case into
inverted conditions.
* Optimize invertable conditions "is"/"is not" and "in"/"not in" directly
into other variant when "not" is applied, for cleaner code.
* Sequentialize the "del" statement with multiple targets to ones with
only each target. The grouping has no meaning for them.
* Introduce temporary variable blocks and use them to re-formulate the
in-place assignments in tree building already, allowing the removal
of a lot of special code dedicated to them.
* The "not" is not really only a fairly normal operator and was changed
to use the unary operation as a base class.
* Use "operands" and "operand" for the "and" and "or" nodes, so it's more
similar to an operation
* Unify the code generation for "and" and "or" a bit more.
* Added simulator functions for "and" and "or" nodes.
* Removed copyright notice from inline copy of Scons, added by accident only
* Claim stronger copyright over basic, program, and reflected tests to release
them under public domain.
* Updated debian/copyright to include "odict" and "oset" licenses, and
full text for ARM ucontext parts
* Remove benchmarks from Debian package, too diverse licenses and not for
users.
- Corrected the behaviour of sys.exc_info() values for the case of nested
exceptions. There is now use of "FrameExceptionKeeper" when a try/except is
used that can preserve existing exceptions and restore as necessary.
- Removed the documentation that said scons is required. It's now included
and therefore always there.
- Added status information for the optimizations plan of README.txt to make
it easier to discover.
- Optimize the case of calling a function with only star list parameter as
it is really very trivial to implement.
- Removed TODO as it's now clear that weakrefs must be supported for the
generator functions, CPython does it too. We did, but were not sure it
was the right thing.
- Refactored exception raising code, so it is easier to understand, set
the traceback indicator inside functions if needed.
- Removed useless globals variable header file. As every module has it
now for itself, no need to have that file and moved the remaining parts
to better places.
- Much improved XML dump output. Intended for regression testing the
optimization changes. Gives a tree with roles.
- Changes all nodes to children having, there were a few holdouts. Now
the order of children is fixed, and every child has a name and a role
so a pretty tree can be made.
- Added mayHaveSideEffects and mayRaiseException where the knowledge that
something might change things behind your back or raise an exception can
be represented.
- Do away with lambda bodies, use function bodies instead. This allows to
do away with special code, and allows optimizations to work more generally
on functions and lambdas the same.
- Added infrastructure for simulation of operations, used for the constant
propagation of them.
- Added support for referencing builtin exceptions and for making their
objects as nodes. This leads to exception creation being optimized not
using global name lookups, but faster creation of just the right object.
- Treat the `` operator just like any other operator, optimize it as well.
- Optimize comparison functions with constant operators as well.
- Use assign targets in exception handlers, make handler an object, with
proper structure, instead of having lists with difficult to recognize
correspondance.
- Cleanup of Contexts, removing lots of unused stuff.
- Make it more clear where a generator expression is meant in the context
of code generation for contractions, these are not generators.
- Temporary variables for comparison chains are no longer module global,
but local to the containing function body, class body, etc.
- Removed the need for assigning the parent of whole trees. Operations that
change the tree now ensure it's correct.
- Added optimizations of try/except with known exception raises, and the
try/finally with no exception possible.
- Made the source executable with Python3.2 again, was broken. Doesn't work
with it at all though.
- Extended to coverage of optimizing builtin exceptions in many cases, more
variants supported.