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

Commit9d5db9a

Browse files
remove double hash table lookup in NotifyNameResolution
1 parent8f92284 commit9d5db9a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎src/fsharp/NameResolution.fs‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,7 @@ type TcResultsSinkImpl(g, ?source: string) =
13881388
letcapturedNameResolutions= ResizeArray<_>()
13891389
letcapturedFormatSpecifierLocations= ResizeArray<_>()
13901390
letcapturedNameResolutionIdentifiers=
1391-
new System.Collections.Generic.Dictionary<pos* string, unit>
1391+
new System.Collections.Generic.HashSet<pos* string>
13921392
({new IEqualityComparer<_>with
13931393
member__.GetHashCode((p:pos,i))= p.Line+101* p.Column+ hash i
13941394
member__.Equals((p1,i1),(p2,i2))= posEq p1 p2&& i1= i2})
@@ -1423,10 +1423,7 @@ type TcResultsSinkImpl(g, ?source: string) =
14231423

14241424
letalreadyDone=
14251425
match keyOptwith
1426-
| Some key->
1427-
letres= capturedNameResolutionIdentifiers.ContainsKey key
1428-
ifnot resthen capturedNameResolutionIdentifiers.Add(key,())|> ignore
1429-
res
1426+
| Some key->not(capturedNameResolutionIdentifiers.Add key)
14301427
|_->false
14311428

14321429
if replacethen

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp