Skip to content

Commit

Permalink
Merge pull request #132 from rainers/master
Browse files Browse the repository at this point in the history
changes for Visual D 1.1.1
  • Loading branch information
rainers committed Apr 28, 2021
2 parents 50fecbc + 3b4bc43 commit b1eb4f3
Show file tree
Hide file tree
Showing 13 changed files with 100 additions and 27 deletions.
9 changes: 9 additions & 0 deletions CHANGES
Expand Up @@ -1296,3 +1296,12 @@ Version history
- added support for -preview=in and -preview=inclusiveincontracts
- visualdproj: added macros FULLOUTDIR, FULLINTDIR, INPUTFULLPATH, INPUTFULLDIR, TARGETFULLPATH
and TARGETFULLDIR for guaranteed absolute paths

2021-04-28 version 1.1.1
* dmdserver:
- updated to frontend of DMD 2.096.1
* debugger:
- bugzilla 21734: stack overflow when displaying recursive structure with array
* installer:
- full installer now bundled with DMD 2.096.1 and LDC 1.25.1

2 changes: 1 addition & 1 deletion VERSION
@@ -1,5 +1,5 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 1
#define VERSION_REVISION 0
#define VERSION_REVISION 1
#define VERSION_BETA
#define VERSION_BUILD 0
6 changes: 6 additions & 0 deletions doc/StartPage.dd
Expand Up @@ -84,6 +84,12 @@ $(H2 News)
$(P $(LINK2 VersionHistory.html, Full version history and complete details...)
)

2021-04-28 Version 1.1.1
$(UL
$(LI semantic engine updated to frontend of DMD 2.096.1)
$(LI full installer now bundled with DMD 2.096.1 and LDC 1.25.1)
)

2021-03-02 Version 1.1.0
$(UL
$(LI semantic engine updated to frontend of DMD 2.095.1)
Expand Down
16 changes: 16 additions & 0 deletions doc/VersionHistory.dd
@@ -1,5 +1,21 @@
Ddoc

$(H2 2021-04-28 Version 1.1.1)
$(UL
$(LI dmdserver:
$(UL
$(LI updated to frontend of DMD 2.096.1)
))
$(LI debugger:
$(UL
$(LI bugzilla 21734: stack overflow when displaying recursive structure with array)
))
$(LI installer:
$(UL
$(LI full installer now bundled with DMD 2.096.1 and LDC 1.25.1)
))
)

$(H2 2021-02-02 Version 1.1.0)
$(UL
$(LI dmdserver:
Expand Down
6 changes: 3 additions & 3 deletions doc/visuald.ddoc
@@ -1,6 +1,6 @@
VERSION = 1.0.1
DMD_VERSION = 2.093.1
LDC_VERSION = 1.23.0
VERSION = 1.1.1
DMD_VERSION = 2.096.1
LDC_VERSION = 1.25.1
ROOT_DIR = https://www.dlang.org/
ROOT = https://www.dlang.org
BODYCLASS = visuald
Expand Down
4 changes: 2 additions & 2 deletions nsis/visuald.nsi
Expand Up @@ -29,12 +29,12 @@

; define DMD source path to include dmd installation
; !define DMD
!define DMD_VERSION "2.095.1"
!define DMD_VERSION "2.096.1"
!define DMD_SRC c:\d\dmd-${DMD_VERSION}

; define LDC to include ldc installation
; !define LDC
!define LDC_VERSION "1.25.0"
!define LDC_VERSION "1.25.1"
!define LDC_SRC c:\d\ldc2-${LDC_VERSION}-windows-multilib

; define VS2019 to include VS2019 support
Expand Down
3 changes: 3 additions & 0 deletions sdk/port/base.d
Expand Up @@ -172,6 +172,9 @@ interface IImageList {}
// 7.1
enum CCM_TRANSLATEACCELERATOR = (WM_USER+97);

// msdbg*.d
alias ULONG32 XINT32;

version(sdk) {}
else {

Expand Down
2 changes: 2 additions & 0 deletions sdk/vsi.visualdproj
Expand Up @@ -2188,6 +2188,7 @@
<File path="vsi\msdbg166.d" />
<File path="vsi\msdbg167.d" />
<File path="vsi\msdbg168.d" />
<File path="vsi\msdbg169.d" />
<File path="vsi\msdbg90.d" />
<File path="vsi\objext.d" />
<File path="vsi\ocdesign.d" />
Expand Down Expand Up @@ -2257,6 +2258,7 @@
<File path="vsi\vsshell165.d" />
<File path="vsi\vsshell166.d" />
<File path="vsi\vsshell167.d" />
<File path="vsi\vsshell169.d" />
<File path="vsi\vsshell2.d" />
<File path="vsi\vsshell80.d" />
<File path="vsi\vsshell90.d" />
Expand Down
2 changes: 1 addition & 1 deletion vdc/dmdserver/dmd
Submodule dmd updated 498 files
13 changes: 9 additions & 4 deletions vdc/dmdserver/dmdinit.d
Expand Up @@ -100,7 +100,12 @@ string genInitDmdStatics()

mixin(genDeclDmdStatics);

pragma(mangle, "_D3dmd12statementsem24StatementSemanticVisitor5visitMRCQCb9statement16ForeachStatementZ7fdapplyPCQDr4func15FuncDeclaration")
static if (__VERSION__ < 2096)
enum fdapply_mangling = "_D3dmd12statementsem24StatementSemanticVisitor5visitMRCQCb9statement16ForeachStatementZ7fdapplyPCQDr4func15FuncDeclaration";
else // !!! broken in 2.096.0 ("5__S1" instead of "4__S1")
enum fdapply_mangling = "_D3dmd12statementsem24StatementSemanticVisitor5visitMRCQCb9statement16ForeachStatementZ4__S17fdapplyPCQDw4func15FuncDeclaration";

pragma(mangle, fdapply_mangling)
extern __gshared FuncDeclaration* statementsem_fdapply;
pragma(mangle, "_D3dmd12statementsem24StatementSemanticVisitor5visitMRCQCb9statement16ForeachStatementZ6fldeTyPCQDq5mtype12TypeDelegate")
extern __gshared TypeDelegate* statementsem_fldeTy;
Expand Down Expand Up @@ -283,8 +288,8 @@ void dmdSetupParams(const ref Options opts)
// case "-wi":
// case "-property": global.params.checkProperty = true; break;
case "-betterC": global.params.betterC = true; break;
case "-dip25": global.params.useDIP25 = true; break;
case "-dip1000": global.params.useDIP25 = global.params.vsafe = true; break;
case "-dip25": global.params.useDIP25 = FeatureState.enabled; break;
case "-dip1000": global.params.useDIP25 = FeatureState.enabled; global.params.vsafe = true; break;
case "-dip1008": global.params.ehnogc = true; break;
case "-revert=import": global.params.vfield = true; break;
case "-transition=field": global.params.vfield = true; break;
Expand All @@ -294,7 +299,7 @@ void dmdSetupParams(const ref Options opts)
case "-preview=dip1021": global.params.useDIP1021 = true; break;
case "-preview=fieldwise": global.params.fieldwise = true; break;
case "-preview=intpromote": global.params.fix16997 = true; break;
case "-preview=dtorfields": global.params.dtorFields = true; break;
case "-preview=dtorfields": global.params.dtorFields = FeatureState.enabled; break;
case "-preview=markdown": global.params.markdown = true; break;
case "-preview=rvaluerefparam": global.params.rvalueRefParam = true; break;
case "-preview=nosharedaccess": global.params.noSharedAccess = true; break;
Expand Down
32 changes: 30 additions & 2 deletions vdc/dmdserver/dmdserver.visualdproj
Expand Up @@ -62,6 +62,8 @@
<preview_markdown>0</preview_markdown>
<preview_rvaluerefparam>0</preview_rvaluerefparam>
<preview_nosharedaccess>0</preview_nosharedaccess>
<preview_in>0</preview_in>
<preview_inclincontracts>0</preview_inclincontracts>
<transition_vmarkdown>0</transition_vmarkdown>
<compiler>0</compiler>
<otherDMD>0</otherDMD>
Expand All @@ -70,7 +72,7 @@
<addDepImp>0</addDepImp>
<program>c:\l\d\dmd2\windows\bin\dmd.exe</program>
<imppath>dmd\src ..\..</imppath>
<fileImppath>dmd dmd\res</fileImppath>
<fileImppath>dmd dmd\src\dmd\res</fileImppath>
<outdir>..\..\bin\$(ConfigurationName)</outdir>
<objdir>$(OutDir)\$(PlatformName)\$(ProjectName)</objdir>
<objname />
Expand Down Expand Up @@ -185,6 +187,8 @@
<preview_markdown>0</preview_markdown>
<preview_rvaluerefparam>0</preview_rvaluerefparam>
<preview_nosharedaccess>0</preview_nosharedaccess>
<preview_in>0</preview_in>
<preview_inclincontracts>0</preview_inclincontracts>
<transition_vmarkdown>0</transition_vmarkdown>
<compiler>0</compiler>
<otherDMD>0</otherDMD>
Expand Down Expand Up @@ -308,6 +312,8 @@
<preview_markdown>0</preview_markdown>
<preview_rvaluerefparam>0</preview_rvaluerefparam>
<preview_nosharedaccess>0</preview_nosharedaccess>
<preview_in>0</preview_in>
<preview_inclincontracts>0</preview_inclincontracts>
<transition_vmarkdown>0</transition_vmarkdown>
<compiler>0</compiler>
<otherDMD>0</otherDMD>
Expand Down Expand Up @@ -431,6 +437,8 @@
<preview_markdown>0</preview_markdown>
<preview_rvaluerefparam>0</preview_rvaluerefparam>
<preview_nosharedaccess>0</preview_nosharedaccess>
<preview_in>0</preview_in>
<preview_inclincontracts>0</preview_inclincontracts>
<transition_vmarkdown>0</transition_vmarkdown>
<compiler>0</compiler>
<otherDMD>0</otherDMD>
Expand Down Expand Up @@ -554,6 +562,8 @@
<preview_markdown>0</preview_markdown>
<preview_rvaluerefparam>0</preview_rvaluerefparam>
<preview_nosharedaccess>0</preview_nosharedaccess>
<preview_in>0</preview_in>
<preview_inclincontracts>0</preview_inclincontracts>
<transition_vmarkdown>0</transition_vmarkdown>
<compiler>0</compiler>
<otherDMD>0</otherDMD>
Expand Down Expand Up @@ -677,6 +687,8 @@
<preview_markdown>0</preview_markdown>
<preview_rvaluerefparam>0</preview_rvaluerefparam>
<preview_nosharedaccess>0</preview_nosharedaccess>
<preview_in>0</preview_in>
<preview_inclincontracts>0</preview_inclincontracts>
<transition_vmarkdown>0</transition_vmarkdown>
<compiler>0</compiler>
<otherDMD>0</otherDMD>
Expand Down Expand Up @@ -800,6 +812,8 @@
<preview_markdown>0</preview_markdown>
<preview_rvaluerefparam>0</preview_rvaluerefparam>
<preview_nosharedaccess>0</preview_nosharedaccess>
<preview_in>0</preview_in>
<preview_inclincontracts>0</preview_inclincontracts>
<transition_vmarkdown>0</transition_vmarkdown>
<compiler>0</compiler>
<otherDMD>0</otherDMD>
Expand Down Expand Up @@ -923,6 +937,8 @@
<preview_markdown>0</preview_markdown>
<preview_rvaluerefparam>0</preview_rvaluerefparam>
<preview_nosharedaccess>0</preview_nosharedaccess>
<preview_in>0</preview_in>
<preview_inclincontracts>0</preview_inclincontracts>
<transition_vmarkdown>0</transition_vmarkdown>
<compiler>2</compiler>
<otherDMD>0</otherDMD>
Expand Down Expand Up @@ -1046,6 +1062,8 @@
<preview_markdown>0</preview_markdown>
<preview_rvaluerefparam>0</preview_rvaluerefparam>
<preview_nosharedaccess>0</preview_nosharedaccess>
<preview_in>0</preview_in>
<preview_inclincontracts>0</preview_inclincontracts>
<transition_vmarkdown>0</transition_vmarkdown>
<compiler>0</compiler>
<otherDMD>0</otherDMD>
Expand Down Expand Up @@ -1169,6 +1187,8 @@
<preview_markdown>0</preview_markdown>
<preview_rvaluerefparam>0</preview_rvaluerefparam>
<preview_nosharedaccess>0</preview_nosharedaccess>
<preview_in>0</preview_in>
<preview_inclincontracts>0</preview_inclincontracts>
<transition_vmarkdown>0</transition_vmarkdown>
<compiler>0</compiler>
<otherDMD>0</otherDMD>
Expand Down Expand Up @@ -1292,6 +1312,8 @@
<preview_markdown>0</preview_markdown>
<preview_rvaluerefparam>0</preview_rvaluerefparam>
<preview_nosharedaccess>0</preview_nosharedaccess>
<preview_in>0</preview_in>
<preview_inclincontracts>0</preview_inclincontracts>
<transition_vmarkdown>0</transition_vmarkdown>
<compiler>0</compiler>
<otherDMD>0</otherDMD>
Expand All @@ -1300,7 +1322,7 @@
<addDepImp>0</addDepImp>
<program>c:\l\d\dmd2\windows\bin\dmd.exe</program>
<imppath>dmd\src ..\.. $(DMDInstallDir)\src\druntime\src</imppath>
<fileImppath>dmd dmd\res</fileImppath>
<fileImppath>dmd dmd\src\dmd\res</fileImppath>
<outdir>..\..\bin\$(ConfigurationName)</outdir>
<objdir>$(OutDir)\$(PlatformName)\$(ProjectName)</objdir>
<objname />
Expand Down Expand Up @@ -1415,6 +1437,8 @@
<preview_markdown>0</preview_markdown>
<preview_rvaluerefparam>0</preview_rvaluerefparam>
<preview_nosharedaccess>0</preview_nosharedaccess>
<preview_in>0</preview_in>
<preview_inclincontracts>0</preview_inclincontracts>
<transition_vmarkdown>0</transition_vmarkdown>
<compiler>0</compiler>
<otherDMD>0</otherDMD>
Expand Down Expand Up @@ -1538,6 +1562,8 @@
<preview_markdown>0</preview_markdown>
<preview_rvaluerefparam>0</preview_rvaluerefparam>
<preview_nosharedaccess>0</preview_nosharedaccess>
<preview_in>0</preview_in>
<preview_inclincontracts>0</preview_inclincontracts>
<transition_vmarkdown>0</transition_vmarkdown>
<compiler>0</compiler>
<otherDMD>0</otherDMD>
Expand Down Expand Up @@ -1661,6 +1687,8 @@
<preview_markdown>0</preview_markdown>
<preview_rvaluerefparam>0</preview_rvaluerefparam>
<preview_nosharedaccess>0</preview_nosharedaccess>
<preview_in>0</preview_in>
<preview_inclincontracts>0</preview_inclincontracts>
<transition_vmarkdown>0</transition_vmarkdown>
<compiler>2</compiler>
<otherDMD>0</otherDMD>
Expand Down
8 changes: 6 additions & 2 deletions vdc/dmdserver/semanalysis.d
Expand Up @@ -24,6 +24,7 @@ import dmd.semantic2;
import dmd.semantic3;

import std.algorithm;
import std.conv;

// debug version = traceGC;

Expand Down Expand Up @@ -72,7 +73,7 @@ class AnalysisContext
return -1;
}

Module loadModuleHandler(const ref Loc location, IdentifiersAtLoc* packages, Identifier ident)
Module loadModuleHandler(const ref Loc location, IdentifierAtLoc[] packages, Identifier ident)
{
// only called if module not found in Module.amodules
L_nextMod:
Expand All @@ -89,7 +90,7 @@ class AnalysisContext
if (md.packages.length != packages.length)
continue L_nextMod;
for (size_t p = 0; p < packages.length; p++)
if (cast(Identifier)md.packages.opIndex(p) != md.packages.opIndex(p))
if (cast(Identifier)md.packages[p] != md.packages[p])
continue L_nextMod;
}
return mi.createSemanticModule(false);
Expand Down Expand Up @@ -226,6 +227,9 @@ string[] guessImportPaths()
{
import std.file;

string path = r"c:\D\dmd-" ~ to!string(__VERSION__ * 0.001) ~ ".0";
if (std.file.exists(path ~ r"\src\druntime\import\object.d"))
return [ path ~ r"\src\druntime\import", path ~ r"\src\phobos" ];
if (std.file.exists(r"c:\s\d\dlang\druntime\import\object.d"))
return [ r"c:\s\d\dlang\druntime\import", r"c:\s\d\dlang\phobos" ];
if (std.file.exists(r"c:\s\d\rainers\druntime\import\object.d"))
Expand Down
24 changes: 12 additions & 12 deletions vdc/dmdserver/semvisitor.d
Expand Up @@ -699,16 +699,16 @@ extern(C++) class FindASTVisitor : ASTVisitor
return false;
}

bool visitPackages(Module mod, IdentifiersAtLoc* packages)
extern(D) bool visitPackages(Module mod, IdentifierAtLoc[] packages)
{
if (!mod || !packages)
return false;

Package pkg = mod.parent ? mod.parent.isPackage() : null;
for (size_t p; pkg && p < packages.dim; p++)
for (size_t p; pkg && p < packages.length; p++)
{
size_t q = packages.dim - 1 - p;
if (!found && matchIdentifier((*packages)[q].loc, (*packages)[q].ident))
size_t q = packages.length - 1 - p;
if (!found && matchIdentifier(packages[q].loc, packages[q].ident))
{
foundNode(pkg);
return true;
Expand Down Expand Up @@ -1642,11 +1642,11 @@ FindIdentifierTypesResult findIdentifierTypes(Module mod)
}
}

void addPackages(IdentifiersAtLoc* packages)
extern(D) void addPackages(IdentifierAtLoc[] packages)
{
if (packages)
for (size_t p; p < packages.dim; p++)
addIdent((*packages)[p].loc, (*packages)[p].ident, TypeReferenceKind.Package);
for (size_t p; p < packages.length; p++)
addIdent(packages[p].loc, packages[p].ident, TypeReferenceKind.Package);
}

void addDeclaration(ref const Loc loc, Declaration decl)
Expand Down Expand Up @@ -2054,17 +2054,17 @@ Reference[] findReferencesInModule(Module mod, int line, int index)
addReference(loc, se.sds.ident);
}

void addPackages(Module mod, IdentifiersAtLoc* packages)
extern(D) void addPackages(Module mod, IdentifierAtLoc[] packages)
{
if (!mod || !packages)
return;

Package pkg = mod.parent ? mod.parent.isPackage() : null;
for (size_t p; pkg && p < packages.dim; p++)
for (size_t p; pkg && p < packages.length; p++)
{
size_t q = packages.dim - 1 - p;
size_t q = packages.length - 1 - p;
if (pkg is search)
addReference((*packages)[q].loc, (*packages)[q].ident);
addReference(packages[q].loc, packages[q].ident);
if (auto parent = pkg.parent)
pkg = parent.isPackage();
}
Expand Down Expand Up @@ -2610,7 +2610,7 @@ string[] findExpansions(Module mod, int line, int index, string tok)
size_t cnt = sd.importedScopes ? sd.importedScopes.dim : 0;
for (size_t i = 0; i < cnt; i++)
{
if ((flags & IgnorePrivateImports) && sd.prots[i] == Prot.Kind.private_)
if ((flags & IgnorePrivateImports) && sd.visibilities[i] == Visibility.Kind.private_)
continue;
auto ss = (*sd.importedScopes)[i].isScopeDsymbol();
if (!ss)
Expand Down

0 comments on commit b1eb4f3

Please sign in to comment.