We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a66479f commit c1fabc6Copy full SHA for c1fabc6
lib/evmone/baseline.cpp
@@ -33,15 +33,7 @@ CodeAnalysis::JumpdestMap analyze_jumpdests(bytes_view code)
33
// static_cast<int8_t>(op) <= OP_PUSH32 is always true and can be skipped.
34
static_assert(OP_PUSH32 == std::numeric_limits<int8_t>::max());
35
36
- CodeAnalysis::JumpdestMap map(code.size()); // Allocate and init bitmap with zeros.
37
- for (size_t i = 0; i < code.size(); ++i)
38
- {
39
- const auto op = code[i];
40
- if (static_cast<int8_t>(op) >= OP_PUSH1) // If any PUSH opcode (see explanation above).
41
- i += op - size_t{OP_PUSH1 - 1}; // Skip PUSH data.
42
- else if (INTX_UNLIKELY(op == OP_JUMPDEST))
43
- map[i] = true;
44
- }
+ CodeAnalysis::JumpdestMap map(code.size(), true); // Allocate and init bitmap with ones.
45
46
return map;
47
}
0 commit comments