Commit Graph

479 Commits

Author SHA1 Message Date
K. Lange
6b6597d57d Add experimental bytecode marshal tool 2021-02-12 15:53:47 +09:00
K. Lange
13371611e2 Add tools (and tools/kuroko contains symlinks to headers) 2021-02-12 11:48:50 +09:00
K. Lange
eb89495fba krk_currentThread doesn't actually need to be a static in this build mode 2021-02-11 21:02:20 +09:00
K. Lange
a15e936d87 Fixes from building on macOS 2021-02-11 20:52:30 +09:00
K. Lange
90704df989 ignore dSYM directories 2021-02-11 20:14:27 +09:00
K. Lange
e6b6fd1f29 Enforce hasKw argument in function signatures for native bindings (so we can stop cheating in wasm) 2021-02-11 19:31:06 +09:00
K Lange
ee50eda05b Use util.h macros to write tuple methods 2021-02-11 16:37:49 +09:00
K. Lange
a3b577e239 Add one actual and three skipped thread tests to the test suite 2021-02-11 15:31:37 +09:00
K. Lange
6037665eb9 Add a flag to the main binary to compile but not run code 2021-02-11 15:30:51 +09:00
K. Lange
556b0ab465 Make sure upvalues reference their owning thread's stack so we can use them in threads 2021-02-11 14:42:06 +09:00
K. Lange
10aa2de306 Add Lock objects for access to simple mutexes using 'with' 2021-02-11 14:41:44 +09:00
K. Lange
d2b2fe3fb9 Request POSIX-style argument parsing in getopt for interpreter 2021-02-11 14:31:05 +09:00
K. Lange
cf57724952 Escape and truncate strings when printing them in debug functions 2021-02-11 13:50:44 +09:00
K Lange
f09723628e Slapping locks on tables isn't working as expected; drop it for now, revisit later 2021-02-11 05:27:43 +09:00
K Lange
8b53ac09b7 Our tuple packing is pretty slow, but some shifts and ors are pretty good 2021-02-11 05:27:06 +09:00
K. Lange
4233234406 Quick little demo of threads fighting over a dict (and still working) 2021-02-10 19:06:25 +09:00
K. Lange
09ce6c46a9 Wrap table accesses in locks, should be good for dicts, field assignments? 2021-02-10 18:19:10 +09:00
K. Lange
f9cfa4e622 Fix up binpath discovery which was totally broken 2021-02-10 14:44:59 +09:00
K. Lange
dce6c4b79e Reduce the size of KrkThreadState so we can squeeze into static TLS storage on dlopen 2021-02-10 12:41:50 +09:00
K. Lange
43d1e86a2a Wrap some things in readers-writer locks and now more stuff doesn't break 2021-02-10 10:20:56 +09:00
K. Lange
345b021936 Eliminate forced uses of GC pausing and fix up some more thread stuff; still need locks on collections 2021-02-09 23:13:45 +09:00
K. Lange
bd5619b32d Add support for size argument in File.read() 2021-02-09 22:09:12 +09:00
K. Lange
854a12f68b Fix up some threading gc stuff before diving into real debugging 2021-02-09 21:34:02 +09:00
K. Lange
fe9af7c274 cmd.exe actually does work with the Windows build 2021-02-09 19:11:35 +09:00
K. Lange
6f95124bcd Threading
Don't be deceived by its size: this commit is mostly a bunch of
sed replacements to move thread state out of "vm" and introduce
a thread-local "KrkThreadState" object to hold stack pointers and
call frames for individual threads.

Threading support is incomplete and there's almost definitely a
bunch of really easy ways to break everything just by allocating
objects, but really simple stuff like carefully modifying a
a list of ints should work okay.

The README has been rewritten to remove code samples, which have
moved to the Wiki (as has the section on integrating with C).

Some other stuff has also moved around because the threading changes
necessitated a major API break anyway, so I also took the time to
fix some ABI issues.
2021-02-09 18:51:09 +09:00
K. Lange
f2747a07e4 Add more things to os module 2021-02-09 11:14:11 +09:00
K. Lange
a51619cb0d Cleanup os module 2021-02-09 11:00:45 +09:00
K. Lange
57b810db69 Add some (dumb) character classification methods for strings 2021-02-09 09:41:13 +09:00
K. Lange
20676f790e bump libc for deb to 2.29
math module built on Ubuntu 20.04 has a symbol dep for 2.29 for
log, pow, exp
2021-02-09 09:16:02 +09:00
K. Lange
af9a4622f8 That seems correct? 2021-02-08 18:28:51 +09:00
K. Lange
ff38f7cc61 Uh, that's not quite what Python is doing, but... 2021-02-08 18:17:14 +09:00
K. Lange
d550c1be6b I need to get rid of this README-reading test... 2021-02-08 17:38:11 +09:00
K. Lange
8d14b24218 Rephrase some things in README 2021-02-08 17:36:18 +09:00
K. Lange
b3b56c8e44 Clean up Makefile and add install target 2021-02-08 17:36:03 +09:00
K. Lange
5b3a7e870b __delslice__, __setslice__ 2021-02-08 09:36:46 +09:00
K. Lange
f5d9a6b806 sets do not have stable ordering, so stop trying to print them in tests 2021-02-08 09:36:30 +09:00
K. Lange
e4df06c85f Report better size numbers for lists, dicts, C types 2021-02-08 08:52:17 +09:00
K. Lange
9fe1e92c45 drop support for kuroko.set_tracing(str); only support kwargs version 2021-02-08 08:48:37 +09:00
K. Lange
3b10257bf5 More dict methods 2021-02-07 10:49:38 +09:00
K. Lange
2e9ba3efa1 Forgot the header updates... 2021-02-06 21:41:28 +09:00
K. Lange
421d5ea000 Cleanup fileio module with new macros 2021-02-06 21:39:23 +09:00
K. Lange
47329df343 Don't use garbage-collection-triggering array resizing 2021-02-06 11:26:08 +09:00
K. Lange
c5e5980265 More str methods 2021-02-06 06:53:44 +09:00
K Lange
c79dfca79d Quick mingw build fixes 2021-02-05 22:10:10 +09:00
K. Lange
c732089a43 Add a method to fileio to read directories 2021-02-05 21:06:04 +09:00
K. Lange
e7a8d0b8e5 Attach code object for class to the resulting class object 2021-02-05 20:34:18 +09:00
K. Lange
f4216ed3a1 Implement set literals, comprehensions 2021-02-05 20:23:28 +09:00
K. Lange
19e5beba05 Implement class decorators and move class definitions into pseudo-functions 2021-02-05 19:54:46 +09:00
K. Lange
930b599e82 Expose basic operators and add more builtins, list functions 2021-02-05 19:05:08 +09:00
K. Lange
4d05ca218c Fix push ordering in attachNamed{Object,Value} 2021-02-05 17:54:55 +09:00