22 Commits

Author SHA1 Message Date
K. Lange
0c4c4c95f9 Add module class with nice repr 2021-01-07 12:13:47 +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
3898e5e51c Store the names of locals in functions for debugging later 2021-01-06 15:03:56 +09:00
K. Lange
c8758c9ffb Add tuple type to store immutable lists 2021-01-05 11:38:11 +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
764f9144f8 Add __base__, isinstance(), and track superclass in the VM and not just implicitly by super() calls. 2020-12-31 09:15:53 +09:00
K. Lange
f7e1c0da0d Add docstrings, __doc__, and help() 2020-12-30 16:59:21 +09:00
K. Lange
a0d52a61f2 add an exception mechanism 2020-12-29 11:00:12 +09:00
K. Lange
067d8cdb65 fix upvalue storage being completely broken when we move the stack 2020-12-28 22:02:39 +09:00
K. Lange
3ba8025eeb lots of fixups so we can create dicts from the vm 2020-12-28 20:38:26 +09:00
K. Lange
f62f6f84e2 fix up some bad garbage collections with modules 2020-12-28 13:51:14 +09:00
K. Lange
1d3368861b fix a bunch of compiler stuff 2020-12-28 12:16:44 +09:00
K. Lange
8f42695f36 Fix up repl 2020-12-28 10:54:25 +09:00
K. Lange
4982881235 that's a lot of stuff and pretty much finishes the book; need to do optimizations 2020-12-27 22:40:35 +09:00
K. Lange
0ca0564cd0 methods/initializers; haven't done invoke, want to add modules first then come back 2020-12-27 17:53:46 +09:00
K. Lange
f88e8de25d classes and instances (from ch 27) 2020-12-27 16:45:34 +09:00
K. Lange
1d0fac5640 Basic garbage collection; had to fix some stuff for stack preallocation 2020-12-27 16:07:27 +09:00
K. Lange
78022fb701 wrap up closure implementation from chapter 25 2020-12-27 13:02:26 +09:00
K. Lange
81e3e133c8 finish up chapter 24 (functions, calls, native bindings) 2020-12-27 09:33:28 +09:00
K. Lange
14aeea5f5b through chapter 19 of Crafting Interpreters 2020-12-26 09:32:21 +09:00