K. Lange
c9b989cb56
Add test for __set_name__
2022-07-06 21:43:15 +09:00
K. Lange
2d8de139b3
More fixes to tuple comparisons; port to lists
2022-07-06 21:25:59 +09:00
K. Lange
ee1420cd35
Use krk_unpackIterable (and a temporary tuple) in OP_UNPACK
2022-07-05 14:45:47 +09:00
K. Lange
ebe1b0276e
Remove tupleOf builtin
2022-07-05 11:43:11 +09:00
K. Lange
f38a451f19
Attach and build upon partial tracebacks
...
If an exception is raised within a 'try', attach a traceback only up
until that 'try'. If a re-raised exception has a traceback already,
attach the new traceback "above" the existing one.
2022-07-03 20:39:07 +09:00
K. Lange
85ad910f23
Attach __cause__, __context__ to exceptions; support 'raise ... from ...'
2022-07-03 19:50:00 +09:00
K. Lange
2d2691710c
Exceptions with no argument should not set it to 'None'
2022-07-03 19:38:04 +09:00
K. Lange
abd90ccd3d
Fixup, complete tuple comparisons
2022-07-03 11:18:11 +09:00
K. Lange
2000161d34
Trim trailing whitespace in string-to-int/long conversions
2022-06-29 14:55:46 +09:00
K. Lange
0d28885009
Fix that one old test to not go through float()
2022-06-29 13:55:21 +09:00
K. Lange
f61922d155
long type
2022-06-27 20:40:24 +09:00
K. Lange
cdcfb63f41
New '__options__' psuedo-module with compile-time changes
2022-06-04 15:59:24 +09:00
K. Lange
48f9d34a9b
Tests for bound method edge cases
2022-06-02 14:34:40 +09:00
K. Lange
bbfe948b86
Lambda should be able to accept *args and **kwargs
2022-05-30 17:46:24 +09:00
K. Lange
a4e2b5c881
Relative imports
2022-05-28 15:41:47 +09:00
K. Lange
aa6781609e
Fix bad encoding of large upvalue indexes
2022-05-27 18:37:37 +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
74e064c82c
Test case for preceding fix
2022-05-24 13:33:34 +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
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
e24ea3d32c
Fix incorrect handling of blank and comment lines before 'else', 'except', etc.
2022-02-17 09:49:24 +09:00
K. Lange
2c158f9491
Fixup bad cast when comparing int to float
2021-12-15 17:31:15 +09:00
K. Lange
abd49b93a7
Fix 'del' on table entries not updating count
2021-12-15 17:22:52 +09:00
K. Lange
6a431e9aa3
Add a test for that
2021-12-15 15:11:27 +09:00
K. Lange
3733c996bc
Fix assignments to single complex assignment targets (trailing commas)
2021-04-23 14:15:14 +09:00
K. Lange
84765c1f4d
Update test for change in dict ordering
2021-04-14 22:32:51 +09:00
K. Lange
40836cba21
Implement Python 3 division semantics
2021-04-02 16:02:05 +09:00
K. Lange
dc361af48b
Fix incorrect binding of classmethod when called on instance of subclass
2021-04-02 12:25:07 +09:00
K. Lange
002412ecf8
Initial support for async/await
2021-03-31 19:27:13 +09:00
K. Lange
f4ea799d42
Fix generator not being popped from stack on 'yield from'
2021-03-31 19:09:06 +09:00
K. Lange
729220568e
Try swapping args to __eq__ on NotImplemented
2021-03-30 17:00:23 +09:00
K. Lange
70d5f1b2b7
Implement NotImplemented, fallback operators
...
Adds 'NOTIMPL' as a new primitive value, available from
__builtins__.NotImplemented. Adds support for inverse /
reflected overrides for binary operators. Adds opcodes
for LESS_EQUAL and GREATER_EQUAL.
2021-03-30 16:42:29 +09:00
K. Lange
006119cc1e
Support arguments to super(), support outside of classes
2021-03-30 14:18:39 +09:00
K. Lange
7a81724595
Unify more format strings
2021-03-26 12:17:14 +09:00
K. Lange
41c77de753
Implement overridable hashing and speed up property access
2021-03-25 19:49:18 +09:00
HarJIT
5c2de206b9
Codecs package ( #4 )
...
Codecs package
Co-authored-by: HarJIT <harjit@harjit.moe>
2021-03-24 04:53:02 -07:00
K Lange
2ed8e65c89
Rework KrkValue to use NaN-boxing
2021-03-24 20:49:44 +09:00
K. Lange
b5c22f77c5
Preallocate table space for krk_dict_of
2021-03-23 20:26:39 +09:00
K. Lange
6f92af28a2
Update test/day7.krk to not just be a test of list.pop
2021-03-23 12:50:04 +09:00
K. Lange
a63aef6b92
Try to make builds smaller
...
... by:
- Normalizing some exception strings.
- Putting the 'dis' module behind -DDEBUG.
2021-03-22 18:09:25 +09:00
K Lange
c68eb093e8
Fix broken stack handling in and make map,enumerate,filter object inits
2021-03-21 16:47:13 +09:00
K. Lange
a25315de92
Implement chained comparison operators
2021-03-21 12:41:54 +09:00
K. Lange
d0ea1278a6
... and update test
2021-03-21 11:31:07 +09:00
K. Lange
1a569e36f6
README changed, update the test
2021-03-20 16:09:48 +09:00
K. Lange
cb809dd0fe
'yield' as an expression with a value; 'yield from'
2021-03-20 12:07:46 +09:00
K. Lange
2d3e7ca3d3
Fix bad pop on bare except-finally
2021-03-19 11:39:49 +09:00
K. Lange
46dada92fc
Support multiple context managers in a 'with' statement
2021-03-18 21:25:19 +09:00
K. Lange
ee731257dd
Support calling exit handlers for with: statements on exception
2021-03-18 20:41:11 +09:00
K. Lange
8aed1368ea
Implement 'finally'
2021-03-18 19:52:30 +09:00