Skip to content

Commit

Permalink
BlockHasher: Do not hash literal kind
Browse files Browse the repository at this point in the history
  • Loading branch information
clonker committed Jul 1, 2024
1 parent f3f7720 commit 0333a55
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion libyul/optimiser/BlockHasher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ void ASTHasherBase::hashLiteral(solidity::yul::Literal const& _literal)
else
hash64(std::hash<std::string>{}(_literal.value.builtinStringLiteralValue()));
hash64(_literal.type.hash());
hash8(static_cast<uint8_t>(_literal.kind));
hash8(_literal.value.unlimited());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ contract C {
}
// ----
// test() -> 0x20, 0x14, "[a called][b called]"
// gas irOptimized: 116530
// gas irOptimized: 116531
// gas legacy: 118845
// gas legacyOptimized: 116844
// test2() -> 0x20, 0x14, "[b called][a called]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// {
// f()
// f()
// h()
// f()
// function f()
// {
// mstore(29400335157912315244266070412362164103369332044010299463143527189509193072640, mload(0x00))
Expand Down
2 changes: 1 addition & 1 deletion test/libyul/yulOptimizerTests/fullSuite/devcon_example.yul
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// let sum := 0
// let length := calldataload(_1)
// let i := 0
// for { } true { i := add(i, 1) }
// for { } 1 { i := add(i, 1) }
// {
// let _2 := iszero(lt(i, length))
// if _2 { break }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// let length := calldataload(_1)
// let i := 0
// let _2 := calldataload(7)
// for { } true { i := add(i, 1) }
// for { } 1 { i := add(i, 1) }
// {
// let _3 := iszero(lt(i, length))
// if _3 { break }
Expand Down

0 comments on commit 0333a55

Please sign in to comment.