Commit Graph

1410 Commits

Author SHA1 Message Date
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
K. Lange
8d02420d4d add .__args__ property to functions 2021-01-05 13:37:26 +09:00
K. Lange
57455ea80d basic lambda expressions (TODO: needs complex argument lists) 2021-01-05 13:28:45 +09:00
K. Lange
a4885833c5 add paste() to repl to disable automatic indentation 2021-01-05 12:53:51 +09:00
K. Lange
f764c059fe compiler support for tuple expressions 2021-01-05 12:07:55 +09:00
K. Lange
3016b1be34 add tuple.__contains__ 2021-01-05 11:42:08 +09:00
K. Lange
7a91678701 Use tuples to store range data for faster lookup 2021-01-05 11:39:20 +09:00
K. Lange
c8758c9ffb Add tuple type to store immutable lists 2021-01-05 11:38:11 +09:00
K. Lange
20d5ce47bf Work towards generalizing fast calls 2021-01-05 09:30:23 +09:00
K. Lange
f771c8a428 fileio gc fixups 2021-01-05 07:51:42 +09:00
K. Lange
0f6e823095 Make sure cached modules don't get garbage collected 2021-01-05 07:51:35 +09:00
K. Lange
3aa984c139 fixup gc collection of function argument names 2021-01-05 07:44:03 +09:00
K Lange
ff8ed02ebd Make print() a function before it's too late 2021-01-04 23:34:10 +09:00
K. Lange
d87fd9b1bd Commit results of test cases as of now (not sure if they're all correctly) 2021-01-04 21:50:20 +09:00
K. Lange
bc12529e75 Fix some test cases for expect testing 2021-01-04 21:44:16 +09:00
K. Lange
e5a1756543 Remove some tests that make too much output 2021-01-04 21:43:51 +09:00
K. Lange
017d1e3ff8 This isn't great but I don't want to deal with it properly right now 2021-01-04 21:43:05 +09:00
K. Lange
bb676a7f4d We had another bug with moving stacks... 2021-01-04 21:39:18 +09:00
K. Lange
feeaa30d11 Fix missing comma in test case for whitespace eating 2021-01-04 21:23:55 +09:00
K. Lange
5c1d8f24b6 more AOC test cases 2021-01-04 20:27:32 +09:00
K. Lange
f4cbf2ec38 this is now a late AOC2020 repo 2021-01-04 20:10:39 +09:00
K. Lange
6195649458 More test scripts 2021-01-04 19:59:11 +09:00
K. Lange
873ffb3428 Eat empty line in block? 2021-01-04 19:56:13 +09:00
K. Lange
f1ebada908 Add string iterators 2021-01-04 19:34:56 +09:00
K. Lange
7b8df5d4da More test files 2021-01-04 19:07:46 +09:00
K. Lange
8f2e7f237e List slicing and a gc fix for iterators 2021-01-04 19:07:39 +09:00
K. Lange
bfae38538d Need to turn off whitespace eating _before_ the close paren 2021-01-04 19:07:19 +09:00
K. Lange
61a38f3a5f That dup isn't necessary 2021-01-04 18:15:17 +09:00
K. Lange
b93429d6a6 Oops, fix strings; simplify bytecode around getters/setters; use this approach for slicing 2021-01-04 18:10:55 +09:00
K. Lange
49b7eb2941 Super speedy getters and setters 2021-01-04 17:47:53 +09:00
K. Lange
49d2a26aa4 repl must reset stack after printing values since they run without a callframe 2021-01-04 17:47:44 +09:00
K. Lange
fb9d0163ef Some more objects 2021-01-04 17:29:06 +09:00
K. Lange
66533d5c23 C-ify a bunch of basic builtin functions 2021-01-04 16:21:59 +09:00