From 3eb78b27505b602c1ccfa952c4cc00f942ccb2b9 Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Tue, 2 Jul 2024 03:51:59 -0400 Subject: Fix string interning pointer invalidity for AST Fix errorneous string intern compare Add symbol interning tests Optimize non-conversion identifier cases Add `File::size()` Add InstanceOf concept Remove `FlatValue::value(const symbol_interner_type&)` Add `AbstractSyntaxTree::intern/intern_cst(lexy::lexeme)` overload Add `DiagnosticLogger::intern/intern_cstr(lexy::lexeme)` overload Use pinned_vector to maintain string interning pointer validity for buffers Add vmcontainer submodule for pinned_vector pinned_vector reserves virtual memory at runtime using OS APIs to maintain pointer validity Remove Exception and RTTI requirement from range-v3 submodule --- include/openvic-dataloader/detail/pinned_vector.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 include/openvic-dataloader/detail/pinned_vector.hpp (limited to 'include/openvic-dataloader/detail/pinned_vector.hpp') diff --git a/include/openvic-dataloader/detail/pinned_vector.hpp b/include/openvic-dataloader/detail/pinned_vector.hpp new file mode 100644 index 0000000..42a7760 --- /dev/null +++ b/include/openvic-dataloader/detail/pinned_vector.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include +#include + +namespace ovdl::detail { + static constexpr auto max_elements = mknejp::vmcontainer::max_elements; + static constexpr auto max_bytes = mknejp::vmcontainer::max_bytes; + static constexpr auto max_pages = mknejp::vmcontainer::max_pages; + + using pinned_vector_traits = mknejp::vmcontainer::pinned_vector_traits; + + template + using pinned_vector = mknejp::vmcontainer::pinned_vector; +} \ No newline at end of file -- cgit v1.2.3-56-ga3b1