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

eof: Support functions (CALLF, RETF, JUMPF) #15550

Merged
merged 6 commits into from
Nov 29, 2024

Conversation

rodiazet
Copy link
Contributor

@rodiazet rodiazet commented Oct 29, 2024

Implement support for functions calls and returns for EOF.

Depends on: #15547. Merged.
Depends on: #15595. Merged.

@rodiazet rodiazet marked this pull request as draft October 29, 2024 10:42
Copy link

Thank you for your contribution to the Solidity compiler! A team member will follow up shortly.

If you haven't read our contributing guidelines and our review checklist before, please do it now, this makes the reviewing process and accepting your contribution smoother.

If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the #solidity-dev channel on Matrix.

@rodiazet rodiazet force-pushed the eof-functions branch 12 times, most recently from 19c3760 to aa13c9c Compare October 30, 2024 12:43
@cameel cameel added has dependencies The PR depends on other PRs that must be merged first EOF labels Oct 30, 2024
@rodiazet rodiazet force-pushed the eof-functions branch 2 times, most recently from fd78a06 to 8ceb5c4 Compare October 30, 2024 15:00
@rodiazet rodiazet marked this pull request as ready for review October 30, 2024 15:04
@rodiazet rodiazet force-pushed the eof-functions branch 2 times, most recently from 436f00e to e4ab717 Compare October 30, 2024 21:18
Copy link
Member

@cameel cameel left a comment

Choose a reason for hiding this comment

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

Just a few minor things from a quick pass over the PR.

Comment on lines 336 to 338
{Instruction::RETF, {"RETF", 0, 0, 0, true, Tier::Special}},
{Instruction::CALLF, {"CALLF", 2, 0, 0, true, Tier::Special}},
{Instruction::JUMPF, {"JUMPF", 2, 0, 0, true, Tier::Special}},
Copy link
Member

Choose a reason for hiding this comment

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

These should get dedicated tiers too, to match execution specs.

Copy link
Contributor Author

@rodiazet rodiazet Oct 31, 2024

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

True. You could change that here or submit a separate PR to change that.

Copy link
Member

Choose a reason for hiding this comment

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

BTW, one more thing that we should do for DATALOADN is hasInstruction(). And then it should be going into the branches that handle Operation in those AssemblyItem helpers that return various properties like number of returns.

libevmasm/AssemblyItem.h Show resolved Hide resolved
libevmasm/Assembly.h Outdated Show resolved Hide resolved
libevmasm/Assembly.cpp Outdated Show resolved Hide resolved
@rodiazet rodiazet force-pushed the eof-functions branch 3 times, most recently from 9a5d5a1 to 0b94103 Compare October 31, 2024 12:40
@cameel

This comment was marked as resolved.

@rodiazet

This comment was marked as resolved.

cameel

This comment was marked as resolved.

@rodiazet rodiazet force-pushed the eof-functions branch 9 times, most recently from 182293d to e4d974c Compare November 29, 2024 15:07
cameel
cameel previously approved these changes Nov 29, 2024
Copy link
Member

@cameel cameel left a comment

Choose a reason for hiding this comment

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

I pushed some final fixups a copy of the eof-functions branch to avoid adding more comments. If you don't have any objections, you can pull in the last commit and squash with yours. Then we're done.

Please rebase on develop, squash review comments and we can merge this.

@rodiazet rodiazet dismissed cameel’s stale review November 29, 2024 17:04

The merge-base changed after approval.

@cameel cameel removed the has dependencies The PR depends on other PRs that must be merged first label Nov 29, 2024
@cameel cameel merged commit b4ecc58 into ethereum:develop Nov 29, 2024
73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants