452 changes: 226 additions & 226 deletions benchmark/gcbench/vdparser.extra/stdext/path.d

Large diffs are not rendered by default.

744 changes: 372 additions & 372 deletions benchmark/gcbench/vdparser.extra/stdext/string.d

Large diffs are not rendered by default.

63 changes: 31 additions & 32 deletions benchmark/gcbench/vdparser.extra/stdext/util.d
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
// This file is part of Visual D
//
// Visual D integrates the D programming language into Visual Studio
// Copyright (c) 2010-2011 by Rainer Schuetze, All Rights Reserved
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt

module stdext.util;

////////////////////////////////////////////////////////////////
inout(T) static_cast(T, S = Object)(inout(S) p)
{
if(!p)
return null;
if(__ctfe)
return cast(inout(T)) p;
assert(cast(inout(T)) p);
void* vp = cast(void*)p;
return cast(inout(T)) vp;
}

////////////////////////////////////////////////////////////////
bool isIn(T...)(T values)
{
T[0] needle = values[0];
foreach(v; values[1..$])
if(v == needle)
return true;
return false;
}

// This file is part of Visual D
//
// Visual D integrates the D programming language into Visual Studio
// Copyright (c) 2010-2011 by Rainer Schuetze, All Rights Reserved
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt

module stdext.util;

////////////////////////////////////////////////////////////////
inout(T) static_cast(T, S = Object)(inout(S) p)
{
if(!p)
return null;
if(__ctfe)
return cast(inout(T)) p;
assert(cast(inout(T)) p);
void* vp = cast(void*)p;
return cast(inout(T)) vp;
}

////////////////////////////////////////////////////////////////
bool isIn(T...)(T values)
{
T[0] needle = values[0];
foreach(v; values[1..$])
if(v == needle)
return true;
return false;
}
2,103 changes: 1,051 additions & 1,052 deletions benchmark/gcbench/vdparser.extra/vdc/ast/aggr.d

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions benchmark/gcbench/vdparser.extra/vdc/ast/all.d
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
// This file is part of Visual D
//
// Visual D integrates the D programming language into Visual Studio
// Copyright (c) 2010-2011 by Rainer Schuetze, All Rights Reserved
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt

module vdc.ast.all;

public import vdc.ast.aggr;
public import vdc.ast.decl;
public import vdc.ast.expr;
public import vdc.ast.iasm;
public import vdc.ast.misc;
public import vdc.ast.mod;
public import vdc.ast.node;
public import vdc.ast.stmt;
public import vdc.ast.tmpl;
public import vdc.ast.type;
public import vdc.ast.writer;
// This file is part of Visual D
//
// Visual D integrates the D programming language into Visual Studio
// Copyright (c) 2010-2011 by Rainer Schuetze, All Rights Reserved
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt

module vdc.ast.all;

public import vdc.ast.aggr;
public import vdc.ast.decl;
public import vdc.ast.expr;
public import vdc.ast.iasm;
public import vdc.ast.misc;
public import vdc.ast.mod;
public import vdc.ast.node;
public import vdc.ast.stmt;
public import vdc.ast.tmpl;
public import vdc.ast.type;
public import vdc.ast.writer;
1,912 changes: 956 additions & 956 deletions benchmark/gcbench/vdparser.extra/vdc/ast/decl.d

Large diffs are not rendered by default.

4,680 changes: 2,340 additions & 2,340 deletions benchmark/gcbench/vdparser.extra/vdc/ast/expr.d

Large diffs are not rendered by default.

400 changes: 200 additions & 200 deletions benchmark/gcbench/vdparser.extra/vdc/ast/iasm.d

Large diffs are not rendered by default.

1,424 changes: 712 additions & 712 deletions benchmark/gcbench/vdparser.extra/vdc/ast/misc.d

Large diffs are not rendered by default.

1,596 changes: 798 additions & 798 deletions benchmark/gcbench/vdparser.extra/vdc/ast/mod.d

Large diffs are not rendered by default.

1,660 changes: 830 additions & 830 deletions benchmark/gcbench/vdparser.extra/vdc/ast/node.d

Large diffs are not rendered by default.

2,519 changes: 1,259 additions & 1,260 deletions benchmark/gcbench/vdparser.extra/vdc/ast/stmt.d

Large diffs are not rendered by default.

1,184 changes: 592 additions & 592 deletions benchmark/gcbench/vdparser.extra/vdc/ast/tmpl.d

Large diffs are not rendered by default.

2,721 changes: 1,360 additions & 1,361 deletions benchmark/gcbench/vdparser.extra/vdc/ast/type.d

Large diffs are not rendered by default.

612 changes: 306 additions & 306 deletions benchmark/gcbench/vdparser.extra/vdc/ast/writer.d

Large diffs are not rendered by default.

4,226 changes: 2,113 additions & 2,113 deletions benchmark/gcbench/vdparser.extra/vdc/interpret.d

Large diffs are not rendered by default.

2,828 changes: 1,414 additions & 1,414 deletions benchmark/gcbench/vdparser.extra/vdc/lexer.d

Large diffs are not rendered by default.

220 changes: 111 additions & 109 deletions benchmark/gcbench/vdparser.extra/vdc/logger.d
Original file line number Diff line number Diff line change
@@ -1,109 +1,111 @@
// This file is part of Visual D
//
// Visual D integrates the D programming language into Visual Studio
// Copyright (c) 2010-2011 by Rainer Schuetze, All Rights Reserved
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt

module vdc.logger;

import std.stdio;
import std.datetime;
import std.conv;
import std.string;
import std.array;

extern(Windows) void OutputDebugStringA(const char* lpOutputString);
extern(Windows) uint GetCurrentThreadId();

import core.sys.windows.windows;

__gshared int gLogIndent = 0;
__gshared bool gLogFirst = true;
__gshared const string gLogFile = "c:/tmp/parser.log";

//debug version = enableLog;

version(enableLog) {

struct LogIndent
{
this(int n)
{
indent = n;
gLogIndent += indent;
}
~this()
{
gLogIndent -= indent;
}
int indent;
}

mixin template logIndent(int n = 1)
{
LogIndent indent = LogIndent(n);
}

class logSync {}

void logInfo(...)
{
auto buffer = new char[17 + 1];
SysTime now = Clock.currTime();
uint tid = GetCurrentThreadId();
auto len = sprintf(buffer.ptr, "%02d:%02d:%02d - %04x - ",
now.hour, now.minute, now.second, tid);
string s = to!string(buffer[0..len]);
s ~= replicate(" ", gLogIndent);

void putc(dchar c)
{
s ~= c;
}

try {
std.format.doFormat(&putc, _arguments, _argptr);
}
catch(Exception e)
{
string msg = e.toString();
s ~= " EXCEPTION";
}

log_string(s);
}

void log_string(string s)
{
s ~= "\n";
if(gLogFile.length == 0)
OutputDebugStringA(toStringz(s));
else
synchronized(logSync.classinfo)
{
if(gLogFirst)
{
gLogFirst = false;
s = "\n" ~ replicate("=", 80) ~ "\n" ~ s;
}
std.file.append(gLogFile, s);
}
}
}
else
{
struct LogIndent
{
this(int n)
{
}
}
void logInfo(...)
{
}
void log_string(string s)
{
}
}
// This file is part of Visual D
//
// Visual D integrates the D programming language into Visual Studio
// Copyright (c) 2010-2011 by Rainer Schuetze, All Rights Reserved
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt

module vdc.logger;

import std.stdio;
import std.datetime;
import std.conv;
import std.string;
import std.array;

extern(Windows) void OutputDebugStringA(const char* lpOutputString);
extern(Windows) uint GetCurrentThreadId();

import core.sys.windows.windows;

__gshared int gLogIndent = 0;
__gshared bool gLogFirst = true;
__gshared const string gLogFile = "c:/tmp/parser.log";

//debug version = enableLog;

version(enableLog) {

struct LogIndent
{
this(int n)
{
indent = n;
gLogIndent += indent;
}
~this()
{
gLogIndent -= indent;
}
int indent;
}

mixin template logIndent(int n = 1)
{
LogIndent indent = LogIndent(n);
}

class logSync {}

void logInfo(...)
{
auto buffer = new char[17 + 1];
SysTime now = Clock.currTime();
uint tid = GetCurrentThreadId();
auto len = sprintf(buffer.ptr, "%02d:%02d:%02d - %04x - ",
now.hour, now.minute, now.second, tid);
string s = to!string(buffer[0..len]);
s ~= replicate(" ", gLogIndent);

void putc(dchar c)
{
s ~= c;
}

try {
std.format.doFormat(&putc, _arguments, _argptr);
}
catch(Exception e)
{
string msg = e.toString();
s ~= " EXCEPTION";
}

log_string(s);
}

void log_string(string s)
{
s ~= "\n";
if(gLogFile.length == 0)
OutputDebugStringA(toStringz(s));
else
synchronized(logSync.classinfo)
{
if(gLogFirst)
{
gLogFirst = false;
s = "\n" ~ replicate("=", 80) ~ "\n" ~ s;
}
std.file.append(gLogFile, s);
}
}
}
else
{
import core.vararg;

struct LogIndent
{
this(int n)
{
}
}
void logInfo(...)
{
}
void log_string(string s)
{
}
}
1,038 changes: 519 additions & 519 deletions benchmark/gcbench/vdparser.extra/vdc/parser/aggr.d

Large diffs are not rendered by default.

3,234 changes: 1,617 additions & 1,617 deletions benchmark/gcbench/vdparser.extra/vdc/parser/decl.d

Large diffs are not rendered by default.

2,601 changes: 1,300 additions & 1,301 deletions benchmark/gcbench/vdparser.extra/vdc/parser/engine.d

Large diffs are not rendered by default.

3,194 changes: 1,597 additions & 1,597 deletions benchmark/gcbench/vdparser.extra/vdc/parser/expr.d

Large diffs are not rendered by default.

408 changes: 204 additions & 204 deletions benchmark/gcbench/vdparser.extra/vdc/parser/iasm.d

Large diffs are not rendered by default.

1,634 changes: 817 additions & 817 deletions benchmark/gcbench/vdparser.extra/vdc/parser/misc.d

Large diffs are not rendered by default.

1,941 changes: 970 additions & 971 deletions benchmark/gcbench/vdparser.extra/vdc/parser/mod.d

Large diffs are not rendered by default.

2,416 changes: 1,208 additions & 1,208 deletions benchmark/gcbench/vdparser.extra/vdc/parser/stmt.d

Large diffs are not rendered by default.

1,016 changes: 508 additions & 508 deletions benchmark/gcbench/vdparser.extra/vdc/parser/tmpl.d

Large diffs are not rendered by default.

2,059 changes: 1,029 additions & 1,030 deletions benchmark/gcbench/vdparser.extra/vdc/semantic.d

Large diffs are not rendered by default.

801 changes: 400 additions & 401 deletions benchmark/gcbench/vdparser.extra/vdc/util.d

Large diffs are not rendered by default.

248 changes: 124 additions & 124 deletions benchmark/gcbench/vdparser.extra/vdc/versions.d
Original file line number Diff line number Diff line change
@@ -1,124 +1,124 @@
// This file is part of Visual D
//
// Visual D integrates the D programming language into Visual Studio
// Copyright (c) 2010-2011 by Rainer Schuetze, All Rights Reserved
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt

module vdc.versions;

__gshared int[string] predefinedVersions;
alias AssociativeArray!(string, int) _wa1; // fully instantiate type info

static @property int[string] sPredefinedVersions()
{
if(!predefinedVersions)
{
// see http://dlang.org/version.html
// 1: always defined
// -1: always undefined
// 0: to be determined by compiler option
predefinedVersions =
[
"DigitalMars" : 0,
"GNU" : 0,
"LDC" : 0,
"SDC" : -1,
"D_NET" : -1,

"Windows" : 1,
"Win32" : 0,
"Win64" : 0,
"linux" : -1,
"OSX" : -1,
"FreeBSD" : -1,
"OpenBSD" : -1,
"NetBSD" : -1,
"DragonFlyBSD" : -1,
"BSD" : -1,
"Solaris" : -1,
"Posix" : -1,
"AIX" : -1,
"Haiku" : -1,
"SkyOS" : -1,
"SysV3" : -1,
"SysV4" : -1,
"Hurd" : -1,
"Android" : -1,
"Cygwin" : -1,
"MinGW" : -1,

"X86" : 0,
"X86_64" : 0,
"ARM" : -1,
"ARM_Thumb" : -1,
"ARM_SoftFloat" : -1,
"ARM_SoftFP" : -1,
"ARM_HardFloat" : -1,
"AArch64" : -1,
"Epiphany" : -1,
"PPC" : -1,
"PPC_SoftFloat" : -1,
"PPC_HardFloat" : -1,
"PPC64" : -1,
"IA64" : -1,
"MIPS32" : -1,
"MIPS64" : -1,
"MIPS_O32" : -1,
"MIPS_N32" : -1,
"MIPS_O64" : -1,
"MIPS_N64" : -1,
"MIPS_EABI" : -1,
"MIPS_SoftFloat" : -1,
"MIPS_HardFloat" : -1,
"NVPTX" : -1,
"NVPTX64" : -1,
"SPARC" : -1,
"SPARC_V8Plus" : -1,
"SPARC_SoftFloat" : -1,
"SPARC_HardFloat" : -1,
"SPARC64" : -1,
"S390" : -1,
"S390X" : -1,
"HPPA" : -1,
"HPPA64" : -1,
"SH" : -1,
"SH64" : -1,
"Alpha" : -1,
"Alpha_SoftFloat" : -1,
"Alpha_HardFloat" : -1,

"LittleEndian" : 1,
"BigEndian" : -1,
"ELFv1" : -1,
"ELFv2" : -1,

"CRuntime_DigitalMars" : 0,
"CRuntime_Microsoft" : 0,
"CRuntime_Glibc" : -1,

"D_Coverage" : 0,
"D_Ddoc" : 0,
"D_InlineAsm_X86" : 0,
"D_InlineAsm_X86_64" : 0,
"D_LP64" : 0,
"D_X32" : -1,
"D_HardFloat" : 1,
"D_SoftFloat" : -1,
"D_PIC" : -1,
"D_SIMD" : 1,
"D_Version2" : 1,
"D_NoBoundsChecks" : 0,

"unittest" : 0,
"assert" : 0,

"none" : -1,
"all" : 1,
];
}
return predefinedVersions;
}
// This file is part of Visual D
//
// Visual D integrates the D programming language into Visual Studio
// Copyright (c) 2010-2011 by Rainer Schuetze, All Rights Reserved
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt

module vdc.versions;

__gshared int[string] predefinedVersions;
alias AssociativeArray!(string, int) _wa1; // fully instantiate type info

static @property int[string] sPredefinedVersions()
{
if(!predefinedVersions)
{
// see http://dlang.org/version.html
// 1: always defined
// -1: always undefined
// 0: to be determined by compiler option
predefinedVersions =
[
"DigitalMars" : 0,
"GNU" : 0,
"LDC" : 0,
"SDC" : -1,
"D_NET" : -1,

"Windows" : 1,
"Win32" : 0,
"Win64" : 0,
"linux" : -1,
"OSX" : -1,
"FreeBSD" : -1,
"OpenBSD" : -1,
"NetBSD" : -1,
"DragonFlyBSD" : -1,
"BSD" : -1,
"Solaris" : -1,
"Posix" : -1,
"AIX" : -1,
"Haiku" : -1,
"SkyOS" : -1,
"SysV3" : -1,
"SysV4" : -1,
"Hurd" : -1,
"Android" : -1,
"Cygwin" : -1,
"MinGW" : -1,

"X86" : 0,
"X86_64" : 0,
"ARM" : -1,
"ARM_Thumb" : -1,
"ARM_SoftFloat" : -1,
"ARM_SoftFP" : -1,
"ARM_HardFloat" : -1,
"AArch64" : -1,
"Epiphany" : -1,
"PPC" : -1,
"PPC_SoftFloat" : -1,
"PPC_HardFloat" : -1,
"PPC64" : -1,
"IA64" : -1,
"MIPS32" : -1,
"MIPS64" : -1,
"MIPS_O32" : -1,
"MIPS_N32" : -1,
"MIPS_O64" : -1,
"MIPS_N64" : -1,
"MIPS_EABI" : -1,
"MIPS_SoftFloat" : -1,
"MIPS_HardFloat" : -1,
"NVPTX" : -1,
"NVPTX64" : -1,
"SPARC" : -1,
"SPARC_V8Plus" : -1,
"SPARC_SoftFloat" : -1,
"SPARC_HardFloat" : -1,
"SPARC64" : -1,
"S390" : -1,
"S390X" : -1,
"HPPA" : -1,
"HPPA64" : -1,
"SH" : -1,
"SH64" : -1,
"Alpha" : -1,
"Alpha_SoftFloat" : -1,
"Alpha_HardFloat" : -1,

"LittleEndian" : 1,
"BigEndian" : -1,

"ELFv1" : -1,
"ELFv2" : -1,

"CRuntime_DigitalMars" : 0,
"CRuntime_Microsoft" : 0,
"CRuntime_Glibc" : -1,

"D_Coverage" : 0,
"D_Ddoc" : 0,
"D_InlineAsm_X86" : 0,
"D_InlineAsm_X86_64" : 0,
"D_LP64" : 0,
"D_X32" : -1,
"D_HardFloat" : 1,
"D_SoftFloat" : -1,
"D_PIC" : -1,
"D_SIMD" : 1,

"D_Version2" : 1,
"D_NoBoundsChecks" : 0,

"unittest" : 0,
"assert" : 0,

"none" : -1,
"all" : 1,
];
}
return predefinedVersions;
}