devel/dcd-client|server: Remove obsolete patch files
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
--- src/dcd/server/autocomplete/complete.d 2022-11-14 15:33:10.423557000 -0500
|
||||
+++ src/dcd/server/autocomplete/complete.d 2022-11-14 15:35:18.150747000 -0500
|
||||
@@ -21,6 +21,7 @@
|
||||
import std.algorithm;
|
||||
import std.array;
|
||||
import std.conv;
|
||||
+import std.experimental.allocator;
|
||||
import std.experimental.logger;
|
||||
import std.file;
|
||||
import std.path;
|
||||
@@ -213,9 +214,9 @@
|
||||
mixin(TYPE_IDENT_CASES);
|
||||
case tok!")":
|
||||
case tok!"]":
|
||||
- auto allocator = scoped!(ASTAllocator)();
|
||||
+ scope allocator = new ASTAllocator();
|
||||
RollbackAllocator rba;
|
||||
- ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
||||
+ ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator.allocatorObject,
|
||||
&rba, cursorPosition, moduleCache);
|
||||
scope(exit) pair.destroy();
|
||||
response.setCompletions(pair.scope_, getExpression(beforeTokens),
|
||||
@@ -229,9 +230,9 @@
|
||||
case tok!";":
|
||||
case tok!"}":
|
||||
case tok!",":
|
||||
- auto allocator = scoped!(ASTAllocator)();
|
||||
+ scope allocator = new ASTAllocator();
|
||||
RollbackAllocator rba;
|
||||
- ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
||||
+ ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator.allocatorObject,
|
||||
&rba, 1, moduleCache);
|
||||
scope(exit) pair.destroy();
|
||||
response.setCompletions(pair.scope_, getExpression(beforeTokens),
|
||||
@@ -302,9 +303,9 @@
|
||||
case tok!")":
|
||||
case tok!"]":
|
||||
mixin(STRING_LITERAL_CASES);
|
||||
- auto allocator = scoped!(ASTAllocator)();
|
||||
+ scope allocator = new ASTAllocator();
|
||||
RollbackAllocator rba;
|
||||
- ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
||||
+ ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator.allocatorObject,
|
||||
&rba, cursorPosition, moduleCache);
|
||||
scope(exit) pair.destroy();
|
||||
auto expression = getExpression(beforeTokens[0 .. $ - 1]);
|
||||
@@ -1,23 +0,0 @@
|
||||
--- src/dcd/server/autocomplete/doc.d 2022-11-14 15:33:18.687809000 -0500
|
||||
+++ src/dcd/server/autocomplete/doc.d 2022-11-14 15:36:55.838929000 -0500
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
import std.algorithm;
|
||||
import std.array;
|
||||
+import std.experimental.allocator;
|
||||
import std.experimental.logger;
|
||||
import std.typecons;
|
||||
|
||||
@@ -45,10 +46,10 @@
|
||||
// trace("Getting doc comments");
|
||||
AutocompleteResponse response;
|
||||
RollbackAllocator rba;
|
||||
- auto allocator = scoped!(ASTAllocator)();
|
||||
+ scope allocator = new ASTAllocator();
|
||||
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
||||
SymbolStuff stuff = getSymbolsForCompletion(request, CompletionType.ddoc,
|
||||
- allocator, &rba, cache, moduleCache);
|
||||
+ allocator.allocatorObject, &rba, cache, moduleCache);
|
||||
if (stuff.symbols.length == 0)
|
||||
warning("Could not find symbol");
|
||||
else
|
||||
@@ -1,28 +0,0 @@
|
||||
--- src/dcd/server/autocomplete/localuse.d 2022-11-14 15:33:24.333812000 -0500
|
||||
+++ src/dcd/server/autocomplete/localuse.d 2022-11-14 15:38:33.174285000 -0500
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
module dcd.server.autocomplete.localuse;
|
||||
|
||||
+import std.experimental.allocator;
|
||||
import std.experimental.logger;
|
||||
import std.range;
|
||||
import std.typecons;
|
||||
@@ -45,7 +46,7 @@
|
||||
{
|
||||
AutocompleteResponse response;
|
||||
RollbackAllocator rba;
|
||||
- auto allocator = scoped!(ASTAllocator)();
|
||||
+ scope allocator = new ASTAllocator();
|
||||
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
||||
|
||||
// patchs the original request for the subsequent requests
|
||||
@@ -60,7 +61,7 @@
|
||||
{
|
||||
auto sortedTokens = assumeSorted(tokenArray);
|
||||
auto beforeTokens = sortedTokens.lowerBound(cursorPosition);
|
||||
- ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
||||
+ ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator.allocatorObject,
|
||||
&rba, request.cursorPosition, moduleCache);
|
||||
auto expression = getExpression(beforeTokens);
|
||||
return SymbolStuff(getSymbolsByTokenChain(pair.scope_, expression,
|
||||
@@ -1,35 +0,0 @@
|
||||
--- src/dcd/server/autocomplete/symbols.d 2022-11-14 15:33:36.047717000 -0500
|
||||
+++ src/dcd/server/autocomplete/symbols.d 2022-11-14 15:40:15.800529000 -0500
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
module dcd.server.autocomplete.symbols;
|
||||
|
||||
+import std.experimental.allocator;
|
||||
import std.experimental.logger;
|
||||
import std.typecons;
|
||||
|
||||
@@ -47,10 +48,10 @@
|
||||
{
|
||||
AutocompleteResponse response;
|
||||
RollbackAllocator rba;
|
||||
- auto allocator = scoped!(ASTAllocator)();
|
||||
+ scope allocator = new ASTAllocator();
|
||||
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
||||
SymbolStuff stuff = getSymbolsForCompletion(request,
|
||||
- CompletionType.location, allocator, &rba, cache, moduleCache);
|
||||
+ CompletionType.location, allocator.allocatorObject, &rba, cache, moduleCache);
|
||||
scope(exit) stuff.destroy();
|
||||
if (stuff.symbols.length > 0)
|
||||
{
|
||||
@@ -75,9 +76,9 @@
|
||||
auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
|
||||
const(Token)[] tokenArray = getTokensForParser(cast(ubyte[]) request.sourceCode,
|
||||
config, &cache);
|
||||
- auto allocator = scoped!(ASTAllocator)();
|
||||
+ scope allocator = new ASTAllocator();
|
||||
RollbackAllocator rba;
|
||||
- ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
|
||||
+ ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator.allocatorObject,
|
||||
&rba, request.cursorPosition, moduleCache);
|
||||
scope(exit) pair.destroy();
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
--- src/dcd/server/autocomplete/util.d 2022-11-14 15:41:09.361709000 -0500
|
||||
+++ src/dcd/server/autocomplete/util.d 2022-11-14 15:41:43.480412000 -0500
|
||||
@@ -19,7 +19,7 @@
|
||||
module dcd.server.autocomplete.util;
|
||||
|
||||
import std.algorithm;
|
||||
-import stdx.allocator;
|
||||
+import std.experimental.allocator;
|
||||
import std.experimental.logger;
|
||||
import std.range;
|
||||
import std.string;
|
||||
@@ -134,7 +134,7 @@
|
||||
* the request's source code, cursor position, and completion type.
|
||||
*/
|
||||
SymbolStuff getSymbolsForCompletion(const AutocompleteRequest request,
|
||||
- const CompletionType type, IAllocator allocator, RollbackAllocator* rba,
|
||||
+ const CompletionType type, RCIAllocator allocator, RollbackAllocator* rba,
|
||||
ref StringCache cache, ref ModuleCache moduleCache)
|
||||
{
|
||||
const(Token)[] tokenArray;
|
||||
@@ -1,22 +0,0 @@
|
||||
--- src/dcd/server/main.d 2022-11-14 15:42:33.385930000 -0500
|
||||
+++ src/dcd/server/main.d 2022-11-14 15:43:15.544622000 -0500
|
||||
@@ -24,8 +24,8 @@
|
||||
import std.conv;
|
||||
import std.datetime.stopwatch : AutoStart, StopWatch;
|
||||
import std.exception : enforce;
|
||||
-import stdx.allocator;
|
||||
-import stdx.allocator.mallocator;
|
||||
+import std.experimental.allocator;
|
||||
+import std.experimental.allocator.mallocator;
|
||||
import std.experimental.logger;
|
||||
import std.file;
|
||||
import std.getopt;
|
||||
@@ -176,7 +176,7 @@
|
||||
info("Sockets shut down.");
|
||||
}
|
||||
|
||||
- ModuleCache cache = ModuleCache(new ASTAllocator);
|
||||
+ ModuleCache cache = ModuleCache(new ASTAllocator().allocatorObject);
|
||||
cache.addImportPaths(importPaths);
|
||||
infof("Import directories:\n %-(%s\n %)", cache.getImportPaths());
|
||||
|
||||
Reference in New Issue
Block a user