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/execution_components.hpp
"
2
#include "
barretenberg/vm2/simulation/addressing.hpp
"
3
#include "
barretenberg/vm2/simulation/context.hpp
"
4
#include "
barretenberg/vm2/simulation/events/addressing_event.hpp
"
5
#include "
barretenberg/vm2/simulation/events/event_emitter.hpp
"
6
7
namespace
bb::avm2::simulation
{
8
9
std::unique_ptr<AddressingInterface>
ExecutionComponentsProvider::make_addressing
(
AddressingEvent
&
event
)
10
{
11
auto
event_emitter
=
std::make_unique<OneShotEventEmitter<AddressingEvent>
>(
event
);
12
auto
addressing
=
std::make_unique<Addressing>
(
instruction_info_db
,
range_check
, *
event_emitter
);
13
addressing_event_emitters
.push_back(
std::move
(
event_emitter
));
14
return
addressing
;
15
}
16
17
std::unique_ptr<GasTrackerInterface>
ExecutionComponentsProvider::make_gas_tracker
(
GasEvent
&
gas_event
,
18
const
Instruction
&
instruction
,
19
ContextInterface
&
context
)
20
{
21
return
std::make_unique<GasTracker>
(
gas_event
,
instruction
,
instruction_info_db
,
context
,
range_check
);
22
}
23
24
}
// namespace bb::avm2::simulation
addressing_event.hpp
bb::avm2::addressing
Definition
addressing.hpp:39
bb::avm2::context
Definition
context.hpp:37
bb::avm2::range_check
Definition
range_check.hpp:34
bb::avm2::simulation::ContextInterface
Definition
context.hpp:23
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:17
bb::avm2::simulation::ExecutionComponentsProvider::make_addressing
std::unique_ptr< AddressingInterface > make_addressing(AddressingEvent &event) override
Definition
execution_components.cpp:9
bb::avm2::simulation::ExecutionComponentsProvider::addressing_event_emitters
std::vector< std::unique_ptr< EventEmitterInterface< AddressingEvent > > > addressing_event_emitters
Definition
execution_components.hpp:49
bb::avm2::simulation::ExecutionComponentsProvider::instruction_info_db
const InstructionInfoDBInterface & instruction_info_db
Definition
execution_components.hpp:44
event_emitter
EventEmitter< DataCopyEvent > event_emitter
Definition
data_copy.test.cpp:53
event_emitter.hpp
execution_components.hpp
gas_event
GasEvent gas_event
Definition
gas_tracker.test.cpp:33
instruction
Instruction instruction
Definition
gas_tracker.test.cpp:32
bb::avm2::simulation
Definition
address_derivation.cpp:8
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:20
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
execution_components.cpp
Generated by
1.9.8