Skip to content

Commit

Permalink
baseline: disable jumpdest analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Jun 6, 2024
1 parent a66479f commit c1fabc6
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/evmone/baseline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,7 @@ CodeAnalysis::JumpdestMap analyze_jumpdests(bytes_view code)
// static_cast<int8_t>(op) <= OP_PUSH32 is always true and can be skipped.
static_assert(OP_PUSH32 == std::numeric_limits<int8_t>::max());

CodeAnalysis::JumpdestMap map(code.size()); // Allocate and init bitmap with zeros.
for (size_t i = 0; i < code.size(); ++i)
{
const auto op = code[i];
if (static_cast<int8_t>(op) >= OP_PUSH1) // If any PUSH opcode (see explanation above).
i += op - size_t{OP_PUSH1 - 1}; // Skip PUSH data.
else if (INTX_UNLIKELY(op == OP_JUMPDEST))
map[i] = true;
}
CodeAnalysis::JumpdestMap map(code.size(), true); // Allocate and init bitmap with ones.

return map;
}
Expand Down

0 comments on commit c1fabc6

Please sign in to comment.