Use std.experimental.allocator in place of stdx.allocator
This commit is contained in:
parent
2bfd3d004f
commit
502b91be48
|
|
@ -28,3 +28,5 @@ stdout.txt
|
||||||
# Dub files
|
# Dub files
|
||||||
.dub
|
.dub
|
||||||
dub.selections.json
|
dub.selections.json
|
||||||
|
|
||||||
|
dcd-test-library
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,6 @@ for /r "libdparse/src" %%F in (*.d) do call set libdparse_modules=%%libdparse_mo
|
||||||
set msgspack_modules=
|
set msgspack_modules=
|
||||||
for /r "msgpack-d/src" %%F in (*.d) do call set msgspack_modules=%%msgspack_modules%% "%%F"
|
for /r "msgpack-d/src" %%F in (*.d) do call set msgspack_modules=%%msgspack_modules%% "%%F"
|
||||||
|
|
||||||
set stdx_allocator=
|
|
||||||
for /r "stdx-allocator/source/stdx/allocator" %%F in (*.d) do call set stdx_allocator=%%stdx_allocator%% "%%F"
|
|
||||||
|
|
||||||
set client_name=bin\dcd-client
|
set client_name=bin\dcd-client
|
||||||
set server_name=bin\dcd-server
|
set server_name=bin\dcd-server
|
||||||
|
|
||||||
|
|
@ -59,11 +56,9 @@ set server_name=bin\dcd-server
|
||||||
%common_modules%^
|
%common_modules%^
|
||||||
%containers_modules%^
|
%containers_modules%^
|
||||||
%msgspack_modules%^
|
%msgspack_modules%^
|
||||||
%stdx_allocator%^
|
|
||||||
-Icontainers/src^
|
-Icontainers/src^
|
||||||
-Imsgpack-d/src^
|
-Imsgpack-d/src^
|
||||||
-Ilibdparse/src^
|
-Ilibdparse/src^
|
||||||
-Istdx-allocator/source^
|
|
||||||
-wi -O -release^
|
-wi -O -release^
|
||||||
-Jbin^
|
-Jbin^
|
||||||
%MFLAGS%^
|
%MFLAGS%^
|
||||||
|
|
|
||||||
2
dsymbol
2
dsymbol
|
|
@ -1 +1 @@
|
||||||
Subproject commit f9a3d302527a9e50140991562648a147b6f5a78e
|
Subproject commit 486668c12364dc50f1fa59483d1c8d0c86e5f720
|
||||||
5
dub.json
5
dub.json
|
|
@ -7,10 +7,9 @@
|
||||||
],
|
],
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dsymbol": ">=0.11.2 <0.12.0",
|
"dsymbol": "~>0.13.1",
|
||||||
"libdparse": ">=0.15.4 <0.16.0",
|
"libdparse": "~>0.19.3",
|
||||||
":common": "*",
|
":common": "*",
|
||||||
"stdx-allocator": "~>2.77.5",
|
|
||||||
"emsi_containers": "~>0.8.0"
|
"emsi_containers": "~>0.8.0"
|
||||||
},
|
},
|
||||||
"subPackages": ["common"],
|
"subPackages": ["common"],
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1393ee4d0c8e50011e641e06d64c429841fb3c2b
|
Subproject commit c3fa4e6eb3720c6aad9e9a772a919ccee2cf1215
|
||||||
3
makefile
3
makefile
|
|
@ -12,7 +12,6 @@ LDC := ldc2
|
||||||
|
|
||||||
DPARSE_DIR := libdparse
|
DPARSE_DIR := libdparse
|
||||||
DSYMBOL_DIR := dsymbol
|
DSYMBOL_DIR := dsymbol
|
||||||
STDXALLOC_DIR := stdx-allocator
|
|
||||||
|
|
||||||
SHELL:=/bin/bash
|
SHELL:=/bin/bash
|
||||||
|
|
||||||
|
|
@ -65,7 +64,6 @@ SERVER_SRC := \
|
||||||
$(shell find common/src/dcd/common -name "*.d")\
|
$(shell find common/src/dcd/common -name "*.d")\
|
||||||
$(shell find src/dcd/server -name "*.d")\
|
$(shell find src/dcd/server -name "*.d")\
|
||||||
$(shell find ${DSYMBOL_DIR}/src -name "*.d")\
|
$(shell find ${DSYMBOL_DIR}/src -name "*.d")\
|
||||||
$(shell find ${STDXALLOC_DIR}/source -name "*.d")\
|
|
||||||
$(shell find ${DPARSE_DIR}/src -name "*.d")\
|
$(shell find ${DPARSE_DIR}/src -name "*.d")\
|
||||||
$(shell find containers/src -name "*.d")\
|
$(shell find containers/src -name "*.d")\
|
||||||
$(shell find msgpack-d/src/ -name "*.d")
|
$(shell find msgpack-d/src/ -name "*.d")
|
||||||
|
|
@ -74,7 +72,6 @@ DMD_SERVER_FLAGS := -Icontainers/src\
|
||||||
-Imsgpack-d/src\
|
-Imsgpack-d/src\
|
||||||
-I${DPARSE_DIR}/src\
|
-I${DPARSE_DIR}/src\
|
||||||
-I${DSYMBOL_DIR}/src\
|
-I${DSYMBOL_DIR}/src\
|
||||||
-I${STDXALLOC_DIR}/source\
|
|
||||||
-Jbin\
|
-Jbin\
|
||||||
-wi\
|
-wi\
|
||||||
-O\
|
-O\
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ AutocompleteResponse dotCompletion(T)(T beforeTokens, const(Token)[] tokenArray,
|
||||||
mixin(TYPE_IDENT_CASES);
|
mixin(TYPE_IDENT_CASES);
|
||||||
case tok!")":
|
case tok!")":
|
||||||
case tok!"]":
|
case tok!"]":
|
||||||
scope allocator = new ASTAllocator();
|
scope allocator = new SymbolsAllocator();
|
||||||
RollbackAllocator rba;
|
RollbackAllocator rba;
|
||||||
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
||||||
&rba, cursorPosition, moduleCache);
|
&rba, cursorPosition, moduleCache);
|
||||||
|
|
@ -229,7 +229,7 @@ AutocompleteResponse dotCompletion(T)(T beforeTokens, const(Token)[] tokenArray,
|
||||||
case tok!";":
|
case tok!";":
|
||||||
case tok!"}":
|
case tok!"}":
|
||||||
case tok!",":
|
case tok!",":
|
||||||
scope allocator = new ASTAllocator();
|
scope allocator = new SymbolsAllocator();
|
||||||
RollbackAllocator rba;
|
RollbackAllocator rba;
|
||||||
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
||||||
&rba, 1, moduleCache);
|
&rba, 1, moduleCache);
|
||||||
|
|
@ -302,7 +302,7 @@ AutocompleteResponse parenCompletion(T)(T beforeTokens,
|
||||||
case tok!")":
|
case tok!")":
|
||||||
case tok!"]":
|
case tok!"]":
|
||||||
mixin(STRING_LITERAL_CASES);
|
mixin(STRING_LITERAL_CASES);
|
||||||
scope allocator = new ASTAllocator();
|
scope allocator = new SymbolsAllocator();
|
||||||
RollbackAllocator rba;
|
RollbackAllocator rba;
|
||||||
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
||||||
&rba, cursorPosition, moduleCache);
|
&rba, cursorPosition, moduleCache);
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ public AutocompleteResponse getDoc(const AutocompleteRequest request,
|
||||||
// trace("Getting doc comments");
|
// trace("Getting doc comments");
|
||||||
AutocompleteResponse response;
|
AutocompleteResponse response;
|
||||||
RollbackAllocator rba;
|
RollbackAllocator rba;
|
||||||
scope allocator = new ASTAllocator();
|
scope allocator = new SymbolsAllocator();
|
||||||
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
||||||
SymbolStuff stuff = getSymbolsForCompletion(request, CompletionType.ddoc,
|
SymbolStuff stuff = getSymbolsForCompletion(request, CompletionType.ddoc,
|
||||||
allocator, &rba, cache, moduleCache);
|
allocator, &rba, cache, moduleCache);
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ public AutocompleteResponse findLocalUse(AutocompleteRequest request,
|
||||||
{
|
{
|
||||||
AutocompleteResponse response;
|
AutocompleteResponse response;
|
||||||
RollbackAllocator rba;
|
RollbackAllocator rba;
|
||||||
scope allocator = new ASTAllocator();
|
scope allocator = new SymbolsAllocator();
|
||||||
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
||||||
|
|
||||||
// patchs the original request for the subsequent requests
|
// patchs the original request for the subsequent requests
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ public AutocompleteResponse findDeclaration(const AutocompleteRequest request,
|
||||||
{
|
{
|
||||||
AutocompleteResponse response;
|
AutocompleteResponse response;
|
||||||
RollbackAllocator rba;
|
RollbackAllocator rba;
|
||||||
scope allocator = new ASTAllocator();
|
scope allocator = new SymbolsAllocator();
|
||||||
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
||||||
SymbolStuff stuff = getSymbolsForCompletion(request,
|
SymbolStuff stuff = getSymbolsForCompletion(request,
|
||||||
CompletionType.location, allocator, &rba, cache, moduleCache);
|
CompletionType.location, allocator, &rba, cache, moduleCache);
|
||||||
|
|
@ -75,7 +75,7 @@ public AutocompleteResponse symbolSearch(const AutocompleteRequest request,
|
||||||
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
||||||
const(Token)[] tokenArray = getTokensForParser(cast(ubyte[]) request.sourceCode,
|
const(Token)[] tokenArray = getTokensForParser(cast(ubyte[]) request.sourceCode,
|
||||||
config, &cache);
|
config, &cache);
|
||||||
scope allocator = new ASTAllocator();
|
scope allocator = new SymbolsAllocator();
|
||||||
RollbackAllocator rba;
|
RollbackAllocator rba;
|
||||||
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
||||||
&rba, request.cursorPosition, moduleCache);
|
&rba, request.cursorPosition, moduleCache);
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
module dcd.server.autocomplete.util;
|
module dcd.server.autocomplete.util;
|
||||||
|
|
||||||
import std.algorithm;
|
import std.algorithm;
|
||||||
import stdx.allocator;
|
import std.experimental.allocator;
|
||||||
import std.experimental.logger;
|
import std.experimental.logger;
|
||||||
import std.range;
|
import std.range;
|
||||||
import std.string;
|
import std.string;
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ import std.array;
|
||||||
import std.conv;
|
import std.conv;
|
||||||
import std.datetime.stopwatch : AutoStart, StopWatch;
|
import std.datetime.stopwatch : AutoStart, StopWatch;
|
||||||
import std.exception : enforce;
|
import std.exception : enforce;
|
||||||
import stdx.allocator;
|
import std.experimental.allocator;
|
||||||
import stdx.allocator.mallocator;
|
import std.experimental.allocator.mallocator;
|
||||||
import std.experimental.logger;
|
import std.experimental.logger;
|
||||||
import std.file;
|
import std.file;
|
||||||
import std.getopt;
|
import std.getopt;
|
||||||
|
|
@ -176,7 +176,7 @@ int runServer(string[] args)
|
||||||
info("Sockets shut down.");
|
info("Sockets shut down.");
|
||||||
}
|
}
|
||||||
|
|
||||||
ModuleCache cache = ModuleCache(new ASTAllocator);
|
ModuleCache cache = ModuleCache(new SymbolsAllocator);
|
||||||
cache.addImportPaths(importPaths);
|
cache.addImportPaths(importPaths);
|
||||||
infof("Import directories:\n %-(%s\n %)", cache.getImportPaths());
|
infof("Import directories:\n %-(%s\n %)", cache.getImportPaths());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit d6e6ce4a838e0dad43ef13f050f96627339cdccd
|
|
||||||
Loading…
Reference in New Issue