K. Lange
f16083a1a6
Pack object type/flags/hash better
...
This is much a more major ABI break than the other things I've
been doing, but also a much bigger win.
2022-05-31 06:55:54 +09:00
K. Lange
bbfe948b86
Lambda should be able to accept *args and **kwargs
2022-05-30 17:46:24 +09:00
K. Lange
65f7ae3f22
Simplify cached method things; don't expose the enum in headers
2022-05-30 13:47:27 +09:00
K. Lange
a41410dcd9
Stick 'subclasses' before method cache
...
While were in here breaking ABIs, this makes a lot more sense.
2022-05-30 08:56:56 +09:00
K. Lange
bbf378efe2
Reorder arguments to callNativeOnStack for better fallthrough to native call
2022-05-29 20:00:41 +09:00
K. Lange
d18b08ea46
Native function args should be const
2022-05-29 18:39:46 +09:00
K. Lange
8ade3af008
Support dir() with no arguments; returns globals only
2022-05-28 17:56:53 +09:00
K. Lange
ae10f81387
Start calling this 1.3
2022-05-28 17:33:35 +09:00
K. Lange
285f7cd496
Fix up path search ordering to be more like CPython; implement __main__.krk
2022-05-28 17:31:43 +09:00
K. Lange
a4e2b5c881
Relative imports
2022-05-28 15:41:47 +09:00
K. Lange
3645047051
Same for None
2022-05-28 11:45:38 +09:00
K. Lange
f14ca90792
Avoid NotImplemented.__hash__ resolving to object.__hash__ and segfaulting
2022-05-28 11:38:59 +09:00
K. Lange
81e3bb33a0
Defer freeing pre-grown stacks when using them in native calls
...
If the stack needs to grow during a native function call that has
taken a pointer into the stack as an argument, defer freeing this
copy of the stack until the outermost such call returns. The new
stack will always point to new memory, as we can not call realloc
in this case, and if repeated nested native function calls result
in multiple stack growths then several copies of the stack may
persistent in memory simultaneously, but we do not need to trouble
native function implementations with the possibility that their
arguments may become invalid, and we do not need to produce copies
of the stack when calling them.
This resolves a long-standing issue with resizable stacks where
native function calls always entailed a memcpy() penalty, and calls
with many arguments also had malloc()/free() overhead for heap
allocated stack copies.
With this change, performance improves, as the wrapper checks around
stack growth are uncommon, so their overall cost is less than the
repeated moving of arguments around for native function calls.
2022-05-27 21:57:17 +09:00
K. Lange
1f6afa7369
Add new CLOSE_MANY and POP_MANY instructions
2022-05-27 18:37:37 +09:00
K. Lange
7dff49ccb7
Fix incorrect hashing of classes in fallback added for subclass tracking
2022-05-27 18:37:37 +09:00
K. Lange
aa6781609e
Fix bad encoding of large upvalue indexes
2022-05-27 18:37:37 +09:00
K. Lange
32b3af58cc
Unset class bases when doing final free so we don't access potentially-freed subclass tables
2022-05-27 00:15:55 +09:00
K. Lange
1ac8f296b2
Invalidate caches of subclass method pointers when they change in a superclass
2022-05-27 00:05:27 +09:00
K. Lange
1c5fc954ed
Update copyright years, it's been 2022 for a while now
2022-05-26 20:46:06 +09:00
K. Lange
3601411f54
Support step value in range()
2022-05-26 20:41:39 +09:00
K. Lange
1acd0243e4
Workaround horrible thread-local performance on macOS (aarch64)
2022-05-24 21:01:42 +09:00
K. Lange
74e064c82c
Test case for preceding fix
2022-05-24 13:33:34 +09:00
K. Lange
b9776aec1e
Revert loop on 'for ... if ...'
2022-05-24 13:27:01 +09:00
K. Lange
341fd877d5
New optimized loop and jump instructions
2022-05-23 22:14:22 +09:00
K. Lange
657a02af29
Reduce recursion overhead when calling objects
2022-05-23 22:14:01 +09:00
K. Lange
c4b83396df
More efficient bool, int comparisons, sometimes
2022-05-23 21:10:09 +09:00
K. Lange
c38e78e21c
Fast-case listiterator.__call__ instanceof check
...
It's highly unlikely this class is subclassed, and it can
be called a lot of times in a loop.
2022-05-23 21:09:03 +09:00
K. Lange
d0c2f8cec2
Cleanup memory size debugger, no need for external hashmap
2022-05-23 13:25:33 +09:00
K. Lange
cb14875406
Catch exceptions early in timeit.timeit
2022-05-23 10:16:07 +09:00
K. Lange
4a052191de
Support 'else' blocks on for and while loops
2022-05-23 09:41:12 +09:00
K. Lange
ece7da299a
Support = to print f-string expression alongside value
2022-05-23 08:42:40 +09:00
K. Lange
78e85ce873
Support an extensive memory debugging process, if you provide some extra files
2022-05-21 21:10:57 +09:00
K. Lange
27278cfa68
Fixup allocation size for bytes literals
2022-05-21 20:39:47 +09:00
K. Lange
953e57fa0d
Fix two more instances of bad alloc/dealloc pairings
2022-05-21 20:05:16 +09:00
K. Lange
73c82e0868
Fixup display of gc debug info on 32-bit platforms
2022-05-21 19:18:30 +09:00
K. Lange
a50cfc63a7
Fix tracking of memory from instances of objects with allocSize != sizeof(Instance)
2022-05-21 19:18:13 +09:00
K. Lange
9b1875d8ce
Fix incorrect memory usage tracking of taken strings
2022-05-21 19:15:04 +09:00
K. Lange
b6e591601b
Fix incorrect memory usage tracking of code object line mappings
2022-05-21 19:14:50 +09:00
K. Lange
81f78b9199
fixup potential leaks when os.exec*() family fails
2022-05-21 19:14:24 +09:00
K. Lange
7c4b129b7c
Dict unpacking should only happen on dicts, or we're going to have a bad time
2022-05-19 11:05:55 +09:00
K. Lange
396b8c0ae3
Inline string equality check to save overhead of object.__eq__ call
2022-05-05 16:14:15 +09:00
K. Lange
5df1469ba1
Optimized method invoke
2022-05-05 11:41:05 +09:00
K. Lange
d947e1aba3
Add bound method call test to benchmark suite
2022-05-05 08:23:49 +09:00
K. Lange
f8139f9352
Add versions, local Kuroko to benchmark
2022-05-05 08:23:40 +09:00
K. Lange
246316ad59
v1.2.5
2022-05-03 16:49:58 +09:00
K. Lange
6613db6cd4
Implement slice objects, slice stepping
...
This is an initial implementation of slice stepping and slice objects.
The __getslice__, __setslice__, and __delslice__ methods have been removed.
Slice expressions are now turned into slice objects with the OP_SLICE instruction.
Slice objects have a start, end, and step, all of which default to None.
Slice objects are passed to __getitem__, et al., as a normal parameter.
Support for slices in list.__getitem__, str.__getitem__, and bytes.__getitem__ has
been implemented.
2022-05-03 16:49:58 +09:00
K. Lange
c750f76a57
Assign non-None REPL results to __builtins__._
2022-04-13 22:34:45 -04:00
K. Lange
c5b95645a7
Support KUROKOPATH similar to PYTHONPATH
2022-03-31 18:01:12 +09:00
K. Lange
dbd1071bc1
Internalize random's rng, seed it with more bits
2022-03-29 10:17:36 +09:00
K. Lange
e815497555
Fixup bad recursive locks in list functions?
2022-03-29 09:42:56 +09:00