44 Commits

Author SHA1 Message Date
Kay Hayen
b4e603ab7c Optimization: Faster variable trace maintenance
* We now trace variables in trace collection as a dictionary
  per variable with a dictionary of the versions, this is
  closer to out frequent usage per variable.

* That makes it a lot easier to update variables after the
  tracing is finished to know their users and writers.

* Requires a lot less work, but also makes work less memory
  local such that the performance gain is relatively small
  despite less work being done.

* Also avoids that a set for the users is to be maintained.
2025-11-26 11:19:43 +00:00
Kay Hayen
718ab60539 Bump copyright year 2025-04-28 11:04:36 +02:00
Kay Hayen
f34f8d0c63 Bump copyright year
* Also split copyright notices between the top and bottom,
  such that readability of just opened files is not harmed
  by license text.
2024-12-18 10:48:16 +01:00
Kay Hayen
909d41f02d Bump copyright year 2023-06-02 15:07:22 +02:00
Kay Hayen
4cfdd9f9c0 Bump copyright year 2022-05-23 10:28:11 +02:00
Kay Hayen
4c5990daac Optimization: Make sure to have zero impact from instance counting
* The instance counting provided a "__del__" that was a noop, but
  still needed to be executed and would cost therefore time
  even if not activated.

* Also some sources claim that garbage collection is not done when
  "__del__" is overloaded, which is avoided this way too.

* Also cleaned up how its imported and used for greater  harmony.

* Derived classes do not have to repeat it, unless they are not using
  base class init.

* It has been observed that a KeyboardInterrupt was ignored in
  the deactivated form of instance release counting,
  which points out that these things should not exist
  unless used.
2021-02-24 19:56:39 +01:00
Kay Hayen
e43b72e087 Bump copyright year to 2021. 2021-01-22 09:58:00 +01:00
Kay Hayen
2cabdc3796 Optimization: Better hard module import attribute lookups
* This avoids the control flow escape they previous did.

* For all but "site" module we now know it won't raise an exception to import.

* This detects imports that will raise and statically optimizes them.

* This looks up configured trust for attributes, currently
  that is only "sys.version" and used for testing purposes and warns
  if it's missing config.

* Side effects for hard imports is provided, only "site" really does.

* Type shape for hard module imports was missing.
2021-01-10 13:12:05 +01:00
Kay Hayen
8dd8ed93c6 Quality: Updated to latest versions of black and isort 2020-11-02 18:43:05 +01:00
Kay Hayen
b2083575cf Bump copyright year to 2020. 2020-02-01 07:42:45 +01:00
Kay Hayen
f3752e381d Quality: Reformated code to black
* 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.
2019-02-13 16:27:25 +01:00
Kay Hayen
47c99d377e Bump copyright year to 2019. 2019-01-24 16:28:13 +01:00
Kay Hayen
3957ee8628 Updated copyright year to 2018. 2018-04-30 09:46:54 +02:00
Kay Hayen
9d0943d4a4 Optimization: Specialized class for internal source references.
* Instead of a boolean flag, we now use a distinct class for internal
  references, saving a bit of memory and execution time for Nuitka
  itself.
2017-07-01 09:23:01 +02:00
Kay Hayen
6df7876b03 Optimization: Implement more correct comparison.
* This should also be slightly faster than the cmp driven stuff and
  for Python3 it should actually avoid a lot of instances to be
  created in the first place.
2017-06-21 15:27:43 +02:00
Kay Hayen
b8556b7fc3 Minor cleanups 2017-06-07 08:23:07 +02:00
Kay Hayen
2f3628e759 Optimization: Attach future specs to modules only
* We were passing along a future spec that was passed around to be
  attached for source references, taking up a slot, while it had to
  be the same for all module.

* This saves a tiny bit of memory and makes tree building faster.
2017-05-29 10:22:45 +02:00
Kay Hayen
47332da901 Cleanup, syntax errors always improved.
* Always output the best syntax error format, and do away with compatible
  syntax errors. Instead make the comparison restricted to the message
  of error only.

* This reduces tedious code and tried to mimic the various Python versions
  errors for no good reasons.
2017-01-14 16:25:46 +01:00
Kay Hayen
064df32ff0 Updated copyright year to 2017. 2017-01-09 07:25:38 +01:00
Kay Hayen
72ac16cfd9 Updated copyright year to 2016 2016-01-04 09:34:48 +01:00
Kay Hayen
08c5e4df9c Cleanup, don't invert the "internal" attribute of source code reference
* The function "isInternal" didn't do what its name said.

* Also factor the code to get the line number value into a separate
  function, which we will need.
2015-06-30 19:03:21 +02:00
Kay Hayen
aea598f66a Cleanup, source code references now are properly internal.
* The reduction to line setting, doesn't quite cut it. Internal code
  may have other exceptions too.

* This was done to not warn about internal code, but then it became
  clear it's not needed, so only the cleanup remains.
2015-04-15 08:22:33 +02:00
Kay Hayen
cc7de4e4d9 Optimization: Use less source code reference objects.
* Cover the source code reference instance in counting, which
  revealed that even for non-changes to the line number, we
  were creating a whole new object that is the same.

* Reduces memory consumption of Nuitka in a normal stdlib using
  and recursing test case by 50MB or 7%.

* Also use __slots__ to limit memory usage a little bit further,
  this gives an extra 15MB.
2015-04-06 11:08:13 +02:00
Kay Hayen
49fb956558 Standalone: Added support for Qt4/5 plugins.
* The plugin folders are determined by asking the modules themselves
  in a separate process.

* The plugin DLLs are then added as entry points, so their used DLLs
  get copied too.

* Added an "-onLoad" mechanism for plugins to provide modules that
  should be loaded when another is first imported.
2015-03-30 08:59:32 +02:00
Kay Hayen
bc8367e3bd Updated copyright year to 2015 2015-01-13 08:43:41 +01:00
Kay Hayen
c2a8b58ed2 Cleanups
* Whitespace of tuples and lists around braces should not be there.

* Also done with autoformat tool.
2014-12-02 20:33:46 +01:00
Kay Hayen
876f670fb7 Memory: Avoid an attribute per compile time constant in the normal case.
* Most constants are never considered for attribute lookup, so storing an
  indicator per node is wasteful.

* The default is now stored in the class. Only when lookups were made and
  failed, the node is changed to cache that information.
2014-08-10 11:27:40 +02:00
Kay Hayen
3915ee82a5 Minor cleanups
* Remove "exec" source code references, they are not used currently and
  won't be in the future.
2014-07-10 09:06:13 +02:00
Kay Hayen
bf480213dd Updated copyright year to 2014 2014-03-02 07:57:59 +01:00
Kay Hayen
ec85e06a3e Cleanups only
* Format function and class definitions with no spaces for braces.

* PyLint cleanups
2013-12-28 11:17:33 +01:00
Kay Hayen
3916ef077f Minor Cleanups
* Comment changes for 80 columns changes mostly
2013-06-24 08:22:32 +02:00
Kay Hayen
d9e34e77c0 Preparations for optimizing inlined exec statements with constant arguments 2013-05-10 09:22:44 +02:00
Kay Hayen
50da5af696 Updated copyright year in notices. 2013-01-12 10:35:22 +01:00
Kay Hayen
149bc9c9c9 Changed my email address towards the outside world. 2012-12-29 14:42:43 +01:00
Kay Hayen
0b15300f08 Change Nuitka to Apache License 2.0, making it usable for everybody. 2012-06-30 23:43:00 +02:00
Kay Hayen
17f25d4ef6 Mark the source code reference of temp blocks as no line number needing, as it's going to be set by its first statement anyway.
More of this kind of changes would be needed, but they will only be done
when reviewing generated code at occasions.
2012-03-17 11:29:11 +01:00
Kay Hayen
cd0ddeef48 Added an attribute to source code references to indicate if the current line shall be set or not.
For use in "internal" code, e.g. exception handlers in re-formulated with statements should not
set the current line, or else they corrupt it.
2012-03-17 11:21:37 +01:00
Kay Hayen
33e156e1c7 Change contributors agreement from copyright assignment to me to a general "Apache 2.0 license". 2012-01-06 23:41:02 +01:00
Kay Hayen
ad9c704b62 Whitespace only, remove leading blank lines from tests. 2012-01-05 10:25:17 +01:00
Kay Hayen
c03f222a4f New copyright year, license cleanups.
* 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.
2012-01-02 09:48:38 +01:00
Kay Hayen
04f06fd015 Nuitka 0.3.5 final 2011-01-22 01:30:59 +01:00
Kay Hayen
b4c9124867 Changed the copyright to 2011, don't call it an attempt anymore. 2011-01-09 23:53:41 +01:00
Kay Hayen
1a90bd27e3 Nuitka 0.3.5 pre5 2011-01-09 23:42:25 +01:00
Nicolas Dumazet
74aed4b0cf move Python files to a nuitka package.
This requires renaming a few imports, but overall makes execution
and packaging much easier.
2011-01-04 20:25:19 +09:00