Commit Graph

555 Commits

Author SHA1 Message Date
K Lange
6d0e342e1b Attach module name to classes like Python does 2021-02-24 22:48:04 +09:00
K Lange
e3f774065d Module name for repl should be __main__, <module> is what we label the module-level function... 2021-02-24 22:47:33 +09:00
K. Lange
0f5786ed62 Make -m work with dotted imports 2021-02-24 18:16:33 +09:00
K. Lange
73feea3cc0 Makefile should also install tools 2021-02-24 12:54:54 +09:00
K. Lange
db4185d035 I think that should fix up installs to /usr/local ? 2021-02-24 11:22:18 +09:00
K. Lange
4fc510034d Add some functions for unloading modules 2021-02-24 10:13:10 +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
361aeb3927 Fixup LDLIBS linking for libkuroko, interpreter, tools, modules? 2021-02-23 16:30:10 +09:00
K. Lange
7df8c0803f Don't use 'git' to do comparison for tests 2021-02-23 14:01:55 +09:00
K. Lange
617c1e8eec Add docs/syntax.md just to have the page exist 2021-02-23 13:00:47 +09:00
K. Lange
fec2e69317 Fix int(bool) to return int 2021-02-23 12:40:36 +09:00
K. Lange
21afbb3fb1 Actually try to determine the required min libc for deb package 2021-02-23 10:50:37 +09:00
K. Lange
e626fefbb8 bools should be derived from ints and valid for int operations implicitly 2021-02-23 10:02:34 +09:00
K. Lange
5c8126d65d Add a pseudo-grammar in EBNF? It's not necessarily accurate, but it's close enough to be a useful reference 2021-02-23 07:38:37 +09:00
K. Lange
092c6fb4d2 OP_INVOKE_CONTAINS, related changes 2021-02-22 18:32:50 +09:00
K. Lange
0216021b6d OP_INVOKE_ITER 2021-02-22 15:15:02 +09:00
K. Lange
ed1e8aebba Catch bad argument ordering in function declaration 2021-02-22 14:43:35 +09:00
K. Lange
f74c6c77b1 for ...;... should not accept multiple expressions for condition 2021-02-22 14:19:28 +09:00
K. Lange
6fee62f341 Fix parsing of nested ternary 2021-02-22 13:51:45 +09:00
K. Lange
3c8855ddcf Fix display of inf, nan 2021-02-21 09:55:09 +09:00
K. Lange
4235c74138 Generate indexes, fixup CSS for mobile 2021-02-20 22:32:11 +09:00
K Lange
379e1846a9 Stringify floats with more digits 2021-02-20 21:48:47 +09:00
K. Lange
a5ff538dc1 Write a bunch more docs 2021-02-20 20:44:07 +09:00
K. Lange
c5b04d55b1 Natively support @classmethod since we intentionally broke using @property for it 2021-02-20 16:04:26 +09:00
K. Lange
76d53eb198 Various doc improvements 2021-02-20 15:43:47 +09:00
K. Lange
663de74695 Actually give new property objects a class so we can do things with them directly 2021-02-20 15:43:22 +09:00
K. Lange
d5d3d721e7 The big documentation system overhaul 2021-02-20 14:10:36 +09:00
K. Lange
32b957aff7 Be more usefully descriptive of argument types in function.__args__ 2021-02-20 14:08:05 +09:00
K. Lange
d55071c291 Fix incorrect assignment of *args name to keywordArgNames 2021-02-20 14:07:41 +09:00
K. Lange
298f429c30 Add a very simple embedding demo for doc purposes 2021-02-19 21:25:15 +09:00
K. Lange
2af6291834 Minor doxygen comment cleanup 2021-02-19 21:24:59 +09:00
K. Lange
35ddf81c88 isinstance() should be able to take a tuple of types 2021-02-19 21:24:41 +09:00
K. Lange
8fc9ce128b Add getattr(), kuroko.importmodule() 2021-02-19 21:05:23 +09:00
K. Lange
3d9530ed19 Doxygen C API stuff is pretty much ready to ship, so here it is... 2021-02-19 13:56:54 +09:00
K. Lange
f14cc086e0 Just always enable threading outside of Emscripten and Windows 2021-02-19 13:32:45 +09:00
K. Lange
79cc3bdac1 More header cleanup, rename some stuff 2021-02-19 12:30:39 +09:00
K. Lange
6f1eefe68d Make isObjType a macro, mostly to appease llvm that complains about the static inline usage in an externed function 2021-02-19 11:14:40 +09:00
K Lange
d1535de8d2 Elminate calls to sprintf 2021-02-19 11:06:07 +09:00
K. Lange
03d917bf40 Doc comments for exceptions.c 2021-02-19 08:18:06 +09:00
K Lange
f94988f741 Prefix CallFrame to KrkCallFrame since it is in our public API 2021-02-18 21:54:58 +09:00
K. Lange
c567204f65 More doc comments 2021-02-18 21:00:27 +09:00
K. Lange
076b702afa Start writing doxygen/javadoc-style doc comments for C API 2021-02-18 19:18:35 +09:00
K. Lange
d112107edc Attach real name of exception in except block to local names table for debugging 2021-02-18 12:57:47 +09:00
K. Lange
9bbb0a1d6e Overhaul exceptions with tracebacks; 'except Type...' 2021-02-18 11:04:59 +09:00
K. Lange
b527561b53 Have a bytes iterator, why not. 2021-02-18 08:54:23 +09:00
K. Lange
649b452714 That changes some test results intentionally 2021-02-18 08:45:07 +09:00
K. Lange
de6a476d01 Fix up exception handling printing 2021-02-18 08:42:05 +09:00
K. Lange
7cfd68d047 Catch non-string result from repr when trying to print exceptions 2021-02-18 08:14:57 +09:00
K. Lange
f70cc3619b Cleanup disassembler output even more 2021-02-17 23:12:14 +09:00
K. Lange
d01476d7b7 Finally pull in that opcode re-org...
... where we use the top two bits as a fixed operand size
that we always check on each instruction cycle.
2021-02-17 22:56:41 +09:00