* Escape and unknown traces now have their own
number spaces. This allows to do some tests
for a trace without using the actual object.
* Narrow the scope of variables to the outline scope
that uses them, so that they don't need to be dealt
with in merging later code where they don't ever
change anymore and are not used at all.
* When checking for unused variables, do not ask the
trace collection to filter its traces, instead work
of the ones attached in the variable already. This
avoids a lot of searching work. Also use a method
to decide if a trace constitutes usage rather than
a long elif chain.
* For "PASS 1" of "telethon.tl.types" which has been one
of the known trouble makers with many classes and type
annotations all changes combined improve the compilation
time by 800%.
* The numbering of function causes issues when code
is used from cache, because then unused helpers
never come to exist.
* This avoids a re-compilation for some modules the
second time around a compilation happens and not
all complex helpers are added at all.
* This adds support to preserve the source code of
decorated functions and provide it at runtime to
tensorflow so it can do its tracing.
* The code generation now has a way of providing
module level init codes.
* This mechanism should be possible to generalize
to other JIT making modules as well.
* Without this, some codes using tensorflow.function
could totally miss out on the specialization it does,
that compilation with Nuitka does not currently
replace.
* That allows for solving our "setup" trick transparent for the new pylint.
* Should make a bunch of dead code obvious to Nuitka, it can now tell this aborts
execution of a branch.
* New black removes a few leading new lines in blocks, so many
files changed in that way.
* The "pygments" has a vulnerability, but updating that and the
restructured text checking stuff did not actually matter at
all.
* Bumped needed version for development to 3.8, since black does
not do 3.7 anymore, and it's old enough.
* Make existing statement operations used that feature, so they are
immediately closer to what expressions do.
* Remove checks for expression or statement, we won't use that
anymore.
* 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.
* We need this for optimization of dictionary "in" operation, such that
the use in the Python2 reformulation of it does not cause problems, as
Python3 classes do not have this (immediately).
* This also opens the door for more variations, e.g. where annotations
are used inside the body or not.
* All expression nodes now use a dedicated generated children mixin
class, aimed at optimal use.
* Some select expression nodes now use dedicated base classes with
automatic computations done in there.
* When cloning nodes or getting visitable nodes, more more compact
code is used that should perform better.
* Named chilren now have types, and "tuple" is handled explicitely
without checking values for their type, so updates, iteration etc.
is all directl.
* Remove useless checker for "kw_defaults" from function creation nodes,
they are only ever "None" when the node is created. No need to check
afterwards anymore.
* Only when a function node is created, is there a chance for "kw_defaults"
to be empty dict, so use a factory function instead.
* With useless checkers removed, generated children mixins now do apply
the checkers statically rather than checking on every update if there
is one, and the checkers dictionary per expression can be dropped as
result, making things perform much better for child replacement.
* Attach type shapes to methods specs for use in attribute node
generation, such that the proper mixin class for the result
type shape can be chosen automatically, but we do have some types,
that depend on Python version looking at it, and won't be suitable yet.
* Factories for nodes are now detected automatically in node generation,
making them easier to use.
* Added support for "importlib.metadata.entry_points" and its
backport variant "importlib_metadata" too.
* Added operations for all "bytes" methods as well, such that the
existing few ones are automatically generated as well.
* Added "auto_compute" for annotations of nodes that never change and do
annotate and potentially raise an exception or not. This will allow to
do stub method implementations, and rather have the base class contain
this directly.
* The "iter" node for 2 arguments was not annotating its exception exit,
which was discovered when looking for a boiler plate node to migrate
to "auto_compute" which then of course resolves the bug.
* Make sure we pass tuple values when creating nodes that have children
with that type. We created node lists only to always convert them to
tuple value when the node is created. This is now avoided in many
cases.
* Sequences had dead attribute "sequence_kind", removed that attribute.
* Made a new sequence mixin for reuse in "importlib.metadata.EntryPoints"
values which are more or less a sequence derived class.
* Made dictionary mixin for reuse in "importlib.metadata.SelectableGroups"
as these are more or less a dict derived class.
* Replaced "willRaiseException" with "willRaiseAnyException" which will be
more accurate and faster, and matches what the result of the function
is more closely anyway. We do not ask the other question at all yet.
* Remove useless raise checks in sequence making nodes, they were
repeating the effort done in the base class for no good reason,
potentially wasting a lot of time.
* Made meta data using test cover the new entry_points method without
arguments at least.
* These optimize into a new compile time constant, that is persisted,
but not for module mode, where changes are expected.
* The "pkg-resources" attempted to do the similar thing with source code
based matches, that are no longer necessary.
* The pure functions were fully optimized immediately, but then also
a second time potentially, and with loops that sometimes was not
finished immediately.
* Also optimized how --verbose and progress bar interact, that was
not fully correct before.
* Some functions take a single positional argument, and that's optional,
but no more, and there is no default value for those.
* This offers a saner method for implementing them before adding more of
the same kind for dictionary method "update".
* The expressions are already supposed to annotate their exception exits,
expression only statements were duplicating those which can cause severe
decrease in performance due to many more branches to merge in trace
collection and memory churn due to them.
* All "computeExpressionDrop" usages return a changed or unchanged self,
we do not need to compare.
* Added a mixin for nodes that statically say they have no side effects
by themselves, and make this provide a non-checking
"computeExpressionDrop" overload.
* Added missing exception raise annotations for where nodes replace
themselves with exceptions, as these were previously hidden bugs.
* Also added static declaration of no raising exception for things without
side effect, as that is considered.
* Remove annotations that just expressed the defaults for all expressions
or were duplicated, e.g. because compile time constants base class has
it already.
* Use staticmethod even more often, in some cases the overload is only
there to add a comment with a TODO, but these calls should not be
slower.
* Added TODOs for unclear cases where side effects and exception
raising disagree.
* The variable completeness of the module is now traced in the module locals
scope and taken from there, allowing to use it sooner.
* The functions completeness is likewise traces in its local scope.
* Unused temporary variables and unnecessary closure variables are now
removed more immediately
* Auto releases of parameter variables are introduced sooner
* This should make it use less iterations to optimize a module and
ideally only one global pass for these optimizations.
* In some cases, mixins were not specifying slots, causing it to not
not being used.
* Now we enforce the present of slots in all node bases.
* Some minor refactorings, because now it's not possible anymore to have
optional attributes.
* This should gain a bit more speed and save memory as well.
* Also optimize "len" through variables as well, this was noted as not being
optimized and therefore being corect where boolean tests were not.
* Plenty of cases where value escaping was added or refined, the "len"
optimization found many of them.
* This has been done in some places only, now do it everywhere.
* This is supposed to make things cleaner and faster.
* Use class level attributes for cases where e.g. the step of a range
is only present for some variants.
* Dedicated return node for case of returning in tried handler.
* The trick is that mixins need to specify that they do have empty slots, then
the using classes need to list them.
* Our meta class does the hard work where possible.
* 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 is needed for matplotlib3 at least.
* Avoid passing NULL instead of empty tuple for varnames and freevars,
allowing to optimize some of these calls to compensate the extra code.
* Container creation helper functions were solifified into one and are now used
consistently, allowing more direct optimizations.
* Never creates empty tuple, lists, or set creations which ought to
allow optimization to assume non-empty.
* More efficient handling of set literals.
* Checking for compile time constant should be faster now.
* Take advantage of checking for None or empty
dict or tuple nodes directly, as these have a
dedicated node type, much faster.
* Do away with special API "getConstant" and use
the general "getCompileTimeConstant" one.
* Generalized "extractSideEffects" to all compile time
constants, for better optimization of unused stuff.
* Cleaned up mapping specific functions, moving to
the constant node type they apply to instead of
asserting their correct usage.
* Faster iteration length results, removed special
checks for string and unicode constants, can be
done with node type checks.
* So far this only worked for empty functions, i.e. those
that only "return None", but there are plenty of
others that fit the bill, by making it an attribute
of the function object.
* This doesn't yet do mutable constants, but we can
add that later.
* This avoids useless exception checking in generated code which we did
so far.
* For classes with many such methods this reduces code generated
by a lot.
could hang
* The locals could refer to the wrong scope if it is not attached at
creation time, which it now is.
* To get to the optimization, variable references for builtin names
have the scope attached just in case they later use it, this has
a dedicated node to save the attribute for the general case.
* Also for Optimization, prepare inlining of helper function bodies,
with local scopes, this should now be easy to accomplish later.
* For loops, we were not considering the initial trace state reliably,
esp. not if it was an uninit trace, which has been fixed.
* Compare traces instead of type shapes to decide if we stablized in
a loop analysis, that is more telling and faster to do.
* More correct annotation of trace escaping, doing away with loop usage
and potential usage.
* Make sure construct the type shapes with alternatives in place, so
we don't have do unmerge them later in code that uses the set of
shapes for a trace or variable.
* Unpacking to single arguments is something we use, this makes it more
clear with braces.
* Unpack to multiple arguments is now displayed much cleaner.
* Multiline imports are used more often at least.
* This will need releases to also have their own traces to be done
reliably.
* This reduces generated C code in some cases, as no extra assignment
needs to be done anymore.