Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite452a46

Browse files
committed
2 parents9e2e058 +4df9975 commite452a46

File tree

167 files changed

+564
-283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+564
-283
lines changed

‎VisualFSharp.sln‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,31 +32,31 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{CFE3259A
3232
EndProject
3333
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") ="VisualFSharp.Salsa","vsintegration\tests\Salsa\VisualFSharp.Salsa.fsproj","{FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}"
3434
EndProject
35-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") ="VisualFSharp.UnitTests","vsintegration\tests\unittests\VisualFSharp.UnitTests.fsproj","{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}"
35+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") ="VisualFSharp.UnitTests","vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj","{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}"
3636
EndProject
37-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="DefinitionLocationAttribute","vsintegration\tests\unittests\MockTypeProviders\DefinitionLocationAttribute\DefinitionLocationAttribute.csproj","{DA39AD38-4A58-47BF-9215-E49768295169}"
37+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="DefinitionLocationAttribute","vsintegration\tests\MockTypeProviders\DefinitionLocationAttribute\DefinitionLocationAttribute.csproj","{DA39AD38-4A58-47BF-9215-E49768295169}"
3838
EndProject
39-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="DefinitionLocationAttributeFileDoesnotExist","vsintegration\tests\unittests\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist\DefinitionLocationAttributeFileDoesnotExist.csproj","{8C2439BD-0E49-4929-A8B1-29CEE228191E}"
39+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="DefinitionLocationAttributeFileDoesnotExist","vsintegration\tests\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist\DefinitionLocationAttributeFileDoesnotExist.csproj","{8C2439BD-0E49-4929-A8B1-29CEE228191E}"
4040
EndProject
41-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="DefinitionLocationAttributeLineDoesnotExist","vsintegration\tests\unittests\MockTypeProviders\DefinitionLocationAttributeLineDoesnotExist\DefinitionLocationAttributeLineDoesnotExist.csproj","{F47196DC-186D-4055-BAF2-658282A12F33}"
41+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="DefinitionLocationAttributeLineDoesnotExist","vsintegration\tests\MockTypeProviders\DefinitionLocationAttributeLineDoesnotExist\DefinitionLocationAttributeLineDoesnotExist.csproj","{F47196DC-186D-4055-BAF2-658282A12F33}"
4242
EndProject
43-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="DefinitionLocationAttributeWithSpaceInTheType","vsintegration\tests\unittests\MockTypeProviders\DefinitionLocationAttributeWithSpaceInTheType\DefinitionLocationAttributeWithSpaceInTheType.csproj","{D4C88934-5893-467E-A55C-A11ECD6479FE}"
43+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="DefinitionLocationAttributeWithSpaceInTheType","vsintegration\tests\MockTypeProviders\DefinitionLocationAttributeWithSpaceInTheType\DefinitionLocationAttributeWithSpaceInTheType.csproj","{D4C88934-5893-467E-A55C-A11ECD6479FE}"
4444
EndProject
45-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") ="DummyProviderForLanguageServiceTesting","vsintegration\tests\unittests\MockTypeProviders\DummyProviderForLanguageServiceTesting\DummyProviderForLanguageServiceTesting.fsproj","{6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}"
45+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") ="DummyProviderForLanguageServiceTesting","vsintegration\tests\MockTypeProviders\DummyProviderForLanguageServiceTesting\DummyProviderForLanguageServiceTesting.fsproj","{6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}"
4646
EndProject
47-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="EditorHideMethodsAttribute","vsintegration\tests\unittests\MockTypeProviders\EditorHideMethodsAttribute\EditorHideMethodsAttribute.csproj","{0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}"
47+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="EditorHideMethodsAttribute","vsintegration\tests\MockTypeProviders\EditorHideMethodsAttribute\EditorHideMethodsAttribute.csproj","{0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}"
4848
EndProject
49-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") ="EmptyAssembly","vsintegration\tests\unittests\MockTypeProviders\EmptyAssembly\EmptyAssembly.fsproj","{004982C6-93EA-4E70-B4F0-BE7D7219926A}"
49+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") ="EmptyAssembly","vsintegration\tests\MockTypeProviders\EmptyAssembly\EmptyAssembly.fsproj","{004982C6-93EA-4E70-B4F0-BE7D7219926A}"
5050
EndProject
51-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="XmlDocAttributeWithAdequateComment","vsintegration\tests\unittests\MockTypeProviders\XmlDocAttributeWithAdequateComment\XmlDocAttributeWithAdequateComment.csproj","{243A81AC-A954-4601-833A-60EEEFB00FCD}"
51+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="XmlDocAttributeWithAdequateComment","vsintegration\tests\MockTypeProviders\XmlDocAttributeWithAdequateComment\XmlDocAttributeWithAdequateComment.csproj","{243A81AC-A954-4601-833A-60EEEFB00FCD}"
5252
EndProject
53-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="XmlDocAttributeWithEmptyComment","vsintegration\tests\unittests\MockTypeProviders\XmlDocAttributeWithEmptyComment\XmlDocAttributeWithEmptyComment.csproj","{B4595EB6-053A-400E-AA1B-7727F1BC900F}"
53+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="XmlDocAttributeWithEmptyComment","vsintegration\tests\MockTypeProviders\XmlDocAttributeWithEmptyComment\XmlDocAttributeWithEmptyComment.csproj","{B4595EB6-053A-400E-AA1B-7727F1BC900F}"
5454
EndProject
55-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="XmlDocAttributeWithLocalizedComment","vsintegration\tests\unittests\MockTypeProviders\XmlDocAttributeWithLocalizedComment\XmlDocAttributeWithLocalizedComment.csproj","{A559D7E8-7EFD-473A-B618-A10B41AB523B}"
55+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="XmlDocAttributeWithLocalizedComment","vsintegration\tests\MockTypeProviders\XmlDocAttributeWithLocalizedComment\XmlDocAttributeWithLocalizedComment.csproj","{A559D7E8-7EFD-473A-B618-A10B41AB523B}"
5656
EndProject
57-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="XmlDocAttributeWithLongComment","vsintegration\tests\unittests\MockTypeProviders\XmlDocAttributeWithLongComment\XmlDocAttributeWithLongComment.csproj","{AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}"
57+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="XmlDocAttributeWithLongComment","vsintegration\tests\MockTypeProviders\XmlDocAttributeWithLongComment\XmlDocAttributeWithLongComment.csproj","{AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}"
5858
EndProject
59-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="XmlDocAttributeWithNullComment","vsintegration\tests\unittests\MockTypeProviders\XmlDocAttributeWithNullComment\XmlDocAttributeWithNullComment.csproj","{956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}"
59+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") ="XmlDocAttributeWithNullComment","vsintegration\tests\MockTypeProviders\XmlDocAttributeWithNullComment\XmlDocAttributeWithNullComment.csproj","{956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}"
6060
EndProject
6161
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") ="FSharp.Build","src\fsharp\FSharp.Build\FSharp.Build.fsproj","{702A7979-BCF9-4C41-853E-3ADFC9897890}"
6262
EndProject

‎build-everything.proj‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<ProjectsWithNet40Include="vsintegration/fsharp-vsintegration-item-templates-build.proj" />
3535
<ProjectsWithNet40Include="vsintegration/fsharp-vsintegration-vsix-build.proj" />
3636
</ItemGroup>
37+
3738
<PropertyGroupCondition="'$(BUILD_VS)'=='1'">
3839
<RestoreVSIntegration>true</RestoreVSIntegration>
3940
<RestoreLanguageServiceProfiling>true</RestoreLanguageServiceProfiling>
@@ -103,9 +104,15 @@
103104
<ProjectsToRestoreInclude="fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj" />
104105
</ItemGroup>
105106

107+
<ItemGroupCondition="'$(BUILD_VS)'=='1' OR '$(TEST_VS_IDEUNIT_SUITE)'=='1'">
108+
<!-- always restore these so VisualFSharp.sln is usable-->
109+
<ProjectsToRestoreInclude="vsintegration/fsharp-vsintegration-unittests-build.proj" />
110+
</ItemGroup>
111+
106112
<ItemGroupCondition="'$(TEST_VS_IDEUNIT_SUITE)'=='1'">
107113
<ProjectsWithNet40Include="vsintegration/fsharp-vsintegration-unittests-build.proj" />
108114
</ItemGroup>
115+
109116
<PropertyGroupCondition="'$(TEST_VS_IDEUNIT_SUITE)'=='1'">
110117
<RestoreVSIntegrationUnitTests>true</RestoreVSIntegrationUnitTests>
111118
</PropertyGroup>

‎src/fsharp/ConstraintSolver.fs‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ let FilterEachThenUndo f meths =
359359
trace.Undo()
360360
match CheckNoErrorsAndGetWarnings reswith
361361
| None-> None
362-
| Some warns-> Some(calledMeth, warns.Length, trace))
362+
| Some warns-> Some(calledMeth, warns, trace))
363363

364364
letShowAccessDomain ad=
365365
match adwith
@@ -2194,8 +2194,8 @@ and ResolveOverloading
21942194
(ArgsEquivInsideUndo csenv cx.IsSome)
21952195
reqdRetTyOpt
21962196
calledMeth)with
2197-
|[(calledMeth,_,_)]->
2198-
Some calledMeth,CompleteD, NoTrace// Can't re-play the trace since ArgsEquivInsideUndo was used
2197+
|[(calledMeth,warns,_)]->
2198+
Some calledMeth,OkResult(warns,()), NoTrace// Can't re-play the trace since ArgsEquivInsideUndo was used
21992199

22002200
|_->
22012201
// Now determine the applicable methods.
@@ -2255,8 +2255,8 @@ and ResolveOverloading
22552255

22562256
None, ErrorD(failOverloading(FSComp.SR.csNoOverloadsFound methodName) errors), NoTrace
22572257

2258-
|[(calledMeth,_, t)]->
2259-
Some calledMeth,CompleteD, WithTrace t
2258+
|[(calledMeth,warns, t)]->
2259+
Some calledMeth,OkResult(warns,()), WithTrace t
22602260

22612261
| applicableMeths->
22622262

@@ -2292,7 +2292,9 @@ and ResolveOverloading
22922292
if c<>0then celse
22932293
0
22942294

2295-
letbetter(candidate:CalledMeth<_>,candidateWarnCount,_)(other:CalledMeth<_>,otherWarnCount,_)=
2295+
letbetter(candidate:CalledMeth<_>,candidateWarnings,_)(other:CalledMeth<_>,otherwarnings,_)=
2296+
letcandidateWarnCount= List.length candidateWarnings
2297+
letotherWarnCount= List.length otherwarnings
22962298
// Prefer methods that don't give "this code is less generic" warnings
22972299
// Note: Relies on 'compare' respecting true > false
22982300
letc= compare(candidateWarnCount=0)(otherWarnCount=0)
@@ -2383,7 +2385,7 @@ and ResolveOverloading
23832385
else
23842386
None)
23852387
match bestMethodswith
2386-
|[(calledMeth,_, t)]-> Some calledMeth,CompleteD, WithTrace t
2388+
|[(calledMeth,warns, t)]-> Some calledMeth,OkResult(warns,()), WithTrace t
23872389
| bestMethods->
23882390
letmethodNames=
23892391
letmethods=

‎src/fsharp/FSharp.Build/FSharpEmbedResourceText.fs‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,14 +348,16 @@ open Printf
348348
letoutFilename= Path.Combine(_outputPath, justfilename+".fs")
349349
letoutXmlFilename= Path.Combine(_outputPath, justfilename+".resx")
350350

351-
if File.Exists(outFilename)&&
352-
File.Exists(outXmlFilename)&&
353-
File.Exists(filename)&&
354-
File.GetLastWriteTimeUtc(filename)<= File.GetLastWriteTimeUtc(outFilename)&&
355-
File.GetLastWriteTimeUtc(filename)<= File.GetLastWriteTimeUtc(outXmlFilename)then
356-
printMessage(sprintf"Skipping generation of%s and%s since up-to-date" outFilename outXmlFilename)
351+
letcondition1= File.Exists(outFilename)
352+
letcondition2= condition1&& File.Exists(outXmlFilename)
353+
letcondition3= condition2&& File.Exists(filename)
354+
letcondition4= condition3&&(File.GetLastWriteTimeUtc(filename)<= File.GetLastWriteTimeUtc(outFilename))
355+
letcondition5= condition4&&(File.GetLastWriteTimeUtc(filename)<= File.GetLastWriteTimeUtc(outXmlFilename))
356+
if condition5then
357+
printMessage(sprintf"Skipping generation of%s and%s from%s since up-to-date" outFilename outXmlFilename filename)
357358
Some(filename, outFilename, outXmlFilename)
358359
else
360+
printMessage(sprintf"Generating%s and%s from%s, because condition%d is false, see FSharpEmbedResourceText.fs in the F# source" outFilename outXmlFilename filename(ifnot condition1then1elifnot condition2then2elifnot condition3then3elifnot condition4then4else5))
359361

360362
printMessage(sprintf"Reading%s" filename)
361363
letlines= File.ReadAllLines(filename)

‎src/fsharp/IlxGen.fs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ open Microsoft.FSharp.Compiler.AbstractIL.Internal
1717
openMicrosoft.FSharp.Compiler.AbstractIL.Internal.Library
1818
openMicrosoft.FSharp.Compiler.AbstractIL.Extensions.ILX
1919
openMicrosoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types
20-
openMicrosoft.FSharp.Compiler.AbstractIL.Diagnostics
2120
openMicrosoft.FSharp.Compiler.AbstractIL.Internal.BinaryConstants
2221

2322
openMicrosoft.FSharp.Compiler
@@ -35,7 +34,6 @@ open Microsoft.FSharp.Compiler.Lib
3534
openMicrosoft.FSharp.Compiler.TypeRelations
3635
openMicrosoft.FSharp.Compiler.TypeChecker
3736
openMicrosoft.FSharp.Compiler.Infos
38-
openMicrosoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types
3937

4038

4139
letIsNonErasedTypar(tp:Typar)=not tp.IsErased

‎src/fsharp/IlxGen.fsi‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,39 @@ type IlxGenBackend =
1818
[<NoEquality; NoComparison>]
1919
typeinternalIlxGenOptions=
2020
{ fragName:string
21+
22+
/// Indicates if we are generating filter blocks
2123
generateFilterBlocks:bool
24+
25+
/// Indicates if we should workaround old reflection emit bugs
2226
workAroundReflectionEmitBugs:bool
27+
28+
/// Indicates if static array data should be emitted using static blobs
2329
emitConstantArraysUsingStaticDataBlobs:bool
30+
2431
/// If this is set, then the last module becomes the "main" module
2532
mainMethodInfo:Attribs option
33+
34+
/// Indicates if local optimizations are active
2635
localOptimizationsAreOn:bool
36+
37+
/// Indicates if we are generating debug symbols or not
2738
generateDebugSymbols:bool
39+
40+
/// A flag to help test emit of debug information
2841
testFlagEmitFeeFeeAs100001:bool
42+
43+
/// Indicates which backend we are generating code for
2944
ilxBackend:IlxGenBackend
45+
3046
/// Indicates the code is being generated in FSI.EXE and is executed immediately after code generation
3147
/// This includes all interactively compiled code, including #load, definitions, and expressions
3248
isInteractive:bool
49+
3350
/// Indicates the code generated is an interactive 'it' expression. We generate a setter to allow clearing of the underlying
3451
/// storage, even though 'it' is not logically mutable
3552
isInteractiveItExpr:bool
53+
3654
/// Indicates that, whenever possible, use callvirt instead of call
3755
alwaysCallVirt:bool}
3856

‎src/fsharp/NameResolution.fs‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,12 +1330,18 @@ let (|ActivePatternCaseUse|_|) (item:Item) =
13301330
| Item.ActivePatternResult(ap,_, idx,_)-> Some(ap.Range, ap.Range, idx)
13311331
|_-> None
13321332

1333+
lettyconRefDefnHash(_g:TcGlobals)(eref1:EntityRef)=
1334+
hash eref1.LogicalName
1335+
13331336
lettyconRefDefnEq g(eref1:EntityRef)(eref2:EntityRef)=
13341337
tyconRefEq g eref1 eref2
13351338
// Signature items considered equal to implementation items
13361339
||((eref1.DefinitionRange= eref2.DefinitionRange|| eref1.SigRange= eref2.SigRange)&&
13371340
(eref1.LogicalName= eref2.LogicalName))
13381341

1342+
letvalRefDefnHash(_g:TcGlobals)(vref1:ValRef)=
1343+
hash vref1.DisplayName
1344+
13391345
letvalRefDefnEq g(vref1:ValRef)(vref2:ValRef)=
13401346
valRefEq g vref1 vref2
13411347
// Signature items considered equal to implementation items
@@ -1410,6 +1416,23 @@ let ItemsAreEffectivelyEqual g orig other =
14101416

14111417
|_->false
14121418

1419+
/// Given the Item 'orig' - returns function 'other : Item -> bool', that will yield true if other and orig represents the same item and false - otherwise
1420+
letItemsAreEffectivelyEqualHash(g:TcGlobals)orig=
1421+
match origwith
1422+
| EntityUse tcref-> tyconRefDefnHash g tcref
1423+
| Item.TypeVar(nm,_)-> hash nm
1424+
| ValUse vref-> valRefDefnHash g vref
1425+
| ActivePatternCaseUse(_,_, idx)-> hash idx
1426+
| MethodUse minfo-> minfo.ComputeHashCode()
1427+
| PropertyUse pinfo-> pinfo.ComputeHashCode()
1428+
| Item.ArgName(id,_,_)-> hash id.idText
1429+
| ILFieldUse ilfinfo-> ilfinfo.ComputeHashCode()
1430+
| UnionCaseUse ucase-> hash ucase.CaseName
1431+
| RecordFieldUse(name,_)-> hash name
1432+
| EventUse einfo-> einfo.ComputeHashCode()
1433+
| Item.ModuleOrNamespaces_->100013
1434+
|_->389329
1435+
14131436
[<System.Diagnostics.DebuggerDisplay("{DebugToString()}")>]
14141437
typeCapturedNameResolution(p:pos,i:Item,tpinst,io:ItemOccurence,de:DisplayEnv,nre:NameResolutionEnv,ad:AccessorDomain,m:range)=
14151438
memberthis.Pos= p

‎src/fsharp/NameResolution.fsi‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ type internal ItemOccurence =
251251
/// Check for equality, up to signature matching
252252
valItemsAreEffectivelyEqual:TcGlobals->Item->Item->bool
253253

254+
/// Hash compatible with ItemsAreEffectivelyEqual
255+
valItemsAreEffectivelyEqualHash:TcGlobals->Item->int
256+
254257
[<Class>]
255258
typeinternalCapturedNameResolution=
256259
/// line and column

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp