-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
EIP 4844 (part 2) #14759
EIP 4844 (part 2) #14759
Conversation
e65d8bc
to
69122e0
Compare
cbec8b1
to
e2f1fad
Compare
88e1c07
to
d5ae8de
Compare
69122e0
to
66e145f
Compare
3ecd0e1
to
a6c2bce
Compare
66e145f
to
9eb631b
Compare
a6c2bce
to
cd106b6
Compare
test/libsolidity/syntaxTests/inlineAssembly/blobhash_pre_cancun_warning.sol
Outdated
Show resolved
Hide resolved
c65588e
to
08bbb84
Compare
20201ee
to
4b71758
Compare
08bbb84
to
d01cd35
Compare
4b71758
to
4c3e118
Compare
c7f1c0e
to
652fd12
Compare
f84b810
to
652696a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's all I had. Once my remaining comments are addressed, we can merge this.
652696a
to
684188f
Compare
684188f
to
8536b57
Compare
8536b57
to
e39e8f1
Compare
test/libsolidity/syntaxTests/viewPureChecker/builtin_blobhash_restrict_warning.sol
Outdated
Show resolved
Hide resolved
case FunctionType::Kind::BlobHash: | ||
{ | ||
acceptAndConvert(*arguments[0], *function.parameterTypes()[0], true); | ||
m_context << Instruction::BLOCKHASH; | ||
if (function.kind() == FunctionType::Kind::BlockHash) | ||
m_context << Instruction::BLOCKHASH; | ||
else | ||
m_context << Instruction::BLOBHASH; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I really like this approach - these are separate cases for a reason - why would you combine them and then perform another check as to what the function kind is? Of course, it's easy to see what's going on once you read the code, but it's confusing at first glance - initially, I thought they may have the same opcode and use the difficulty/prevrandao mechanism based on the fork, which is obviously not the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this one is short enough that it would have been clearer as a separate handler.
Still, when the code is longer this approach makes sense. The handler in IRGeneratorForStatements.cpp
was actually the opposite case - there merging it with the other cases helps reduce duplication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially implemented them separately, but as pointed out in #14759 (comment) there are instances where multiple built-ins are handled within the same case, both in IRGeneratorForStatements
and ExpressionCompiler
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which is why I didn't complain about it myself, but @nikola-matic does have a point here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@r0qs we seem to have wormholed ourselves into a parallel universe where Kamil doesn't complain, and I do. :D
f9d3a14
to
763869d
Compare
763869d
to
81268e3
Compare
Depends on #14757(merged)Second part of #14740
Fixes #14740