@@ -14,43 +14,42 @@ using namespace evmone::instr;
14
14
15
15
// / Instruction implementations - "core" instruction + stack height adjustment.
16
16
// / @{
17
- template <evmc_opcode Op, void CoreFn (StackTop) noexcept = core::impl<Op>>
17
+ template <Opcode Op, void CoreFn (StackTop) noexcept = core::impl<Op>>
18
18
inline void impl(AdvancedExecutionState& state) noexcept
19
19
{
20
20
CoreFn (state.stack .top_item );
21
21
state.stack .top_item += instr::traits[Op].stack_height_change ;
22
22
}
23
23
24
- template <evmc_opcode Op, void CoreFn (StackTop, ExecutionState&) noexcept = core::impl<Op>>
24
+ template <Opcode Op, void CoreFn (StackTop, ExecutionState&) noexcept = core::impl<Op>>
25
25
inline void impl(AdvancedExecutionState& state) noexcept
26
26
{
27
27
CoreFn (state.stack .top_item , state);
28
28
state.stack .top_item += instr::traits[Op].stack_height_change ;
29
29
}
30
30
31
- template <evmc_opcode Op,
32
- evmc_status_code CoreFn (StackTop, ExecutionState&) noexcept = core::impl<Op>>
31
+ template <Opcode Op, evmc_status_code CoreFn (StackTop, ExecutionState&) noexcept = core::impl<Op>>
33
32
inline evmc_status_code impl(AdvancedExecutionState& state) noexcept
34
33
{
35
34
const auto status = CoreFn (state.stack .top_item , state);
36
35
state.stack .top_item += instr::traits[Op].stack_height_change ;
37
36
return status;
38
37
}
39
38
40
- template <evmc_opcode Op, StopToken CoreFn () noexcept = core::impl<Op>>
39
+ template <Opcode Op, StopToken CoreFn () noexcept = core::impl<Op>>
41
40
inline StopToken impl(AdvancedExecutionState& /* state*/ ) noexcept
42
41
{
43
42
return CoreFn ();
44
43
}
45
44
46
- template <evmc_opcode Op, StopToken CoreFn (StackTop, ExecutionState&) noexcept = core::impl<Op>>
45
+ template <Opcode Op, StopToken CoreFn (StackTop, ExecutionState&) noexcept = core::impl<Op>>
47
46
inline StopToken impl(AdvancedExecutionState& state) noexcept
48
47
{
49
48
// Stack height adjustment may be omitted.
50
49
return CoreFn (state.stack .top_item , state);
51
50
}
52
51
53
- template <evmc_opcode Op,
52
+ template <Opcode Op,
54
53
code_iterator CoreFn (StackTop, ExecutionState&, code_iterator) noexcept = core::impl<Op>>
55
54
inline code_iterator impl(AdvancedExecutionState& state, code_iterator pos) noexcept
56
55
{
@@ -180,7 +179,7 @@ const Instruction* op_push_full(const Instruction* instr, AdvancedExecutionState
180
179
return ++instr;
181
180
}
182
181
183
- template <evmc_opcode Op>
182
+ template <Opcode Op>
184
183
const Instruction* op_call (const Instruction* instr, AdvancedExecutionState& state) noexcept
185
184
{
186
185
const auto gas_left_correction = state.current_block_cost - instr->arg .number ;
@@ -196,7 +195,7 @@ const Instruction* op_call(const Instruction* instr, AdvancedExecutionState& sta
196
195
return ++instr;
197
196
}
198
197
199
- template <evmc_opcode Op>
198
+ template <Opcode Op>
200
199
const Instruction* op_create (const Instruction* instr, AdvancedExecutionState& state) noexcept
201
200
{
202
201
const auto gas_left_correction = state.current_block_cost - instr->arg .number ;
0 commit comments