14134 Commits

Author SHA1 Message Date
Kay Hayen
b4f8864e56 Backport: These changes need to be manually distributed to previous commits 2025-12-06 10:47:37 +01:00
Kay Hayen
9238839def macOS: Added option to create DMG files 2025-12-06 10:47:37 +01:00
Kay Hayen
6ac5c8b571 Optimization: Detect variable references discarded sooner
* The expression was already adding its usage indication,
  undo that such that next micro pass knows if it's used
  or not sooner. Otherwise it may not happen if that will
  have no other changes. And if it did, it will need even
  one more than necessary.
2025-12-06 10:47:37 +01:00
Kay Hayen
1fe435085b Minor spelling cleanup 2025-11-28 14:17:00 +00:00
Kay Hayen
83db40284b Scons: Disable detection of MSVC in new location 2025-11-28 14:17:00 +00:00
Kay Hayen
b186708820 UI: Minor wording improvement for no C compiler message 2025-11-28 14:17:00 +00:00
Kay Hayen
a48c46ca88 fixup! Scons: Make zig work for Windows too (WIP) 2025-11-28 14:17:00 +00:00
Kay Hayen
dcdb539371 Debugging: More clear verbose trace for dropped expressions 2025-11-28 14:17:00 +00:00
Kay Hayen
02b4c9577b Release: Output the problematic source filename not target filename 2025-11-28 14:17:00 +00:00
Kay Hayen
869290fe03 Merge tag '2.8.9' into develop 2025-11-28 14:14:32 +00:00
Kay Hayen
6c11376b1a Merge branch 'hotfix/2.8.9' 2.8.9 2025-11-28 14:12:57 +00:00
Kay Hayen
e4f5d57a24 New hotfix release. 2025-11-28 13:58:50 +00:00
Kay Hayen
ed9db1879c Windows: Fix, the "sys.executable" value in onefile DLL mode could be wrong
* We mean for this to be pointing to a "python.exe" near the
  code. However, the updating code was inactive. And with the
  current "multiprocessing" plugin when that module is loaded,
  the value changes to this anyway.

* As a result this went undetected, but it's an important change
  to make sure "sys.executable" calls as a binary do not go
  unnoticed.
2025-11-28 13:58:00 +00:00
Kay Hayen
1d5b0cabb8 Python3.14: Strangely this gives a warning with MSVC now
* For 3.13 and earlier the warning was not given, but now with 3.14
  it is, but it's actually a type mismatch for all versions.

* It could also be MSVC 14.5 having changed but, but I doubt that
  is the case. It's a good change anyway, although obviously it
  is not nearly a fix of anything.
2025-11-28 13:57:33 +00:00
Kay Hayen
49ac29fab9 Python3.14: Add implicit dependency for "_ctypes" on Windows 2025-11-28 13:57:00 +00:00
Kay Hayen
534d85f0b7 fixup! Scons: Added newer inline copy with Scons that supports Visual Studio 2026 2025-11-28 13:56:28 +00:00
Kay Hayen
e19b645a21 Scons: Don't detect installed MinGW at all
* We only end up rejecting it later, so that's a waste of time.
2025-11-28 13:56:02 +00:00
Kay Hayen
fb65ebc0af fixup! Scons: Added newer inline copy with Scons that supports Visual Studio 2026 2025-11-28 13:55:54 +00:00
Peter Bierma
4194ca7a99 Python3.14: Follow change in order of evaluation of "__exit__" and "__enter__" 2025-11-27 13:10:24 +00:00
Peter Bierma
d252de44d5 Python3.14: Added support for uncompiled generator integration
* This is actually a crucial piece for correctness with
  asyncio and couroutines as well as asyncgen to properly
  integrate.
2025-11-27 13:06:24 +00:00
Peter Bierma
862847c5e0 Python3.14: Added groundwork for deferred evaluation of function annotations
* The Python side of things is delayed, but this
  is already good, and will stop us from using
  the original "annotate" of uncompiled functions
  accidentally.
2025-11-27 13:06:01 +00:00
Kay Hayen
a08935840f fixup! Optimization: Much faster Python passes 2025-11-27 11:12:44 +00:00
Kay Hayen
9127f1b229 fixup! Python3.12+: Implement function type syntax 2025-11-27 11:06:29 +00:00
Peter Bierma
f371b2967e Python3.12+: Implement function type syntax
* This adds support for function generics.

---------

Co-authored-by: Kay Hayen <kay.hayen@gmail.com>
2025-11-26 21:55:02 +00:00
Kay Hayen
d443a73233 Python3.13: Fix, need to make sure we also export "PyInterpreter_*" API 2025-11-26 21:48:28 +00:00
Kay Hayen
42a5c6c869 Debugging: Output what module had extra changes during debug extra micro pass 2025-11-26 21:09:26 +00:00
Kay Hayen
f4fbb24e51 Merge tag '2.8.8' into develop 2025-11-26 13:47:11 +00:00
Kay Hayen
445a3290c7 Merge branch 'hotfix/2.8.8' 2.8.8 2025-11-26 13:46:36 +00:00
Kay Hayen
9528698720 New hotfix release. 2025-11-26 13:45:23 +00:00
Kay Hayen
0c7f980254 fixup! Scons: Added newer inline copy with Scons that supports Visual Studio 2026 2025-11-26 13:45:06 +00:00
Kay Hayen
f37ef10c3f New pre-release. 2025-11-26 11:21:54 +00:00
Kay Hayen
6305fb4760 Python2: Fix, need to import this exception
* Was crashing in code supposed to handle non-existent report files
2025-11-26 11:19:44 +00:00
Kay Hayen
ae17208c75 macOS: Proper error exit for attempting to compile for arm64 on x86_64 python 2025-11-26 11:19:44 +00:00
Kay Hayen
352f636f22 Scons: Avoid using the "Python" tool here too 2025-11-26 11:19:44 +00:00
Kay Hayen
4b46b08924 Cleanup, remove annotations from inline copies
* They only waste memory, and it's a oneliner to do that with
  the "3to2" tool.
2025-11-26 11:19:44 +00:00
Kay Hayen
ffd9670775 UI: Also report what plugin did cause the forbidden implicit import 2025-11-26 11:19:44 +00:00
Kay Hayen
1239323a44 Optimization: Faster variable tracing again
* Re-use start trace objects from previous micro passes,
  allocating all over is wasteful and harms cache locality,
  this gives a minor performance boost to avoid that.

* Specialize start traces to not have and use a "previous"
  trace, making some methods faster since they don't have
  to check, and start traces use up less memory as a result
  as well.

* Avoid parent class "__init__" calls in value traces, instead
  duplicate implementations. That's ugly but only faster.

* For some methods they now can be static methods with start
  traces, making their calls slightly faster, too.

* Use proper abstract methods instead of assertions against
  being called, that was old code.
2025-11-26 11:19:44 +00:00
Kay Hayen
1630785d3a UI: Remove warning for OrderedSet
* We no longer depend on a fast "OrderedSet" implementation for
  value tracing.
2025-11-26 11:19:44 +00:00
Kay Hayen
e9d054bfbd Minor cleanups 2025-11-26 11:19:44 +00:00
Kay Hayen
26bb6e8727 Minor spelling cleanup 2025-11-26 11:19:44 +00:00
Kay Hayen
b5dea21a05 Reports: Also including timing information for code generation
* With this per module value we can now see improvements
  there and problem makers.
2025-11-26 11:19:44 +00:00
Kay Hayen
6e6f89b5d9 Optimization: Make sure modulo for unknown init values is true too
* Also shifted the responsibility for setting it to active
  to the function that sets it active.

* This improves performance even further since module
  variables in modules benefit from the fast code paths
  for not escaping them more often.
2025-11-26 11:19:44 +00:00
Kay Hayen
75c50febc4 Optimization: Faster assertion checks for value traces
* Since this is ran very frequently, make sure the test is
   as fast as possible.
2025-11-26 11:19:44 +00:00
Kay Hayen
6b2aa33a95 Optimization: Avoid final extra micro pass
* Instead we relegate this to debug mode and check that
  it then doesn't do anything. For large modules this
  extra micro pass took up substantial time.
2025-11-26 11:19:44 +00:00
Kay Hayen
86daee5755 Fix, avoid setting an assign trace for removed assignment of mutable values
* Loop optimization was seeing this and then saw the
  change to uninit trace only one iteration later
  than possible. This could potentially cause a need
  for more micro passes than necessary.
2025-11-26 11:19:44 +00:00
Kay Hayen
bd913a2c98 Minor spelling cleanups 2025-11-26 11:19:44 +00:00
Kay Hayen
4abf97aa4f Optimization: Remove assertions for frequently ran code 2025-11-26 11:19:44 +00:00
Kay Hayen
75617529a1 Optimization: Faster code generation
* This doesn't do indentation anymore unless asked by
  new option or in debug mode, saving 10% of the time
  use for generation of code in a larger module.
2025-11-26 11:19:44 +00:00
Kay Hayen
839cf40d2f Optimization: Keep track of variables that can even escape
* Temporary and locals dict variables cannot escape yet were
  using a lot of time in virtual method calls.

* This avoids that time entirely making this step even faster.

* We do not take the effort to dynamically clean it up, so
  variables could be added there that then don't exist, but
  it's still faster this way as those are mostly rare cases.
2025-11-26 11:19:44 +00:00
Kay Hayen
84e89940e4 Optimization: Faster escaping of variables already in unknown state
* This mostly affects module variables which once they
  become unknown may frequently escape again.

* The number based check avoids the work for many cases.

* For the very trusted trace check we need to make that
  fast to test as well for best results.
2025-11-26 11:19:44 +00:00