Updated DScanner

This commit is contained in:
Hackerpilot 2014-01-21 23:57:40 -08:00
parent b16ad1ef27
commit 0ed026e3d1
4 changed files with 33 additions and 16 deletions

View File

@ -28,3 +28,32 @@ dmd \
-O -release -noboundscheck -inline\
-ofdcd-server
#gdc client.d\
# messages.d\
# msgpack-d/src/msgpack.d\
# -Imsgpack-d/src\
# -O3 -frelease -fno-bounds-check\
# -odcd-client
#
#gdc \
# actypes.d\
# astconverter.d\
# autocomplete.d\
# constants.d\
# messages.d\
# modulecache.d\
# semantic.d\
# server.d\
# stupidlog.d\
# dscanner/stdx/d/ast.d\
# dscanner/stdx/d/parser.d\
# dscanner/stdx/lexer.d\
# dscanner/stdx/d/lexer.d\
# dscanner/stdx/d/entities.d\
# dscanner/formatter.d\
# msgpack-d/src/msgpack.d\
# -Imsgpack-d/src\
# -Idscanner\
# -O3 -frelease -fno-bounds-check\
# -odcd-server

@ -1 +1 @@
Subproject commit d840eed12af4984a71933a1d2f09de6065e13a26
Subproject commit 2c90f300fd51355fd583868c7efde3dece988af9

View File

@ -61,18 +61,6 @@ struct ModuleCache
cache = cache.init;
}
static void estimateMemory()
{
size_t estimate = 0;
foreach (c; cache)
{
foreach (symbol; c.symbols)
estimate = symbol.estimateMemory(estimate);
}
double megabytes = estimate / (1024.0F * 1024.0F);
Log.trace("Memory use estimated at ", megabytes, " megabytes");
}
/**
* Adds the given path to the list of directories checked for imports
*/

View File

@ -27,6 +27,7 @@ import std.file;
import std.array;
import std.process;
import std.datetime;
import std.conv;
import msgpack;
@ -46,7 +47,6 @@ version(OSX) version = useXDG;
int main(string[] args)
{
Log.info("Starting up...");
StopWatch sw = StopWatch(AutoStart.yes);
@ -61,7 +61,7 @@ int main(string[] args)
{
getopt(args, "port|p", &port, "I", &importPaths, "help|h", &help);
}
catch (Exception e)
catch (ConvException e)
{
stderr.writeln(e.msg);
printHelp(args[0]);
@ -96,7 +96,7 @@ int main(string[] args)
sw.stop();
Log.info("Startup completed in ", sw.peek().to!("msecs", float), " milliseconds");
ModuleCache.estimateMemory();
// ModuleCache.estimateMemory();
// No relative paths