Merge 05e94873c3
into e48216e4a8
This commit is contained in:
commit
13aab1aef3
|
@ -149,6 +149,7 @@ struct ModuleCache
|
|||
DSymbol* cacheModule(string location)
|
||||
{
|
||||
import std.stdio : File;
|
||||
import core.memory: GC;
|
||||
|
||||
assert (location !is null);
|
||||
|
||||
|
@ -160,6 +161,8 @@ struct ModuleCache
|
|||
if (!needsReparsing(cachedLocation))
|
||||
return getEntryFor(cachedLocation).symbol;
|
||||
|
||||
scope(exit) GC.collect();
|
||||
|
||||
recursionGuard.insert(&cachedLocation.data[0]);
|
||||
|
||||
File f = File(cachedLocation);
|
||||
|
|
|
@ -65,6 +65,9 @@ enum CalltipHint {
|
|||
public AutocompleteResponse complete(const AutocompleteRequest request,
|
||||
ref ModuleCache moduleCache)
|
||||
{
|
||||
import core.memory: GC;
|
||||
scope(exit) GC.collect();
|
||||
|
||||
const(Token)[] tokenArray;
|
||||
auto stringCache = StringCache(request.sourceCode.length.optimalBucketCount);
|
||||
auto beforeTokens = getTokensBeforeCursor(request.sourceCode,
|
||||
|
|
Loading…
Reference in New Issue