Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
execution_components.cpp
Go to the documentation of this file.
1
#include "
barretenberg/vm2/simulation/gadgets/execution_components.hpp
"
2
3
#include "
barretenberg/vm2/simulation/events/addressing_event.hpp
"
4
#include "
barretenberg/vm2/simulation/events/event_emitter.hpp
"
5
#include "
barretenberg/vm2/simulation/gadgets/addressing.hpp
"
6
#include "
barretenberg/vm2/simulation/gadgets/context.hpp
"
7
8
namespace
bb::avm2::simulation
{
9
10
std::unique_ptr<AddressingInterface>
ExecutionComponentsProvider::make_addressing
(
AddressingEvent
&
event
)
11
{
12
auto
event_emitter
=
std::make_unique<OneShotEventEmitter<AddressingEvent>
>(
event
);
13
auto
addressing
=
std::make_unique<Addressing>
(
instruction_info_db
,
greater_than
, *
event_emitter
);
14
addressing_event_emitters
.push_back(
std::move
(
event_emitter
));
15
return
addressing
;
16
}
17
18
std::unique_ptr<GasTrackerInterface>
ExecutionComponentsProvider::make_gas_tracker
(
GasEvent
&
gas_event
,
19
const
Instruction
&
instruction
,
20
ContextInterface
&
context
)
21
{
22
return
std::make_unique<GasTracker>
(
gas_event
,
instruction
,
instruction_info_db
,
context
,
greater_than
);
23
}
24
25
}
// namespace bb::avm2::simulation
addressing_event.hpp
bb::avm2::addressing
Definition
addressing.hpp:38
bb::avm2::context
Definition
context.hpp:37
bb::avm2::simulation::ContextInterface
Definition
context.hpp:19
bb::avm2::simulation::ExecutionComponentsProvider::make_gas_tracker
std::unique_ptr< GasTrackerInterface > make_gas_tracker(GasEvent &gas_event, const Instruction &instruction, ContextInterface &context) override
Definition
execution_components.cpp:18
bb::avm2::simulation::ExecutionComponentsProvider::make_addressing
std::unique_ptr< AddressingInterface > make_addressing(AddressingEvent &event) override
Definition
execution_components.cpp:10
bb::avm2::simulation::ExecutionComponentsProvider::addressing_event_emitters
std::vector< std::unique_ptr< EventEmitterInterface< AddressingEvent > > > addressing_event_emitters
Definition
execution_components.hpp:43
bb::avm2::simulation::ExecutionComponentsProvider::instruction_info_db
const InstructionInfoDBInterface & instruction_info_db
Definition
execution_components.hpp:38
bb::avm2::simulation::ExecutionComponentsProvider::greater_than
GreaterThanInterface & greater_than
Definition
execution_components.hpp:37
event_emitter
EventEmitter< DataCopyEvent > event_emitter
Definition
data_copy.test.cpp:56
event_emitter.hpp
execution_components.hpp
gas_event
GasEvent gas_event
Definition
gas_tracker.test.cpp:34
instruction
Instruction instruction
Definition
gas_tracker.test.cpp:33
bb::avm2::simulation
Definition
address_derivation_event.hpp:6
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
event
simulation::PublicDataTreeReadWriteEvent event
Definition
public_data_tree_trace.cpp:24
addressing.hpp
context.hpp
bb::avm2::simulation::AddressingEvent
Definition
addressing_event.hpp:52
bb::avm2::simulation::GasEvent
Definition
gas_event.hpp:22
bb::avm2::simulation::Instruction
Definition
serialization.hpp:30
src
barretenberg
vm2
simulation
gadgets
execution_components.cpp
Generated by
1.9.8