forked from source-academy/js-slang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: naive time quanta based scheduler Abstracted the current program as a `main` go routine in preparation for `GoStatement` implementation * chore: fix eslint errors * refactor: use `Counter` for frame id generation * refactor: add `GoStatement` to ECE types * feat: implement `GoStatement` support in ECE Right now we only support non-builtin calls to spawn a goroutine. We need to consider if its even worth it spawn a new goroutine for a builtin since its only a "1 step/tick" op. Additionally, I introduced `GoRoutineOp` to handle spawning of new goroutines. Its payload is same as `CallOp` so we can consider combining them if there is no special cases to handle later on * feat: add `StringLit` support in parser This is mainly so that we can `println` strings to differentiate between goroutines. Note that this is purely a convenience feature, the ECE does not allocate strings in the heap/string pool right now. * feat: implement `GoRoutineOp` support in heap * feat: randomize goroutine time quanta
- Loading branch information
1 parent
983a274
commit ce87563
Showing
12 changed files
with
1,051 additions
and
733 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.