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

Keep number of stack items to drop for branches #391

Merged
merged 4 commits into from
Jun 26, 2020
Merged

Keep number of stack items to drop for branches #391

merged 4 commits into from
Jun 26, 2020

Conversation

chfast
Copy link
Collaborator

@chfast chfast commented Jun 25, 2020

Instead of keeping information about the absolute height to rewind the
stack to, keep the number of stack items to drop (without the number of
results - arity of the result type).

This makes OperandStack simpler (no need to track the bottom of the stack). No speed change.

@chfast chfast changed the title Stack drop Keep number of stack items to drop for branches Jun 25, 2020
@chfast chfast marked this pull request as ready for review June 25, 2020 19:41
@chfast chfast requested review from gumb0 and axic June 25, 2020 19:41
@codecov
Copy link

codecov bot commented Jun 25, 2020

Codecov Report

Merging #391 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #391   +/-   ##
=======================================
  Coverage   99.15%   99.16%           
=======================================
  Files          43       43           
  Lines       12972    12980    +8     
=======================================
+ Hits        12863    12871    +8     
  Misses        109      109           

lib/fizzy/parser_expr.cpp Outdated Show resolved Hide resolved
@axic
Copy link
Member

axic commented Jun 25, 2020

@chfast did you benchmark the effect of this?

@chfast
Copy link
Collaborator Author

chfast commented Jun 26, 2020

@chfast did you benchmark the effect of this?

No speed change.

@chfast chfast force-pushed the stack_drop branch 2 times, most recently from 8bddacd to 5fb35fc Compare June 26, 2020 06:10
lib/fizzy/execute.cpp Outdated Show resolved Hide resolved
lib/fizzy/parser_expr.cpp Outdated Show resolved Hide resolved
@gumb0
Copy link
Collaborator

gumb0 commented Jun 26, 2020

Looks good, two minor nitpicks.

Copy link
Member

@axic axic left a comment

Choose a reason for hiding this comment

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

Assuming no speed regression.

Instead of keeping information about the absolute height to rewind the
stack to, keep the number of stack items to drop (without the number of
results - arity of the result type).
@axic axic merged commit 9c793d1 into master Jun 26, 2020
@axic axic deleted the stack_drop branch June 26, 2020 13:38
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.

3 participants