Skip to content

Integrate from fsharp\fsharp master #641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 431 commits into from
Oct 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
431 commits
Select commit Hold shift + click to select a range
13d430a
switching to Array approach
jackmott Aug 11, 2016
c1b6afb
fix fsfromfsviacs build
eiriktsarpalis Aug 11, 2016
70e769b
fix tab on count increment
jackmott Aug 11, 2016
a0ebc0f
Merge branch 'faster-array-filter' of https://github.com/jackmott/vis…
KevinRansom Aug 11, 2016
b16ae44
elide whitespace
KevinRansom Aug 11, 2016
9f7dda7
Merge branch 'working5' of https://github.com/liboz/visualfsharp into…
KevinRansom Aug 11, 2016
682d06d
don't use and add minor comment
KevinRansom Aug 11, 2016
57322e6
revert
jackmott Aug 11, 2016
ead9e6b
revert
jackmott Aug 11, 2016
be26fc6
faster partition
jackmott Aug 11, 2016
48ea5ca
Update array.fs
jackmott Aug 11, 2016
cdfcd91
fix trailing whitespace
jackmott Aug 11, 2016
a91fe38
Merge remote-tracking branch 'upstream/master'
jackmott Aug 11, 2016
464f312
changing for loops to array.Length-1 pattern
jackmott Aug 11, 2016
636d134
fixed two mistakes found by unit tests
jackmott Aug 11, 2016
a840e8c
remove SurfaceArea.Silverlight tests leftover file
eiriktsarpalis Aug 11, 2016
669de03
simplify for loop
jackmott Aug 11, 2016
14676f9
merge with upstream master
jackmott Aug 11, 2016
5f34f10
cleaner for syntax
jackmott Aug 11, 2016
8156178
clean up OSS targets files.
KevinRansom Aug 11, 2016
d8ccb53
use consistent for loop syntax
jackmott Aug 12, 2016
d0b3cc5
faster parallel partition
jackmott Aug 12, 2016
69370fb
Merge branch 'master' of https://github.com/KevinRansom/visualfsharp
KevinRansom Aug 12, 2016
093c490
preview4
KevinRansom Aug 12, 2016
ea0110d
faster parallel.choose
jackmott Aug 12, 2016
2974510
minor code cleanup for il.fs
Thorium Aug 12, 2016
e99c3a0
remove unecessary len vars
jackmott Aug 12, 2016
5e61c22
remove temp.bat
KevinRansom Aug 12, 2016
36e5c9b
Fix hintpath for System.ValueTuple.dll and System.Immutable.dll
KevinRansom Aug 12, 2016
3cdf31d
shadowcopy doesn't work with public sign
KevinRansom Aug 12, 2016
03ce330
Merge pull request #1426 from Thorium/master
KevinRansom Aug 12, 2016
af89a30
Merge pull request #1418 from jackmott/fast-array-partition
KevinRansom Aug 12, 2016
7cfe41e
Merge pull request #1422 from KevinRansom/master
KevinRansom Aug 12, 2016
9b1a08b
Fix some more preview issues
KevinRansom Aug 13, 2016
b7f2596
adding array perf testing sample script
jackmott Aug 13, 2016
c346655
Merge branch 'master' of https://github.com/Microsoft/visualfsharp in…
KevinRansom Aug 13, 2016
629d4e2
fix call of Array.sub
jackmott Aug 13, 2016
657e8af
Fix update.cmd
KevinRansom Aug 13, 2016
918e557
Encore un fois
KevinRansom Aug 13, 2016
200715b
Merge branch 'master' of https://github.com/KevinRansom/visualfsharp
KevinRansom Aug 13, 2016
3cdcad8
Merge branch 'preview4' of https://github.com/Microsoft/visualfsharp …
KevinRansom Aug 13, 2016
6ca796c
Merge pull request #1386 from eiriktsarpalis/csharp-optional-param-co…
KevinRansom Aug 13, 2016
feab056
Add switch for publicsign, by default use delaysign because of ngen
KevinRansom Aug 13, 2016
fb57250
one more case
jackmott Aug 13, 2016
a177d8e
normalize formatting
jackmott Aug 13, 2016
4853293
Merge pull request #1425 from Microsoft/preview4
KevinRansom Aug 13, 2016
2cc1d9d
change task cancellation behaviour on awaited untyped tasks
eiriktsarpalis Aug 13, 2016
c04eb01
add tests
eiriktsarpalis Aug 13, 2016
9749378
add F# optional implicit converter runtime tests
eiriktsarpalis Aug 13, 2016
9e6aebd
fix Async.Sleep cancellation for netcore
eiriktsarpalis Aug 13, 2016
76796c3
store
KevinRansom Aug 14, 2016
897e1ad
Merge https://github.com/Microsoft/visualfsharp
KevinRansom Aug 14, 2016
eb1e411
more efficient algorithm for List.groupBy and a fix to the related un…
liboz Aug 13, 2016
7d96870
only 1 evaluation of IEnumator.Current per loop
liboz Aug 14, 2016
8430f20
collections cleanup
liboz Aug 14, 2016
6ddfb23
faster averageby, cleanup
jackmott Aug 14, 2016
87fff30
fix update.fs and config.fs for preview 4
KevinRansom Aug 15, 2016
d6c85ea
comparewith and concat
jackmott Aug 15, 2016
0c0da19
fix for call of partitionNew
jackmott Aug 15, 2016
cd05c09
adding benchmarkdotnet to packages.config
jackmott Aug 15, 2016
06fcf47
collections cleanup
liboz Aug 15, 2016
068255e
Fix how config.bat finds the sdk ... used to set path to sn.exe
KevinRansom Aug 15, 2016
adfdad7
Merge pull request #5 from Microsoft/master
AviAvni Aug 16, 2016
fb4c1d7
Fix ci_part1 on dev15 preview 4
KevinRansom Aug 16, 2016
681c6c6
Merge pull request #1440 from liboz/patch-1
KevinRansom Aug 16, 2016
73234af
fix #1394
AviAvni Aug 16, 2016
8a33fc0
fix message
AviAvni Aug 16, 2016
4fb4bd3
add test
AviAvni Aug 16, 2016
b22cd31
fix build seperate test
AviAvni Aug 16, 2016
f401761
fix error line num
AviAvni Aug 16, 2016
183861a
throw TaskCanceledException
eiriktsarpalis Aug 16, 2016
8201bef
Suggest fields from record ctor - fixes #1445
forki Aug 16, 2016
dedbfe8
removing inline from groupBy
liboz Aug 16, 2016
2b306ad
Merge pull request #1420 from jackmott/fix-array-length-pattern
KevinRansom Aug 16, 2016
fa39a5c
merge with master
jackmott Aug 16, 2016
1d3409c
Merge pull request #1439 from jackmott/comparewith
KevinRansom Aug 16, 2016
c44a121
merge with master
jackmott Aug 16, 2016
5fff014
Added F# script/file items to VS new file dialog
Aug 16, 2016
81bdd76
Merge pull request #1451 from otawfik-ms/fix--new-file-scripts-1427
Aug 17, 2016
7eb2dce
changed warning message for tastValueHasBeenCopied
zpbappi Aug 17, 2016
d546700
added optimization when doing set difference from an empty set
zpbappi Aug 17, 2016
6f0b3fd
updated the expected message in test accordingly
zpbappi Aug 17, 2016
87864b9
changed another expected tests to make the fsharpqa test suite pass
zpbappi Aug 18, 2016
20045ed
changing for loops to array.Length-1 pattern
jackmott Aug 11, 2016
e3875ad
fixed two mistakes found by unit tests
jackmott Aug 11, 2016
9eb0975
use consistent for loop syntax
jackmott Aug 12, 2016
b340999
remove unecessary len vars
jackmott Aug 12, 2016
31c6c67
one more case
jackmott Aug 13, 2016
2ce224b
normalize formatting
jackmott Aug 13, 2016
b500565
comparewith and concat
jackmott Aug 15, 2016
cfb448f
collections cleanup
liboz Aug 15, 2016
046deee
Added F# script/file items to VS new file dialog
Aug 16, 2016
9319e5f
Merge remote-tracking branch 'upstream/master'
jackmott Aug 18, 2016
26b3f50
new filter
jackmott Aug 18, 2016
8079552
new filter
jackmott Aug 18, 2016
c86cdbb
spacing fix
jackmott Aug 18, 2016
e1f005c
Change build parameter SignType to BUILD_PUBLICSIGN because it is use…
Aug 18, 2016
a11ec0f
Merge pull request #1457 from otawfik-ms/fixsigning
Aug 19, 2016
76fda55
Merge remote-tracking branch 'upstream/master' into filter2
jackmott Aug 19, 2016
0836f56
bugfix, merge with master
jackmott Aug 19, 2016
497f11a
avoid extra copying
jackmott Aug 19, 2016
918dc77
Disable AddReferences.COM
KevinRansom Aug 19, 2016
8b7d65a
Use full debugging for net40 builds and portable pdb's for coreclr bu…
KevinRansom Aug 19, 2016
08cde0c
Merge branch 'master' of https://github.com/Microsoft/visualfsharp
KevinRansom Aug 19, 2016
9d5399f
Add a few more SDKs
KevinRansom Aug 20, 2016
5fc3aa4
sn64 did not have a trailing '\'
KevinRansom Aug 20, 2016
4aefb67
Merge pull request #1441 from KevinRansom/master
KevinRansom Aug 20, 2016
ec83482
Merge pull request #1437 from jackmott/averageBy
KevinRansom Aug 20, 2016
672c2dd
Merge pull request #1453 from zpbappi/issue-324
KevinRansom Aug 20, 2016
dcc134e
Merge pull request #1456 from jackmott/filter2
KevinRansom Aug 20, 2016
e33f27a
Merge pull request #1444 from AviAvni/fix-1394
KevinRansom Aug 20, 2016
18a7140
Merge pull request #1433 from eiriktsarpalis/fix-continueWithUnit
KevinRansom Aug 20, 2016
9335745
Merge pull request #1434 from eiriktsarpalis/csharp-optional-add-testing
KevinRansom Aug 20, 2016
fe27371
Merge pull request #1452 from zpbappi/issue-389
KevinRansom Aug 20, 2016
ce6ddd5
choose with less memory use
jackmott Aug 21, 2016
714e504
merge with master
jackmott Aug 21, 2016
807883a
Fix fsharp.core.dll copies
KevinRansom Aug 21, 2016
4e38786
Removed duplicate key
ncave Aug 21, 2016
ddfe73f
Merge pull request #1463 from ncave/patch
KevinRansom Aug 21, 2016
96b4a04
Merge branch 'master' of https://github.com/Microsoft/visualfsharp in…
KevinRansom Aug 22, 2016
7c610c7
Make fsharp.compiler.dll and FSharp.LanguageService.Compiler.dll peve…
KevinRansom Aug 22, 2016
123eea8
merge
KevinRansom Aug 22, 2016
57fbd5f
Small cleanup in reflect.fs
forki Aug 22, 2016
695069d
Update README.md
KevinRansom Aug 22, 2016
374bbc8
Cleanup isNotNull
forki Aug 22, 2016
d224a97
Suggest types - fixes #1446
forki Aug 16, 2016
75392d3
Fixed binary reader error message
ncave Aug 22, 2016
87e5f46
added detail to local.fs error messages
cloudRoutine Aug 17, 2016
85669c4
move detailed exceptions into FSharp.Core namespace
cloudRoutine Aug 17, 2016
10ef89e
detailed error messages for array2.fs
cloudRoutine Aug 17, 2016
7e577e0
Detailed error messages seq.fs
cloudRoutine Aug 17, 2016
033f04d
added detail to 2 string errors in string.fs
cloudRoutine Aug 17, 2016
945d529
Added more detailed error messages to list.fs
cloudRoutine Aug 18, 2016
c0200bf
cleaned up error messages in local.fs
cloudRoutine Aug 18, 2016
9e03583
extend detailed exception signature
cloudRoutine Aug 18, 2016
65907ec
Clean up Array2D error messages
cloudRoutine Aug 18, 2016
cdfa813
more detailed collections function error messages
cloudRoutine Aug 18, 2016
3ccf2fe
adjust access modifiers
cloudRoutine Aug 19, 2016
b5198b0
fix grammar in error message
cloudRoutine Aug 19, 2016
ff890d8
use labeled properties for FsCheck tests
cloudRoutine Aug 19, 2016
4ef509b
show results in fscheck labels
cloudRoutine Aug 19, 2016
ddc37f3
additional exn fns for arrays
cloudRoutine Aug 19, 2016
ab6f346
added more detailed array error messages
cloudRoutine Aug 19, 2016
bdc2ea6
check exns explicitly with FsCheck
cloudRoutine Aug 19, 2016
6ac848a
simplify error messages in seq.fs
cloudRoutine Aug 19, 2016
a5e2896
Update update.cmd to support win sdk 10
KevinRansom Aug 22, 2016
c6cd0b4
Update update.cmd to support win sdk 10
KevinRansom Aug 22, 2016
f41f963
Merge branch 'master' of https://github.com/KevinRansom/visualfsharp
KevinRansom Aug 22, 2016
97904fc
Merge pull request #1462 from KevinRansom/master
KevinRansom Aug 22, 2016
5b8bf72
src/update.cmd
KevinRansom Aug 22, 2016
36050db
Merge pull request #1467 from forki/isNotNull
KevinRansom Aug 22, 2016
4af438b
Merge pull request #1466 from forki/clean-reflect
KevinRansom Aug 22, 2016
f582728
Add support for Systemm.ValueTuple to existing f# templates
KevinRansom Aug 23, 2016
c8a7ec7
Using isNull when possible
forki Aug 23, 2016
9cb4283
Cleanup Optimizer
forki Aug 23, 2016
a5f00ed
Cleanup isNil and nonNil
forki Aug 23, 2016
50d14d6
Optimize use of isNone and isSome
forki Aug 23, 2016
b6ab404
Use isNull from base
forki Aug 23, 2016
8a34540
Merge pull request #1473 from KevinRansom/templatetuples
KevinRansom Aug 23, 2016
b80d8fc
Merge pull request #1378 from liboz/working
KevinRansom Aug 23, 2016
4873e4c
Merge pull request #1423 from jackmott/faster-parallel-partition
KevinRansom Aug 23, 2016
773fc3e
verifyMethodInfoWasTaken is only enabled in Debug mode
forki Aug 23, 2016
b0c42a7
yet another pattern match
forki Aug 23, 2016
eff4dfa
Who needs parenthesis anyways?
forki Aug 23, 2016
7a1db94
Add fsc.exe.config/fsi.exe.config and fsiAnyCpu.config to setup. And…
KevinRansom Aug 23, 2016
8a03389
setup/FSharp.SDK/component-groups/Runtime_Redist.wxs
KevinRansom Aug 23, 2016
fd657f3
Merge pull request #1476 from forki/optimizer
KevinRansom Aug 23, 2016
b877799
Merge pull request #1465 from KevinRansom/peverify
KevinRansom Aug 23, 2016
303fc40
Merge pull request #1461 from jackmott/choose2
KevinRansom Aug 23, 2016
a9af082
feedback
KevinRansom Aug 23, 2016
dc4e5e5
Merge pull request #1449 from forki/typesuggestion
KevinRansom Aug 23, 2016
36de62a
merge
KevinRansom Aug 23, 2016
69b3379
Merge pull request #1475 from forki/isNull
KevinRansom Aug 23, 2016
6f42543
Merge pull request #1477 from KevinRansom/fixappconfigs
KevinRansom Aug 23, 2016
467fb8c
PR cleanup
cloudRoutine Aug 24, 2016
9028c11
Cleanup QuickParse.fs
forki Aug 24, 2016
d1b0bea
Alternative Array.Filter implementation
manofstick Aug 24, 2016
1aff9d4
Fixed tests
ncave Aug 24, 2016
924c6a3
Cleanup printf
forki Aug 24, 2016
d1f6fb6
No-op
ncave Aug 24, 2016
f82d7c9
print public fields
liboz Aug 24, 2016
ef59304
Added test and cleanup
liboz Aug 24, 2016
a582a14
ending with a newline
liboz Aug 24, 2016
4f4d814
escaped braces
liboz Aug 24, 2016
28882cc
maybe it needs the spaces...
liboz Aug 25, 2016
69e55b6
fix test
liboz Aug 25, 2016
adfab79
Return to originally proposed filter method
manofstick Aug 25, 2016
83912df
1. Update System.ValueTuple in templates to the official public pre-r…
KevinRansom Aug 25, 2016
ec32fa2
Merge pull request #1480 from forki/printf
KevinRansom Aug 25, 2016
062d672
Merge pull request #1454 from cloudRoutine/improve-errors
KevinRansom Aug 25, 2016
4dd4e1e
Merge pull request #1468 from ncave/patch
KevinRansom Aug 25, 2016
389095c
Additional cleanup as suggested by feedback
liboz Aug 25, 2016
6a4118c
Merge pull request #1487 from Microsoft/sqmsessionguid
KevinRansom Aug 25, 2016
5e865c5
Merge pull request #1484 from liboz/working3
KevinRansom Aug 26, 2016
53fe4ef
Merge pull request #1478 from forki/clean-quickparse
KevinRansom Aug 26, 2016
848c934
Merge pull request #1377 from smoothdeveloper/issue-35-return-type-ab…
KevinRansom Aug 26, 2016
251ed76
Deploy correct dependencies for the compiler
Aug 26, 2016
9b215b0
Add missing compiler dependencies to F# VS Addin
Aug 26, 2016
3951da6
Merge pull request #1490 from Microsoft/compilerdeployment
KevinRansom Aug 26, 2016
ce557df
Fix portable pdb debugging
Aug 30, 2016
f4eab74
Add ValueTuple to test project.json
Aug 30, 2016
198c30a
"Final" version of Array.filter, including test
manofstick Aug 30, 2016
6fd485d
Merge pull request #1501 from Microsoft/compilerdeployment
KevinRansom Aug 30, 2016
a0050e1
Merge pull request #1479 from manofstick/manofstick-array-filter
KevinRansom Aug 30, 2016
641bb41
Merge remote-tracking branch 'refs/remotes/Microsoft/master'
manofstick Aug 31, 2016
8e3e42b
race condition: access to lastStamp outside of lock
manofstick Aug 31, 2016
072fd54
race condition: unsafe double check locking
manofstick Aug 31, 2016
1d685c3
fix lastStamp type
manofstick Aug 31, 2016
66195b6
Update nuspec for FSharp.Compilerto point to shipped system.valuetuple
KevinRansom Aug 31, 2016
359df98
Merge pull request #1507 from Microsoft/valuetuplenuspec
KevinRansom Aug 31, 2016
074b033
Merge pull request #1505 from manofstick/manofstick-threading-concerns
KevinRansom Aug 31, 2016
cd56475
Fix more setup paths
Aug 30, 2016
8ec9219
Fix Microsoft.DiaSymReader path in setup
Aug 29, 2016
71c8798
Re-adding qualified access to Microsoft.FSharp.Primitives.Basics for …
liboz Sep 2, 2016
3f35532
Portable PDB generation did not emit sequence points and local variab…
KevinRansom Sep 6, 2016
b6785c8
allow Dev15 setup to uninstall F# packages by listing the package ID …
brettfo Sep 7, 2016
e7d09b2
Use List.exists for contains (#1518)
forki Sep 11, 2016
b62f97c
Try to reproduce #1536
forki Sep 15, 2016
f320958
Deleting unused method from test suite (#1531)
forki Sep 15, 2016
6bbea65
Limit number of scopes in a method to avoid Stack Overflow in PDBWrit…
forki Sep 15, 2016
ea60a9d
Embed PDBs in built binary (#1529)
KevinRansom Sep 15, 2016
6afc4f9
Update projects for Preview 5 (#1541)
KevinRansom Sep 17, 2016
ab11350
Merge branch 'i1536' of https://github.com/forki/visualfsharp into fo…
KevinRansom Sep 17, 2016
b528c23
Merge pdb scopes for full pdbs when the scopes are the same size.
KevinRansom Sep 17, 2016
9eea25c
Merge https://github.com/Microsoft/visualfsharp into forki-i1536
KevinRansom Sep 17, 2016
c7a9acf
reapply top
KevinRansom Sep 18, 2016
9dc2ed8
A couple of files had variables change order
KevinRansom Sep 18, 2016
4d87596
Use VisualCppTools nuget package for link.exe
KevinRansom Sep 18, 2016
bc95eff
Merge pull request #1545 from Microsoft/forki-i1536
KevinRansom Sep 20, 2016
588ab10
Fix FS0052 warnings (#1543)
mrinaldi Sep 20, 2016
782451a
deferencing only once per function call (#1532)
liboz Sep 20, 2016
85f3a40
Update vccptools version # (#1554)
KevinRansom Sep 20, 2016
ca69e01
Cleanup Optimizer (#1519)
forki Sep 20, 2016
55fb7e6
Integrate visualfsharp master and remove static dependencies on Syste…
dsyme Sep 21, 2016
6f90f39
various fixes
dsyme Sep 22, 2016
6b07a3c
move SDK to mono/fsharp
dsyme Sep 23, 2016
f421906
move SDK to mono/fsharp (2)
dsyme Sep 26, 2016
2843c4f
adjust VS2010 project file
dsyme Sep 26, 2016
84b6da1
Merge pull request #610 from dsyme/integrate-775
dsyme Sep 26, 2016
e28fca0
add optdata/sigdata
dsyme Sep 27, 2016
28d3540
add optdata/sigdata for net40 only
dsyme Sep 27, 2016
a2f37b6
Merge pull request #615 from dsyme/integrate-776
dsyme Sep 27, 2016
f46fc60
Integrate fsharp\fsharp
dsyme Sep 28, 2016
909adb8
fix merge conflicts
dsyme Sep 28, 2016
fa0a889
fixes to integration
dsyme Oct 11, 2016
ddd76ba
fixes for netcore 1.0
dsyme Oct 11, 2016
53f83b0
avoid eager dereferencing when building globals
dsyme Oct 11, 2016
2b158b7
Merge branch 'master' of http://github.com/fsharp/FSharp.Compiler.Ser…
dsyme Oct 11, 2016
e904062
fix .NET Core build
dsyme Oct 11, 2016
f7a868a
enable more tests on .NET Core
dsyme Oct 11, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,7 @@ src/fsharp/FSharp.Compiler.Service/FSIstrings.fs
src/fsharp/FSharp.Compiler.Service/FSIstrings.resx
Tools/
Backup/
tests/fsharp/core/array/dont.run.peverify
tests/fsharp/core/innerpoly/dont.run.peverify
tests/fsharp/typecheck/sigs/neg94-pre.dll
times
36 changes: 12 additions & 24 deletions src/absil/il.fs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ let runningOnMono =

let _ = if logging then dprintn "* warning: Il.logging is on"

let isNil x = match x with [] -> true | _ -> false
let nonNil x = match x with [] -> false | _ -> true
let int_order = LanguagePrimitives.FastGenericComparer<int>

let notlazy v = Lazy.CreateFromValue v
Expand Down Expand Up @@ -86,11 +84,7 @@ let memoizeNamespaceRightTable = new ConcurrentDictionary<string,string option *


let splitNamespace nm =
let mutable res = Unchecked.defaultof<_>
let ok = memoizeNamespaceTable.TryGetValue(nm,&res)
if ok then res else
let x = splitNamespaceAux nm
(memoizeNamespaceTable.[nm] <- x; x)
memoizeNamespaceTable.GetOrAdd(nm, splitNamespaceAux)

let splitNamespaceMemoized nm = splitNamespace nm

Expand All @@ -99,12 +93,9 @@ let memoizeNamespaceArrayTable =
Concurrent.ConcurrentDictionary<string,string[]>()

let splitNamespaceToArray nm =
let mutable res = Unchecked.defaultof<_>
let ok = memoizeNamespaceArrayTable.TryGetValue(nm,&res)
if ok then res else
let x = Array.ofList (splitNamespace nm)
(memoizeNamespaceArrayTable.[nm] <- x; x)

memoizeNamespaceArrayTable.GetOrAdd(nm, fun nm ->
let x = Array.ofList (splitNamespace nm)
x)

let splitILTypeName (nm:string) =
match nm.LastIndexOf '.' with
Expand Down Expand Up @@ -157,11 +148,7 @@ let splitTypeNameRightAux nm =
else None, nm

let splitTypeNameRight nm =
let mutable res = Unchecked.defaultof<_>
let ok = memoizeNamespaceRightTable.TryGetValue(nm,&res)
if ok then res else
let x = splitTypeNameRightAux nm
(memoizeNamespaceRightTable.[nm] <- x; x)
memoizeNamespaceRightTable.GetOrAdd(nm, splitTypeNameRightAux)

// --------------------------------------------------------------------
// Ordered lists with a lookup table
Expand Down Expand Up @@ -1987,7 +1974,7 @@ let mkILFieldRef(tref,nm,ty) = { EnclosingTypeRef=tref; Name=nm; Type=ty}
let mkILFieldSpec (tref,ty) = { FieldRef= tref; EnclosingType=ty }

let mkILFieldSpecInTy (typ:ILType,nm,fty) =
mkILFieldSpec (mkILFieldRef (typ.TypeRef,nm,fty), typ)
mkILFieldSpec (mkILFieldRef (typ.TypeRef,nm,fty), typ)

let emptyILCustomAttrs = ILAttributes (fun () -> [| |])

Expand Down Expand Up @@ -2650,7 +2637,7 @@ let rec rescopeILTypeSpecQuick scoref (tspec:ILTypeSpec) =
let tref = tspec.TypeRef
let tinst = tspec.GenericArgs
let qtref = qrescope_tref scoref tref
if ILList.isEmpty tinst && isNone qtref then
if ILList.isEmpty tinst && Option.isNone qtref then
None (* avoid reallocation in the common case *)
else
match qtref with
Expand Down Expand Up @@ -3692,12 +3679,13 @@ type ILGlobals with
mkILCustomAttribute this (mkSystemDiagnosticsDebuggableTypeRef this, [this.typ_Bool; this.typ_Bool], [ILAttribElem.Bool false; ILAttribElem.Bool jitOptimizerDisabled], [])


member this.mkDebuggableAttributeV2(ignoreSymbolStoreSequencePoints, jitOptimizerDisabled, enableEnC) =
member this.mkDebuggableAttributeV2(jitTracking, ignoreSymbolStoreSequencePoints, jitOptimizerDisabled, enableEnC) =
let tref = mkSystemDiagnosticsDebuggableTypeRef this
mkILCustomAttribute this
(tref,[mkILNonGenericValueTy (tref_DebuggableAttribute_DebuggingModes this)],
(* See System.Diagnostics.DebuggableAttribute.DebuggingModes *)
[ILAttribElem.Int32( (if jitOptimizerDisabled then 256 else 0) |||
[ILAttribElem.Int32( (if jitTracking then 1 else 0) |||
(if jitOptimizerDisabled then 256 else 0) |||
(if ignoreSymbolStoreSequencePoints then 2 else 0) |||
(if enableEnC then 4 else 0))],[])

Expand Down Expand Up @@ -4288,7 +4276,7 @@ let rec unscopeILTypeSpecQuick (tspec:ILTypeSpec) =
let tref = tspec.TypeRef
let tinst = tspec.GenericArgs
let qtref = qunscope_tref tref
if ILList.isEmpty tinst && isNone qtref then
if ILList.isEmpty tinst && Option.isNone qtref then
None (* avoid reallocation in the common case *)
else
match qtref with
Expand Down Expand Up @@ -4329,7 +4317,7 @@ let resolveILMethodRefWithRescope r td (mref:ILMethodRef) =
let nargs = args.Length
let nm = mref.Name
let possibles = td.Methods.FindByNameAndArity (nm,nargs)
if isNil possibles then failwith ("no method named "+nm+" found in type "+td.Name);
if List.isEmpty possibles then failwith ("no method named "+nm+" found in type "+td.Name);
let argTypes = mref.ArgTypes |> List.map r
let retType : ILType = r mref.ReturnType
match
Expand Down
2 changes: 1 addition & 1 deletion src/absil/il.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@ type ILGlobals =
with
member mkDebuggableAttribute: bool (* disable JIT optimizations *) -> ILAttribute
/// Some commonly used custom attibutes
member mkDebuggableAttributeV2 : bool (* ignoreSymbolStoreSequencePoints *) * bool (* disable JIT optimizations *) * bool (* enable EnC *) -> ILAttribute
member mkDebuggableAttributeV2 : bool (* jitTracking *) * bool (* ignoreSymbolStoreSequencePoints *) * bool (* disable JIT optimizations *) * bool (* enable EnC *) -> ILAttribute
member mkCompilerGeneratedAttribute : unit -> ILAttribute
member mkDebuggerNonUserCodeAttribute : unit -> ILAttribute
member mkDebuggerStepThroughAttribute : unit -> ILAttribute
Expand Down
16 changes: 6 additions & 10 deletions src/absil/illib.fs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ let (>>>&) (x:int32) (n:int32) = int32 (uint32 x >>> n)

let notlazy v = Lazy<_>.CreateFromValue v

let isSome x = match x with None -> false | _ -> true
let isNone x = match x with None -> true | _ -> false
let isNil x = match x with [] -> true | _ -> false
let nonNil x = match x with [] -> false | _ -> true
let isNull (x : 'T) = match (x :> obj) with null -> true | _ -> false
let isNonNull (x : 'T) = match (x :> obj) with null -> false | _ -> true
let nonNull msg x = if isNonNull x then x else failwith ("null: " ^ msg)
let inline isNonNull x = not (isNull x)
let inline nonNull msg x = if isNull x then failwith ("null: " ^ msg) else x
let (===) x y = LanguagePrimitives.PhysicalEquality x y

//---------------------------------------------------------------------
Expand Down Expand Up @@ -438,7 +433,7 @@ module String =
else
None

let hasPrefix s t = isSome (tryDropPrefix s t)
let hasPrefix s t = Option.isSome (tryDropPrefix s t)
let dropPrefix s t = match (tryDropPrefix s t) with Some(res) -> res | None -> failwith "dropPrefix"

let dropSuffix s t = match (tryDropSuffix s t) with Some(res) -> res | None -> failwith "dropSuffix"
Expand Down Expand Up @@ -716,8 +711,8 @@ type LazyWithContext<'T,'ctxt> =
funcOrException = box f;
findOriginalException = findOriginalException }
static member NotLazy(x:'T) : LazyWithContext<'T,'ctxt> =
{ value = x;
funcOrException = null;
{ value = x
funcOrException = null
findOriginalException = id }
member x.IsDelayed = (match x.funcOrException with null -> false | :? LazyWithContextFailure -> false | _ -> true)
member x.IsForced = (match x.funcOrException with null -> true | _ -> false)
Expand Down Expand Up @@ -785,6 +780,7 @@ module NameMap =
let exists f m = Map.foldBack (fun x y sofar -> sofar || f x y) m false
let ofKeyedList f l = List.foldBack (fun x acc -> Map.add (f x) x acc) l Map.empty
let ofList l : NameMap<'T> = Map.ofList l
let ofSeq l : NameMap<'T> = Map.ofSeq l
let ofFlatList (l:FlatList<_>) : NameMap<'T> = FlatList.toMap l
let toList (l: NameMap<'T>) = Map.toList l
let layer (m1 : NameMap<'T>) m2 = Map.foldBack Map.add m1 m2
Expand Down
2 changes: 1 addition & 1 deletion src/absil/ilprint.fs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ and goutput_gparam env os (gf: ILGenericParameterDef) =
output_parens (output_seq "," (goutput_typ env)) os gf.Constraints

and goutput_gparams env os b =
if nonNil b then
if not (List.isEmpty b) then
output_string os "<"; output_seq "," (goutput_gparam env) os b; output_string os ">"; ()

and output_bcc os bcc =
Expand Down
40 changes: 21 additions & 19 deletions src/absil/ilread.fs
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,6 @@ module MemoryMapping =
let OPEN_EXISTING = 0x0003
let OPEN_ALWAYS = 0x0004

let derefByte (p:nativeint) =
NativePtr.read (NativePtr.ofNativeInt<byte> p)

type MemoryMappedFile(hMap: MemoryMapping.HANDLE, start:nativeint) =
inherit BinaryFile()

Expand All @@ -182,37 +179,38 @@ type MemoryMappedFile(hMap: MemoryMapping.HANDLE, start:nativeint) =
start + nativeint i

override m.ReadByte i =
derefByte (m.Addr i)
Marshal.ReadByte(m.Addr i)

override m.ReadBytes i len =
let res = Bytes.zeroCreate len
Marshal.Copy(m.Addr i, res, 0,len)
res

override m.ReadInt32 i =
NativePtr.read (NativePtr.ofNativeInt<int32> (m.Addr i))
Marshal.ReadInt32(m.Addr i)

override m.ReadUInt16 i =
NativePtr.read (NativePtr.ofNativeInt<uint16> (m.Addr i))
uint16(Marshal.ReadInt16(m.Addr i))

member m.Close() =
ignore(MemoryMapping.UnmapViewOfFile start)
ignore(MemoryMapping.CloseHandle hMap)

override m.CountUtf8String i =
let start = m.Addr i
let start = m.Addr i
let mutable p = start
while derefByte p <> 0uy do
while Marshal.ReadByte(p) <> 0uy do
p <- p + 1n
int (p - start)

override m.ReadUTF8String i =
let n = m.CountUtf8String i
#if FX_RESHAPED_REFLECTION
System.Text.Encoding.UTF8.GetString(NativePtr.ofNativeInt (m.Addr i), n)
#else
new System.String(NativePtr.ofNativeInt (m.Addr i), 0, n, System.Text.Encoding.UTF8)
#endif
System.Runtime.InteropServices.Marshal.PtrToStringAnsi((m.Addr i), n)
//#if FX_RESHAPED_REFLECTION
// System.Text.Encoding.UTF8.GetString(NativePtr.ofNativeInt (m.Addr i), n)
//#else
// new System.String(NativePtr.ofNativeInt (m.Addr i), 0, n, System.Text.Encoding.UTF8)
//#endif


//---------------------------------------------------------------------
Expand Down Expand Up @@ -1486,7 +1484,7 @@ let dataEndPoints ctxtH =
let rva = ctxt.resourcesAddr + offset
res := ("manifest resource", rva) :: !res
!res
if isNil dataStartPoints then []
if List.isEmpty dataStartPoints then []
else
let methodRVAs =
let res = ref []
Expand Down Expand Up @@ -2184,7 +2182,7 @@ and seekReadMemberRefAsMethodDataUncached ctxtH (MemberRefAsMspecIdx (numtypars,

and seekReadMemberRefAsMethDataNoVarArgs ctxt numtypars idx : MethodData =
let (VarArgMethodData(enclTyp, cc, nm, argtys,varargs, retty,minst)) = seekReadMemberRefAsMethodData ctxt numtypars idx
if isSome varargs then dprintf "ignoring sentinel and varargs in ILMethodDef token signature"
if Option.isSome varargs then dprintf "ignoring sentinel and varargs in ILMethodDef token signature"
(MethodData(enclTyp, cc, nm, argtys, retty,minst))

and seekReadMethodSpecAsMethodData ctxt numtypars idx =
Expand Down Expand Up @@ -3964,16 +3962,20 @@ let OpenILModuleReader infile opts =

// ++GLOBAL MUTABLE STATE
let ilModuleReaderCache =
new Internal.Utilities.Collections.AgedLookup<(string * System.DateTime),ILModuleReader>(0, areSame=(fun (x,y) -> x = y))
new Internal.Utilities.Collections.AgedLookup<(string * System.DateTime * string * bool),ILModuleReader>(0, areSame=(fun (x,y) -> x = y))


let OpenILModuleReaderAfterReadingAllBytes infile opts =
// Pseudo-normalize the paths.
let key,succeeded =
try (FileSystem.GetFullPathShim(infile), FileSystem.GetLastWriteTimeShim(infile)), true
try
(FileSystem.GetFullPathShim(infile),
FileSystem.GetLastWriteTimeShim(infile),
opts.ilGlobals.primaryAssemblyName,
opts.ilGlobals.noDebugData), true
with e ->
System.Diagnostics.Debug.Assert(false, "Failed to compute key in OpenILModuleReaderAfterReadingAllBytes cache. Falling back to uncached.")
("",System.DateTime.Now), false
("",System.DateTime.Now,"",false), false
let cacheResult =
if not succeeded then None // Fall back to uncached.
else if opts.pdbPath.IsSome then None // can't used a cached entry when reading PDBs, since it makes the returned object IDisposable
Expand All @@ -3987,7 +3989,7 @@ let OpenILModuleReaderAfterReadingAllBytes infile opts =
{ modul = modul
ilAssemblyRefs = ilAssemblyRefs
dispose = (fun () -> ClosePdbReader pdb) }
if isNone pdb && succeeded then
if Option.isNone pdb && succeeded then
ilModuleReaderCache.Put(key, ilModuleReader)
ilModuleReader

Expand Down
2 changes: 1 addition & 1 deletion src/absil/ilreflect.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ let rec buildMethodPass3 cenv tref modB (typB:TypeBuilder) emEnv (mdef : ILMetho
| ".cctor" | ".ctor" ->
let consB = envGetConsB emEnv mref
// Constructors can not have generic parameters
assert isNil mdef.GenericParams
assert List.isEmpty mdef.GenericParams
// Value parameters
let defineParameter (i,attr,name) = consB.DefineParameterAndLog(i+1,attr,name)
mdef.Parameters |> ILList.iteri (emitParameter cenv emEnv defineParameter);
Expand Down
Loading