Commit Graph

51 Commits

Author SHA1 Message Date
K. Lange
0c40e8a6fc Actually commit parseArgs test tool 2023-03-27 09:17:40 +09:00
K. Lange
e26391bc2f Automatically detect if libm is needed to support floordiv 2023-03-27 09:11:40 +09:00
K. Lange
7d57acd49a Support /,*,kws in function definitions 2022-09-29 21:46:10 +09:00
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
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
2793090d07 Make deb package versions a bit smarter 2022-07-31 19:36:22 +09:00
K. Lange
0a9eeca62e Cleanup sandbox 2022-07-29 12:24:23 +09:00
K. Lange
316d1219a2 Bind globals to functions, not codeobjects 2022-07-12 09:41:48 +09:00
K. Lange
19927ea13f Stop using tupleOf in codec tools 2022-07-05 11:42:57 +09:00
K. Lange
e7ca71ec96 Support more special methods in doc generation 2022-06-29 13:53:31 +09:00
K. Lange
d968a91cc7 Cleanup missed setlice/delslice refs 2022-06-29 13:15:46 +09:00
K. Lange
7d3df0d650 Cache binary operator methods, support inplace variants 2022-06-04 20:25:54 +09:00
K. Lange
fa2b2c053b Merge flags 2022-05-31 17:31:35 +09:00
K. Lange
aa6781609e Fix bad encoding of large upvalue indexes 2022-05-27 18:37:37 +09:00
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
HarJIT
807f3e27ba
Bit of a facepalm moment (re-add the WHATWG-specified one-way katakana (#9)
mappings for ISO-2022-JP, which went missing when I made it wrap the
EUC-JP index to save space).
2021-04-11 12:03:27 +09:00
HarJIT
614193b8a1
Codecs package docs, as well as some assorted tweaks or minor additions (#5)
* Add some docs, and remove second Code page 874 codec (they handled the
non-overridden C1 area differently, but we only need one).

* More docs work.

* Doc stuff.

* Adjusted.

* More tweaks (table padding is not the docstring's problem).

* CSS and docstring tweaks.

* Link from modules to parent packages and vice versa.

* More documentation.

* Docstrings for all `codecs` submodules.

* Move encode_jis7_reduced into dbextra_data_7bit (thus completing the lazy
startup which was apparently not complete already) and docstrings added to
implementations of base class methods referring up to the base class.

* Remove FUSE junk that somehow made it into the repo.

* Some more docstrings.

* Fix some broken references to `string` (rather than `data`) which would have
caused a problem if any existing error handler had returned a negative
offset (which no current handler does, but it's worth fixing anyway).

* Add a cp042 codec to accompany the x-user-defined codec, and to pave the
way for maybe adding Adobe Symbol, Zapf Dingbats or Wingdings codecs
in future.

* Better Japanese Autodetect behaviour for ISO-2022-JP (add yet another
condition in which it will be detected, making it able to conclusively
detect it prior to end of stream without being fed an entire escape
sequence in one call). Also some docs tweaks.

* idstr() → _idstr() since it's internal.

* Docs for codecs.pifonts.

* Docstrings for dbextra.

* Document the sbextra classes.

* Docstrings for the web encodings.

* Possibly a fairer assessment of likely reality.

* Docstrings for codecs.binascii

* The *encoding* isn't removed (the BOM is).

* Make it clearer when competing OEM code pages use different letter layouts.

* Fix copied in error.

* Stop generating linking to non-existent "← tools" from tools.gendoc.

* Move .fuse_hidden* exclusion to my user-level config.

* Constrain the table style changes to class .markdownTable, to avoid any
effect on other interface tables generated by Doxygen.

* Refer to `__ispackage__` when generating help.
2021-04-02 16:34:10 +09:00
K. Lange
40836cba21 Implement Python 3 division semantics 2021-04-02 16:02:05 +09:00
K. Lange
c7d14d0528 Add tool 'krk-debug-stats' which prints basic sizes 2021-03-29 09:26:13 +09:00
K. Lange
9a0b940302 Fix functions from C extensions that got disappeared 2021-03-26 07:01:53 +09:00
K. Lange
857da44509 Swap out bitfields for flags for flexibility 2021-03-25 19:47:19 +09:00
K. Lange
555100c3c9 Try to ignore imported functions, classes in tools.gendoc 2021-03-25 15:52:54 +09:00
K. Lange
50f94d9d3b Update doc generation for properties, type hints 2021-03-25 09:54:07 +09:00
HarJIT
5c2de206b9
Codecs package (#4)
Codecs package

Co-authored-by: HarJIT <harjit@harjit.moe>
2021-03-24 04:53:02 -07:00
K Lange
2ed8e65c89 Rework KrkValue to use NaN-boxing 2021-03-24 20:49:44 +09:00
K. Lange
6746ccf001 Add docstrings to socket module 2021-03-22 12:49:31 +09:00
K. Lange
a0ad38e225 Header reorg I've been meaning to do for a while 2021-03-22 09:22:39 +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
01a124054d Update bytecode marshaller 2021-03-20 20:04:10 +09:00
K. Lange
d36dc3cae3 Simplify Pair iterator in gendoc 2021-03-17 08:07:16 +09:00
K. Lange
ec12bca5ed Prefix value and object tag enums 2021-03-16 07:04:27 +09:00
K. Lange
68fdcc0b69 Function -> CodeObject 2021-03-16 06:57:41 +09:00
K. Lange
f0ee256060 Fix doc generator for new property attribute layout 2021-03-10 21:18:48 +09:00
K. Lange
c9aa17e119 Rename __get__, __set__ to match Python's __getitem__, __setitem__ and make room for future addition of descriptors 2021-03-10 14:24:22 +09:00
K. Lange
84b7a37fab Remove the distinction between a class's 'fields' and 'methods' and implement actual method resolution 2021-03-09 22:35:40 +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
4235c74138 Generate indexes, fixup CSS for mobile 2021-02-20 22:32:11 +09:00
K. Lange
a5ff538dc1 Write a bunch more docs 2021-02-20 20:44:07 +09:00
K. Lange
76d53eb198 Various doc improvements 2021-02-20 15:43:47 +09:00
K. Lange
d5d3d721e7 The big documentation system overhaul 2021-02-20 14:10:36 +09:00
K. Lange
298f429c30 Add a very simple embedding demo for doc purposes 2021-02-19 21:25:15 +09:00
K. Lange
79cc3bdac1 More header cleanup, rename some stuff 2021-02-19 12:30:39 +09:00
K Lange
d1535de8d2 Elminate calls to sprintf 2021-02-19 11:06:07 +09:00
K Lange
3cef9d05e8 Add simple repl to krk-sandbox 2021-02-15 21:16:23 +09:00
K. Lange
8b5cfdf4e2 More stuff for os module 2021-02-12 19:50:55 +09:00
K. Lange
798df9cc08 cleanup unused / redundant defs 2021-02-12 16:01:29 +09:00
K. Lange
7d18c9fb1a Fix missing nil terminators in strings read by marshal reader 2021-02-12 15:57:54 +09:00
K. Lange
6b6597d57d Add experimental bytecode marshal tool 2021-02-12 15:53:47 +09:00