From efb0582d2c01fbb08c54402af1906344d1f5e0f7 Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Sun, 11 Feb 2018 15:06:48 +0100 Subject: [PATCH] Switch to use the frozen stdx-allocator --- .gitmodules | 3 +++ dub.json | 5 +++-- makefile | 14 +++++++++----- src/analysis/helpers.d | 4 ++-- src/analysis/run.d | 8 ++++---- stdx-allocator | 1 + 6 files changed, 22 insertions(+), 13 deletions(-) create mode 160000 stdx-allocator diff --git a/.gitmodules b/.gitmodules index 921283e..cd5bd3a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,3 +14,6 @@ [submodule "libddoc"] path = libddoc url = https://github.com/economicmodeling/libddoc +[submodule "stdx-allocator"] + path = stdx-allocator + url = https://github.com/dlang-community/stdx-allocator diff --git a/dub.json b/dub.json index d47d769..6e9a8ee 100644 --- a/dub.json +++ b/dub.json @@ -13,10 +13,11 @@ ], "dependencies" : { "libdparse" : "~>0.8.0-alpha.2", - "dsymbol" : "~>0.3.0-alpha.1", + "dsymbol" : "~>0.3.0-alpha.2", "inifiled" : ">=1.0.2", "emsi_containers" : "~>0.6.0", - "libddoc" : "~>0.3.0-beta.1" + "libddoc" : "~>0.3.0-beta.1", + "stdx-allocator" : "~>2.77.0" }, "targetPath" : "bin" } diff --git a/makefile b/makefile index 2780216..8fe0445 100644 --- a/makefile +++ b/makefile @@ -11,14 +11,18 @@ LIB_SRC := \ $(shell find inifiled/source/ -name "*.d")\ $(shell find libdparse/src/std/experimental/ -name "*.d")\ $(shell find libdparse/src/dparse/ -name "*.d")\ - $(shell find libddoc/src -name "*.d") + $(shell find libddoc/src -name "*.d") \ + $(shell find stdx-allocator/source -name "*.d") PROJECT_SRC := $(shell find src/ -name "*.d") SRC := $(LIB_SRC) $(PROJECT_SRC) INCLUDE_PATHS = \ - -Iinifiled/source -Isrc\ - -Ilibdparse/src\ - -Idsymbol/src -Icontainers/src\ - -Ilibddoc/src + -Isrc \ + -Iinifiled/source \ + -Ilibdparse/src \ + -Idsymbol/src \ + -Icontainers/src \ + -Ilibddoc/src \ + -Istdx-allocator/source VERSIONS = DEBUG_VERSIONS = -version=dparse_verbose DMD_FLAGS = -w -inline -release -O -J. -od${OBJ_DIR} -version=StdLoggerDisableWarning diff --git a/src/analysis/helpers.d b/src/analysis/helpers.d index 390c7b2..949a4e4 100644 --- a/src/analysis/helpers.d +++ b/src/analysis/helpers.d @@ -16,8 +16,8 @@ import dsymbol.modulecache : ModuleCache; import analysis.config; import analysis.run; import analysis.base; -import std.experimental.allocator.mallocator; -import std.experimental.allocator; +import stdx.allocator.mallocator; +import stdx.allocator; S between(S)(S value, S before, S after) if (isSomeString!S) { diff --git a/src/analysis/run.d b/src/analysis/run.d index 3079e17..b3f13d6 100644 --- a/src/analysis/run.d +++ b/src/analysis/run.d @@ -18,10 +18,10 @@ import dparse.ast; import dparse.rollback_allocator; import std.typecons : scoped; -import std.experimental.allocator : CAllocatorImpl; -import std.experimental.allocator.mallocator : Mallocator; -import std.experimental.allocator.building_blocks.region : Region; -import std.experimental.allocator.building_blocks.allocator_list : AllocatorList; +import stdx.allocator : CAllocatorImpl; +import stdx.allocator.mallocator : Mallocator; +import stdx.allocator.building_blocks.region : Region; +import stdx.allocator.building_blocks.allocator_list : AllocatorList; import analysis.config; import analysis.base; diff --git a/stdx-allocator b/stdx-allocator new file mode 160000 index 0000000..7487970 --- /dev/null +++ b/stdx-allocator @@ -0,0 +1 @@ +Subproject commit 7487970b58f4a2c0d495679329a8a2857111f3fd