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 --- deps/SCsub | 39 +++++++++++++++++++++++++++++++++++---- deps/dryad | 2 +- deps/range-v3 | 2 +- deps/vmcontainer | 1 + 4 files changed, 38 insertions(+), 6 deletions(-) create mode 160000 deps/vmcontainer (limited to 'deps') diff --git a/deps/SCsub b/deps/SCsub index 5f714df..441ec93 100644 --- a/deps/SCsub +++ b/deps/SCsub @@ -56,7 +56,7 @@ def build_dryad(env): env.Append(CXXFLAGS=["/external:I", include_dir, "/external:W0"]) else: env.Append(CXXFLAGS=["-isystem", include_dir]) - + env.exposed_includes += env.dryad["INCPATH"] def build_fmt(env): @@ -117,7 +117,7 @@ def build_fmt(env): env.Append(CXXFLAGS=[""]) env.Append(LIBPATH=[fmt_env.Dir(source_path)]) env.Prepend(LIBS=[library_name]) - + env.exposed_includes += env.fmt["INCPATH"] def build_range_v3(env): @@ -135,10 +135,41 @@ def build_range_v3(env): env.Append(CXXFLAGS=["/external:I", include_dir, "/external:W0"]) else: env.Append(CXXFLAGS=["-isystem", include_dir]) - + env.exposed_includes += env.range_v3["INCPATH"] +def build_vmcontainer(env): + vmcontainer_env = env.Clone() + + include_path = "vmcontainer/lib/include" + source_path = "vmcontainer/lib/src" + paths = [include_path, source_path] + vmcontainer_env.Append(CPPPATH=[[vmcontainer_env.Dir(p) for p in paths]]) + sources = env.GlobRecursive("*.cpp", paths) + env.vmcontainer_sources = sources + + library_name = "libvmcontainer" + env["LIBSUFFIX"] + library = vmcontainer_env.StaticLibrary(target=os.path.join(source_path, library_name), source=sources) + Default(library) + + include_dir = vmcontainer_env.Dir(include_path) + + env.vmcontainer = {} + env.vmcontainer["INCPATH"] = [include_dir] + + env.Append(CPPPATH=env.vmcontainer["INCPATH"]) + if env.get("is_msvc", False): + env.Append(CXXFLAGS=["/external:I", include_dir, "/external:W0"]) + else: + env.Append(CXXFLAGS=["-isystem", include_dir]) + env.Append(CXXFLAGS=[""]) + env.Append(LIBPATH=[vmcontainer_env.Dir(source_path)]) + env.Prepend(LIBS=[library_name]) + + env.exposed_includes += env.vmcontainer["INCPATH"] + build_dryad(env) build_fmt(env) build_lexy(env) -build_range_v3(env) \ No newline at end of file +build_range_v3(env) +build_vmcontainer(env) \ No newline at end of file diff --git a/deps/dryad b/deps/dryad index 3aa3d76..697b8f8 160000 --- a/deps/dryad +++ b/deps/dryad @@ -1 +1 @@ -Subproject commit 3aa3d7606cb007436bb3433ddf83b8bdcf1ecc4b +Subproject commit 697b8f817e0c6c2a2f398c3e9217533b1507dc21 diff --git a/deps/range-v3 b/deps/range-v3 index 97452bb..334bf57 160000 --- a/deps/range-v3 +++ b/deps/range-v3 @@ -1 +1 @@ -Subproject commit 97452bb3eb74a73fc86504421a6a27c92bce6b99 +Subproject commit 334bf5772462dbd2e0e2ce142e22c4e5a8970a96 diff --git a/deps/vmcontainer b/deps/vmcontainer new file mode 160000 index 0000000..f7851cd --- /dev/null +++ b/deps/vmcontainer @@ -0,0 +1 @@ +Subproject commit f7851cd758af9d65189f55f2a3cba0021e369083 -- cgit v1.2.3-56-ga3b1