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

Upgrade intx to 0.10.0 #622

Merged
merged 1 commit into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmake/Hunter/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ hunter_cmake_args(

hunter_config(
intx
VERSION 0.9.1
URL https://github.com/chfast/intx/archive/v0.9.1.tar.gz
SHA1 d9907860327b52ca5cba4048d1a0e8274c883584
VERSION 0.10.0
URL https://github.com/chfast/intx/archive/v0.10.0.tar.gz
SHA1 3a6ebe0b1a36527b6ef291ee93a8e508371e5b77
)
2 changes: 1 addition & 1 deletion lib/evmone/baseline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ int64_t dispatch(const CostTable& cost_table, ExecutionState& state, int64_t gas
return gas;
}
}
INTX_UNREACHABLE();
intx::unreachable();
}

#if EVMONE_CGOTO_SUPPORTED
Expand Down
6 changes: 2 additions & 4 deletions lib/evmone/execution_state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,10 @@ class Memory
void grow(size_t new_size) noexcept
{
// Restriction for future changes. EVM always has memory size as multiple of 32 bytes.
assert(new_size % 32 == 0);
INTX_REQUIRE(new_size % 32 == 0);

// Allow only growing memory. Include hint for optimizing compiler.
assert(new_size > m_size);
if (new_size <= m_size)
INTX_UNREACHABLE(); // TODO: NOLINT(misc-static-assert)
INTX_REQUIRE(new_size > m_size);

if (new_size > m_capacity)
{
Expand Down