11#ifndef ARK_VM_SCOPE_HPP 
   12#define ARK_VM_SCOPE_HPP 
   29        using pair_t = std::pair<uint16_t, Value>;
 
   50        void pushBack(uint16_t 
id, 
Value&& val) 
noexcept;
 
   58        void pushBack(uint16_t 
id, 
const Value& val) 
noexcept;
 
   66        void insertFront(
const std::vector<pair_t>& values) 
noexcept;
 
   75        [[nodiscard]] 
bool maybeHas(uint16_t 
id) 
const noexcept;
 
   83        [[nodiscard]] 
Value* operator[](uint16_t id_to_look_for) 
noexcept;
 
   91        [[nodiscard]] 
const Value* operator[](uint16_t id_to_look_for) 
const noexcept;
 
   99        [[nodiscard]] uint16_t idFromValue(
const Value& val) 
const noexcept;
 
  106        [[nodiscard]] 
inline const pair_t& 
atPos(
const std::size_t i) 
const noexcept 
  108            return m_storage[m_start + i];
 
 
  118            return m_storage[m_start + m_size - 1 - i];
 
 
  124        void reset() noexcept;
 
  131        [[nodiscard]] inline 
std::
size_t size() const noexcept
 
 
  143            return m_start + m_size;
 
 
 
Default value type handled by the virtual machine.
 
The ArkScript virtual machine, executing ArkScript bytecode.
 
A class to handle the VM scope more efficiently.
 
ScopeView()=delete
Deleted constructor to avoid creating ScopeViews pointing to nothing. Helps catch bugs at compile tim...
 
uint16_t m_max_id
Maximum stored ID, used for a basic bloom filter.
 
std::size_t storageEnd() const noexcept
Compute the position of the first free slot in the shared storage, after this scope.
 
std::pair< uint16_t, Value > pair_t
 
const pair_t & atPos(const std::size_t i) const noexcept
Return the element at index in scope.
 
uint16_t m_min_id
Minimum stored ID, used for a basic bloom filter.
 
pair_t & atPosReverse(const std::size_t i) noexcept
Return the element at index, starting from the end.
 
bool operator==(const Namespace &A, const Namespace &B)