Commit graph

638 commits

Author SHA1 Message Date
Filip Tibell
5905b2d6cf Add back support for init files in require 2023-08-22 20:00:58 -05:00
Filip Tibell
3cd7a8945c Fix wait_for_thread and remove debugging for it 2023-08-22 20:00:58 -05:00
Filip Tibell
98bb475afe Use real thread ids instead of randomized ones 2023-08-22 20:00:58 -05:00
Filip Tibell
7e7cfd7cd0 Add some different debugging 2023-08-22 20:00:58 -05:00
Filip Tibell
a8db74d40d Remove debugging 2023-08-22 20:00:58 -05:00
Filip Tibell
3ab15e63e8 Fix new lua threads not breaking scheduler out of futures resumption 2023-08-22 20:00:58 -05:00
Filip Tibell
ee21921601 Add some debugging for require 2023-08-22 20:00:58 -05:00
Filip Tibell
4eb7d5ab8b Support require without extension for path requires 2023-08-22 20:00:58 -05:00
Filip Tibell
38994b941c Store reference to lua in require context 2023-08-22 20:00:58 -05:00
Filip Tibell
9182427a0a Fix async require cache, unify relative and cwd-relative require functions 2023-08-22 20:00:58 -05:00
Filip Tibell
d6c31f67ba Implement functionality necessary for relative path requires 2023-08-22 20:00:58 -05:00
Filip Tibell
a91e24eb01 Make it easier to emit formatted lua errors 2023-08-22 20:00:58 -05:00
Filip Tibell
c484ae73d6 Add back net builtin 2023-08-22 20:00:58 -05:00
Filip Tibell
d40a7b6b4f Add back roblox builtin 2023-08-22 20:00:58 -05:00
Filip Tibell
8a2c5f65bb Add back process builtin 2023-08-22 20:00:58 -05:00
Filip Tibell
67e1d6c7fc Add back fs builtin 2023-08-22 20:00:58 -05:00
Filip Tibell
780f155377 Add back serde builtin 2023-08-22 20:00:58 -05:00
Filip Tibell
d6dbe5c861 Add back luau builtin 2023-08-22 20:00:58 -05:00
Filip Tibell
73361d5a52 Add back stdio builtin and pretty error formatting 2023-08-22 20:00:58 -05:00
Filip Tibell
e4cf40789c Dont try to resume dead threads in the scheduler 2023-08-22 20:00:58 -05:00
Filip Tibell
0757d6f293 Initial implementation of builtin libraries, task library 2023-08-22 20:00:58 -05:00
Filip Tibell
7a63987cbe Bring back version global 2023-08-22 20:00:58 -05:00
Filip Tibell
24b6498774 Rename version global test 2023-08-22 20:00:58 -05:00
Filip Tibell
2762a43dbb Add back _G table 2023-08-22 20:00:58 -05:00
Filip Tibell
b69f824b57 Pretty-print lua errors 2023-08-22 20:00:58 -05:00
Filip Tibell
4acc730d38 Ensure thread safety of scheduler state 2023-08-22 20:00:58 -05:00
Filip Tibell
b1847bf84c Add documentation for scheduler state 2023-08-22 20:00:58 -05:00
Filip Tibell
2960f960de More robust scheduler error resumption mechanism 2023-08-22 20:00:58 -05:00
Filip Tibell
dcb989fd92 Implement basic abs path require, propagate async errors back to lua threads 2023-08-22 20:00:58 -05:00
Filip Tibell
bcef44e286 Implement bulk of new require behavior 2023-08-22 20:00:58 -05:00
Filip Tibell
7d73601a58 Initial scaffolding to get custom globals and require working 2023-08-22 20:00:58 -05:00
Filip Tibell
7fe43a969f Use static lifetime bound instead of spamming actual static lifetime 2023-08-22 20:00:58 -05:00
Filip Tibell
0dbf466817 Add back lua lifetime to scheduler 2023-08-22 20:00:58 -05:00
Filip Tibell
6e83958653 Remove mlua macros feature 2023-08-22 20:00:58 -05:00
Filip Tibell
b4bbc0630a Add table builder util 2023-08-22 20:00:58 -05:00
Filip Tibell
1f72033a6a Use static lua for now, to make lifetimes work 2023-08-22 20:00:58 -05:00
Filip Tibell
e1fa89cf60 Some lifetime and async arg improvements 2023-08-22 20:00:58 -05:00
Filip Tibell
62e6130223 Relax scheduler method args since lifetimes are now correct 2023-08-22 20:00:58 -05:00
Filip Tibell
dc80b1c28f Scheduler now manages entire Lua struct, elide lifetimes where possible 2023-08-22 20:00:58 -05:00
Filip Tibell
1b7287a742 Methods take owned threads 2023-08-22 20:00:58 -05:00
Filip Tibell
ab386e000d Add lifetimes because they are fun 2023-08-22 20:00:58 -05:00
Filip Tibell
6416ef5fb7 More work on scheduler async stuff 2023-08-22 20:00:58 -05:00
Filip Tibell
e08908e22e Update mlua version 2023-08-22 20:00:58 -05:00
Filip Tibell
7c8af9730f Some work on async functions for new scheduler 2023-08-22 20:00:58 -05:00
Filip Tibell
0a5305b947 Add api for scheduling plain futures in scheduler 2023-08-22 20:00:58 -05:00
Filip Tibell
eafc42531f Implement futures resumption 2023-08-22 20:00:58 -05:00
Filip Tibell
d1a2dc2fa6 Use atomics in scheduler state instead of refcell 2023-08-22 20:00:58 -05:00
Filip Tibell
4fa76aa27f Implement thread return value broadcasting in scheduler 2023-08-22 20:00:58 -05:00
Filip Tibell
6757e1a1a8 Initial barebones scheduler implementation and interface 2023-08-22 20:00:58 -05:00
Filip Tibell
c80e504283 Clean slate 2023-08-22 20:00:58 -05:00