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

CSE Machine: Implement two-step block statement evaluation #1538

Merged
merged 7 commits into from
Feb 18, 2024

Conversation

NhatMinh0208
Copy link
Contributor

@NhatMinh0208 NhatMinh0208 commented Feb 15, 2024

Description

This PR implements two-step block statement evaluation for the CSE machine.

This is done by introducing a new subtype of BlockStatement called RawBlockStatement to indicate a block statement that has completed environment creation, and only needs to get its body unpacked into the control stack.

Resolves #1537.

Changes

  • add RawBlockStatement
  • change block handling logic to push RawBlockStatement instead of unpacking directly

@NhatMinh0208 NhatMinh0208 self-assigned this Feb 15, 2024
@NhatMinh0208 NhatMinh0208 added the Enhancement New feature or request label Feb 15, 2024
@coveralls
Copy link

coveralls commented Feb 15, 2024

Pull Request Test Coverage Report for Build 7948778469

Details

  • 0 of 10 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 81.65%

Totals Coverage Status
Change from base Build 7948021332: 0.01%
Covered Lines: 10228
Relevant Lines: 12102

💛 - Coveralls

@NhatMinh0208 NhatMinh0208 marked this pull request as ready for review February 15, 2024 16:03
NhatMinh0208 and others added 3 commits February 18, 2024 15:09
* Restore whitespace for readability
* Refactor if-else to use early return instead
* Standardize capitalization of comments
* Update comment for clarity
Copy link
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@RichDom2185 RichDom2185 merged commit 3dac647 into master Feb 18, 2024
4 checks passed
@RichDom2185 RichDom2185 deleted the cse-progblock branch February 18, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

CSE Machine: Evaluation of block statements should be split into two steps
3 participants