Skip to content

Commit 92359d8

Browse files
committed
Merge pull request #7 from rainers/master
transfer to dlang.org
2 parents 4868de7 + bad6051 commit 92359d8

31 files changed

+969
-125
lines changed

CHANGES

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,3 +571,10 @@ unreleased Version 0.3.37
571571
* fixed building with -op and source files on different drive than project
572572
* added file options per configuration
573573
* fixed invoking bad command when no files to compile, but additional arguments set
574+
* added support for VS 2013 to installer, removed VS.NET 2003
575+
* installer now picks up dmd2 folder from DMD installation
576+
* changed license to Boost
577+
* added global option to display the reason for building a target
578+
* fixed custom build rules executed twice sometimes
579+
* improved indentation after opening parenthesis to follow next token
580+
* added commands "Collapse unittests" and "Collapse disabled" to the outlining menu

TODO

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,18 @@ Project:
3434
- separate compile + link does not write to object dir
3535
- ddoc files
3636
- additional options for resource compiler
37-
- compile and run current buffer/selection
3837
- pass import path from static lib project to dependent projects
39-
- file properties per configuration
4038
- single file compilation for file configuration
4139
- custom command: quotes in dependencies not supported
40+
- different lib paths for Win32/Win64
41+
- support [Environment64] in sc.ini
4242

4343
Language service:
4444
-----------------
4545
- goto definition does not know about scope
4646
- use spell-checker on completion?
4747
- case insensitive completion?
4848
- showScope: function/delegate literal not shown correctly, in/out/body
49-
- collapse disabled version/debug blocks
5049
- disable parsing/outlining for large files?
5150
- replace token: empty dialog when opened without resizing
5251
- check indentation of multiple string literals on several lines
@@ -65,7 +64,8 @@ Lexer/Parser:
6564
- do not parse file if it is D1?
6665
- deprecated syntax
6766
- syntax error with "@disable new()"
68-
- integrate d_parser.dll
67+
+ integrate d_parser.dll
68+
- 0.ident
6969

7070
Semantics:
7171
---------------

doc/Debugging.dd

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ $(H2 Visual Studio Debugger)
55
$(P Thanks to $(LINK2 http://www.dsource.org/projects/cv2pdb, cv2pdb), debugging in Visual Studio integrates well.
66
Here is an example debugging session)
77

8-
$(IMG_CENTER images/debug.png, 90%)
8+
<div align="center"><img src="images/debug.png" width="90%"/></div>
99

1010
$(P Using cv2pdb has a few quirks, like displaying '@' instead of '.'. This is happening because the C++ debugger
1111
that comes with Visual Studio is used and it is confused if there is a '.' in a symbol name.)
@@ -40,5 +40,12 @@ simply enable the "D Exceptions" entry, but must select the specific exceptions
4040

4141
$(IMG_CENTER images/d_exceptions.png)
4242

43+
$(H2 Visual Studio 2012)
44+
45+
Visual Studio 2012 introduced a new debug engine that loses some of the capabilities of the
46+
preceding debug engine. This includes displaying variables in the Watch Window. You
47+
can switch back to the old debug engine by going to Tools->Options and then under the debugger
48+
settings, turn on native edit and continue. This will also reenable the visualizer macros in autoexp.dat.
49+
4350
Macros:
4451
TITLE=Debugging

doc/StartPage.dd

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ $(TD $(IMG images/vd_logo.png))
55
$(TD
66
$(P Visual D is a Visual Studio package providing both project management and language services.
77
It works with Visual Studio 2005, 2008, 2010 and 2012 as well as the free Visual Studio Shells.
8-
See the $(LINK2 installation.html, Installation) instructions, especially if not using a commercial edition of Visual Studio.)
8+
See the $(LINK2 Installation.html, Installation) instructions, especially if not using a commercial edition of Visual Studio.)
99

1010
$(P Visual D aims at providing seamless integration of the D programming language into Visual Studio.))
1111
)
@@ -37,16 +37,17 @@ $(UL
3737
$(LI Completely written in D)
3838
)
3939
) $(TD
40-
<img src="images/fullvs.png" width="100%"/>
40+
$(LINK2 images/fullvs.png, <img src="images/fullvs.png" width="100%"/>)
4141
))
4242

43-
$(LINK2 features.html, Read more...)
43+
$(LINK2 Features.html, Read more...)
4444

4545
$(H2 News)
4646

47-
$(LINK2 versionhistory.html, Full version history and complete details...)
47+
$(LINK2 VersionHistory.html, Full version history and complete details...)
48+
$(BR)
4849

49-
2013-05-10 $(LINK2 news36.html, Version 0.3.36)
50+
2013-05-10 $(LINK2 News36.html, Version 0.3.36)
5051
$(UL
5152
$(LI updated to new features of the language and tooling as of dmd 2.062)
5253
$(LI basic LDC support)
@@ -73,7 +74,7 @@ $(UL
7374
$(LI fixed spurious crashes due to bug in precise garbage collection)
7475
)
7576

76-
$(LINK2 versionhistory.html, more...)
77+
$(LINK2 VersionHistory.html, more...)
7778

7879
$(H2 Download)
7980

doc/visuald.ddoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ TOP=
151151
</div>
152152
</form>
153153
<div id="toctop">
154-
$(UL $(H2 <a href="../index.html" title="D Programming Language">D</a>)
155-
$(LI <a href="../download.html" title="Download a D compiler">Downloads &amp; Tools</a>)
156-
$(LI <a href="../spec.html" title="D Language Specification">Language</a>)
157-
$(LI <a href="../phobos/index.html" title="D Runtime Library">Phobos $(LATEST)</a>)
154+
$(UL $(H2 <a href="$(DLANG_ORG)/index.html" title="D Programming Language">D</a>)
155+
$(LI <a href="$(DLANG_ORG)/download.html" title="Download a D compiler">Downloads &amp; Tools</a>)
156+
$(LI <a href="$(DLANG_ORG)/spec.html" title="D Language Specification">Language</a>)
157+
$(LI <a href="$(DLANG_ORG)/phobos/index.html" title="D Runtime Library">Runtime Library $(LATEST)</a>)
158158
)
159159
</div>
160160
</div>
@@ -163,7 +163,7 @@ NAVIGATION_VISUALD=
163163
<div class="navblock">
164164
$(H2 <a href="StartPage.html" title="Visual Studio Plugin for D">Visual D</a>)
165165
$(UL
166-
$(LI <a href="VersionHistory.html" title="Latest changes">News</a>)
166+
$(LI <a href="VersionHistory.html" title="Latest changes">Version History</a>)
167167
$(LI <a href="Features.html" title="Visual D Features">Features</a>)
168168
$(LI <a href="Installation.html" title="Installation">Installation</a>)
169169
$(LI
@@ -247,6 +247,8 @@ TD = <td valign=top>$0</td>
247247
TDNW = <td valign=top class="donthyphenate">$0</td>
248248
SUB = <sub>$0</sub>
249249

250+
DLANG_ORG=..
251+
_=http://www.dlang.org
250252
COPYRIGHT= Copyright &copy; 1999-$(YEAR) by Digital Mars, All Rights Reserved
251253

252254
H2=<h2>$0</h2>

nsis/visuald.nsi

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
!define MAGO_CLSID {97348AC0-2B6B-4B99-A245-4C7E2C09D403}
7878
!define MAGO_ENGINE_KEY AD7Metrics\Engine\${MAGO_CLSID}
7979
!define MAGO_EXCEPTION_KEY AD7Metrics\Exception\${MAGO_CLSID}
80-
!define MAGO_ABOUT "A debug engine dedicated to debugging applications written in the D programming language. See the project website at http://www.dsource.org/projects/mago_debugger for more information. Copyright (c) 2010 Aldo J. Nunez"
80+
!define MAGO_ABOUT "A debug engine dedicated to debugging applications written in the D programming language. See the project website at http://www.dsource.org/projects/mago_debugger for more information. Copyright (c) 2010-2013 Aldo J. Nunez"
8181

8282
!searchparse /file ../../../mago/include/magoversion.h "#define MAGO_VERSION_MAJOR " MAGO_VERSION_MAJOR
8383
!searchparse /file ../../../mago/include/magoversion.h "#define MAGO_VERSION_MINOR " MAGO_VERSION_MINOR
@@ -120,6 +120,7 @@
120120
;--------------------------------
121121
;installation time variables
122122
Var DMDInstallDir
123+
Var DInstallDir
123124

124125
;--------------------------------
125126
;Interface Settings
@@ -458,16 +459,16 @@ SectionEnd
458459
LangString DESC_SecVCExpress2010 ${LANG_ENGLISH} "Register for usage in Visual C++ Express 2010 (experimental and unusable)."
459460
!endif
460461
!ifdef CV2PDB
461-
LangString DESC_SecCv2pdb ${LANG_ENGLISH} "cv2pdb is necessary to debug executables in Visual Studio."
462+
LangString DESC_SecCv2pdb ${LANG_ENGLISH} "cv2pdb is necessary to debug Win32 executables in Visual Studio."
462463
LangString DESC_SecCv2pdb2 ${LANG_ENGLISH} "$\r$\nYou might not want to install it, if you have already installed it elsewhere."
463464
!endif
464465
!ifdef MAGO
465466
LangString DESC_SecMago ${LANG_ENGLISH} "Mago is a debug engine especially designed for the D-Language."
466-
LangString DESC_SecMago2 ${LANG_ENGLISH} "$\r$\nMago is written by Aldo Nunez. It is in an early alpha stage, so some things are still in an experimental stage."
467+
LangString DESC_SecMago2 ${LANG_ENGLISH} "$\r$\nMago is written by Aldo Nunez. Distributed under the Apache License Version 2.0. See www.dsource.org/ projects/mago_debugger"
467468
!endif
468469
!ifdef DPARSER
469-
LangString DESC_SecDParser ${LANG_ENGLISH} "DParser is a Parser & Resolver & Completion library for D."
470-
LangString DESC_SecDParser2 ${LANG_ENGLISH} "$\r$\nDParser is written by Alexander Bothe. See https://github.com/aBothe/D_Parser"
470+
LangString DESC_SecDParser ${LANG_ENGLISH} "DParser is a Parser && Resolver && Completion library for D."
471+
LangString DESC_SecDParser2 ${LANG_ENGLISH} "$\r$\nDParser is written by Alexander Bothe. Distributed under the Apache License Version 2.0. See https://github.com/ aBothe/D_Parser"
471472
!endif
472473

473474
;Assign language strings to sections
@@ -697,9 +698,13 @@ Function DMDInstallPage
697698
!insertmacro MUI_HEADER_TEXT "DMD Installation Folder" "Specify the directory where DMD is installed"
698699

699700
ReadRegStr $DMDInstallDir HKLM "Software\${APPNAME}" "DMDInstallDir"
700-
IfErrors 0 NoDMDInstallDir
701-
ReadRegStr $DMDInstallDir HKLM "SOFTWARE\D" "Install_Dir"
702-
NoDMDInstallDir:
701+
IfErrors DMDInstallDirEmpty
702+
StrCmp "$DMDInstallDir" "" DMDInstallDirEmpty HasDMDInstallDir
703+
DMDInstallDirEmpty:
704+
ReadRegStr $DInstallDir HKLM "SOFTWARE\D" "Install_Dir"
705+
IfErrors HasDmdInstallDir
706+
StrCpy $DmdInstallDir $DInstallDir\dmd2
707+
HasDMDInstallDir:
703708

704709
WriteINIStr "$PLUGINSDIR\dmdinstall.ini" "Field 1" "State" $DMDInstallDir
705710
!insertmacro INSTALLOPTIONS_DISPLAY "dmdinstall.ini"

vdc/abothe/VDServer.cs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ void addExpansion(string name)
118118
[ClassInterface(ClassInterfaceType.None)]
119119
public class VDServer : IVDServer
120120
{
121-
private ParseCacheList _parseCacheList;
122-
private ParseCache _parseCache;
123121
private CodeLocation _tipStart, _tipEnd;
124122
private string _tipText;
125123
private string _expansions;
@@ -135,10 +133,6 @@ public class VDServer : IVDServer
135133

136134
public VDServer()
137135
{
138-
_parseCacheList = new ParseCacheList();
139-
_parseCache = new ParseCache();
140-
_parseCacheList.Add(_parseCache);
141-
142136
// MessageBox.Show("VDServer()");
143137
}
144138

@@ -147,8 +141,7 @@ public void ConfigureSemanticProject(string filename, string imp, string stringI
147141
if (_imports != imp)
148142
{
149143
var impDirs = imp.Split('\n');
150-
if(_parseCache.UpdateRequired(impDirs))
151-
_parseCache.BeginParse(impDirs, "");
144+
GlobalParseCache.BeginAddOrUpdatePaths(impDirs);
152145
}
153146
_imports = imp;
154147
_stringImports = stringImp;
@@ -186,11 +179,11 @@ public void UpdateModule(string filename, string srcText, bool verbose)
186179
if (_modules.TryGetValue(filename, out oldast))
187180
{
188181
//_parseCache.UfcsCache.RemoveModuleItems(oldast);
189-
_parseCache.Remove(oldast);
182+
GlobalParseCache.RemoveModule(oldast);
190183
}
191-
_parseCache.AddOrUpdate(ast);
184+
GlobalParseCache.AddOrUpdateModule(ast);
192185
ConditionalCompilationFlags cflags = new ConditionalCompilationFlags(_editorData);
193-
_parseCache.UfcsCache.CacheModuleMethods(ast, ResolutionContext.Create(_parseCacheList, cflags, null, null));
186+
//GlobalParseCache.UfcsCache.CacheModuleMethods(ast, ResolutionContext.Create(_parseCacheList, cflags, null, null));
194187

195188
_modules[filename] = ast;
196189
_sources[filename] = srcText;
@@ -221,6 +214,7 @@ public void GetTip(string filename, int startLine, int startIndex, int endLine,
221214
_tipEnd = new CodeLocation(startIndex + 2, startLine);
222215
_tipText = "";
223216

217+
_setupEditorData();
224218
_editorData.CaretLocation = _tipStart;
225219
_editorData.SyntaxTree = ast as DModule;
226220
_editorData.ModuleCode = _sources[filename];
@@ -255,6 +249,7 @@ public void GetSemanticExpansions(string filename, string tok, uint line, uint i
255249
if (!_modules.TryGetValue(filename, out ast))
256250
throw new COMException("module not found", 1);
257251

252+
_setupEditorData();
258253
CodeLocation loc = new CodeLocation((int)idx + 1, (int) line);
259254
_editorData.SyntaxTree = ast as DModule;
260255
_editorData.ModuleCode = _sources[filename];
@@ -329,6 +324,7 @@ public void GetDefinition(string filename, int startLine, int startIndex, int en
329324
_tipEnd = new CodeLocation(endIndex + 1, endLine);
330325
_tipText = "";
331326

327+
_setupEditorData();
332328
_editorData.CaretLocation = _tipEnd;
333329
_editorData.SyntaxTree = ast as DModule;
334330
_editorData.ModuleCode = _sources[filename];
@@ -385,7 +381,7 @@ void _setupEditorData()
385381
else
386382
versions += "DigitalMars\n";
387383

388-
_editorData.ParseCache = _parseCacheList;
384+
_editorData.ParseCache = new ParseCacheView(_imports.Split('\n'));
389385
_editorData.IsDebug = (_flags & 2) != 0;
390386
_editorData.DebugLevel = (int)(_flags >> 16) & 0xff;
391387
_editorData.VersionNumber = (int)(_flags >> 8) & 0xff;
@@ -396,7 +392,6 @@ void _setupEditorData()
396392
CompletionOptions.Instance.HideDeprecatedNodes = (_flags & 128) != 0;
397393
}
398394

399-
400395
#if false
401396
[EditorBrowsable(EditorBrowsableState.Never)]
402397
[ComRegisterFunction()]

vdc/parser.visualdproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
<Config name="TestDebug" platform="Win32">
192192
<obj>0</obj>
193193
<link>0</link>
194-
<lib>1</lib>
194+
<lib>0</lib>
195195
<subsystem>0</subsystem>
196196
<multiobj>0</multiobj>
197197
<singleFileCompilation>0</singleFileCompilation>
@@ -254,7 +254,7 @@
254254
<debuglevel>0</debuglevel>
255255
<debugids />
256256
<versionlevel>0</versionlevel>
257-
<versionids />
257+
<versionids>MAIN</versionids>
258258
<dump_source>0</dump_source>
259259
<mapverbosity>0</mapverbosity>
260260
<createImplib>0</createImplib>
@@ -1138,10 +1138,10 @@
11381138
<File path="ast\misc.d" />
11391139
<File path="ast\mod.d" />
11401140
<File path="ast\node.d" />
1141-
<File path="ast\stmt.d" />
11421141
<File path="ast\tmpl.d" />
11431142
<File path="ast\type.d" />
11441143
<File path="ast\writer.d" />
1144+
<File path="ast\stmt.d" />
11451145
</Folder>
11461146
<Folder name="parser">
11471147
<File path="parser\aggr.d" />
@@ -1151,17 +1151,17 @@
11511151
<File path="parser\iasm.d" />
11521152
<File path="parser\misc.d" />
11531153
<File path="parser\mod.d" />
1154-
<File path="parser\stmt.d" />
11551154
<File path="parser\tmpl.d" />
1155+
<File path="parser\stmt.d" />
11561156
</Folder>
11571157
<File path="interpret.d" />
11581158
<File path="ivdserver.d" />
11591159
<File path="lexer.d" />
11601160
<File path="logger.d" />
11611161
<File path="parsertest.d" />
1162-
<File path="semantic.d" />
11631162
<File path="util.d" />
11641163
<File path="vdserver.d" />
11651164
<File path="versions.d" />
1165+
<File path="semantic.d" />
11661166
</Folder>
11671167
</DProject>

vdc/parsertest.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ int main(string[] argv)
711711
});
712712
return semanticErrors > 0 ? 1 : 0;
713713
}
714-
else
714+
else if (false)
715715
{
716716
Project prj = new Project;
717717
prj.options.setImportDirs(imps);
@@ -720,8 +720,8 @@ int main(string[] argv)
720720
string fname = imps[1] ~ r"std\datetime.d";
721721
prj.addAndParseFile(fname);
722722
}
723-
return 0;
724723
}
724+
return 0;
725725
}
726726
}
727727

vdc/vdserver.visualdproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
<resfile />
184184
<exefile>$(OutDir)\$(ProjectName).exe</exefile>
185185
<useStdLibPath>1</useStdLibPath>
186-
<additionalOptions />
186+
<additionalOptions>-L/SUBSYSTEM:WINDOWS</additionalOptions>
187187
<preBuildCommand />
188188
<postBuildCommand />
189189
<filesToClean>*.obj;*.cmd;*.build;*.json;*.dep</filesToClean>
@@ -948,7 +948,7 @@ midl /D _DEBUG /nologo /char signed /env win32 /Oicf /out &quot;$(OutDir)&quot;
948948
if errorlevel 1 goto reportError
949949
rc /fo&quot;$(OutDir)\vdserver.res&quot; &quot;/I$(OutDir)&quot; $(InputPath)" outfile="$(OutDir)\vdserver.res" linkoutput="true" />
950950
<File path="vdserver.reg" />
951-
<File path="vdserver_d.reg" />
952951
<File path="vdserverfactory.d" />
952+
<File path="vdserver_d.reg" />
953953
</Folder>
954954
</DProject>

0 commit comments

Comments
 (0)