K. Lange
f6a5f7f954
Cleanup exception hierarchy
...
- Add BaseException as the proper base of all exception types.
- Add SystemError for internal errors.
- Move OSError out of 'os' and into the core.
- Make KeyboardInterrupt subclass BaseException.
- Make ArgumentError subclass TypeError.
2022-08-05 12:36:06 +09:00
K. Lange
1129323cff
Trying to build an exception may itself raise an exception
2022-08-05 10:10:24 +09:00
K. Lange
5d9d33e10e
The builtins module really should be called 'builtins'
2022-08-04 05:58:22 +09:00
K. Lange
879a26f3cf
Support rline in the simple-repl and update it to be more like the real one
2022-08-03 22:52:55 +09:00
K. Lange
0df346fb9b
Don't keep rebuilding class object that tracks compiler state for gc...
2022-08-03 22:22:50 +09:00
K. Lange
6d8d33c020
Move File, BinaryFile, Directory to fileio module
2022-08-03 22:05:14 +09:00
K. Lange
0455137c7b
Store fget, fset as direct object pointers if we can
2022-08-03 22:04:57 +09:00
K. Lange
8236fb9037
Rewrite attribute get/set to fix descriptors; drop DYNAMIC_PROPERTY
2022-08-03 21:01:28 +09:00
K. Lange
c519298183
reorder opcodes since we added EXIT_LOOP
2022-08-03 20:43:19 +09:00
K. Lange
71dd3ecce9
Use krk_parseArgs in a few places
2022-08-03 19:44:59 +09:00
K. Lange
15fa509193
Add krk_parseArgs utility function
2022-08-03 19:44:07 +09:00
K. Lange
2387ac6b29
bytes() can take iterators, int, encode strings (utf-8)
2022-08-03 09:10:37 +09:00
K. Lange
0d23254a1e
Replace all uses of PUSH_CHAR in obj_str with string builders
2022-08-03 08:56:55 +09:00
K. Lange
b0a35fb897
Attach mode strings to stdin, stdout, stderr objects so they repr correctly
2022-08-02 07:44:49 +09:00
K. Lange
85d64e05ac
_macos_currentThread should always be inlined
2022-08-02 07:44:23 +09:00
K. Lange
efb73c8759
Don't use PRIkrk_int in exception format strings, we can't trust it
2022-08-01 11:22:33 +09:00
K. Lange
5190c0c9ab
Mark this as rc0
2022-07-31 19:36:30 +09:00
K. Lange
2793090d07
Make deb package versions a bit smarter
2022-07-31 19:36:22 +09:00
K. Lange
bc413b6dae
Missing cast when shifting '1' by digit size in obj_long
2022-07-31 09:31:24 +09:00
K. Lange
b3fbb9c23f
Cleanup old unpackArray things
2022-07-31 09:31:02 +09:00
K. Lange
5c469ddde9
clang seems to think this can be uninitialized
2022-07-29 21:39:52 +09:00
K. Lange
9bd257e625
Exceptions raised in 'else' should run 'finally' before raising, not run 'except'
2022-07-29 20:05:21 +09:00
K. Lange
2f18ecbaa1
Support 'else' block on 'try'
2022-07-29 19:33:31 +09:00
K. Lange
d6c9602abd
Properly run __exit__, finally on break or continue
2022-07-29 19:13:33 +09:00
K. Lange
d89b023752
Support %.*s in exception formatter
2022-07-29 19:11:56 +09:00
K. Lange
0a9eeca62e
Cleanup sandbox
2022-07-29 12:24:23 +09:00
K. Lange
473f0baabb
Fix Makefile oops with rpath=$ORIGIN
2022-07-29 12:22:27 +09:00
K. Lange
3de86ab199
Break out 'kuroko' module, expose init functions, and let VM be initialized without modules
2022-07-29 12:18:01 +09:00
K. Lange
b8620601fb
Minor cleanup of import errors
2022-07-29 12:17:16 +09:00
K. Lange
8c387b56bd
Clean up some C API docs
2022-07-29 09:51:56 +09:00
K. Lange
3b770aa71a
Fixup krk_runfile and remove krk_callfile
2022-07-29 09:51:42 +09:00
K. Lange
71ab25b679
Add more exposed API functions to headers
2022-07-29 09:51:00 +09:00
K. Lange
74d3b5f479
Move exception generation into src/exceptions.c
2022-07-29 09:49:57 +09:00
K. Lange
b5ab2bd24a
Support del on function attributes, since we support get and set
2022-07-29 09:48:07 +09:00
K. Lange
a0d66aa2d7
Serial to 7
2022-07-27 22:02:47 +09:00
K. Lange
3b56331189
Don't use 'char*' Attribute functions in get/set/delattr
2022-07-27 22:01:12 +09:00
K. Lange
26a31b713e
Use a custom formatter for krk_runtimeError
2022-07-27 21:44:02 +09:00
K. Lange
b9c8e36414
Don't rely on %s to print messages attached to exceptions
2022-07-27 21:09:20 +09:00
K. Lange
9075a589b8
Fix wrong size of specialMethodNames
2022-07-26 19:23:47 +09:00
K. Lange
8fa4a62344
serial to 6
2022-07-26 19:00:30 +09:00
K. Lange
fb014bf330
Fix up some feature disable flags
2022-07-26 18:57:54 +09:00
K. Lange
786457c6fd
Fixup typedefs for KrkObj, KrkString
2022-07-26 14:12:55 +09:00
K. Lange
7d568a209a
Make the compiler reentrant
2022-07-26 13:42:05 +09:00
K. Lange
39ed214178
Remove global state from debugger
2022-07-26 13:38:25 +09:00
K. Lange
73cdaeea30
Get rid of several redundant globals
2022-07-26 10:49:45 +09:00
K. Lange
b7f81d9239
KrkGenericAlias → krk_GenericAlias for symbol name consistency
2022-07-26 09:17:11 +09:00
K. Lange
dd621b94f2
Don't let an already-running generator execute
2022-07-24 16:39:53 +09:00
K. Lange
4dc3f08fa0
Fix upvalue capture in generators
2022-07-24 15:54:36 +09:00
K. Lange
8213430712
Close upvalues even if exception exits runtime
2022-07-24 14:14:47 +09:00
K. Lange
ee86a241e0
b5
2022-07-23 08:35:00 +09:00