diff --git a/CHANGES b/CHANGES
index 7e9060cb..ee253dcc 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1500,3 +1500,15 @@ Version history
- add "Step Over Foreach" command
* dbuild: generic support for VS 2026 18.1-18.15
* added command "Step Over Foreach"
+
+2026-08-28 version 1.5.0-rc3
+ * dmdserver:
+ - improve intellisense in __traits
+ - define version VisualDServer to allow ensuring template instances
+ - removed more stale pointers reducing memory requirements
+ * fix reading ldc2.conf for LDC 1.42+ from subdirectories
+
+2026-08-29 version 1.5.0
+ * full installer now bundled with DMD 2.113.o and LDC 1.43.0
+ * dmdserver:
+ - updated to dmd 2.114-beta1
diff --git a/VERSION b/VERSION
index c5680d67..b3ede3ad 100644
--- a/VERSION
+++ b/VERSION
@@ -1,5 +1,5 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 5
#define VERSION_REVISION 0
-#define VERSION_BETA -rc
-#define VERSION_BUILD 2
+#define VERSION_BETA
+#define VERSION_BUILD 0
diff --git a/nsis/visuald.nsi b/nsis/visuald.nsi
index 908b16f1..13013bc9 100644
--- a/nsis/visuald.nsi
+++ b/nsis/visuald.nsi
@@ -29,13 +29,18 @@
; define DMD source path to include dmd installation
; !define DMD
-!define DMD_VERSION "2.112.0"
+!define DMD_VERSION "2.113.0"
!define DMD_SRC c:\d\dmd-${DMD_VERSION}
+!define DMD_ZIP dmd.${DMD_VERSION}.windows.7z
; define LDC to include ldc installation
; !define LDC
-!define LDC_VERSION "1.42.0"
-!define LDC_SRC c:\d\ldc2-${LDC_VERSION}-windows-multilib
+!define LDC_VERSION "1.43.0"
+!define LDC_BASE ldc2-${LDC_VERSION}-windows-multilib
+!define LDC_SRC c:\d\${LDC_BASE}
+!define LDC_ZIP ${LDC_BASE}.7z
+
+!define DOWNLOADS c:\d\Downloads
; define VS2019 to include VS2019 support
; !define VS2019
@@ -128,8 +133,12 @@
!endif
OutFile "..\..\downloads\${APPNAME}-v${VERSION}${OUT_SUFFIX}.exe"
- SetCompressor /solid lzma
+ SetDatablockOptimize off
!ifdef DMD
+ SetCompressor /solid lzma
+ SetCompressorDictSize 112
+!else
+ SetCompressor /solid lzma
SetCompressorDictSize 112
!endif
@@ -315,6 +324,7 @@ Section "Visual Studio package" SecPackage
${File} "..\..\binaries\" dmdserver-2.110.exe
${File} "..\..\binaries\" dmdserver-2.111.exe
${File} "..\..\binaries\" dmdserver-2.112.exe
+ ${File} "..\..\binaries\" dmdserver-2.113.exe
!endif
!ifdef DPARSER
@@ -434,6 +444,22 @@ ${MementoSection} "Install DMD" SecDMD
; not using ${File} to keep compiler even if Visual D uninstalled
!define DmdBaseDir "$CompilerInstallDir\dmd-${DMD_VERSION}"
+!ifdef DMD_ZIP
+ ; the 7z contains the dmd2 sub directory
+ ${SetOutPath} "$CompilerInstallDir\Downloads"
+ File ${DOWNLOADS}\${DMD_ZIP}
+ ${SetOutPath} "${DmdBaseDir}.tmp"
+ nsExec::ExecToLog '"$INSTDIR\7z\7za.exe" x "$CompilerInstallDir\Downloads\${DMD_ZIP}" -y -o"${DmdBaseDir}.tmp"'
+ Pop $0
+
+ ${If} $0 != 0
+ MessageBox MB_ICONSTOP 'Failed to extract DMD.$\r$\n"$INSTDIR\7z\7za.exe" x "$CompilerInstallDir\Downloads ${DMD_ZIP}" -y -o"${DmdBaseDir}.tmp"$\r$\nError code: $0'
+ Abort
+ ${EndIf}
+ ${SetOutPath} "$CompilerInstallDir"
+ Rename "${DmdBaseDir}.tmp\dmd2" "${DmdBaseDir}"
+ RMDir "${DmdBaseDir}.tmp"
+!else
${SetOutPath} "${DmdBaseDir}"
File /r ${DMD_SRC}\html
;File /r ${DMD_SRC}\samples
@@ -441,6 +467,7 @@ ${MementoSection} "Install DMD" SecDMD
File /r ${DMD_SRC}\windows
File ${DMD_SRC}\license.txt
File ${DMD_SRC}\readme.txt
+!endif
WriteRegStr HKLM "Software\${APPNAME}" "DMDInstallDir" ${DmdBaseDir}
@@ -453,7 +480,20 @@ ${MementoSection} "Install LDC" SecLDC
; not using ${File} to keep compiler even if Visual D uninstalled
- !define LdcBaseDir "$CompilerInstallDir\ldc2-${LDC_VERSION}-windows-multilib"
+ !define LdcBaseDir "$CompilerInstallDir\${LDC_BASE}"
+!ifdef LDC_ZIP
+ ; the 7z contains the ${LDC_BASE} sub directory
+ ${SetOutPath} "$CompilerInstallDir\Downloads"
+ File ${DOWNLOADS}\${LDC_ZIP}
+ ${SetOutPath} "${LdcBaseDir}"
+ nsExec::ExecToLog '"$INSTDIR\7z\7za.exe" x "$CompilerInstallDir\Downloads\${LDC_ZIP}" -y -o"$CompilerInstallDir"'
+ Pop $0
+
+ ${If} $0 != 0
+ MessageBox MB_ICONSTOP 'Failed to extract LDC.$\r$\n"$INSTDIR\7z\7za.exe" x "$CompilerInstallDir\Downloads\${LDC_ZIP}" -y -o"$CompilerInstallDir"$\r$\nError code: $0'
+ Abort
+ ${EndIf}
+!else
${SetOutPath} "${LdcBaseDir}"
File /r ${LDC_SRC}\bin
File /r ${LDC_SRC}\etc
@@ -461,7 +501,8 @@ ${MementoSection} "Install LDC" SecLDC
File /r ${LDC_SRC}\lib32
File /r ${LDC_SRC}\lib64
File ${LDC_SRC}\*.*
- WriteRegStr HKLM "Software\${APPNAME}" "LDCInstallDir" ${LdcBaseDir}
+!endif
+ WriteRegStr HKLM "Software\${APPNAME}" "LDCInstallDir" "${LdcBaseDir}"
${MementoSectionEnd}
!endif
@@ -470,7 +511,7 @@ ${MementoSectionEnd}
;--------------------------------
${MementoSection} "Install in VS.NET" SecVS_NET
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS_NET_REGISTRY_KEY}'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS_NET_REGISTRY_KEY}'
;WriteRegStr ${VS_REGISTRY_ROOT} "${VS_NET_REGISTRY_KEY}${VDSETTINGS_KEY}" "DMDInstallDir" $DMDInstallDir
${RegisterWin32Exception} ${VS_NET_REGISTRY_KEY} "Win32 Exceptions\D Exception"
@@ -480,7 +521,7 @@ ${MementoSectionEnd}
;--------------------------------
${MementoSection} "Install in VS 2005" SecVS2005
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2005_REGISTRY_KEY}'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2005_REGISTRY_KEY}'
;WriteRegStr ${VS_REGISTRY_ROOT} "${VS2005_REGISTRY_KEY}${VDSETTINGS_KEY}" "DMDInstallDir" $DMDInstallDir
${RegisterWin32Exception} ${VS2005_REGISTRY_KEY} "Win32 Exceptions\D Exception"
@@ -489,7 +530,7 @@ ${MementoSectionEnd}
;--------------------------------
${MementoSection} "Install in VS 2008" SecVS2008
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2008_REGISTRY_KEY}'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2008_REGISTRY_KEY}'
;WriteRegStr ${VS_REGISTRY_ROOT} "${VS2008_REGISTRY_KEY}${VDSETTINGS_KEY}" "DMDInstallDir" $DMDInstallDir
${RegisterWin32Exception} ${VS2008_REGISTRY_KEY} "Win32 Exceptions\D Exception"
@@ -498,13 +539,13 @@ ${MementoSectionEnd}
;--------------------------------
${MementoSection} "Install in VS 2010" SecVS2010
- ;ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2010_REGISTRY_KEY}'
+ ;ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2010_REGISTRY_KEY}'
;WriteRegStr ${VS_REGISTRY_ROOT} "${VS2010_REGISTRY_KEY}${VDSETTINGS_KEY}" "DMDInstallDir" $DMDInstallDir
${RegisterWin32Exception} ${VS2010_REGISTRY_KEY} "Win32 Exceptions\D Exception"
ReadRegStr $1 ${VS_REGISTRY_ROOT} "${VS2010_REGISTRY_KEY}" InstallDir
RMDir /r '$1${EXTENSION_DIR_APP}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2010_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2010_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
${AddItem} "$1${EXTENSION_DIR}\visuald.pkgdef"
${SetOutPath} "$1${EXTENSION_DIR}"
@@ -525,13 +566,13 @@ ${MementoSectionEnd}
;--------------------------------
${MementoSection} "Install in VS 2012" SecVS2012
- ;ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2012_REGISTRY_KEY}'
+ ;ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2012_REGISTRY_KEY}'
;WriteRegStr ${VS_REGISTRY_ROOT} "${VS2012_REGISTRY_KEY}${VDSETTINGS_KEY}" "DMDInstallDir" $DMDInstallDir
${RegisterWin32Exception} ${VS2012_REGISTRY_KEY} "Win32 Exceptions\D Exception"
ReadRegStr $1 ${VS_REGISTRY_ROOT} "${VS2012_REGISTRY_KEY}" InstallDir
RMDir /r '$1${EXTENSION_DIR_APP}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2012_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2012_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
${AddItem} "$1${EXTENSION_DIR}\visuald.pkgdef"
${SetOutPath} "$1${EXTENSION_DIR}"
@@ -558,13 +599,13 @@ ${MementoSectionEnd}
;--------------------------------
${MementoSection} "Install in VS 2013" SecVS2013
- ;ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2013_REGISTRY_KEY}'
+ ;ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2013_REGISTRY_KEY}'
;WriteRegStr ${VS_REGISTRY_ROOT} "${VS2013_REGISTRY_KEY}${VDSETTINGS_KEY}" "DMDInstallDir" $DMDInstallDir
${RegisterWin32Exception} ${VS2013_REGISTRY_KEY} "Win32 Exceptions\D Exception"
ReadRegStr $1 ${VS_REGISTRY_ROOT} "${VS2013_REGISTRY_KEY}" InstallDir
RMDir /r '$1${EXTENSION_DIR_APP}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2013_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2013_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
${AddItem} "$1${EXTENSION_DIR}\visuald.pkgdef"
${SetOutPath} "$1${EXTENSION_DIR}"
@@ -599,13 +640,13 @@ ${MementoSectionEnd}
;--------------------------------
${MementoSection} "Install in VS 2015" SecVS2015
- ;ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2015_REGISTRY_KEY}'
+ ;ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2015_REGISTRY_KEY}'
;WriteRegStr ${VS_REGISTRY_ROOT} "${VS2015_REGISTRY_KEY}${VDSETTINGS_KEY}" "DMDInstallDir" $DMDInstallDir
${RegisterWin32Exception} ${VS2015_REGISTRY_KEY} "Win32 Exceptions\D Exception"
ReadRegStr $1 ${VS_REGISTRY_ROOT} "${VS2015_REGISTRY_KEY}" InstallDir
RMDir /r '$1${EXTENSION_DIR_APP}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2015_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2015_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
${AddItem} "$1${EXTENSION_DIR}\visuald.pkgdef"
${SetOutPath} "$1${EXTENSION_DIR}"
@@ -640,14 +681,14 @@ ${MementoSectionEnd}
;--------------------------------
${MementoSection} "Install in VS 2017" SecVS2017
- ;ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2017_REGISTRY_KEY}'
+ ;ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2017_REGISTRY_KEY}'
;WriteRegStr ${VS_REGISTRY_ROOT} "${VS2017_REGISTRY_KEY}${VDSETTINGS_KEY}" "DMDInstallDir" $DMDInstallDir
;${RegisterWin32Exception} ${VS2017_REGISTRY_KEY} "Win32 Exceptions\D Exception"
ReadRegStr $1 ${VS_REGISTRY_ROOT} "${VS2017_INSTALL_KEY}" "15.0"
StrCpy $1 "$1Common7\IDE\"
RMDir /r '$1${EXTENSION_DIR_APP}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2017_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2017_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
${AddItem} "$1${EXTENSION_DIR}\visuald.pkgdef"
${SetOutPath} "$1${EXTENSION_DIR}"
@@ -686,7 +727,7 @@ ${MementoSectionEnd}
;--------------------------------
${MementoSection} "Install in VS 2019" SecVS2019
- ;ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2019_REGISTRY_KEY}'
+ ;ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2019_REGISTRY_KEY}'
;WriteRegStr ${VS_REGISTRY_ROOT} "${VS2019_REGISTRY_KEY}${VDSETTINGS_KEY}" "DMDInstallDir" $DMDInstallDir
;${RegisterWin32Exception} ${VS2019_REGISTRY_KEY} "Win32 Exceptions\D Exception"
@@ -695,7 +736,7 @@ ${MementoSection} "Install in VS 2019" SecVS2019
StrCpy $1 "$1Common7\IDE\"
RMDir /r '$1${EXTENSION_DIR_APP}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2019_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2019_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
${AddItem} "$1${EXTENSION_DIR}\visuald.pkgdef"
${SetOutPath} "$1${EXTENSION_DIR}"
@@ -790,7 +831,7 @@ ${MementoSectionEnd}
;--------------------------------
${MementoUnselectedSection} "Install in VC-Express 2008" SecVCExpress2008
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VCEXP2008_REGISTRY_KEY}'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VCEXP2008_REGISTRY_KEY}'
;WriteRegStr ${VS_REGISTRY_ROOT} "${VCEXP2008_REGISTRY_KEY}${VDSETTINGS_KEY}" "DMDInstallDir" $DMDInstallDir
${MementoSectionEnd}
@@ -798,7 +839,7 @@ ${MementoSectionEnd}
;--------------------------------
${MementoUnselectedSection} "Install in VC-Express 2010" SecVCExpress2010
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VCEXP2010_REGISTRY_KEY}'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VCEXP2010_REGISTRY_KEY}'
;WriteRegStr ${VS_REGISTRY_ROOT} "${VCEXP2010_REGISTRY_KEY}${VDSETTINGS_KEY}" "DMDInstallDir" $DMDInstallDir
${MementoSectionEnd}
@@ -861,7 +902,7 @@ ${MementoSection} "MSBuild integration" SecMSBuild
!define V180_GENERAL_XML "$1\MsBuild\Microsoft\VC\v180\1033\general.xml"
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V180_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.18.0.xml'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V180_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.18.0.xml'
${AddItem} "$INSTDIR\msbuild\general_d.18.0.xml"
NoVS2026:
!endif
@@ -881,7 +922,7 @@ ${MementoSection} "MSBuild integration" SecMSBuild
!define V170_GENERAL_XML "$1\MsBuild\Microsoft\VC\v170\1033\general.xml"
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V170_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.17.0.xml'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V170_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.17.0.xml'
${AddItem} "$INSTDIR\msbuild\general_d.17.0.xml"
NoVS2022:
@@ -899,7 +940,7 @@ ${MementoSection} "MSBuild integration" SecMSBuild
!define V170_GENERAL_XML_2 "$1\MsBuild\Microsoft\VC\v170\1033\general.xml"
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V170_GENERAL_XML_2};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general2_d.17.0.xml'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V170_GENERAL_XML_2};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general2_d.17.0.xml'
${AddItem} "$INSTDIR\msbuild\general2_d.17.0.xml"
NoVS2022_2:
@@ -917,7 +958,7 @@ ${MementoSection} "MSBuild integration" SecMSBuild
!define V170_GENERAL_XML_3 "$1\MsBuild\Microsoft\VC\v170\1033\general.xml"
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V170_GENERAL_XML_3};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general3_d.17.0.xml'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V170_GENERAL_XML_3};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general3_d.17.0.xml'
${AddItem} "$INSTDIR\msbuild\general3_d.17.0.xml"
NoVS2022_3:
@@ -935,7 +976,7 @@ ${MementoSection} "MSBuild integration" SecMSBuild
!define V170_GENERAL_XML_4 "$1\MsBuild\Microsoft\VC\v170\1033\general.xml"
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V170_GENERAL_XML_4};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general4_d.17.0.xml'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V170_GENERAL_XML_4};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general4_d.17.0.xml'
${AddItem} "$INSTDIR\msbuild\general4_d.17.0.xml"
NoVS2022_4:
@@ -952,7 +993,7 @@ ${MementoSection} "MSBuild integration" SecMSBuild
!define V170BT_GENERAL_XML "$1\Common7\IDE\VC\VCTargets\1033\general.xml"
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V170BT_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.17bt.0.xml'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V170BT_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.17bt.0.xml'
${AddItem} "$INSTDIR\msbuild\general_d.17bt.0.xml"
NoVS2022BT:
@@ -972,7 +1013,7 @@ ${MementoSection} "MSBuild integration" SecMSBuild
!define V160_GENERAL_XML "$1\MsBuild\Microsoft\VC\v160\1033\general.xml"
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V160_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.16.0.xml'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V160_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.16.0.xml'
${AddItem} "$INSTDIR\msbuild\general_d.16.0.xml"
NoVS2019:
@@ -989,7 +1030,7 @@ ${MementoSection} "MSBuild integration" SecMSBuild
!define V160BT_GENERAL_XML "$1\Common7\IDE\VC\VCTargets\1033\general.xml"
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V160BT_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.16bt.0.xml'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V160BT_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.16bt.0.xml'
${AddItem} "$INSTDIR\msbuild\general_d.16bt.0.xml"
NoVS2019BT:
@@ -1008,7 +1049,7 @@ ${MementoSection} "MSBuild integration" SecMSBuild
!define V150BT_GENERAL_XML "$1\Common7\IDE\VC\VCTargets\1033\general.xml"
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V150BT_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.15bt.0.xml'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V150BT_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.15bt.0.xml'
${AddItem} "$INSTDIR\msbuild\general_d.15bt.0.xml"
NoVS2017BT:
@@ -1025,7 +1066,7 @@ ${MementoSection} "MSBuild integration" SecMSBuild
!define V150_GENERAL_XML "$1\Common7\IDE\VC\VCTargets\1033\general.xml"
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V150_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.15.0.xml'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V150_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.15.0.xml'
${AddItem} "$INSTDIR\msbuild\general_d.15.0.xml"
NoVS2017:
@@ -1042,7 +1083,7 @@ ${MementoSection} "MSBuild integration" SecMSBuild
!define V140_GENERAL_XML "$1\Microsoft.Cpp\v4.0\V140\1033\general.xml"
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V140_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.14.0.xml'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V140_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.14.0.xml'
${AddItem} "$INSTDIR\msbuild\general_d.14.0.xml"
NoMSBuild14:
@@ -1059,7 +1100,7 @@ ${MementoSection} "MSBuild integration" SecMSBuild
!define V120_GENERAL_XML "$1\Microsoft.Cpp\v4.0\V120\1033\general.xml"
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V120_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.12.0.xml'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" GenerateGeneralXML ${V120_GENERAL_XML};$INSTDIR\msbuild\general_d.snippet;$INSTDIR\msbuild\general_d.12.0.xml'
${AddItem} "$INSTDIR\msbuild\general_d.12.0.xml"
NoMSBuild12:
@@ -1151,7 +1192,7 @@ ${MementoSection} "mago" SecMago
${File} ${MAGO_SOURCE}\bin\x64\Release\ MagoNatDE.dll
${File} "$%VSINSTALLDIR%\DIA SDK\bin\amd64\" msdia140.dll
- ExecWait 'regsvr32 /s "$INSTDIR\Mago\MagoNatDE.dll"'
+ ExecWait '$SYSDIR\regsvr32 /s "$INSTDIR\Mago\MagoNatDE.dll"'
${If} ${RunningX64}
${DisableX64FSRedirection}
ExecWait '"$SYSDIR\regsvr32.exe" /s "$INSTDIR\Mago\x64\MagoNatDE.dll"'
@@ -1262,7 +1303,7 @@ SectionEnd
!endif
!ifdef CV2PDB
LangString DESC_SecCv2pdb ${LANG_ENGLISH} "cv2pdb is necessary to debug Win32 executables in Visual Studio."
- LangString DESC_SecCv2pdb2 ${LANG_ENGLISH} "$\r$\nYou might not want to install it, if you have already installed it elsewhere."
+ LangString DESC_SecCv2pdb2 ${LANG_ENGLISH} "$\r$\nOnly necessary for legacy versions of DMD."
!endif
!ifdef MAGO
LangString DESC_SecMago ${LANG_ENGLISH} "Mago is a debug engine especially designed for the D-Language."
@@ -1270,7 +1311,7 @@ SectionEnd
LangString DESC_SecMagoVSCode ${LANG_ENGLISH} "Intergrate Mago with the VSCode Microsoft cpptool debug engine."
!endif
!ifdef MSBUILD
- LangString DESC_SecMSBuild ${LANG_ENGLISH} "MSBuild integration into VC++ projects in VS 2013/15/17/19/22"
+ LangString DESC_SecMSBuild ${LANG_ENGLISH} "MSBuild integration into VC++ projects in VS 2013-2026"
!endif
;Assign language strings to sections
@@ -1324,18 +1365,18 @@ SectionEnd
Section "Uninstall"
!ifdef VS_NET
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS_NET_REGISTRY_KEY}'
-!endif
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2005_REGISTRY_KEY}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2008_REGISTRY_KEY}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2010_REGISTRY_KEY}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2012_REGISTRY_KEY}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2013_REGISTRY_KEY}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2015_REGISTRY_KEY}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2017_REGISTRY_KEY}'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS_NET_REGISTRY_KEY}'
+!endif
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2005_REGISTRY_KEY}'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2008_REGISTRY_KEY}'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2010_REGISTRY_KEY}'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2012_REGISTRY_KEY}'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2013_REGISTRY_KEY}'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2015_REGISTRY_KEY}'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2017_REGISTRY_KEY}'
!ifdef EXPRESS
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VCEXP2008_REGISTRY_KEY}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VCEXP2010_REGISTRY_KEY}'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VCEXP2008_REGISTRY_KEY}'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VCEXP2010_REGISTRY_KEY}'
!endif
!ifdef VS2026
@@ -1471,7 +1512,7 @@ Section "Uninstall"
; DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2019_REGISTRY_KEY}\${WIN32_EXCEPTION_KEY}\Win32 Exceptions\D Exception"
!ifdef MAGO
- ExecWait 'regsvr32 /u /s "$INSTDIR\Mago\MagoNatDE.dll"'
+ ExecWait '$SYSDIR\regsvr32 /u /s "$INSTDIR\Mago\MagoNatDE.dll"'
!ifdef VS_NET
Push ${VS_NET_REGISTRY_KEY}
@@ -1919,7 +1960,7 @@ enabled:
!insertmacro InsertToFile "$1${AutoExpPath}" "[Visualizer]" "$INSTDIR\cv2pdb\autoexp.visualizer" NoBackup
SkipVisualizer:
- ;;; ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" VerifyMSObj $1'
+ ;;; ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" VerifyMSObj $1'
NoInstall:
@@ -2339,7 +2380,7 @@ Function InstallForVS2022
Exch $1 ; argument Index
- ;ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2022_REGISTRY_KEY}'
+ ;ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2022_REGISTRY_KEY}'
;WriteRegStr ${VS_REGISTRY_ROOT} "${VS2022_REGISTRY_KEY}${VDSETTINGS_KEY}" "DMDInstallDir" $DMDInstallDir
;${RegisterWin32Exception} ${VS2022_REGISTRY_KEY} "Win32 Exceptions\D Exception"
@@ -2349,7 +2390,7 @@ Function InstallForVS2022
StrCpy $1 "$1Common7\IDE\"
RMDir /r '$1${EXTENSION_DIR_APP}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2022_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2022_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
${AddItem} "$1${EXTENSION_DIR}\visuald.pkgdef"
${SetOutPath} "$1${EXTENSION_DIR}"
@@ -2424,7 +2465,7 @@ Function InstallForVS2026
StrCpy $1 "$1Common7\IDE\"
RMDir /r '$1${EXTENSION_DIR_APP}'
- ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2026_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
+ ExecWait '$SYSDIR\rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2026_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
${AddItem} "$1${EXTENSION_DIR}\visuald.pkgdef"
${SetOutPath} "$1${EXTENSION_DIR}"
diff --git a/stdext/libconfig.d b/stdext/libconfig.d
index 85211e6e..b2f6b1ef 100644
--- a/stdext/libconfig.d
+++ b/stdext/libconfig.d
@@ -51,7 +51,7 @@ class Setting
group,
}
- this(string name, Type type)
+ this(string name, Type type) pure
{
_name = name;
_type = type;
@@ -91,10 +91,11 @@ class ScalarSetting : Setting
class ArraySetting : Setting
{
- this(string name, string[] vals)
+ this(string name, string[] vals, bool isAppending)
{
super(name, Type.array);
_vals = vals;
+ _isAppending = isAppending;
}
@property const(string)[] vals() const
@@ -102,7 +103,13 @@ class ArraySetting : Setting
return _vals;
}
+ @property bool isAppending() const
+ {
+ return _isAppending;
+ }
+
private string[] _vals;
+ private bool _isAppending;
}
class GroupSetting : Setting
@@ -175,7 +182,7 @@ EBNF grammar.
It is a subset of the libconfig grammar (http://www.hyperrealm.com/libconfig).
config = { ows , setting } , ows ;
-setting = (name | string) , (":" | "=") , value , [";" | ","] ;
+setting = (name | string) , (":" | "=" | "~=") , value , [";" | ","] ;
name = alpha , { alpha | digit | "_" | "-" } ;
value = string | array | group ;
array = "[" , ows ,
@@ -214,6 +221,7 @@ enum Token
{
name,
assign, // ':' or '='
+ appendAssign, // '~='
str,
lbrace, // '{'
rbrace, // '}'
@@ -229,17 +237,18 @@ string humanReadableToken(in Token tok)
{
final switch(tok)
{
- case Token.name: return `"name"`;
- case Token.assign: return `':' or '='`;
- case Token.str: return `"string"`;
- case Token.lbrace: return `'{'`;
- case Token.rbrace: return `'}'`;
- case Token.lbracket: return `'['`;
- case Token.rbracket: return `']'`;
- case Token.semicolon: return `';'`;
- case Token.comma: return `','`;
- case Token.unknown: return `"unknown token"`;
- case Token.eof: return `"end of file"`;
+ case Token.name: return `"name"`;
+ case Token.assign: return `':' or '='`;
+ case Token.appendAssign: return `'~='`;
+ case Token.str: return `"string"`;
+ case Token.lbrace: return `'{'`;
+ case Token.rbrace: return `'}'`;
+ case Token.lbracket: return `'['`;
+ case Token.rbracket: return `']'`;
+ case Token.semicolon: return `';'`;
+ case Token.comma: return `','`;
+ case Token.unknown: return `"unknown token"`;
+ case Token.eof: return `"end of file"`;
}
}
@@ -268,11 +277,14 @@ struct Parser
void error(in string msg)
{
- enum fmt = "Error while reading config file: %.*s\nline %d: %.*s";
- char[1024] buf;
- auto len = snprintf(buf.ptr, cast(int)buf.length, fmt, cast(int)filename.length,
- filename.ptr, lineNum, cast(int)msg.length, msg.ptr);
- throw new Exception(buf[0 .. len].idup);
+ error(msg, lineNum);
+ }
+
+ void error(in string msg, int lineNum)
+ {
+ char[20] buf = void;
+ auto len = snprintf(buf.ptr, buf.length, "line %d: ", lineNum);
+ throw new Exception((cast(string) buf[0 .. len]) ~ msg);
}
char getChar()
@@ -317,6 +329,19 @@ struct Parser
return getTok(outStr);
}
+ if (lastChar == '~')
+ {
+ lastChar = getChar();
+ if (lastChar != '=')
+ {
+ outStr = "~";
+ return Token.unknown;
+ }
+
+ lastChar = getChar();
+ return Token.appendAssign;
+ }
+
if (isalpha(lastChar))
{
string name;
@@ -452,17 +477,6 @@ struct Parser
". Got " ~ humanReadableToken(tok) ~ s ~ " instead.");
}
- string accept(in Token expected)
- {
- string s;
- immutable tok = getTok(s);
- if (tok != expected)
- {
- unexpectedTokenError(tok, expected, s);
- }
- return s;
- }
-
Setting[] parseConfig()
{
Setting[] res;
@@ -492,11 +506,29 @@ struct Parser
assert(false);
}
- accept(Token.assign);
+ string s;
+ t = getTok(s);
+ if (t != Token.assign && t != Token.appendAssign)
+ {
+ auto msg = "Expected either"
+ ~ " token " ~ humanReadableToken(Token.assign)
+ ~ " or token " ~ humanReadableToken(Token.appendAssign)
+ ~ " but got: " ~ humanReadableToken(t)
+ ~ ' ' ~ (s.length ? '(' ~ s ~ ')' : s);
+ error(msg);
+ }
+ // This is off by +1 if `t` is followed by \n
+ const assignLineNum = lineNum;
- Setting res = parseValue(name);
+ Setting res = parseValue(name, t);
+ if (t == Token.appendAssign)
+ {
+ if (res.type == Setting.Type.scalar)
+ error(humanReadableToken(t) ~ " is not supported with scalar values", assignLineNum);
+ if (res.type == Setting.Type.group)
+ error(humanReadableToken(t) ~ " is not supported with groups", assignLineNum);
+ }
- string s;
t = getTok(s);
if (t != Token.semicolon && t != Token.comma)
{
@@ -506,8 +538,10 @@ struct Parser
return res;
}
- Setting parseValue(string name)
+ Setting parseValue(string name, Token tAssign = Token.assign)
{
+ assert(tAssign == Token.assign || tAssign == Token.appendAssign);
+
string s;
auto t = getTok(s);
if (t == Token.str)
@@ -516,6 +550,7 @@ struct Parser
}
else if (t == Token.lbracket)
{
+ const isAppending = tAssign == Token.appendAssign;
string[] arrVal;
while (1)
{
@@ -527,7 +562,7 @@ struct Parser
arrVal ~= s;
break;
case Token.rbracket:
- return new ArraySetting(name, arrVal);
+ return new ArraySetting(name, arrVal, isAppending);
default:
unexpectedTokenError(t, Token.str, s);
assert(false);
@@ -540,7 +575,7 @@ struct Parser
case Token.comma:
break;
case Token.rbracket:
- return new ArraySetting(name, arrVal);
+ return new ArraySetting(name, arrVal, isAppending);
default:
unexpectedTokenError(t, Token.comma, s);
assert(false);
@@ -620,6 +655,8 @@ group-1_2: {};
scalar = "abc";
// comment
Array_1-2 = [ "a" ];
+
+ AppArray ~= [ "x" ]; // appending array
};
`;
@@ -633,7 +670,7 @@ group-1_2: {};
assert(settings[1].name == "86(_64)?-.*linux\\.?");
assert(settings[1].type == Setting.Type.group);
auto group2 = cast(GroupSetting) settings[1];
- assert(group2.children.length == 2);
+ assert(group2.children.length == 3);
assert(group2.children[0].name == "scalar");
assert(group2.children[0].type == Setting.Type.scalar);
@@ -642,4 +679,10 @@ group-1_2: {};
assert(group2.children[1].name == "Array_1-2");
assert(group2.children[1].type == Setting.Type.array);
assert((cast(ArraySetting) group2.children[1]).vals == [ "a" ]);
+ assert((cast(ArraySetting) group2.children[1]).isAppending == false);
+
+ assert(group2.children[2].name == "AppArray");
+ assert(group2.children[2].type == Setting.Type.array);
+ assert((cast(ArraySetting) group2.children[2]).vals == [ "x" ]);
+ assert((cast(ArraySetting) group2.children[2]).isAppending == true);
}
diff --git a/tools/pipedmd.d b/tools/pipedmd.d
index bb055465..1e9def4e 100644
--- a/tools/pipedmd.d
+++ b/tools/pipedmd.d
@@ -27,6 +27,11 @@ static import std.file;
import stdext.string : decodeDmdString;
pragma(lib, "user32");
+pragma(lib, "kernel32");
+pragma(lib, "ole32");
+pragma(lib, "oleaut32");
+
+extern(Windows) BOOL QueryProcessCycleTime(HANDLE ProcessHandle, PULONG64 CycleTime);
// version = pipeLink; // define to forward arguments to link.exe and demangle its output
version = MSLinkFormat;
@@ -100,7 +105,7 @@ int main(string[] argv)
printf("decompresses and demangles names in OPTLINK and ld messages\n");
printf("\n");
printf("usage: %.*s [-nodemangle] [-gdcmode | -msmode] [-deps depfile] [executable] [arguments]\n",
- argv[0].length, argv[0].ptr);
+ cast(int)argv[0].length, argv[0].ptr);
return -1;
}
int skipargs = 0;
@@ -171,9 +176,9 @@ int main(string[] argv)
if (verbose)
{
if (fullexe.empty)
- printf ("%.*s not found in PATH, assuming %d-bit application\n", exe.length, exe.ptr, isX64 ? 64 : 32);
+ printf ("%.*s not found in PATH, assuming %d-bit application\n", cast(int)exe.length, exe.ptr, isX64 ? 64 : 32);
else
- printf ("%.*s is a %d-bit application\n", fullexe.length, fullexe.ptr, isX64 ? 64 : 32);
+ printf ("%.*s is a %d-bit application\n", cast(int)fullexe.length, fullexe.ptr, isX64 ? 64 : 32);
}
string trackerArgs;
string tracker = findTracker(isX64, trackerArgs);
@@ -195,7 +200,7 @@ int main(string[] argv)
}
else if (isX64 || !canInjectDLL)
{
- printf("cannot monitor %d-bit executable %.*s, no suitable tracker.exe found\n", isX64 ? 64 : 32, exe.length, exe.ptr);
+ printf("cannot monitor %d-bit executable %.*s, no suitable tracker.exe found\n", isX64 ? 64 : 32, cast(int)exe.length, exe.ptr);
return -1;
}
else
@@ -209,7 +214,7 @@ int main(string[] argv)
command ~= quoteArg(argv[i]);
}
if(verbose)
- printf("Command: %.*s\n", command.length, command.ptr);
+ printf("Command: %.*s\n", cast(int)command.length, command.ptr);
int exitCode = runProcess(command, inject ? depsfile : null, doDemangle, demangleAll, gdcMode, msMode, memStats);
@@ -381,15 +386,17 @@ int runProcess(string command, string depsfile, bool doDemangle, bool demangleAl
}
if (memStats)
+ {
+ PROCESS_MEMORY_COUNTERS memCounters;
+ string procName = getProcessName(piProcInfo.hProcess);
if (auto fun = getProcessMemoryInfoFunc())
- {
- string procName = getProcessName(piProcInfo.hProcess);
- PROCESS_MEMORY_COUNTERS memCounters;
- bSuccess = fun(piProcInfo.hProcess, &memCounters, memCounters.sizeof);
- if (bSuccess)
- printf("%s used %lld MB of private memory\n", procName.ptr,
- cast(long)memCounters.PeakPagefileUsage >> 20);
- }
+ fun(piProcInfo.hProcess, &memCounters, memCounters.sizeof);
+ ulong cycleTime;
+ QueryProcessCycleTime(piProcInfo.hProcess, &cycleTime);
+
+ printf("%s used %lld MB of private memory, %llu Mcycles\n", procName.ptr,
+ cast(long)memCounters.PeakPagefileUsage >> 20, cycleTime >> 20);
+ }
//close the handles to the process
CloseHandle(hStdInWrite);
diff --git a/tools/tracegc.d b/tools/tracegc.d
index a622db4e..c828abe4 100644
--- a/tools/tracegc.d
+++ b/tools/tracegc.d
@@ -294,6 +294,7 @@ class GCTraceProxy : GC
void collect() nothrow
{
gc.collect();
+ tracer.traceBuffer.removeOldEntries();
}
static if(__VERSION__ < 2_109)
@@ -563,7 +564,7 @@ nothrow:
return null;
}
- AddrTracePair[] createTraceMap()
+ AddrTracePair[] createTraceMap(bool clearOld)
{
size_t n = numEntries();
if (!n)
@@ -580,10 +581,18 @@ nothrow:
foreach_reverse (ref rng; _p[0.._length])
foreach_reverse (ref te; rng._entries[0..rng._length])
{
+ if (!te.addr)
+ continue;
// insert with quadratic probing
size_t k = addrHash(te.addr, n - 1);
- for (size_t j = 1; arr[k].addr !is te.addr; j++)
+ for (size_t j = 1; ; j++)
{
+ if (arr[k].addr is te.addr)
+ {
+ if (clearOld)
+ arr[k].entry.addr = null;
+ break;
+ }
if (arr[k].addr is null)
{
arr[k].addr = te.addr;
@@ -617,13 +626,15 @@ nothrow:
return arr[k].entry;
}
+ enum entriesPerRange = 64 * 1024; // Windows VirtualAlloc granularity
+
void newRange()
{
if (_length == _cap)
grow();
- enum entriesPerRange = 64 * 1024; // Windows VirtualAlloc granularity
- _p[_length]._entries = cast(TraceEntry*)os_mem_map(entriesPerRange * TraceEntry.sizeof);
+ if (_p[_length]._entries is null)
+ _p[_length]._entries = cast(TraceEntry*)os_mem_map(entriesPerRange * TraceEntry.sizeof);
_p[_length]._capacity = entriesPerRange;
_p[_length]._length = 0;
if (_p[_length]._entries is null)
@@ -631,6 +642,16 @@ nothrow:
_length++;
}
+ TraceEntry* getEntry(size_t idx)
+ {
+ for (size_t r = 0; r < _length; r++)
+ if (idx < _p[r]._length)
+ return &_p[r]._entries[idx];
+ else
+ idx -= _p[r]._length;
+ return null;
+ }
+
size_t numEntries()
{
size_t sum = 0;
@@ -647,6 +668,39 @@ nothrow:
return sum;
}
+ size_t removeOldEntries()
+ {
+ size_t num = numEntries();
+ if (num < 2)
+ return 0;
+ deleteTraceMap(createTraceMap(true));
+ size_t cnt = 0;
+ size_t rdr = 0, rdi = 0;
+ size_t wrr = 0, wri = 0;
+ while (rdr < _length)
+ {
+ if (_p[rdr]._entries[rdi].addr)
+ {
+ _p[wrr]._entries[wri] = _p[rdr]._entries[rdi];
+ if (++wri >= _p[wrr]._length)
+ {
+ wri = 0;
+ while (++wrr < _length && wri >= _p[wrr]._length) {}
+ }
+ }
+ else
+ cnt++;
+ if (++rdi >= _p[rdr]._length)
+ {
+ rdi = 0;
+ while (++rdr < _length && rdi >= _p[rdr]._length) {}
+ }
+ }
+ _p[wrr]._length = wri;
+ _length = wrr + 1;
+ return cnt;
+ }
+
private:
void grow()
{
@@ -657,6 +711,7 @@ private:
onOutOfMemoryErrorNoGC();
p[0 .. _length] = _p[0 .. _length];
+ p[_length .. ncap] = Range.init;
os_mem_unmap(_p, _cap * Range.sizeof);
_p = p;
@@ -1398,7 +1453,7 @@ void dumpGC(GC _gc)
trace_printf("GC stats: %lld used, %lld free\n", cast(long)stats.usedSize, cast(long)stats.freeSize);
- AddrTracePair[] traceMap = tracer.traceBuffer.createTraceMap();
+ AddrTracePair[] traceMap = tracer.traceBuffer.createTraceMap(false);
memset(addrInfoStat.ptr, 0, addrInfoStat.sizeof);
thread_suspendAll();
@@ -1788,7 +1843,19 @@ private __gshared bool hadNewline = false;
int trace_printf(ARGS...)(const char* fmt, ARGS args) nothrow
{
if (!gcx_fh)
- gcx_fh = fopen("tracegc.log", "w");
+ {
+ version(LanguageServer)
+ {
+ import core.sys.windows.winbase;
+ uint pid = GetCurrentProcessId();
+ char[260] tpath;
+ auto len = GetTempPathA(260, tpath.ptr);
+ sprintf(tpath.ptr + len, "dmdserver\\tracegc-%d.log", pid);
+ gcx_fh = fopen(tpath.ptr, "w");
+ }
+ else
+ gcx_fh = fopen("tracegc.log", "w");
+ }
if (!gcx_fh)
return 0;
diff --git a/vdc/dmdserver/dmd b/vdc/dmdserver/dmd
index 3023f50f..4627ee8d 160000
--- a/vdc/dmdserver/dmd
+++ b/vdc/dmdserver/dmd
@@ -1 +1 @@
-Subproject commit 3023f50fcf790357dcd9c631dad59490f5d9eca7
+Subproject commit 4627ee8d8f6e85863c649cb791e799e34b21549d
diff --git a/vdc/dmdserver/dmdinit.d b/vdc/dmdserver/dmdinit.d
index 84921551..8d6ca0d4 100644
--- a/vdc/dmdserver/dmdinit.d
+++ b/vdc/dmdserver/dmdinit.d
@@ -52,7 +52,8 @@ alias countersType = uint[uint]; // actually uint[Key]
alias EscapeInfer = RootObject[int];
enum uint_1 : uint { initValue = 1 }
-enum build_for_version = "2.113";
+enum build_for_version = import("VERSION")[1..$]; // skip "v"
+pragma(msg, "Building for ", build_for_version);
string select_by_version(string[] sel...)
{
@@ -77,8 +78,12 @@ enum string[2][] dmdStatics =
// ["_D3dmd7dmodule6Module11loadStdMathFZ8std_mathCQBsQBrQBm", "Module"],
// ["_D3dmd7dmodule6Module14loadCoreAtomicFZ11core_atomicCQBzQByQBt", "Module"],
// 2.112
- ["_D3dmd10dsymbolsem11loadStdMathFZ8std_mathCQBp7dmodule6Module", "Module"],
- ["_D3dmd10dsymbolsem14loadCoreAtomicFZ11core_atomicCQBw7dmodule6Module", "Module"],
+ [sbv("", "_D3dmd10dsymbolsem11loadStdMathFZ8std_mathCQBp7dmodule6Module",
+ "2.114", ""),
+ "Module"],
+ [sbv("", "_D3dmd10dsymbolsem14loadCoreAtomicFZ11core_atomicCQBw7dmodule6Module",
+ "2.114", ""),
+ "Module"],
// up to 2.110
[sbv("", "_D3dmd4func15FuncDeclaration8genCfuncRPSQBm4root5array__T5ArrayTCQCl5mtype9ParameterZQBcCQDjQy4TypeCQDu10identifier10IdentifiermZ2stCQFb7dsymbol12DsymbolTable",
@@ -140,10 +145,11 @@ enum string[2][] dmdStatics =
// 2.103
// ["_D3dmd10identifier10Identifier17generateIdWithLocFNbAyaKxSQCe8location3LocZ8countersHSQDgQDfQCwQCnFNbQBxKxQBxZ3Keyk", "countersType"],
["_D3dmd10identifier10Identifier9newSuffixFNbZ1ik", "size_t"],
- // 2.111
- // ["_D3dmd10identifier10Identifier17generateIdWithLocFNbAyaSQCc8location3LocQuZ8countersHSQDgQDfQCwQCnFNbQBxQBxQCdZ3Keyk", "countersType"],
- // 2.112
- ["_D3dmd10identifier10Identifier17generateIdWithLocFNbAyaSQCc8location3LocxPvZ8countersHSQDhQDgQCxQCoFNbQByQByxQBkZ3Keyk", "countersType"],
+
+ [sbv("2.111", "_D3dmd10identifier10Identifier17generateIdWithLocFNbAyaSQCc8location3LocQuZ8countersHSQDgQDfQCwQCnFNbQBxQBxQCdZ3Keyk",
+ "2.112", "_D3dmd10identifier10Identifier17generateIdWithLocFNbAyaSQCc8location3LocxPvZ8countersHSQDhQDgQCxQCoFNbQByQByxQBkZ3Keyk",
+ "2.114", "_D3dmd10identifier10Identifier17generateIdWithLocFNbAyaSQCc8location3LocxPvbZ8countersHSQDiQDhQCyQCpFNbQBzQBzxQBlbZ3Keyk"),
+ "countersType"],
// 2.106
["_D3dmd7arrayop7arrayOpFCQw10expression6BinExpPSQBt6dscope5ScopeZQByCQCo9dtemplate19TemplateDeclaration", "TemplateDeclaration"],
@@ -184,7 +190,8 @@ string genDeclDmdStatics()
{
string s;
foreach (decl; dmdStatics)
- s ~= q{extern extern(C) __gshared } ~ decl[1] ~ " " ~ cmangled(decl[0]) ~ ";\n";
+ if (!decl[0].empty)
+ s ~= q{extern extern(C) __gshared } ~ decl[1] ~ " " ~ cmangled(decl[0]) ~ ";\n";
return s;
}
@@ -192,7 +199,8 @@ string genInitDmdStatics()
{
string s;
foreach (decl; dmdStatics)
- s ~= cmangled(decl[0]) ~ " = (" ~ decl[1] ~ ").init;\n";
+ if (!decl[0].empty)
+ s ~= cmangled(decl[0]) ~ " = (" ~ decl[1] ~ ").init;\n";
return s;
}
@@ -366,9 +374,16 @@ void dmdSetupParams(const ref Options opts)
global.params.useInline = false;
global.params.ignoreUnsupportedPragmas = opts.ldcCompiler;
global.params.obj = false;
- global.params.useDeprecated = !opts.noDeprecated ? DiagnosticReporting.off
+ static if (build_for_version >= "2.114")
+ {
+ ref errparams = global.errorSink;
+ global.errorSink.errorLimit = 0;
+ }
+ else
+ ref errparams = global.params;
+ errparams.useDeprecated = !opts.noDeprecated ? DiagnosticReporting.off
: opts.deprecatedInfo ? DiagnosticReporting.inform : DiagnosticReporting.error ;
- global.params.useWarnings = !opts.warnings ? DiagnosticReporting.off
+ errparams.useWarnings = !opts.warnings ? DiagnosticReporting.off
: opts.warnAsError ? DiagnosticReporting.error : DiagnosticReporting.inform;
global.params.linkswitches = Strings();
global.params.libfiles = Strings();
@@ -463,7 +478,9 @@ void dmdSetupParams(const ref Options opts)
global.versionids.remove(idx);
VersionCondition.addPredefinedGlobalIdent(opts.ldcCompiler ? "LDC" : "GNU");
}
- // always enable for tooltips
+ VersionCondition.addGlobalIdent("VisualDServer");
+
+ // always enable docs for tooltips
global.params.ddoc.doOutput = true;
// global.params.debuglevel = opts.debugLevel;
diff --git a/vdc/dmdserver/dmdlocation.d b/vdc/dmdserver/dmdlocation.d
index 437643bb..4c2095f0 100644
--- a/vdc/dmdserver/dmdlocation.d
+++ b/vdc/dmdserver/dmdlocation.d
@@ -282,6 +282,7 @@ struct BaseLoc
uint startLine;
uint startOffset;
+ uint startColumn = 1;
uint lastLineOffset;
BaseLoc[] substitutions; /// Substitutions from #line / #file directives
diff --git a/vdc/dmdserver/dmdrmem.d b/vdc/dmdserver/dmdrmem.d
index ecce0b16..0581d0ff 100644
--- a/vdc/dmdserver/dmdrmem.d
+++ b/vdc/dmdserver/dmdrmem.d
@@ -3,6 +3,10 @@ module dmd.root.rmem;
import core.memory : GC;
import core.stdc.string : strlen;
+enum CHUNK_SIZE = (256 * 4096 - 64);
+enum DEFAULT_ALIGNMENT = 16;
+
+__gshared size_t heappos = CHUNK_SIZE;
__gshared size_t heapleft = 0;
__gshared void* heapp;
__gshared size_t heapTotal = 0; // Total amount of memory allocated using malloc
diff --git a/vdc/dmdserver/dmdserver.visualdproj b/vdc/dmdserver/dmdserver.visualdproj
index cf15c8c7..868f7a24 100644
--- a/vdc/dmdserver/dmdserver.visualdproj
+++ b/vdc/dmdserver/dmdserver.visualdproj
@@ -392,7 +392,7 @@
0
0
0
- 2
+ 1
1
1
0
diff --git a/vdc/dmdserver/semanalysis.d b/vdc/dmdserver/semanalysis.d
index 12b61687..35e7694b 100644
--- a/vdc/dmdserver/semanalysis.d
+++ b/vdc/dmdserver/semanalysis.d
@@ -141,7 +141,7 @@ void reinitSemanticModules()
GC.collect();
version(traceGC)
{
- bool dump = false; // to be modified in the debugger
+ __gshared bool dump = false; // to be modified in the debugger
if (dump)
dumpGC();
}
@@ -661,7 +661,10 @@ void do_unittests()
}
else
{
- assert_equal(err, expected_err);
+ if (expected_err.endsWith("..."))
+ assert_equal(err[0..min($, expected_err.length-3)], expected_err[0..$-3]);
+ else
+ assert_equal(err, expected_err);
assert_equal(other, "");
}
return m;
@@ -770,7 +773,9 @@ void do_unittests()
source = q{
__VERSION__
};
- string ver = select_by_version("", "2112L", "2.113", "2113L");
+ string ver = select_by_version("", "2112L",
+ "2.113", "2113L",
+ "2.114", "2114L");
m = checkErrors(source, "2,2,2,3:Error: declaration expected, not `" ~ver ~ "`\n");
source = q{
@@ -999,14 +1004,14 @@ void do_unittests()
q{ // Line 1
struct ST(T)
{
- T f;
+ T ST;
}
};
m = checkErrors(source, "");
checkTip(m, 2, 10, "(struct) `source.ST(T)`");
checkTip(m, 4, 4, "(unresolved type) `T`");
- checkTip(m, 4, 6, "`T f`");
+ checkTip(m, 4, 6, "`T ST`");
source =
q{ // Line 1
@@ -1126,8 +1131,7 @@ void do_unittests()
} // Line 10
};
m = checkErrors(source, "10,2,10,3:Error: missing closing `)` after `if (c.to`\n" ~
- "10,2,10,3:Error: found `}` instead of statement\n" ~
- "9,9,9,10:Error: no property `to` for type `source.C`, perhaps `import std.conv;` is needed?\n");
+ "10,2,10,3:Error: found `}` instead of statement\n...");
checkExpansions(m, 9, 10, "to", [ "toString", "toHash", "toDebug" ]);
checkExpansions(m, 9, 8, "c", [ "c", "capacity", "clear" ]);
@@ -1751,6 +1755,15 @@ void do_unittests()
checkTip(m, 2, 44, "(local variable) `object.Object o`");
checkTip(m, 3, 47, "(class) `object.Object`\n...");
+ source = q{
+ enum sz = __traits(classInstanceSize, Object);
+ };
+ m = checkErrors(source, "");
+
+ checkTip(m, 2, 41, "(class) `object.Object`\n...");
+ version(D_LP64)
+ checkTip(m, 2, 8, "(constant) `ulong source.sz = 16LU`");
+
// check for semantics in unittest
source = q{
unittest
@@ -1802,11 +1815,13 @@ void do_unittests()
};
m = checkErrors(source, "");
+ string nanF = select_by_version("", "nanF", "2.114", "float.nan");
+ string infF = select_by_version("", "infF", "2.114", "float.infinity");
checkTip(m, 3, 17, "(constant) `ulong float.sizeof = 4LU`");
- checkTip(m, 3, 29, "(constant) `float float.init = nanF`");
+ checkTip(m, 3, 29, "(constant) `float float.init = " ~ nanF ~ "`");
checkTip(m, 3, 39, "(constant) `float float.epsilon = 1.19209e-07F`");
checkTip(m, 3, 52, "(constant) `int float.mant_dig = 24`");
- checkTip(m, 4, 11, "(constant) `float float.infinity = infF`");
+ checkTip(m, 4, 11, "(constant) `float float.infinity = " ~ infF ~ "`");
checkTip(m, 4, 25, "(constant) `float float.min_normal = 1.17549e-38F`");
checkTip(m, 4, 41, "(constant) `int float.min_10_exp = -37`");
checkTip(m, 4, 57, "(constant) `int float.min_exp = -125`");
@@ -2397,6 +2412,22 @@ void do_unittests()
checkTip(tmpl_m, 4, 11, "(parameter) `int x`");
//checkTip(tmpl_m, 8, 11, "(parameter) `T x`");
}
+
+ source = q{
+ template Templ(T, int n)
+ {
+ struct Templ
+ {
+ T[n] payload;
+ }
+ }
+ version(VisualDServer) private Templ!(int, 3) _example;
+ };
+ m = checkErrors(source, "");
+
+ checkTip(m, 6, 10, "(field) `int[3] source.Templ!(int, 3).payload`");
+
+ m = null;
}
unittest
@@ -2672,6 +2703,7 @@ unittest
test_ana_dmd();
}
+//version = test;
version(test):
// https://issues.dlang.org/show_bug.cgi?id=20253
@@ -2692,7 +2724,7 @@ void dummy()
enum z3 = size_t.stringof;
enum z4 = size_t.mangleof;
cfloat flt = cfloat.nan;
- auto q = [flt.sizeof, flt.init, flt.epsilon, flt.mant_dig, flt.infinity,
+ auto q = [cast(cfloat)flt.sizeof, flt.init, flt.epsilon, flt.mant_dig, flt.infinity,
flt.re, flt.im, flt.min_normal, flt.min_10_exp];
//auto ti = Object.classinfo;
}
@@ -2719,6 +2751,9 @@ template Templ(T, int n)
T payload;
}
}
+version(VisualDServer) { struct T {}
+ Templ!(T, 3) a;
+}
import vdc.dmdserver.dmdinit;
diff --git a/vdc/dmdserver/semvisitor.d b/vdc/dmdserver/semvisitor.d
index 31664d49..a35f3ce8 100644
--- a/vdc/dmdserver/semvisitor.d
+++ b/vdc/dmdserver/semvisitor.d
@@ -193,18 +193,26 @@ extern(C++) class ASTVisitor : StoppableVisitor
super.visit(expr);
}
- override void visit(TraitsExp te)
+ void visitArgs(Objects* args)
{
- if (te.args)
+ if (args)
{
- foreach(a; (*te.args))
+ foreach(a; (*args))
if (auto t = a.isType())
visitType(t);
else if (auto e = a.isExpression())
visitExpression(e);
- //else if (auto s = a.isSymbol())
- // visitSymbol(s);
+ //else if (auto s = a.isSymbol())
+ // visitSymbol(s);
}
+ }
+
+ override void visit(TraitsExp te)
+ {
+ import vdc.dmdserver.dmdinit;
+ visitArgs(te.args);
+ static if (build_for_version >= "2.113")
+ visitArgs(te.parsedArgs);
super.visit(te);
}
@@ -213,10 +221,9 @@ extern(C++) class ASTVisitor : StoppableVisitor
{
if (ti.tiargs && ti.parsedArgs)
{
- size_t args = min(ti.tiargs.dim, ti.parsedArgs.dim);
- for (size_t a = 0; a < args; a++)
- if (Type tip = (*ti.parsedArgs)[a].isType())
- visitType(tip);
+ //size_t args = min(ti.tiargs.dim, ti.parsedArgs.dim);
+ visitArgs(ti.tiargs);
+ visitArgs(ti.parsedArgs);
}
}
@@ -839,10 +846,10 @@ extern(C++) class FindASTVisitor : ASTVisitor
override void visit(CompoundStatement cs)
{
// optimize to only visit members in approriate source range
- size_t scnt = cs.statements ? cs.statements.dim : 0;
+ size_t scnt = cs.cs_statements ? cs.cs_statements.dim : 0;
for (size_t i = 0; i < scnt && !stop; i++)
{
- Statement s = (*cs.statements)[i];
+ Statement s = (*cs.cs_statements)[i];
if (!s)
continue;
if (visited.contains(s))
@@ -1504,6 +1511,14 @@ TipData tipDataForObject(RootObject obj)
return tip;
}
+Statements* cs_statements(CompoundStatement cs)
+{
+ static if (is(typeof(cs.statements) : Statements*))
+ return cs.statements;
+ else
+ return &cs.statements;
+}
+
static const(char)* printSymbolWithLink(Dsymbol sym, bool qualifyTypes)
{
const(char)* s = qualifyTypes ? sym.toPrettyCharsHelper() : sym.toChars();
@@ -2088,8 +2103,8 @@ ParameterStorageClassPos[] findParameterStorageClass(Module mod)
if (auto fd = (cast(FuncExp)expr).fd)
if (fd.fbody)
if (auto cs = fd.fbody.isCompoundStatement())
- if (cs.statements && cs.statements.length)
- if (auto rs = (*cs.statements)[0].isReturnStatement())
+ if (cs.cs_statements && cs.cs_statements.length)
+ if (auto rs = (*cs.cs_statements)[0].isReturnStatement())
expr = rs.exp;
if (expr.loc.filename is filename)
diff --git a/vdc/parser/engine.d b/vdc/parser/engine.d
index 9d74b347..6495192b 100644
--- a/vdc/parser/engine.d
+++ b/vdc/parser/engine.d
@@ -729,7 +729,7 @@ class Parser
lineno = 1;
size_t linepos = 0; // position after last line break
int tokid;
- for(size_t pos = 0; pos < text.length && !abort; )
+ for(pos_t pos = 0; pos < text.length && !abort; )
{
int prevlineno = lineno;
size_t prevlinepos = linepos;
@@ -795,7 +795,7 @@ class Parser
if (nodeStack.depth > 1)
{
parseError("parsing unfinished before end of mixin");
- return null;
+ return null;
}
return popNode().members;
}
diff --git a/vdc/parsertest.d b/vdc/parsertest.d
index fc4810a7..95a1eedd 100644
--- a/vdc/parsertest.d
+++ b/vdc/parsertest.d
@@ -310,12 +310,12 @@ int[] ctfeLexer(string s)
{
Lexer lex;
int state;
- size_t pos;
+ pos_t pos;
int[] ids;
while(pos < s.length)
{
- size_t prevpos = pos;
+ pos_t prevpos = pos;
int id;
int type = lex.scan(state, s, pos, id);
assert(prevpos < pos);
diff --git a/visuald/dpackage.d b/visuald/dpackage.d
index 3ee4d949..8b73b7ff 100644
--- a/visuald/dpackage.d
+++ b/visuald/dpackage.d
@@ -2622,33 +2622,45 @@ class GlobalOptions
if(std.file.exists(conffile))
{
string bindir = buildPath(LDC.InstallDir, "bin");
- try
+ void parse(string file)
{
- import stdext.libconfig;
- Setting[] settings = parseConfigFile(conffile);
- foreach(set; settings)
+ try
{
- if(set.name == "default" && set.type == Setting.Type.group)
+ import stdext.libconfig;
+ Setting[] settings = parseConfigFile(file);
+ foreach(set; settings)
{
- auto group = cast(GroupSetting)set;
- foreach(sw; group.children)
+ if(set.name == "default" && set.type == Setting.Type.group)
{
- if ((sw.name == "switches" || sw.name == "post-switches") && sw.type == Setting.Type.array)
+ auto group = cast(GroupSetting)set;
+ foreach(sw; group.children)
{
- auto arr = cast(ArraySetting)sw;
- foreach(a; arr.vals())
+ if ((sw.name == "switches" || sw.name == "post-switches") && sw.type == Setting.Type.array)
{
- string opts = replace(a, "%%ldcbinarypath%%", bindir);
- imports ~= getOptionImportPaths([opts], bindir); // assume single argument that might contain spaces
+ auto arr = cast(ArraySetting)sw;
+ foreach(a; arr.vals())
+ {
+ string opts = replace(a, "%%ldcbinarypath%%", bindir);
+ imports ~= getOptionImportPaths([opts], bindir); // assume single argument that might contain spaces
+ }
}
}
}
}
}
+ catch(Exception e)
+ {
+ string msg = e.msg;
+ file = file;
+ }
}
- catch(Exception)
+ if (std.file.isDir(conffile))
{
+ foreach (string file; dirEntries(conffile, SpanMode.shallow))
+ parse(file);
}
+ else
+ parse(conffile);
}
return imports;
}
@@ -2674,6 +2686,15 @@ class GlobalOptions
return imports;
}
+ unittest
+ {
+ auto opts = new GlobalOptions;
+ opts.LDC.InstallDir = r"c:\D\ldc2-1.43.0-beta1-windows-multilib";
+ string[] imports;
+ imports = opts.getLDCImportPaths();
+ imports = opts.getIniImportPaths();
+ }
+
string[] getJSONPaths()
{
string[] jsonpaths;
diff --git a/visuald/hierarchy.d b/visuald/hierarchy.d
index e2a63305..9f2effb5 100644
--- a/visuald/hierarchy.d
+++ b/visuald/hierarchy.d
@@ -1024,7 +1024,7 @@ class CFolderNode : CHierContainer
HRESULT hr;
hr = srpAddItemDlg.AddProjectItemDlg(GetCVsHierarchy().GetVsItemID(this),
&g_projectFactoryCLSID,
- cast(IVsProject)GetCVsHierarchy(), dwFlags,
+ qi_cast!IVsProject(GetCVsHierarchy()), dwFlags,
pszExpandDir, pszSelectItem,
&bstrLocation.bstr,
&bstrFilters,
diff --git a/visuald/register.d b/visuald/register.d
index 321be58b..bcc7bbf2 100644
--- a/visuald/register.d
+++ b/visuald/register.d
@@ -153,10 +153,7 @@ class RegKey
HRESULT hr;
if(write && chkDump && registryRoot.length && keyname.startsWith(registryRoot))
{
- if (keyname.startsWith(registryRoot))
- registryDump ~= "\n[$RootKey$"w ~ keyname[registryRoot.length..$] ~ "]\n"w;
- else
- registryDump ~= "\n[\\"w ~ keyname ~ "]\n"w;
+ registryDump ~= "\n[$RootKey$"w ~ keyname[registryRoot.length..$] ~ "]\n"w;
}
else if(write)
{
@@ -799,16 +796,16 @@ version(none){
keyToolOptsLdc.Set("Sort"w, 20);
scope RegKey keyToolOptsCmd = new RegKey(keyRoot, registrationRoot ~ regPathToolsDirsCmd);
- keyToolOptsLdc.Set(null, "Compile/Run/Debug/Dustmite");
- keyToolOptsLdc.Set("Package"w, packageGuid);
- keyToolOptsLdc.Set("Page"w, GUID2wstring(g_CmdLinePropertyPage));
- keyToolOptsLdc.Set("Sort"w, 40);
+ keyToolOptsCmd.Set(null, "Compile/Run/Debug/Dustmite");
+ keyToolOptsCmd.Set("Package"w, packageGuid);
+ keyToolOptsCmd.Set("Page"w, GUID2wstring(g_CmdLinePropertyPage));
+ keyToolOptsCmd.Set("Sort"w, 40);
scope RegKey keyToolOptsUpdate = new RegKey(keyRoot, registrationRoot ~ regPathToolsUpdate);
- keyToolOptsLdc.Set(null, "Updates");
- keyToolOptsLdc.Set("Package"w, packageGuid);
- keyToolOptsLdc.Set("Page"w, GUID2wstring(g_UpdatePropertyPage));
- keyToolOptsLdc.Set("Sort"w, 50);
+ keyToolOptsUpdate.Set(null, "Updates");
+ keyToolOptsUpdate.Set("Package"w, packageGuid);
+ keyToolOptsUpdate.Set("Page"w, GUID2wstring(g_UpdatePropertyPage));
+ keyToolOptsUpdate.Set("Sort"w, 50);
static if(hasDubSupport)
{
diff --git a/visuald/trackprojectdocument.d b/visuald/trackprojectdocument.d
index 43d7e8f6..79f83a6e 100644
--- a/visuald/trackprojectdocument.d
+++ b/visuald/trackprojectdocument.d
@@ -60,7 +60,7 @@ public:
return true;
scope(exit) release(srpIVsTrackProjectDocuments2);
- IVsProject pIVsProject = cast(IVsProject) mHierarchy;
+ IVsProject pIVsProject = qi_cast!IVsProject(mHierarchy);
assert(pIVsProject);
VSQUERYADDFILERESULTS fSummaryResult = VSQUERYADDFILERESULTS_AddOK;
@@ -85,7 +85,7 @@ public:
return;
scope(exit) release(srpIVsTrackProjectDocuments2);
- IVsProject pIVsProject = cast(IVsProject) mHierarchy;
+ IVsProject pIVsProject = qi_cast!IVsProject(mHierarchy);
assert(pIVsProject);
ScopedBSTR cbstrMkDokument;
diff --git a/visuald/visuald.visualdproj b/visuald/visuald.visualdproj
index bd9ba1fd..71bc6a09 100644
--- a/visuald/visuald.visualdproj
+++ b/visuald/visuald.visualdproj
@@ -1138,9 +1138,9 @@
0
0
0
- 0
+ 1
0
- 2
+ 0
0
1
0
@@ -2375,6 +2375,7 @@ rc /fo"$(OutDir)\visuald.res" /I "$(IntDir)" $(InputPath)" d
+
diff --git a/visuald_vs10.sln b/visuald_vs10.sln
index 50b34e88..6339a323 100644
--- a/visuald_vs10.sln
+++ b/visuald_vs10.sln
@@ -31,6 +31,9 @@ EndProject
Project("{002A2DE9-8BB6-484D-9802-7E4AD4084715}") = "vsi2d", "c2d\vsi2d.visualdproj", "{8760F45A-69D9-4B68-BE63-0E055B51D447}"
EndProject
Project("{002A2DE9-8BB6-484D-9802-7E4AD4084715}") = "parser", "vdc\parser.visualdproj", "{FE3A959D-6CFA-43BF-8637-62125B571770}"
+ ProjectSection(ProjectDependencies) = postProject
+ {2070DF9A-6D80-4E3C-950A-C1BBA1B20F4D} = {2070DF9A-6D80-4E3C-950A-C1BBA1B20F4D}
+ EndProjectSection
EndProject
Project("{002A2DE9-8BB6-484D-9802-7E4AD4084715}") = "stdext", "stdext\stdext.visualdproj", "{2070DF9A-6D80-4E3C-950A-C1BBA1B20F4D}"
ProjectSection(ProjectDependencies) = postProject