Commit Graph

7 Commits

Author SHA1 Message Date
K. Lange
444cb28d06 Drop krk_callSimple
Replace it with two functions that won't run into issues with
trying to call bound objects, instances, etc. that weren't on
the stack. In general, if you have a callable value of unknown
type you should call `krk_callStack` with it on the stack followed
by all of its args; to make this abundantly clear, `krk_callStack`
only takes the argument count. For calling things we know to be
safe (closures and natives), there is `krk_callDirect`, which should
be used, for example, when calling core methods like __repr__.
2021-04-17 19:29:52 +09:00
K Lange
63f4ae8d9b Retool the sandbox to disable modules and re-enable print 2021-03-20 22:51:22 +09:00
K. Lange
4c1fe774e7 Eliminate unused parameters to krk_compile, interpret, runfile, callfile 2021-02-25 08:17:19 +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
79cc3bdac1 More header cleanup, rename some stuff 2021-02-19 12:30:39 +09:00
K Lange
3cef9d05e8 Add simple repl to krk-sandbox 2021-02-15 21:16:23 +09:00
K. Lange
13371611e2 Add tools (and tools/kuroko contains symlinks to headers) 2021-02-12 11:48:50 +09:00