Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: wait group #32

Merged
merged 10 commits into from
Apr 15, 2024
Merged

feat: wait group #32

merged 10 commits into from
Apr 15, 2024

Conversation

alvynben
Copy link
Collaborator

This PR introduces comprehensive support for the WaitGroup synchronization primitive in the go-slang interpreter, enhancing the concurrency capabilities of the language. Key components of the update include:

Type System Enhancements:

  1. New types (NewType and MakeType) have been added to accommodate the WaitGroup and differentiate between creation methods (new vs. make).
  2. Modifications to the type system are reflected across type literals and command structures, expanding the interpreter's understanding of these new constructs.

Interpreter Functionality:

  1. The CallExpression handling in the interpreter now recognizes and processes methods called on WaitGroup instances (add, done, and wait), using a new structured approach to manage method-specific actions dynamically.
  2. New operations for WaitGroup (WaitGroupAddOp, WaitGroupDoneOp, WaitGroupWaitOp) are implemented to handle the respective functionalities of the WaitGroup methods.

Heap Management:

  1. The heap management system has been updated to allocate and manage memory for WaitGroup instances correctly.
  2. New tags (PointerTag.WaitGroup) have been added to manage WaitGroup pointers specifically.

Video Description:

Screen.Recording.2024-04-14.at.1.58.34.AM.mov

@alvynben alvynben mentioned this pull request Apr 13, 2024
@shenyih0ng shenyih0ng merged commit 0d1a5dd into master Apr 15, 2024
1 check passed
@shenyih0ng shenyih0ng deleted the feat/add-wait-group branch April 15, 2024 06:50
@shenyih0ng shenyih0ng changed the title Feat/add wait group feat: wait group Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants