Commit Graph

842 Commits

Author SHA1 Message Date
K. Lange
35b4032de3 Support chained 'for's in generator expressions 2021-03-06 15:32:30 +09:00
K. Lange
0f6b74ff5b Generator expressions as direct function arguments 2021-03-06 11:19:34 +09:00
K. Lange
e97e42afc9 Replace tuple comprehensions with generator expressions 2021-03-06 11:13:49 +09:00
K Lange
5d36129778
Financial contributions are welcome. 2021-03-05 11:41:04 +09:00
K. Lange
11f78e62bb Concede defeat the language identification battle; we're _A_ Python? 2021-03-05 11:39:10 +09:00
K Lange
6a9668041f Ship my own wcwidth for Windows and fix up the magic incantations to make UTF-8 in/out work 2021-03-04 22:01:23 +09:00
K. Lange
2fafc06203 Fix bad allocation size for generator objects 2021-03-04 18:45:12 +09:00
K. Lange
7aa4d3ce99 yield keyword; generator functions 2021-03-04 18:09:07 +09:00
K. Lange
5b6e3cbff1 Remove long-deprecated __list, __dict, __inrepr attributes 2021-03-04 14:23:32 +09:00
K. Lange
88c6d27569 Use a thread status flag to indicate interrupt status instead of trying to raise from the signal handler 2021-03-04 08:28:32 +09:00
K. Lange
37353c2b88 Move and expose dumpStack for use in debuggers 2021-03-04 08:28:32 +09:00
K Lange
3daf95bd47 (win32) only link static deps on the core library 2021-03-03 23:37:44 +09:00
K. Lange
a89c2bacef Formalize the debugger interface and clean it up; add nice debugger to main interpreter executable 2021-03-03 20:52:32 +09:00
K. Lange
9ecbc894ed Build against tcmalloc on win32 2021-03-03 10:41:11 +09:00
K. Lange
e06a132a21 Resolve link resolution issue on Darwin 2021-03-03 10:36:44 +09:00
K Lange
9faec7b318 Threading support in mingw win32 builds 2021-03-02 23:24:52 +09:00
K. Lange
f6558fd3fa Fixup debugger bugs; add 'p' command 2021-03-02 16:29:15 +09:00
K. Lange
b943e5e9e3 Add a locals() function 2021-03-02 16:24:49 +09:00
K. Lange
59bb19b3cb Attach more instruction operands to examine() results 2021-03-02 10:27:24 +09:00
K. Lange
b1d32fb606 Rudimentary hookable breakpoints/debugger 2021-03-01 23:20:25 +09:00
K. Lange
4b7cf2ec27 Fix operator precedence for unary 'not' 2021-03-01 14:56:40 +09:00
K. Lange
a65f2dcf81 Add 'assert' statement 2021-03-01 11:55:51 +09:00
K. Lange
5ce03ebcf5 (docs) change header link for generated doc pages 2021-02-28 23:04:36 +09:00
K. Lange
ebf94603a4 Fix incorrect offsets in closure instructions 2021-02-28 17:23:02 +09:00
K. Lange
8cf67cf7b2 Add static analysis methods to 'dis' module 2021-02-28 16:39:36 +09:00
K. Lange
c39063412e Separate code objects into a different type at runtime 2021-02-28 16:39:25 +09:00
K. Lange
8ffd629250 Fix wrong KWARGS value when an argument after an expansion starts with an identifier 2021-02-27 20:10:49 +09:00
K Lange
4c94aab5c1 win32 build fixes 2021-02-26 22:18:40 +09:00
K. Lange
adfd8a6492 Fix bug with resizing local table when assigning names to exceptions 2021-02-26 15:28:03 +09:00
K. Lange
c50352d5a2 Add mkdir, stat to os module 2021-02-26 10:26:21 +09:00
K. Lange
135ad72612 Fix -C option 2021-02-25 10:40:18 +09:00
K. Lange
00fce076fe Add __qualname__ to classes 2021-02-25 10:03:52 +09:00
K. Lange
1bf238ebc1 Have startModule attach the module to the modules table rather than the import logic doing it 2021-02-25 08:55:07 +09:00
K. Lange
bc856ac063 Ongoing documentation improvements 2021-02-25 08:50:37 +09:00
K. Lange
4c1fe774e7 Eliminate unused parameters to krk_compile, interpret, runfile, callfile 2021-02-25 08:17:19 +09:00
K Lange
77b7f3ab22 Attach modules in C extensions when using krk_makeClass 2021-02-24 23:02:50 +09:00
K Lange
8e1f5f0565 repr classes as <class 'module.Class'> like Python
- We were using "<type ...>" like Python2 does for built-ins?
  But even Python 2 called user classes "<class ...>" - Python 3
  calls both built-ins and user classes "class".
- Check if there's a __module__ name and use that as well, now
  we look even more like Python!
2021-02-24 22:50:51 +09:00
K Lange
6d0e342e1b Attach module name to classes like Python does 2021-02-24 22:48:04 +09:00
K Lange
e3f774065d Module name for repl should be __main__, <module> is what we label the module-level function... 2021-02-24 22:47:33 +09:00
K. Lange
0f5786ed62 Make -m work with dotted imports 2021-02-24 18:16:33 +09:00
K. Lange
73feea3cc0 Makefile should also install tools 2021-02-24 12:54:54 +09:00
K. Lange
db4185d035 I think that should fix up installs to /usr/local ? 2021-02-24 11:22:18 +09:00
K. Lange
4fc510034d Add some functions for unloading modules 2021-02-24 10:13:10 +09:00
K. Lange
3945e3865f Changes to how uncaught exceptions are handled.
- Don't clear the HAS_EXCEPTION bit.
- Reuse CLEAN_OUTPUT to disable printing the exception.
- Don't reset the stack, repls should do that _on every call_.
- Fix up sandbox and simple-repl.h, they don't need to do that silly stack thing to handle exceptions themselves.
2021-02-24 09:08:21 +09:00
K. Lange
361aeb3927 Fixup LDLIBS linking for libkuroko, interpreter, tools, modules? 2021-02-23 16:30:10 +09:00
K. Lange
7df8c0803f Don't use 'git' to do comparison for tests 2021-02-23 14:01:55 +09:00
K. Lange
617c1e8eec Add docs/syntax.md just to have the page exist 2021-02-23 13:00:47 +09:00
K. Lange
fec2e69317 Fix int(bool) to return int 2021-02-23 12:40:36 +09:00
K. Lange
21afbb3fb1 Actually try to determine the required min libc for deb package 2021-02-23 10:50:37 +09:00
K. Lange
e626fefbb8 bools should be derived from ints and valid for int operations implicitly 2021-02-23 10:02:34 +09:00