Skip to content

Keep number of stack items to drop for branches#391

Merged
axic merged 4 commits intomasterfrom
stack_drop
Jun 26, 2020
Merged

Keep number of stack items to drop for branches#391
axic merged 4 commits intomasterfrom
stack_drop

Conversation

@chfast
Copy link
Copy Markdown
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 axic and gumb0 June 25, 2020 19:41
@codecov
Copy link
Copy Markdown

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           

Comment thread lib/fizzy/parser_expr.cpp Outdated
@axic
Copy link
Copy Markdown
Member

axic commented Jun 25, 2020

@chfast did you benchmark the effect of this?

@chfast
Copy link
Copy Markdown
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
Comment thread lib/fizzy/execute.cpp Outdated
Comment thread lib/fizzy/parser_expr.cpp Outdated
@gumb0
Copy link
Copy Markdown
Collaborator

gumb0 commented Jun 26, 2020

Looks good, two minor nitpicks.

Copy link
Copy Markdown
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.

chfast added 4 commits June 26, 2020 15:26
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