Commit Graph

1392 Commits

Author SHA1 Message Date
K. Lange
ace8357c9a List comprehensions should not set their subfunctions to methods; ensures 'self' is an upvalue 2021-01-08 16:53:46 +09:00
K. Lange
0d2e115c93 Make sure we rebuild everything on a header file change... 2021-01-08 16:53:17 +09:00
K. Lange
3735b9c16b Raise KeyboardInterrupt on ^C 2021-01-08 16:40:43 +09:00
K. Lange
3f66b85757 Add os.environ (missing set: TODO) 2021-01-08 16:36:24 +09:00
K. Lange
0a9276863c Move module_paths to 'kuroko' insted of __builtins__ 2021-01-08 15:59:43 +09:00
K. Lange
596b552219 Add str.[l,r]strip() suite 2021-01-08 15:53:39 +09:00
K. Lange
80c307e12a Remove src/*.o on 'make clean' 2021-01-08 12:15:53 +09:00
K. Lange
f21a959b14 Add instructions for static builds 2021-01-08 12:12:44 +09:00
K. Lange
0658d2f4dd Flags and Makefile for static building 2021-01-08 10:59:03 +09:00
K. Lange
bd644026b0 Try to enable a Github Actions workflow 2021-01-08 08:49:08 +09:00
K. Lange
cdd3272d0e Accept tabs as being equivalent to eight spaces, but no mixing on a single line 2021-01-08 07:05:33 +09:00
K. Lange
ee518f9643 Fix two symbols missing namespacing prefixes 2021-01-08 06:49:27 +09:00
K Lange
44f69a78c2 Fix leak in _string_split 2021-01-07 23:18:14 +09:00
K Lange
3823270a8b Set interpreter rpath to $ORIGIN 2021-01-07 22:52:38 +09:00
K Lange
a1fbaecabd Readme and doc updates 2021-01-07 22:45:52 +09:00
K Lange
f9832be57c Typos and such 2021-01-07 20:42:25 +09:00
K Lange
5e93d9c3aa Cleanup interpreter flags 2021-01-07 20:22:49 +09:00
K Lange
4d31f5dc0e Pretend a tab is one space, just to begrudgingly allow them. 2021-01-07 20:22:34 +09:00
K Lange
2d012e4126 Add more help information and some startup text to the repl 2021-01-07 20:00:57 +09:00
K Lange
330f697800 Embed version information in a 'kuroko' module (~= Python's 'sys', but I want to keep that name available for Python compatibility) 2021-01-07 20:00:31 +09:00
K Lange
99cb7c592f closure.__doc__ should be a dynamic field, not a method... 2021-01-07 19:59:47 +09:00
K. Lange
5df14689bf Tab completion for basic fields/methods in the repl 2021-01-07 18:47:36 +09:00
K. Lange
9eb5fb1cad Add ternary (a) if (cond) else (b) 2021-01-07 14:04:42 +09:00
K. Lange
03ead15eaf Fix segfault on compile failure 2021-01-07 12:34:44 +09:00
K. Lange
21760c1f2d traceback ordering is in fact most-recent-last just like cpython... 2021-01-07 12:20:53 +09:00
K. Lange
0c4c4c95f9 Add module class with nice repr 2021-01-07 12:13:47 +09:00
K. Lange
ecb5f1e4ec Attach __doc__ to modules, default to None (but still set) if missing 2021-01-07 11:30:10 +09:00
K. Lange
11e6b79e49 Remove 'export' keyword 2021-01-07 11:15:57 +09:00
K. Lange
8a1de6c4d2 Assign __main__ as name of executed scripts 2021-01-07 10:58:04 +09:00
K. Lange
4266bf60e7 Attach globals to callframes and get rid of vm.globals 2021-01-07 10:52:29 +09:00
K. Lange
fbf4dda818 Fix tracking what should be 'global' through function calls? 2021-01-07 10:39:09 +09:00
K. Lange
902d2222b5 Make modules work like in Python. TODO: module class for better repring 2021-01-07 09:50:58 +09:00
K. Lange
e19e45c59b Simplify builtins.c generation 2021-01-07 08:39:46 +09:00
K. Lange
d6525a1f32 Add tuple.__iter__, internalize list.__iter__ 2021-01-07 08:27:40 +09:00
K. Lange
5d01aae45b Show local variable names, when available, in stack dumps 2021-01-06 22:09:27 +09:00
K. Lange
d3d048a3f8 Allow trailing commas in lists, dicts 2021-01-06 21:45:39 +09:00
K. Lange
7073505c6b fix test that includes pointer values in output 2021-01-06 19:07:22 +09:00
K. Lange
3898e5e51c Store the names of locals in functions for debugging later 2021-01-06 15:03:56 +09:00
K. Lange
b4e4da667f Add test for upvalue bug resolved yesterday 2021-01-06 14:51:07 +09:00
K. Lange
3c6b45709a Add an optional watchdog timer (set vm.watchdog and build with -DENABLE_WATCHDOG) 2021-01-06 10:40:23 +09:00
K. Lange
3cc8e8ef79 Don't build rline into libkuroko.so 2021-01-06 10:39:27 +09:00
K. Lange
1d02ed3c7d Expose krk_dumpTraceback so, eg., bim can call it at the right time 2021-01-05 23:23:16 +09:00
K. Lange
5b19419045 Fix incorrect Compiler* reference in addUpvalue 2021-01-05 23:22:37 +09:00
K. Lange
2a901a71a0 Need to mess with stack slots when import multiple things as locals 2021-01-05 19:47:25 +09:00
K. Lange
a4a4da70df Fixup more kwargs stuff, need to pop values for defaults 2021-01-05 19:01:26 +09:00
K. Lange
2f78ae8770 maybe support __eq__? 2021-01-05 17:41:32 +09:00
K. Lange
181e378628 Add class name to method __repr__ 2021-01-05 15:36:09 +09:00
K. Lange
ab158260f7 improve disassembly somewhat and add dis module 2021-01-05 15:33:33 +09:00
K. Lange
04391ebbaa add exit() to repl 2021-01-05 13:43:47 +09:00
K. Lange
7e2c515de6 Fix tuple repr to call repr and not str 2021-01-05 13:37:39 +09:00