Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
internal_call_stack_manager.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <memory>
5
7
8namespace bb::avm2::simulation {
9
11 public:
13
14 virtual void push(PC caller_pc, PC return_pc) = 0;
15 virtual PC pop() = 0;
16 virtual InternalCallId get_next_call_id() const = 0;
17 virtual InternalCallId get_call_id() const = 0;
19 // Returns the call stack (caller PCs, not return PCs) without including the current PC.
20 virtual std::vector<PC> get_current_call_stack() const = 0;
21};
22
29
30// InternalCallStackException is thrown when there is an attempt to pop from
31// an empty internal call stack
32class InternalCallStackException : public std::runtime_error {
33 public:
34 explicit InternalCallStackException(const std::string& message)
35 : std::runtime_error(message)
36 {}
37};
38
39} // namespace bb::avm2::simulation
virtual std::vector< PC > get_current_call_stack() const =0
virtual void push(PC caller_pc, PC return_pc)=0
virtual InternalCallId get_return_call_id() const =0
virtual InternalCallId get_next_call_id() const =0
virtual std::unique_ptr< InternalCallStackManagerInterface > make_internal_call_stack_manager(uint32_t context_id)=0
uint32_t PC
uint32_t InternalCallId
STL namespace.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
uint32_t context_id