Commit Graph

763 Commits

Author SHA1 Message Date
K. Lange
baad0997fb Cleanups for docs, stripped builds 2021-03-18 14:59:26 +09:00
K. Lange
30ef65355c Doxygen cleanups 2021-03-18 14:29:27 +09:00
K. Lange
2de2d6ba6e Fix ordering of assignments for codeobjects to resolve gc issue 2021-03-17 15:26:34 +09:00
K. Lange
d36dc3cae3 Simplify Pair iterator in gendoc 2021-03-17 08:07:16 +09:00
K. Lange
14af8bb8f3 call() on generator must return 2 to yield to callSimple 2021-03-17 08:06:50 +09:00
K Lange
3123a3eb40 Change a couple of recurse parses to accept assignments or tuples 2021-03-16 21:12:08 +09:00
K. Lange
6c29be4dcf Fix up multiple assignment targets so we have some hope of nesting 2021-03-16 19:28:00 +09:00
K. Lange
d0a29f49e9 Do safe tuple printing in a more normal-looking format 2021-03-16 19:11:45 +09:00
K. Lange
5c63d667f4 Catch continue/break outside of loops 2021-03-16 18:40:33 +09:00
K. Lange
ec12bca5ed Prefix value and object tag enums 2021-03-16 07:04:27 +09:00
K. Lange
68fdcc0b69 Function -> CodeObject 2021-03-16 06:57:41 +09:00
K Lange
09a1573907 Give function objects attribute tables 2021-03-15 23:34:17 +09:00
K Lange
011b5a9925 Fix handling of trailing comma in target list 2021-03-15 23:34:17 +09:00
K Lange
5fa367dfbd Fix up some error handling with complex assignment targets 2021-03-15 23:03:13 +09:00
K Lange
708ba0a481 Fix up some weird stuff with parens 2021-03-13 23:37:09 +09:00
K. Lange
1ceaaec053 I guess expressions should start at CAN_ASSIGN 2021-03-13 20:31:13 +09:00
K. Lange
1229020078 Revert "Dedupe constants on compile"
This reverts commit b3c0d45bf4.
2021-03-13 20:18:13 +09:00
K. Lange
b09f7b1131 Multiple arbitrary assignment 2021-03-13 20:17:45 +09:00
K. Lange
372b6c15b0 Use KRK_ macros in os.c 2021-03-13 16:06:34 +09:00
K. Lange
e09023ad5c Make sure VM's main decoder loop takes KrkOpCode so we get warnings about missing ops 2021-03-13 16:04:13 +09:00
K Lange
b3c0d45bf4 Dedupe constants on compile 2021-03-13 14:53:47 +09:00
K Lange
3bd27cd847 Arrow operator for return types was missing from PARSE_RULES 2021-03-13 14:25:44 +09:00
K Lange
9ea28e77f1 Add class and module member annotations 2021-03-13 14:22:32 +09:00
K. Lange
b243aabc82 Add more docstrings to builtins 2021-03-12 20:17:53 +09:00
K. Lange
d147de2d7f Let the scanner attempt to continue when unget() was called twice 2021-03-12 19:42:18 +09:00
K. Lange
d3a614869a Fix leak in compiler when a truncated escape sequence is encountered 2021-03-12 19:42:02 +09:00
K. Lange
307f5e7200 Free source chars when string allocation failed due to invalid UTF-8 sequence 2021-03-12 19:41:32 +09:00
K. Lange
55e6752b8c Free instances first on shutdown so we can be sure their classes are still around for gcsweep binds 2021-03-12 19:41:04 +09:00
K. Lange
a19c39e011 Be more thorough in freeVM 2021-03-12 19:40:29 +09:00
K. Lange
57b7f76244 Don't let garbage collection close stdin/out/err 2021-03-12 19:40:05 +09:00
K Lange
d23aed51b2 Eliminate global calls to listOf, dictOf with cleaner comprehensions 2021-03-12 15:40:07 +09:00
K. Lange
1b101af1a3 let 'function' type be subscripted for annotations 2021-03-12 12:25:01 +09:00
K. Lange
efdb743c54 Type hint expressions must not be assignment expressions 2021-03-11 21:05:25 +09:00
K Lange
49ee777c50 Type annotations. 2021-03-11 20:44:39 +09:00
K Lange
e3a7dc002f Add __class_getitem__, GenericAlias in prep for type hints 2021-03-11 19:06:07 +09:00
K Lange
f655ca7f61 Fix up function, object repring and add __qualname__ to functions 2021-03-11 19:05:21 +09:00
K. Lange
1201dc8115 Move birthday for exception objects to the start of the except block 2021-03-11 13:57:11 +09:00
K. Lange
63d7c8af97 Implicitly instantiate classes passed to 'raise' 2021-03-11 12:32:35 +09:00
K. Lange
9924b35e77 What if we just... called finalize again on property assignment... 2021-03-11 10:02:23 +09:00
K Lange
3c97754365 Fix filter object passing wrong argument to condition function 2021-03-10 23:29:58 +09:00
K. Lange
c305f790b5 Add some docstrings for property objects 2021-03-10 21:19:55 +09:00
K. Lange
f0ee256060 Fix doc generator for new property attribute layout 2021-03-10 21:18:48 +09:00
K. Lange
6b3f8de63b Implement general __get__/__set__ descriptors
property objects are no longer a special case and have been simplified
old-style native properties can probably all be removed as well, but, todo
2021-03-10 20:24:12 +09:00
K. Lange
96a403b34c Allow parenthesized from ... import (...) lists 2021-03-10 16:36:19 +09:00
K. Lange
540a9aea0d Fix bug in json float parsing found by WASM IDE's static analyzer 2021-03-10 14:35:14 +09:00
K. Lange
c9aa17e119 Rename __get__, __set__ to match Python's __getitem__, __setitem__ and make room for future addition of descriptors 2021-03-10 14:24:22 +09:00
K Lange
aaac0c168a Add krk_valueGetAttribute_default 2021-03-09 23:34:57 +09:00
K. Lange
05f7d9537a Add tests related to recent class method changes 2021-03-09 23:00:47 +09:00
K. Lange
5d508bcc17 Implement tuple.__init__ 2021-03-09 22:55:40 +09:00
K. Lange
e38648c9fb krk_debug_dumpStack() should accept NULL for frame arg 2021-03-09 22:55:27 +09:00