9 const std::size_t offset_by = values.size();
13 for (std::size_t i = 0; i < m_size; ++i)
17 assert(m_storage[m_start + m_size - i - 1].second.valueType() !=
ValueType::Reference &&
"References can not be moved around!");
18 m_storage[m_start + m_size - i + offset_by - 1] = m_storage[m_start + m_size - i - 1];
22 for (
const pair_t& pair : values)
24 const uint16_t
id = pair.first;
30 m_storage[m_start + i] = pair;
39 for (std::size_t i = m_start; i < m_start + m_size; ++i)
41 const auto& [id, value] = m_storage[i];
52 return A.m_size == B.m_size && A.m_start == B.m_start;
The virtual machine scope system.
A class to handle the VM scope more efficiently.
void insertFront(const std::vector< pair_t > &values) noexcept
Insert one or more pairs at the beginning of the scope.
std::pair< uint16_t, Value > pair_t
uint16_t idFromValue(const Value &val) const noexcept
Get the id of a variable based on its value ; used for debug only.
bool operator==(const Namespace &A, const Namespace &B)
constexpr uint16_t MaxValue16Bits