diff --git a/.gitignore b/.gitignore
index 418b3677b36..1a1ec2707c2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,10 @@
# output location
artifacts/
-packages/
-
/tests/scripts/current
+.dotnet/
+.packages/
+./tools
# Patches that may have been generated by scripts.
# (These aren't generally useful to commit directly; if anything, they should be applied.)
diff --git a/.vsts-pr.yaml b/.vsts-pr.yaml
index c9f88e2296c..772fd8cf18f 100644
--- a/.vsts-pr.yaml
+++ b/.vsts-pr.yaml
@@ -1,4 +1,5 @@
jobs:
+
- job: Linux
pool:
vmImage: ubuntu-16.04
@@ -6,21 +7,42 @@ jobs:
strategy:
maxParallel: 3
matrix:
- dotnet_sdk:
- _command: make
- _args: Configuration=release
- release_fcs:
- _command: ./fcs/build.sh
- _args: Build
+ coreclr_release:
+ _configuration: Release
+ _testKind: testcoreclr
steps:
- - script: $(_command) $(_args)
+ - script: ./eng/cibuild.sh --configuration $(_configuration) --$(_testKind)
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Build Logs
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_configuration)'
+ ArtifactName: 'Linux $(_configuration) $(_testKind) build log'
+ publishLocation: Container
+ continueOnError: true
+ condition: not(succeeded())
- task: PublishBuildArtifacts@1
+ displayName: Publish Test Results
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults'
- ArtifactName: 'Linux $(_command) $(_args)'
+ ArtifactName: 'Linux $(_configuration) $(_testKind)'
publishLocation: Container
continueOnError: true
- condition: failed()
+ condition: not(succeeded())
+
+- job: Linux_FCS
+ pool:
+ vmImage: ubuntu-16.04
+ timeoutInMinutes: 90
+ steps:
+ - script: ./fcs/build.sh Build
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Test Results
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults'
+ ArtifactName: 'Linux FCS test results'
+ publishLocation: Container
+ continueOnError: true
+ condition: not(succeeded())
- job: MacOS
pool:
@@ -29,56 +51,92 @@ jobs:
strategy:
maxParallel: 3
matrix:
- dotnet_sdk:
- _command: make
- _args: Configuration=release
- release_fcs:
- _command: ./fcs/build.sh
- _args: Build
+ coreclr_release:
+ _configuration: Release
+ _testKind: testcoreclr
+ steps:
+ - script: ./eng/cibuild.sh --configuration $(_configuration) --$(_testKind)
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Build Logs
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_configuration)'
+ ArtifactName: 'MacOS $(_configuration) $(_testKind) build log'
+ publishLocation: Container
+ continueOnError: true
+ condition: not(succeeded())
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Test Results
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults'
+ ArtifactName: 'MacOS $(_configuration) $(_testKind)'
+ publishLocation: Container
+ continueOnError: true
+ condition: not(succeeded())
+
+- job: MacOS_FCS
+ pool:
+ vmImage: macOS-10.13
+ timeoutInMinutes: 90
steps:
- - script: $(_command) $(_args)
+ - script: ./fcs/build.sh Build
- task: PublishBuildArtifacts@1
+ displayName: Publish Test Results
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults'
- ArtifactName: 'MacOS $(_command) $(_args)'
+ ArtifactName: 'MacOS FCS test results'
publishLocation: Container
continueOnError: true
- condition: failed()
+ condition: not(succeeded())
- job: Windows
pool:
- vmImage: vs2017-win2016
+ vmImage: windows-2019
timeoutInMinutes: 120
strategy:
- maxParallel: 7
+ maxParallel: 4
matrix:
- ci_part1:
- _command: build.cmd
- _args: release ci_part1
- ci_part2:
- _command: build.cmd
- _args: release ci_part2
- ci_part3:
- _command: build.cmd
- _args: release ci_part3
- ci_part4:
- _command: build.cmd
- _args: release ci_part4
- debug_default:
- _command: build.cmd
- _args: debug
- net40_no_vs:
- _command: build.cmd
- _args: release net40
- release_fcs:
- _command: fcs\build.cmd
- _args: TestAndNuget
+ desktop_release:
+ _configuration: Release
+ _testKind: testDesktop
+ coreclr_release:
+ _configuration: Release
+ _testKind: testCoreclr
+ fsharpqa_release:
+ _configuration: Release
+ _testKind: testFSharpQA
+ vs_release:
+ _configuration: Release
+ _testKind: testVs
+ steps:
+ - script: eng\CIBuild.cmd -configuration $(_configuration) -$(_testKind)
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Build Logs
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_configuration)'
+ ArtifactName: 'Windows $(_configuration) $(_testKind) build log'
+ publishLocation: Container
+ continueOnError: true
+ condition: not(succeeded())
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Test Results
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults'
+ ArtifactName: 'Windows $(_configuration) $(_testKind) test results'
+ publishLocation: Container
+ continueOnError: true
+ condition: not(succeeded())
+
+- job: Windows_FCS
+ pool:
+ vmImage: windows-2019
+ timeoutInMinutes: 120
steps:
- - script: $(_command) $(_args)
+ - script: fcs\build.cmd TestAndNuget
- task: PublishBuildArtifacts@1
+ displayName: Publish Test Results
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults'
- ArtifactName: 'Windows $(_command) $(_args)'
+ ArtifactName: 'Windows FCS test results'
publishLocation: Container
continueOnError: true
- condition: failed()
+ condition: not(succeeded())
diff --git a/.vsts-signed.yaml b/.vsts-signed.yaml
index 823ac20297a..0623f2e36f6 100644
--- a/.vsts-signed.yaml
+++ b/.vsts-signed.yaml
@@ -1,9 +1,9 @@
variables:
-- name: PB_PublishBlobFeedUrl
- value: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
- group: DotNet-Blob-Feed
-- name: PB_PublishBlobFeedKey
- value: $(dotnetfeed-storage-access-key-1)
+- name: SignType
+ value: real
+- name: VisualStudioDropName
+ value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)
jobs:
- job: Full_Signed
@@ -13,124 +13,104 @@ jobs:
variables:
BuildConfiguration: 'Release'
steps:
+
# Install Signing Plugin
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
displayName: Install Signing Plugin
inputs:
signType: real
- condition: and(succeeded(), in(variables['PB_SignType'], 'test', 'real'))
-
- # Install Swix Plugin
- - task: ms-vseng.MicroBuildTasks.32f78468-e895-4f47-962c-58a699361df8.MicroBuildSwixPlugin@1
- displayName: Install Swix Plugin
+ esrpSigning: true
+ condition: and(succeeded(), ne(variables['SignType'], ''))
- # Run build.cmd
- - task: CmdLine@1
- displayName: Run build.cmd
- inputs:
- filename: build.cmd
- arguments: microbuild
+ # Build
+ - script: eng\CIBuild.cmd
+ -configuration $(BuildConfiguration)
+ -testAll
+ /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
+ /p:VisualStudioDropName=$(VisualStudioDropName)
+ /p:DotNetSignType=$(SignType)
+ /p:DotNetPublishToBlobFeed=true
+ /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
+ /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
+ /p:PublishToSymbolServer=true
+ /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
+ /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
+ displayName: Build
- # Publish nightly package to MyGet
- - task: PowerShell@1
- displayName: Publish nightly package to MyGet
+ # Publish logs
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Logs
inputs:
- scriptName: 'setup\publish-assets.ps1'
- arguments: '-binariesPath artifacts\bin -configuration $(BuildConfiguration) -branchName $(Build.SourceBranch) -apiKey $(FSharp.MyGetApiKey)'
- condition: and(succeeded(), contains(variables['PB_PublishType'], 'myget'))
+ PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(BuildConfiguration)'
+ ArtifactName: 'Build Diagnostic Files'
+ publishLocation: Container
+ continueOnError: true
+ condition: succeededOrFailed()
- # Package publish
- - task: CmdLine@1
- displayName: Restore package publishing
- inputs:
- filename: '.nuget\NuGet.exe'
- arguments: 'restore packages.config -PackagesDirectory packages -Source https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json'
- condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
- - task: MSBuild@1
- displayName: Publish packages to Azure Blob Storage
- inputs:
- solution: PublishToBlob.proj
- msbuildArguments: '/t:Build /p:Configuration=$(BuildConfiguration) /p:ExpectedFeedUrl=$(PB_PublishBlobFeedUrl) /p:AccountKey=$(PB_PublishBlobFeedKey) /p:ManifestRepouri=$(Build.Repository.Uri) /p:ManifestBranch=$(Build.SourceBranch) /p:ManifestCommit=$(Build.SourceVersion) /p:ManifestBuildId=$(Build.BuildNumber) /bl:$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/pub/publish.binlog'
- condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
+ # Publish test results
- task: PublishBuildArtifacts@1
- displayName: Publish publishing bin log
+ displayName: Publish Test Results
inputs:
- PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/pub'
- ArtifactName: 'Publish_bin_log'
+ PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults'
+ ArtifactName: 'Test Results'
publishLocation: Container
continueOnError: true
- condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
- - task: CopyFiles@2
- displayName: Gather Asset Manifests
+ condition: succeededOrFailed()
+
+ # Upload VSTS Drop
+ - task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1
+ displayName: Upload VSTS Drop
inputs:
- SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/AssetManifest'
- TargetFolder: '$(Build.StagingDirectory)/AssetManifests'
- continueOnError: true
- condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
+ DropName: $(VisualStudioDropName)
+ DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion'
+ condition: succeeded()
+
+ # Publish an artifact that the RoslynInsertionTool is able to find by its name.
- task: PublishBuildArtifacts@1
- displayName: Push Asset Manifests
+ displayName: Publish Artifact VSSetup
inputs:
- PathtoPublish: '$(Build.StagingDirectory)/AssetManifests'
- PublishLocation: Container
- ArtifactName: AssetManifests
- continueOnError: true
- condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
+ PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion'
+ ArtifactName: 'VSSetup'
+ condition: succeeded()
- # Create static drop
+ # Archive NuGet packages to DevOps.
- task: PublishBuildArtifacts@1
- displayName: Create static drop
+ displayName: Publish Artifact Packages
inputs:
- PathtoPublish: 'artifacts'
- ArtifactName: '$(Build.BuildNumber)'
- publishLocation: FilePath
- TargetPath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)'
- Parallel: true
- ParallelCount: 64
- condition: and(succeeded(), contains(variables['PB_PublishType'], 'drop'))
+ PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(BuildConfiguration)'
+ ArtifactName: 'Packages'
+ condition: succeeded()
- # Publish symbols
- - task: PublishSymbols@1
- displayName: Publish symbols
+ # Publish nightly package to ADO
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Artifact Nightly
inputs:
- SymbolsPath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildNumber)\Symbols'
- SearchPattern: '**\*.dll;**\*.exe;**\*.pdb'
- SymbolsFolder: '$(Build.SourcesDirectory)\artifacts\SymStore'
- TreatNotIndexedAsWarning: true
- SymbolsProduct: '$(Build.DefinitionName)'
- SymbolsVersion: '$(Build.BuildNumber)'
- continueOnError: true
- condition: and(succeeded(), contains(variables['PB_PublishType'], 'symbols'))
+ PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\VisualFSharpFull.vsix'
+ ArtifactName: 'Nightly'
+ condition: succeeded()
- # Upload VSTS Drop
- - task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1
- displayName: Upload VSTS Drop
+ # Publish nightly package to MyGet
+ - task: PowerShell@1
+ displayName: Publish nightly package to MyGet
inputs:
- DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion'
- condition: and(succeeded(), contains(variables['PB_PublishType'], 'vsts'))
+ scriptName: 'setup\publish-assets.ps1'
+ arguments: '-artifactsPath artifacts -configuration $(BuildConfiguration) -branchName $(Build.SourceBranch) -apiKey $(FSharp.MyGetApiKey)'
+ condition: succeeded()
+
+ # Package publish
+ - task: PublishBuildArtifacts@1
+ displayName: Push Asset Manifests
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/AssetManifest'
+ ArtifactName: AssetManifests
+ continueOnError: true
+ condition: succeeded()
# Execute cleanup tasks
- task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1
displayName: Execute cleanup tasks
condition: succeededOrFailed()
- # Publish Artifact: MicroBuildOutputs
- - task: PublishBuildArtifacts@1
- displayName: 'Publish Artifact: MicroBuildOutputs'
- inputs:
- PathtoPublish: '$(Build.StagingDirectory)\MicroBuild\Output'
- ArtifactName: MicroBuildOutputs
- publishLocation: Container
- condition: and(succeeded(), contains(variables['PB_PublishType'], 'microbuild'))
-
- # Publish Symbols to Symweb
- - task: ms-vscs-artifact.build-tasks.artifactSymbolTask-1.artifactSymbolTask@0
- displayName: Publish symbols to SymWeb
- inputs:
- symbolServiceURI: 'https://microsoft.artifacts.visualstudio.com/DefaultCollection'
- sourcePath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildNumber)\SymStore'
- usePat: false
- condition: and(succeeded(), contains(variables['PB_PublishType'], 'symweb'))
-
- template: /eng/common/templates/job/publish-build-assets.yml
parameters:
dependsOn:
diff --git a/Build.cmd b/Build.cmd
new file mode 100644
index 00000000000..ad55484933d
--- /dev/null
+++ b/Build.cmd
@@ -0,0 +1,2 @@
+@echo off
+powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\build.ps1""" -build -restore %*"
diff --git a/DEVGUIDE.md b/DEVGUIDE.md
index e9c62109a96..474442c5c64 100644
--- a/DEVGUIDE.md
+++ b/DEVGUIDE.md
@@ -34,113 +34,60 @@ Install
2. The command prompt must have Administrator rights (`Run as Administrator`).
-On Windows you can build the F# compiler for .NET Framework as follows:
+On Windows you can build the F# compiler and tools as follows:
- build.cmd
+ Build.cmd
-This is the same as
+Desktop tests can be run with:
- build.cmd net40
+ Build.cmd -test
-There are various qualifiers:
+Additional options are available via:
- build.cmd release -- build release (the default)
- build.cmd debug -- build debug instead of release
-
- build.cmd net40 -- build .NET Framework compiler (the default)
- build.cmd coreclr -- build .NET Core compiler
- build.cmd vs -- build the Visual F# IDE Tools (see below)
- build.cmd pcls -- build the PCL FSharp.Core libraries
- build.cmd all -- build all
-
- build.cmd proto -- force the rebuild of the Proto bootstrap compiler in addition to other things
-
- build.cmd test -- build default targets, run suitable tests
- build.cmd net40 test -- build net40, run suitable tests
- build.cmd coreclr test -- build coreclr, run suitable tests
- build.cmd vs test -- build Visual F# IDE Tools, run all tests (see below)
- build.cmd all test -- build all, run all tests
-
- build.cmd test-smoke -- build, run smoke tests
- build.cmd test-net40-fsharp -- build, run tests\fsharp suite for .NET Framework
- build.cmd test-net40-fsharpqa -- build, run tests\fsharpqa suite for .NET Framework
+ Build.cmd /?
After you build the first time you can open and use this solution:
- .\FSharp.sln
-
-or just build it directly:
-
- msbuild FSharp.sln
+ .\VisualFSharp.sln
If you are just developing the core compiler and library then building ``FSharp.sln`` will be enough.
-### Developing the F# Compiler (Linux)
-
-For Linux/Mono, follow [these instructions](http://www.mono-project.com/docs/getting-started/install/linux/). Also you may need:
-
- sudo apt-get install mono-complete make git
-
-Then:
-
- make
-
-Then to replace your machine-wide installation:
-
- sudo make install
-
-Full testing is not yet enabled on Linux.
-
-### Developing the F# Compiler (macOS)
+### Developing the F# Compiler (Linux/macOS)
-Install XCode command line tools (or homebrew equivalents) and Mono or Visual Studio for Mac.
+For Linux/Mac:
-Then:
+ ./build.sh
- make
+Running tests:
-Then to replace your machine-wide installation:
-
- sudo make install
-
-Full testing is not yet enabled on macOS.
-
-### [Optional] Specifying the install path (Linux or macOS)
-
-You can specify a custom installation path using the DESTDIR shell variable
-
- DESTDIR=/my/path/to/fsharp make install
-
-### Developing the F# Compiler (Linux or macOS - .NET Core)
-
-Install [the latest .NET SDK](https://www.microsoft.com/net/download/). Then use
-
- src/buildfromsource.sh
-
-Outputs are placed in
-
- BuildFromSource/Debug/...
- BuildFromSource/Release/...
-
-This uses an installed .NET SDK 2.0 to build the various duplicated project
-
-Testing the .NET Core version of the F# compiler on macOS and Linux is TBD.
+ ./build.sh -test
### Developing the Visual F# IDE Tools (Windows Only)
To build and test Visual F# IDE Tools, install these requirements:
-- Download [Visual Studio 2017](https://www.visualstudio.com/downloads/)
+- Download [Visual Studio 2019](https://www.visualstudio.com/downloads/)
- Launch the Visual Studio Installer
- - Under the "Windows" workloads, select ".NET desktop development"
- - Select "F# desktop language support" under the optional components
- - Under the "Other Toolsets" workloads, select "Visual Studio extension development"
+ - Under the **"Windows"** workload, select **".NET desktop development"**
+ - Select the optional component **"F# desktop language support"**
+ - Under the **"Mobile & Gaming"** workload, select **"Mobile development with .NET"**
+ - Under the **"Other Toolsets"** workload, select **"Visual Studio extension development"**
+ - On the **"Individual Components"** tab, select **".NET Framework 4.7.2 SDK"** and **".NET Framework 4.7.2 targeting pack"**
Steps to build:
- build.cmd vs -- build the Visual F# IDE Tools in Release configuration (see below)
- build.cmd vs debug -- build the Visual F# IDE Tools in Debug configuration (see below)
- build.cmd vs test -- build Visual F# IDE Tools, run all tests (see below)
+ Build.cmd -- build all F# components under the default configuration (Debug)
+ Build.cmd -configuration Release -- build all F# components as Release
+ Build.cmd -testDesktop -- build and test all net472 tests
+
+All test options:
+
+ -testDesktop -- test all net472 target frameworks
+ -testCoreClr -- test all netstandard and netcoreapp target frameworks
+ -testFSharpQA -- test all F# Cambridge tests
+ -testVs -- test all VS integration points
+ -testFcs -- test F# compiler service components
+ -testAll -- all of the above
Use ``VisualFSharp.sln`` if you're building the Visual F# IDE Tools.
@@ -148,18 +95,18 @@ Note on Debug vs Release: ``Release`` Configuration has a degraded debugging exp
Note ([#2351](https://github.com/Microsoft/visualfsharp/issues/2351)): if you face this error:
-> error VSSDK1077: Unable to locate the extensions directory. "ExternalSettingsManager::GetScopePaths failed to initialize PkgDefManager for C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe".
+> error VSSDK1077: Unable to locate the extensions directory. "ExternalSettingsManager::GetScopePaths failed to initialize PkgDefManager for C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe".
Or hard crash on launch ("Unknown Error"), delete these folders:
-- `%localappdata%\Microsoft\VisualStudio\15.0_(some number here)RoslynDev`
-- `%localappdata%\Microsoft\VisualStudio\15.0_(some number here)`
+- `%localappdata%\Microsoft\VisualStudio\16.0_(some number here)RoslynDev`
+- `%localappdata%\Microsoft\VisualStudio\16.0_(some number here)`
#### [Optional] Install the Visual F# IDE Tools (Windows Only)
The new builds of the Visual F# IDE Tools can no longer be installed into Visual Studio 2015.
-You can install Visual Studio 2017 from https://www.visualstudio.com/downloads/.
+You can install Visual Studio 2019 from https://www.visualstudio.com/downloads/.
**Note:** This step will install a VSIX extension into Visual Studio "Next" that changes the Visual F# IDE Tools
components installed in that VS installation. You can revert this step by disabling or uninstalling the addin.
@@ -167,12 +114,12 @@ components installed in that VS installation. You can revert this step by disab
For **Debug**, uninstall then reinstall:
VSIXInstaller.exe /u:"VisualFSharp"
- VSIXInstaller.exe artifacts\bin\VisualFSharpFull\Debug\net46\VisualFSharpFull.vsix
+ VSIXInstaller.exe artifacts\VSSetup\Debug\VisualFSharpFull.vsix
For **Release**, uninstall then reinstall:
VSIXInstaller.exe /u:"VisualFSharp"
- VSIXInstaller.exe artifacts\bin\VisualFSharpFull\Release\net46\VisualFSharpFull.vsix
+ VSIXInstaller.exe artifacts\VSSetup\Release\VisualFSharpFull.vsix
Restart Visual Studio, it should now be running your freshly-built Visual F# IDE Tools with updated F# Interactive.
@@ -188,15 +135,15 @@ Because this uses the "RoslynDev" hive you can simultaneously test changes to an
#### [Optional] Rapid deployment of incremental changes to Visual F# IDE Tools components
-For the brave, you can rapidly deploy incrementally updated versions of Visual F# IDE Tool components such as ``FSHarp.Editor.dll`` by copying them directly into the extension directory in your user AppData folder:
+For the brave, you can rapidly deploy incrementally updated versions of Visual F# IDE Tool components such as ``FSharp.Editor.dll`` by copying them directly into the extension directory in your user AppData folder:
- xcopy /y debug\net40\bin\FSharp.* "%USERPROFILE%\AppData\Local\Microsoft\VisualStudio\15.0_7c5620b7FSharpDev\Extensions\Microsoft.VisualFSharpTools\Visual F# Tools\15.4.1.9055"
+ xcopy /y debug\net40\bin\FSharp.* "%USERPROFILE%\AppData\Local\Microsoft\VisualStudio\16.0_7c5620b7FSharpDev\Extensions\Microsoft.VisualFSharpTools\Visual F# Tools\16.4.1.9055"
This gives a much tighter inner development loop than uninstalling/reinstalling the VSIX, as you do not have to restart VIsual Studio. Caveat emptor.
#### [Optional] Clobber the F# SDK on the machine
-**Note:** The step below will try to clobber the machine-wide installed F# SDK on your machine. This replaces the ``fsc.exe`` used by the standard install location or ``Microsoft.FSharp.Targets``. **Repairing Visual Studio 15 is currently the only way to revert this step.**
+**Note:** The step below will try to clobber the machine-wide installed F# SDK on your machine. This replaces the ``fsc.exe`` used by the standard install location or ``Microsoft.FSharp.Targets``. **Repairing Visual Studio 16 is currently the only way to revert this step.**
For **Debug**:
@@ -237,7 +184,7 @@ If you change error messages you may need to update FSComp.fs in `src\buildfroms
To do this, build the non-buildfromsource version of FSharp.Compiler.Private (src\fsharp\FSharp.Compiler.Private) then check its obj\ directory for `FSComp.fs` and manually copy that into the buildfromsource directory.
.\build net40
- copy /y artifacts\obj\FSharp.Compiler.Private\Release\net46\FSComp.* src\buildfromsource\FSharp.Compiler.Private\
+ copy /y artifacts\obj\FSharp.Compiler.Private\Release\net472\FSComp.* src\buildfromsource\FSharp.Compiler.Private\
If your changes involve modifying the list of language keywords in any way, (e.g. when implementing a new keyword), the XLF localization files need to be synced with the corresponding resx files. This can be done automatically by running
diff --git a/FSharp.Directory.Build.props b/Directory.Build.props
similarity index 100%
rename from FSharp.Directory.Build.props
rename to Directory.Build.props
diff --git a/FSharp.Directory.Build.targets b/Directory.Build.targets
similarity index 99%
rename from FSharp.Directory.Build.targets
rename to Directory.Build.targets
index 84125426d58..08da3ab0966 100644
--- a/FSharp.Directory.Build.targets
+++ b/Directory.Build.targets
@@ -1,7 +1,5 @@
-
-
diff --git a/DotnetCLIToolsVersion.txt b/DotnetCLIToolsVersion.txt
deleted file mode 100644
index 38295b0d98d..00000000000
--- a/DotnetCLIToolsVersion.txt
+++ /dev/null
@@ -1 +0,0 @@
-2.1.504
\ No newline at end of file
diff --git a/FSharp.Profiles.props b/FSharp.Profiles.props
index f3e0bc12d36..534ba96c04f 100644
--- a/FSharp.Profiles.props
+++ b/FSharp.Profiles.props
@@ -39,7 +39,6 @@
$(DefineConstants);FX_NO_WINFORMS
$(DefineConstants);FX_NO_INDENTED_TEXT_WRITER
$(DefineConstants);FX_REDUCED_EXCEPTIONS
- $(DefineConstants);FX_REDUCED_CONSOLE
$(DefineConstants);FX_RESHAPED_REFEMIT
$(DefineConstants);FX_RESHAPED_GLOBALIZATION
$(DefineConstants);FX_RESHAPED_REFLECTION
diff --git a/FSharp.sln b/FSharp.sln
index 923255dd35b..115e9a219c9 100644
--- a/FSharp.sln
+++ b/FSharp.sln
@@ -3,35 +3,28 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26403.7
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Private", "src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Private", "src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Server.Shared", "src\fsharp\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj", "{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Core", "src\fsharp\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "src\fsharp\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Build", "src\fsharp\FSharp.Build\FSharp.Build.fsproj", "{702A7979-BCF9-4C41-853E-3ADFC9897890}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fsc", "src\fsharp\Fsc\Fsc.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Build", "src\fsharp\FSharp.Build\FSharp.Build.fsproj", "{702A7979-BCF9-4C41-853E-3ADFC9897890}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Interactive.Settings", "src\fsharp\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj", "{649FA588-F02E-457C-9FCF-87E46407481E}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsc", "src\fsharp\fsc\fsc.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsiAnyCPU", "src\fsharp\fsiAnyCpu\FsiAnyCPU.fsproj", "{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}"
- ProjectSection(ProjectDependencies) = postProject
- {649FA588-F02E-457C-9FCF-87E46407481E} = {649FA588-F02E-457C-9FCF-87E46407481E}
- EndProjectSection
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Interactive.Settings", "src\fsharp\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj", "{649FA588-F02E-457C-9FCF-87E46407481E}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fsi", "src\fsharp\fsi\Fsi.fsproj", "{D0E98C0D-490B-4C61-9329-0862F6E87645}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsi", "src\fsharp\fsi\fsi.fsproj", "{D0E98C0D-490B-4C61-9329-0862F6E87645}"
ProjectSection(ProjectDependencies) = postProject
{649FA588-F02E-457C-9FCF-87E46407481E} = {649FA588-F02E-457C-9FCF-87E46407481E}
EndProjectSection
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Tests.FSharpSuite", "tests\fsharp\FSharp.Tests.FSharpSuite.fsproj", "{C163E892-5BF7-4B59-AA99-B0E8079C67C4}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharpSuite.Tests", "tests\fsharp\FSharpSuite.Tests.fsproj", "{C163E892-5BF7-4B59-AA99-B0E8079C67C4}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.UnitTests", "tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj", "{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.UnitTests", "tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj", "{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Core.UnitTests", "tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj", "{88E2D422-6852-46E3-A740-83E391DC7973}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core.UnitTests", "tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj", "{88E2D422-6852-46E3-A740-83E391DC7973}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Compiler", "Compiler", "{3881429D-A97A-49EB-B7AE-A82BA5FE9C77}"
EndProject
@@ -39,7 +32,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{B8DDA694
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{3058BC79-8E79-4645-B05D-48CC182FA8A6}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fsharpqafiles", "tests\fsharpqa\fsharpqafiles.csproj", "{AAAAD274-696A-49EC-AAAA-F870BE91AAAA}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Build.UnitTests", "tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj", "{53C0DAAD-158C-4658-8EC7-D7341530239F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -55,34 +48,22 @@ Global
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|x86.ActiveCfg = Debug|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|x86.Build.0 = Debug|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|Any CPU.Build.0 = Proto|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|x86.ActiveCfg = Proto|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|x86.Build.0 = Proto|Any CPU
+ {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|x86.ActiveCfg = Release|Any CPU
+ {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|x86.Build.0 = Release|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.Build.0 = Release|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|x86.ActiveCfg = Release|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|x86.Build.0 = Release|Any CPU
- {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|x86.ActiveCfg = Debug|Any CPU
- {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|x86.Build.0 = Debug|Any CPU
- {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
- {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|Any CPU.Build.0 = Proto|Any CPU
- {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|x86.ActiveCfg = Proto|Any CPU
- {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|x86.Build.0 = Proto|Any CPU
- {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|Any CPU.Build.0 = Release|Any CPU
- {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|x86.ActiveCfg = Release|Any CPU
- {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|x86.Build.0 = Release|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|x86.ActiveCfg = Debug|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|x86.Build.0 = Debug|Any CPU
- {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
- {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|Any CPU.Build.0 = Proto|Any CPU
- {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|x86.ActiveCfg = Proto|Any CPU
- {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|x86.Build.0 = Proto|Any CPU
+ {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|x86.ActiveCfg = Release|Any CPU
+ {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|x86.Build.0 = Release|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|Any CPU.Build.0 = Release|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|x86.ActiveCfg = Release|Any CPU
@@ -91,10 +72,10 @@ Global
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Debug|Any CPU.Build.0 = Debug|Any CPU
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Debug|x86.ActiveCfg = Debug|Any CPU
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Debug|x86.Build.0 = Debug|Any CPU
- {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
- {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|Any CPU.Build.0 = Proto|Any CPU
- {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|x86.ActiveCfg = Proto|Any CPU
- {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|x86.Build.0 = Proto|Any CPU
+ {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|x86.ActiveCfg = Release|Any CPU
+ {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|x86.Build.0 = Release|Any CPU
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Release|Any CPU.ActiveCfg = Release|Any CPU
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Release|Any CPU.Build.0 = Release|Any CPU
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Release|x86.ActiveCfg = Release|Any CPU
@@ -103,10 +84,10 @@ Global
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|x86.ActiveCfg = Debug|Any CPU
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|x86.Build.0 = Debug|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|Any CPU.Build.0 = Proto|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|x86.ActiveCfg = Proto|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|x86.Build.0 = Proto|Any CPU
+ {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|x86.ActiveCfg = Release|Any CPU
+ {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|x86.Build.0 = Release|Any CPU
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.Build.0 = Release|Any CPU
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|x86.ActiveCfg = Release|Any CPU
@@ -115,34 +96,22 @@ Global
{649FA588-F02E-457C-9FCF-87E46407481E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{649FA588-F02E-457C-9FCF-87E46407481E}.Debug|x86.ActiveCfg = Debug|Any CPU
{649FA588-F02E-457C-9FCF-87E46407481E}.Debug|x86.Build.0 = Debug|Any CPU
- {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
- {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|Any CPU.Build.0 = Proto|Any CPU
- {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|x86.ActiveCfg = Proto|Any CPU
- {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|x86.Build.0 = Proto|Any CPU
+ {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|x86.ActiveCfg = Release|Any CPU
+ {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|x86.Build.0 = Release|Any CPU
{649FA588-F02E-457C-9FCF-87E46407481E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{649FA588-F02E-457C-9FCF-87E46407481E}.Release|Any CPU.Build.0 = Release|Any CPU
{649FA588-F02E-457C-9FCF-87E46407481E}.Release|x86.ActiveCfg = Release|Any CPU
{649FA588-F02E-457C-9FCF-87E46407481E}.Release|x86.Build.0 = Release|Any CPU
- {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|x86.ActiveCfg = Debug|Any CPU
- {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|x86.Build.0 = Debug|Any CPU
- {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
- {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Proto|Any CPU.Build.0 = Proto|Any CPU
- {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Proto|x86.ActiveCfg = Proto|Any CPU
- {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Proto|x86.Build.0 = Proto|Any CPU
- {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|Any CPU.Build.0 = Release|Any CPU
- {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|x86.ActiveCfg = Release|Any CPU
- {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|x86.Build.0 = Release|Any CPU
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Debug|x86.ActiveCfg = Debug|Any CPU
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Debug|x86.Build.0 = Debug|Any CPU
- {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
- {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|Any CPU.Build.0 = Proto|Any CPU
- {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|x86.ActiveCfg = Proto|Any CPU
- {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|x86.Build.0 = Proto|Any CPU
+ {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|x86.ActiveCfg = Release|Any CPU
+ {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|x86.Build.0 = Release|Any CPU
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Release|Any CPU.Build.0 = Release|Any CPU
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Release|x86.ActiveCfg = Release|Any CPU
@@ -151,10 +120,10 @@ Global
{C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Debug|x86.ActiveCfg = Debug|Any CPU
{C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Debug|x86.Build.0 = Debug|Any CPU
- {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
- {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|Any CPU.Build.0 = Proto|Any CPU
- {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|x86.ActiveCfg = Proto|Any CPU
- {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|x86.Build.0 = Proto|Any CPU
+ {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|x86.ActiveCfg = Release|Any CPU
+ {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|x86.Build.0 = Release|Any CPU
{C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Release|Any CPU.Build.0 = Release|Any CPU
{C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Release|x86.ActiveCfg = Release|Any CPU
@@ -163,10 +132,10 @@ Global
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Debug|x86.ActiveCfg = Debug|Any CPU
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Debug|x86.Build.0 = Debug|Any CPU
- {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
- {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|Any CPU.Build.0 = Proto|Any CPU
- {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|x86.ActiveCfg = Proto|Any CPU
- {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|x86.Build.0 = Proto|Any CPU
+ {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|x86.ActiveCfg = Release|Any CPU
+ {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|x86.Build.0 = Release|Any CPU
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Release|Any CPU.Build.0 = Release|Any CPU
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Release|x86.ActiveCfg = Release|Any CPU
@@ -175,42 +144,41 @@ Global
{88E2D422-6852-46E3-A740-83E391DC7973}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88E2D422-6852-46E3-A740-83E391DC7973}.Debug|x86.ActiveCfg = Debug|Any CPU
{88E2D422-6852-46E3-A740-83E391DC7973}.Debug|x86.Build.0 = Debug|Any CPU
- {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
- {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|Any CPU.Build.0 = Proto|Any CPU
- {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|x86.ActiveCfg = Proto|Any CPU
- {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|x86.Build.0 = Proto|Any CPU
+ {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|x86.ActiveCfg = Release|Any CPU
+ {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|x86.Build.0 = Release|Any CPU
{88E2D422-6852-46E3-A740-83E391DC7973}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88E2D422-6852-46E3-A740-83E391DC7973}.Release|Any CPU.Build.0 = Release|Any CPU
{88E2D422-6852-46E3-A740-83E391DC7973}.Release|x86.ActiveCfg = Release|Any CPU
{88E2D422-6852-46E3-A740-83E391DC7973}.Release|x86.Build.0 = Release|Any CPU
- {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Debug|Any CPU.ActiveCfg = Debug|x86
- {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Debug|x86.ActiveCfg = Debug|x86
- {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Debug|x86.Build.0 = Debug|x86
- {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Proto|Any CPU.ActiveCfg = Debug|x86
- {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Proto|Any CPU.Build.0 = Debug|x86
- {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Proto|x86.ActiveCfg = Debug|x86
- {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Proto|x86.Build.0 = Debug|x86
- {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Release|Any CPU.ActiveCfg = Debug|x86
- {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Release|Any CPU.Build.0 = Debug|x86
- {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Release|x86.ActiveCfg = Debug|x86
- {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Release|x86.Build.0 = Debug|x86
+ {53C0DAAD-158C-4658-8EC7-D7341530239F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {53C0DAAD-158C-4658-8EC7-D7341530239F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {53C0DAAD-158C-4658-8EC7-D7341530239F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {53C0DAAD-158C-4658-8EC7-D7341530239F}.Debug|x86.Build.0 = Debug|Any CPU
+ {53C0DAAD-158C-4658-8EC7-D7341530239F}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {53C0DAAD-158C-4658-8EC7-D7341530239F}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {53C0DAAD-158C-4658-8EC7-D7341530239F}.Proto|x86.ActiveCfg = Release|Any CPU
+ {53C0DAAD-158C-4658-8EC7-D7341530239F}.Proto|x86.Build.0 = Release|Any CPU
+ {53C0DAAD-158C-4658-8EC7-D7341530239F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {53C0DAAD-158C-4658-8EC7-D7341530239F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {53C0DAAD-158C-4658-8EC7-D7341530239F}.Release|x86.ActiveCfg = Release|Any CPU
+ {53C0DAAD-158C-4658-8EC7-D7341530239F}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} = {3881429D-A97A-49EB-B7AE-A82BA5FE9C77}
- {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{DED3BBD7-53F4-428A-8C9F-27968E768605} = {3058BC79-8E79-4645-B05D-48CC182FA8A6}
{702A7979-BCF9-4C41-853E-3ADFC9897890} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{C94C257C-3C0A-4858-B5D8-D746498D1F08} = {3881429D-A97A-49EB-B7AE-A82BA5FE9C77}
{649FA588-F02E-457C-9FCF-87E46407481E} = {B8DDA694-7939-42E3-95E5-265C2217C142}
- {8B3E283D-B5FE-4055-9D80-7E3A32F3967B} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{D0E98C0D-490B-4C61-9329-0862F6E87645} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{C163E892-5BF7-4B59-AA99-B0E8079C67C4} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
{88E2D422-6852-46E3-A740-83E391DC7973} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
- {AAAAD274-696A-49EC-AAAA-F870BE91AAAA} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
+ {53C0DAAD-158C-4658-8EC7-D7341530239F} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BD5177C7-1380-40E7-94D2-7768E1A8B1B8}
diff --git a/FSharpBuild.Directory.Build.props b/FSharpBuild.Directory.Build.props
index 05c4a82c394..31d24301299 100644
--- a/FSharpBuild.Directory.Build.props
+++ b/FSharpBuild.Directory.Build.props
@@ -1,25 +1,18 @@
-
-
-
-
+
+
+
+
+ true
+
- Debug
- $(MSBuildThisFileDirectory)
$(RepoRoot)src
- $(RepoRoot)artifacts
- $(ArtifactsDir)\toolset
- $(ArtifactsDir)\bin
- $(ArtifactsDir)\obj
- $(ArtifactsDir)\packages
- $(ArtifactsBinDir)\$(MSBuildProjectName)
- $(ArtifactsObjDir)\$(MSBuildProjectName)
$(ArtifactsDir)\SymStore
- $(ArtifactsBinDir)\fsc\Proto\net472
- $(ArtifactsBinDir)/fsc/Proto/netcoreapp2.1
+ $(ArtifactsDir)\Bootstrap
+ $(ArtifactsDir)/fsc/Proto/netcoreapp2.1
4.4.0
1182;0025;$(WarningsAsErrors)
@@ -62,13 +55,8 @@
- false
- true
- $(FSharpSourcesRoot)\fsharp\msft.pubkey
- true
- true
+ Microsoft
-
$(FSharpSourcesRoot)\fsharp\test.snk
false
@@ -83,6 +71,8 @@
+ $(NoWarn);FS2003
+ true
portable
fs
false
diff --git a/FSharpBuild.Directory.Build.targets b/FSharpBuild.Directory.Build.targets
index fa39d7498fd..1d9828726b9 100644
--- a/FSharpBuild.Directory.Build.targets
+++ b/FSharpBuild.Directory.Build.targets
@@ -1,20 +1,9 @@
-
+
+
+
-
- en;$(XlfLanguages)
-
-
-
-
- $(AssetTargetFallback);net462
-
-
$(CompileDependsOn);CopyAndSubstituteTextFiles
@@ -34,9 +23,4 @@
-
-
-
-
-
diff --git a/FSharpTests.Directory.Build.props b/FSharpTests.Directory.Build.props
index 56013600868..ed5d63ca747 100644
--- a/FSharpTests.Directory.Build.props
+++ b/FSharpTests.Directory.Build.props
@@ -19,12 +19,12 @@
true
- $(MSBuildThisFileDirectory)artifacts\toolset\dotnet
+ $([System.IO.Path]::GetDirectoryName('$(DOTNET_HOST_PATH)'))
dotnet.exe
dotnet
$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\netcoreapp2.1\fsc.exe
- $(MSBuildThisFileDirectory)artifacts\toolset\dotnet
+ $([System.IO.Path]::GetDirectoryName('$(DOTNET_HOST_PATH)'))
dotnet.exe
dotnet
$(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\netcoreapp2.1\fsi.exe
diff --git a/NuGet.Config b/NuGet.config
similarity index 100%
rename from NuGet.Config
rename to NuGet.config
diff --git a/PublishToBlob.proj b/PublishToBlob.proj
deleted file mode 100644
index 21e8ec6eb6f..00000000000
--- a/PublishToBlob.proj
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
- Microsoft.DotNet.Build.Tasks.Feed
-
- 2.2.0-beta.19066.1
-
-
-
-
-
-
-
-
-
-
- $(MSBuildThisFileDirectory)artifacts\log\$(Configuration)\
- AnyCPU
- $(Platform)
- $(ArtifactsLogDir)AssetManifest\$(OS)-$(PlatformName).xml
-
-
-
-
-
-
-
diff --git a/Restore.cmd b/Restore.cmd
new file mode 100644
index 00000000000..1b84815f3ed
--- /dev/null
+++ b/Restore.cmd
@@ -0,0 +1,2 @@
+@echo off
+powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\build.ps1""" -restore %*"
diff --git a/RoslynPackageVersion.txt b/RoslynPackageVersion.txt
index 0aca85accc6..f0add9e0811 100644
--- a/RoslynPackageVersion.txt
+++ b/RoslynPackageVersion.txt
@@ -1 +1 @@
-2.11.0-beta1-63431-08
+3.0.0-beta4-19170-01
diff --git a/Test.cmd b/Test.cmd
new file mode 100644
index 00000000000..4a6eabc39e2
--- /dev/null
+++ b/Test.cmd
@@ -0,0 +1,2 @@
+@echo off
+powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\build.ps1""" -test %*"
diff --git a/VisualFSharp.sln b/VisualFSharp.sln
index ea9bbe592d7..41d5424b810 100644
--- a/VisualFSharp.sln
+++ b/VisualFSharp.sln
@@ -1,100 +1,100 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.28010.2036
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.28729.10
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.VS.FSI", "vsintegration\src\FSharp.VS.FSI\FSharp.VS.FSI.fsproj", "{991DCF75-C2EB-42B6-9A0D-AA1D2409D519}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Private", "src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VisualFSharp.UnitTests Support", "VisualFSharp.UnitTests Support", "{3F044931-FB83-4433-B934-AE66AB27B278}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VisualFSharpFull", "vsintegration\Vsix\VisualFSharpFull\VisualFSharpFull.csproj", "{59ADCE46-9740-4079-834D-9A03A3494EBC}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VisualFSharp", "VisualFSharp", "{4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}"
+ ProjectSection(SolutionItems) = preProject
+ vsintegration\readme.md = vsintegration\readme.md
+ EndProjectSection
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Server.Shared", "src\fsharp\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj", "{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Compiler", "Compiler", "{3881429D-A97A-49EB-B7AE-A82BA5FE9C77}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Core", "src\fsharp\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}"
EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.LanguageService", "vsintegration\src\FSharp.LanguageService\FSharp.LanguageService.fsproj", "{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{B8DDA694-7939-42E3-95E5-265C2217C142}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.LanguageService.Base", "vsintegration\src\FSharp.LanguageService.Base\FSharp.LanguageService.Base.csproj", "{1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{3058BC79-8E79-4645-B05D-48CC182FA8A6}"
EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Editor", "vsintegration\src\FSharp.Editor\FSharp.Editor.fsproj", "{65E0E82A-EACE-4787-8994-888674C2FE87}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ItemTemplates", "ItemTemplates", "{F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectSystem.Base", "vsintegration\src\FSharp.ProjectSystem.Base\Project\ProjectSystem.Base.csproj", "{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utils", "Utils", "{D086C8C6-D00D-4C3B-9AB2-A4286C9F5922}"
EndProject
-Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "FSharp.PropertiesPages", "vsintegration\src\FSharp.ProjectSystem.PropertyPages\FSharp.PropertiesPages.vbproj", "{FCFB214C-462E-42B3-91CA-FC557EFEE74F}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FSharp.Compiler.Service.tests Support", "FSharp.Compiler.Service.tests Support", "{35636A82-401A-4C3A-B2AB-EB7DC5E9C268}"
EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ProjectSystem", "vsintegration\src\FSharp.ProjectSystem.FSharp\ProjectSystem.fsproj", "{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Legacy", "Legacy", "{CCAB6E50-34C6-42AF-A6B0-567C29FCD91B}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ProjectTemplates", "ProjectTemplates", "{C9B1D3F5-4971-4F04-9C26-37E3AC809AB4}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.VS.FSI", "vsintegration\src\FSharp.VS.FSI\FSharp.VS.FSI.fsproj", "{991DCF75-C2EB-42B6-9A0D-AA1D2409D519}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Private", "src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}"
EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "VisualFSharp.Salsa", "vsintegration\tests\Salsa\VisualFSharp.Salsa.fsproj", "{FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VisualFSharpFull", "vsintegration\Vsix\VisualFSharpFull\VisualFSharpFull.csproj", "{59ADCE46-9740-4079-834D-9A03A3494EBC}"
EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "VisualFSharp.UnitTests", "vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj", "{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VisualFSharpTemplates", "vsintegration\Vsix\VisualFSharpTemplates\VisualFSharpTemplates.csproj", "{025CE01B-98F3-4C3C-B486-2C0BD038D011}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefinitionLocationAttribute", "vsintegration\tests\MockTypeProviders\DefinitionLocationAttribute\DefinitionLocationAttribute.csproj", "{DA39AD38-4A58-47BF-9215-E49768295169}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Server.Shared", "src\fsharp\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj", "{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefinitionLocationAttributeFileDoesnotExist", "vsintegration\tests\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist\DefinitionLocationAttributeFileDoesnotExist.csproj", "{8C2439BD-0E49-4929-A8B1-29CEE228191E}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "src\fsharp\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefinitionLocationAttributeLineDoesnotExist", "vsintegration\tests\MockTypeProviders\DefinitionLocationAttributeLineDoesnotExist\DefinitionLocationAttributeLineDoesnotExist.csproj", "{F47196DC-186D-4055-BAF2-658282A12F33}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.LanguageService", "vsintegration\src\FSharp.LanguageService\FSharp.LanguageService.fsproj", "{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefinitionLocationAttributeWithSpaceInTheType", "vsintegration\tests\MockTypeProviders\DefinitionLocationAttributeWithSpaceInTheType\DefinitionLocationAttributeWithSpaceInTheType.csproj", "{D4C88934-5893-467E-A55C-A11ECD6479FE}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.LanguageService.Base", "vsintegration\src\FSharp.LanguageService.Base\FSharp.LanguageService.Base.csproj", "{1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "DummyProviderForLanguageServiceTesting", "vsintegration\tests\MockTypeProviders\DummyProviderForLanguageServiceTesting\DummyProviderForLanguageServiceTesting.fsproj", "{6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Editor", "vsintegration\src\FSharp.Editor\FSharp.Editor.fsproj", "{65E0E82A-EACE-4787-8994-888674C2FE87}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorHideMethodsAttribute", "vsintegration\tests\MockTypeProviders\EditorHideMethodsAttribute\EditorHideMethodsAttribute.csproj", "{0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectSystem.Base", "vsintegration\src\FSharp.ProjectSystem.Base\Project\ProjectSystem.Base.csproj", "{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "EmptyAssembly", "vsintegration\tests\MockTypeProviders\EmptyAssembly\EmptyAssembly.fsproj", "{004982C6-93EA-4E70-B4F0-BE7D7219926A}"
+Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "FSharp.PropertiesPages", "vsintegration\src\FSharp.ProjectSystem.PropertyPages\FSharp.PropertiesPages.vbproj", "{FCFB214C-462E-42B3-91CA-FC557EFEE74F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithAdequateComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithAdequateComment\XmlDocAttributeWithAdequateComment.csproj", "{243A81AC-A954-4601-833A-60EEEFB00FCD}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ProjectSystem", "vsintegration\src\FSharp.ProjectSystem.FSharp\ProjectSystem.fsproj", "{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithEmptyComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithEmptyComment\XmlDocAttributeWithEmptyComment.csproj", "{B4595EB6-053A-400E-AA1B-7727F1BC900F}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "VisualFSharp.Salsa", "vsintegration\tests\Salsa\VisualFSharp.Salsa.fsproj", "{FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithLocalizedComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithLocalizedComment\XmlDocAttributeWithLocalizedComment.csproj", "{A559D7E8-7EFD-473A-B618-A10B41AB523B}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "VisualFSharp.UnitTests", "vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj", "{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithLongComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithLongComment\XmlDocAttributeWithLongComment.csproj", "{AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DefinitionLocationAttribute", "vsintegration\tests\MockTypeProviders\DefinitionLocationAttribute\DefinitionLocationAttribute.csproj", "{DA39AD38-4A58-47BF-9215-E49768295169}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithNullComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithNullComment\XmlDocAttributeWithNullComment.csproj", "{956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DefinitionLocationAttributeFileDoesnotExist", "vsintegration\tests\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist\DefinitionLocationAttributeFileDoesnotExist.csproj", "{8C2439BD-0E49-4929-A8B1-29CEE228191E}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Build", "src\fsharp\FSharp.Build\FSharp.Build.fsproj", "{702A7979-BCF9-4C41-853E-3ADFC9897890}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DefinitionLocationAttributeLineDoesnotExist", "vsintegration\tests\MockTypeProviders\DefinitionLocationAttributeLineDoesnotExist\DefinitionLocationAttributeLineDoesnotExist.csproj", "{F47196DC-186D-4055-BAF2-658282A12F33}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fsc", "src\fsharp\Fsc\Fsc.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DefinitionLocationAttributeWithSpaceInTheType", "vsintegration\tests\MockTypeProviders\DefinitionLocationAttributeWithSpaceInTheType\DefinitionLocationAttributeWithSpaceInTheType.csproj", "{D4C88934-5893-467E-A55C-A11ECD6479FE}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Interactive.Settings", "src\fsharp\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj", "{649FA588-F02E-457C-9FCF-87E46407481E}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "DummyProviderForLanguageServiceTesting", "vsintegration\tests\MockTypeProviders\DummyProviderForLanguageServiceTesting\DummyProviderForLanguageServiceTesting.fsproj", "{6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsiAnyCPU", "src\fsharp\fsiAnyCpu\FsiAnyCPU.fsproj", "{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EditorHideMethodsAttribute", "vsintegration\tests\MockTypeProviders\EditorHideMethodsAttribute\EditorHideMethodsAttribute.csproj", "{0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fsi", "src\fsharp\fsi\Fsi.fsproj", "{D0E98C0D-490B-4C61-9329-0862F6E87645}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "EmptyAssembly", "vsintegration\tests\MockTypeProviders\EmptyAssembly\EmptyAssembly.fsproj", "{004982C6-93EA-4E70-B4F0-BE7D7219926A}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Tests.FSharpSuite", "tests\fsharp\FSharp.Tests.FSharpSuite.fsproj", "{C163E892-5BF7-4B59-AA99-B0E8079C67C4}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XmlDocAttributeWithAdequateComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithAdequateComment\XmlDocAttributeWithAdequateComment.csproj", "{243A81AC-A954-4601-833A-60EEEFB00FCD}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VisualFSharp.UnitTests Support", "VisualFSharp.UnitTests Support", "{3F044931-FB83-4433-B934-AE66AB27B278}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XmlDocAttributeWithEmptyComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithEmptyComment\XmlDocAttributeWithEmptyComment.csproj", "{B4595EB6-053A-400E-AA1B-7727F1BC900F}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.UnitTests", "tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj", "{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XmlDocAttributeWithLocalizedComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithLocalizedComment\XmlDocAttributeWithLocalizedComment.csproj", "{A559D7E8-7EFD-473A-B618-A10B41AB523B}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Core.UnitTests", "tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj", "{88E2D422-6852-46E3-A740-83E391DC7973}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XmlDocAttributeWithLongComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithLongComment\XmlDocAttributeWithLongComment.csproj", "{AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VisualFSharp", "VisualFSharp", "{4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}"
- ProjectSection(SolutionItems) = preProject
- vsintegration\readme.md = vsintegration\readme.md
- EndProjectSection
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XmlDocAttributeWithNullComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithNullComment\XmlDocAttributeWithNullComment.csproj", "{956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Compiler", "Compiler", "{3881429D-A97A-49EB-B7AE-A82BA5FE9C77}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Build", "src\fsharp\FSharp.Build\FSharp.Build.fsproj", "{702A7979-BCF9-4C41-853E-3ADFC9897890}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsc", "src\fsharp\fsc\fsc.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{B8DDA694-7939-42E3-95E5-265C2217C142}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Interactive.Settings", "src\fsharp\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj", "{649FA588-F02E-457C-9FCF-87E46407481E}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{3058BC79-8E79-4645-B05D-48CC182FA8A6}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsiAnyCpu", "src\fsharp\fsiAnyCpu\fsiAnyCpu.fsproj", "{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleProject", "vsintegration\ProjectTemplates\ConsoleProject\ConsoleProject.csproj", "{604F0DAA-2D33-48DD-B162-EDF0B672803D}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsi", "src\fsharp\fsi\fsi.fsproj", "{D0E98C0D-490B-4C61-9329-0862F6E87645}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibraryProject", "vsintegration\ProjectTemplates\LibraryProject\LibraryProject.csproj", "{01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharpSuite.Tests", "tests\fsharp\FSharpSuite.Tests.fsproj", "{C163E892-5BF7-4B59-AA99-B0E8079C67C4}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TutorialProject", "vsintegration\ProjectTemplates\TutorialProject\TutorialProject.csproj", "{2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.UnitTests", "tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj", "{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ItemTemplates", "ItemTemplates", "{F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core.UnitTests", "tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj", "{88E2D422-6852-46E3-A740-83E391DC7973}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppConfig", "vsintegration\ItemTemplates\AppConfig\AppConfig.csproj", "{6BA13AA4-C25F-480F-856B-8E8000299A72}"
EndProject
@@ -108,38 +108,58 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextFile", "vsintegration\I
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XMLFile", "vsintegration\ItemTemplates\XMLFile\XMLFile.csproj", "{1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "HostedCompilerServer", "tests\fsharpqa\testenv\src\HostedCompilerServer\HostedCompilerServer.fsproj", "{4239EFEA-E746-446A-BF7A-51FCBAB13946}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "HostedCompilerServer", "tests\fsharpqa\testenv\src\HostedCompilerServer\HostedCompilerServer.fsproj", "{4239EFEA-E746-446A-BF7A-51FCBAB13946}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ILComparer", "tests\fsharpqa\testenv\src\ILComparer\ILComparer.fsproj", "{2E60864A-E3FF-4BCC-810F-DC7C34E6B236}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utils", "Utils", "{D086C8C6-D00D-4C3B-9AB2-A4286C9F5922}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ILComparer", "tests\fsharpqa\testenv\src\ILComparer\ILComparer.fsproj", "{2E60864A-E3FF-4BCC-810F-DC7C34E6B236}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "LanguageServiceProfiling", "vsintegration\Utils\LanguageServiceProfiling\LanguageServiceProfiling.fsproj", "{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.UIResources", "vsintegration\src\FSharp.UIResources\FSharp.UIResources.csproj", "{C4586A06-1402-48BC-8E35-A1B8642F895B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Analysis", "tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharp_Analysis", "tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FSharp.Compiler.Service.tests Support", "FSharp.Compiler.Service.tests Support", "{35636A82-401A-4C3A-B2AB-EB7DC5E9C268}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TestTP", "tests\service\data\TestTP\TestTP.fsproj", "{FF76BD3C-5E0A-4752-B6C3-044F6E15719B}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "TestTP", "tests\service\data\TestTP\TestTP.fsproj", "{FF76BD3C-5E0A-4752-B6C3-044F6E15719B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceFile", "vsintegration\ItemTemplates\ResourceFile\ResourceFile.csproj", "{0385564F-07B4-4264-AB8A-17C393E9140C}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Build.UnitTests", "tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj", "{400FAB03-786E-40CC-85A8-04B0C2869B14}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Build.UnitTests", "tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj", "{400FAB03-786E-40CC-85A8-04B0C2869B14}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PEVerify", "tests\fsharpqa\testenv\src\PEVerify\PEVerify.csproj", "{B0689A4E-07D8-494D-A0C8-791CB1D74E54}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.PatternMatcher", "vsintegration\src\FSharp.PatternMatcher\FSharp.PatternMatcher.csproj", "{18227628-DF90-4C47-AF3D-CC72D2EDD986}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Legacy", "Legacy", "{CCAB6E50-34C6-42AF-A6B0-567C29FCD91B}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "GetTypesVS.UnitTests", "vsintegration\tests\GetTypesVS.UnitTests\GetTypesVS.UnitTests.fsproj", "{6D93CEBD-4540-4D96-A153-B440A661FD09}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Setup", "Setup", "{6235B3AF-774D-4EA1-8F37-789E767F6368}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.FSharp.Compiler.MSBuild", "setup\Swix\Microsoft.FSharp.Compiler.MSBuild\Microsoft.FSharp.Compiler.MSBuild.csproj", "{4CBEE353-EB7F-4A47-988B-0070AEB4EE7A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.FSharp.Dependencies", "setup\Swix\Microsoft.FSharp.Dependencies\Microsoft.FSharp.Dependencies.csproj", "{6BCFED7A-3F67-4180-B307-C7D69D191D8C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.FSharp.IDE", "setup\Swix\Microsoft.FSharp.IDE\Microsoft.FSharp.IDE.csproj", "{E93E7D28-1C6B-4E04-BE83-68428CF7E039}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.FSharp.SDK", "setup\Swix\Microsoft.FSharp.SDK\Microsoft.FSharp.SDK.csproj", "{9482211E-23D0-4BD0-9893-E4AA5559F67A}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{647810D0-5307-448F-99A2-E83917010DAE}"
EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "GetTypesVSUnitTests", "vsintegration\tests\GetTypesVSUnitTests\GetTypesVSUnitTests.fsproj", "{6D93CEBD-4540-4D96-A153-B440A661FD09}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.FSharp.Compiler", "src\fsharp\FSharp.Compiler.nuget\Microsoft.FSharp.Compiler.csproj", "{04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ProjectTemplates", "ProjectTemplates", "{BED74F9E-A0D2-48E2-9EE7-449832100487}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleProject", "vsintegration\ProjectTemplates\ConsoleProject\ConsoleProject.csproj", "{1D8D778E-8D6B-4A8C-88A6-BE578988FBE8}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibraryProject", "vsintegration\ProjectTemplates\LibraryProject\LibraryProject.csproj", "{C32806E0-71C2-40E4-AEC4-517F73F6A18A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TutorialProject", "vsintegration\ProjectTemplates\TutorialProject\TutorialProject.csproj", "{7B345E51-F2C0-4D4B-B0E0-05432EC9D5E1}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.Core.nuget", "src\fsharp\FSharp.Core.nuget\FSharp.Core.nuget.csproj", "{8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
+ Proto|Any CPU = Proto|Any CPU
+ Proto|x86 = Proto|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
@@ -148,6 +168,10 @@ Global
{991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Debug|Any CPU.Build.0 = Debug|Any CPU
{991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Debug|x86.ActiveCfg = Debug|Any CPU
{991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Debug|x86.Build.0 = Debug|Any CPU
+ {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|x86.ActiveCfg = Release|Any CPU
+ {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|x86.Build.0 = Release|Any CPU
{991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Release|Any CPU.ActiveCfg = Release|Any CPU
{991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Release|Any CPU.Build.0 = Release|Any CPU
{991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Release|x86.ActiveCfg = Release|Any CPU
@@ -156,6 +180,10 @@ Global
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|x86.ActiveCfg = Debug|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|x86.Build.0 = Debug|Any CPU
+ {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|x86.ActiveCfg = Release|Any CPU
+ {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|x86.Build.0 = Release|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.Build.0 = Release|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|x86.ActiveCfg = Release|Any CPU
@@ -164,14 +192,34 @@ Global
{59ADCE46-9740-4079-834D-9A03A3494EBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59ADCE46-9740-4079-834D-9A03A3494EBC}.Debug|x86.ActiveCfg = Debug|Any CPU
{59ADCE46-9740-4079-834D-9A03A3494EBC}.Debug|x86.Build.0 = Debug|Any CPU
+ {59ADCE46-9740-4079-834D-9A03A3494EBC}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {59ADCE46-9740-4079-834D-9A03A3494EBC}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {59ADCE46-9740-4079-834D-9A03A3494EBC}.Proto|x86.ActiveCfg = Release|Any CPU
+ {59ADCE46-9740-4079-834D-9A03A3494EBC}.Proto|x86.Build.0 = Release|Any CPU
{59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|Any CPU.Build.0 = Release|Any CPU
{59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|x86.ActiveCfg = Release|Any CPU
{59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|x86.Build.0 = Release|Any CPU
+ {025CE01B-98F3-4C3C-B486-2C0BD038D011}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {025CE01B-98F3-4C3C-B486-2C0BD038D011}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {025CE01B-98F3-4C3C-B486-2C0BD038D011}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {025CE01B-98F3-4C3C-B486-2C0BD038D011}.Debug|x86.Build.0 = Debug|Any CPU
+ {025CE01B-98F3-4C3C-B486-2C0BD038D011}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {025CE01B-98F3-4C3C-B486-2C0BD038D011}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {025CE01B-98F3-4C3C-B486-2C0BD038D011}.Proto|x86.ActiveCfg = Release|Any CPU
+ {025CE01B-98F3-4C3C-B486-2C0BD038D011}.Proto|x86.Build.0 = Release|Any CPU
+ {025CE01B-98F3-4C3C-B486-2C0BD038D011}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {025CE01B-98F3-4C3C-B486-2C0BD038D011}.Release|Any CPU.Build.0 = Release|Any CPU
+ {025CE01B-98F3-4C3C-B486-2C0BD038D011}.Release|x86.ActiveCfg = Release|Any CPU
+ {025CE01B-98F3-4C3C-B486-2C0BD038D011}.Release|x86.Build.0 = Release|Any CPU
{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|x86.ActiveCfg = Debug|Any CPU
{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|x86.Build.0 = Debug|Any CPU
+ {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|x86.ActiveCfg = Release|Any CPU
+ {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|x86.Build.0 = Release|Any CPU
{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|Any CPU.Build.0 = Release|Any CPU
{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|x86.ActiveCfg = Release|Any CPU
@@ -180,6 +228,10 @@ Global
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|x86.ActiveCfg = Debug|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|x86.Build.0 = Debug|Any CPU
+ {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|x86.ActiveCfg = Release|Any CPU
+ {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|x86.Build.0 = Release|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|Any CPU.Build.0 = Release|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|x86.ActiveCfg = Release|Any CPU
@@ -188,6 +240,10 @@ Global
{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Debug|x86.ActiveCfg = Debug|Any CPU
{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Debug|x86.Build.0 = Debug|Any CPU
+ {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|x86.ActiveCfg = Release|Any CPU
+ {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|x86.Build.0 = Release|Any CPU
{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Release|Any CPU.Build.0 = Release|Any CPU
{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Release|x86.ActiveCfg = Release|Any CPU
@@ -196,6 +252,10 @@ Global
{1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Debug|x86.ActiveCfg = Debug|Any CPU
{1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Debug|x86.Build.0 = Debug|Any CPU
+ {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|x86.ActiveCfg = Release|Any CPU
+ {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|x86.Build.0 = Release|Any CPU
{1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Release|Any CPU.Build.0 = Release|Any CPU
{1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Release|x86.ActiveCfg = Release|Any CPU
@@ -204,6 +264,10 @@ Global
{65E0E82A-EACE-4787-8994-888674C2FE87}.Debug|Any CPU.Build.0 = Debug|Any CPU
{65E0E82A-EACE-4787-8994-888674C2FE87}.Debug|x86.ActiveCfg = Debug|Any CPU
{65E0E82A-EACE-4787-8994-888674C2FE87}.Debug|x86.Build.0 = Debug|Any CPU
+ {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|x86.ActiveCfg = Release|Any CPU
+ {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|x86.Build.0 = Release|Any CPU
{65E0E82A-EACE-4787-8994-888674C2FE87}.Release|Any CPU.ActiveCfg = Release|Any CPU
{65E0E82A-EACE-4787-8994-888674C2FE87}.Release|Any CPU.Build.0 = Release|Any CPU
{65E0E82A-EACE-4787-8994-888674C2FE87}.Release|x86.ActiveCfg = Release|Any CPU
@@ -212,6 +276,10 @@ Global
{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Debug|x86.ActiveCfg = Debug|Any CPU
{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Debug|x86.Build.0 = Debug|Any CPU
+ {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|x86.ActiveCfg = Release|Any CPU
+ {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|x86.Build.0 = Release|Any CPU
{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Release|Any CPU.Build.0 = Release|Any CPU
{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Release|x86.ActiveCfg = Release|Any CPU
@@ -220,6 +288,10 @@ Global
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Debug|x86.ActiveCfg = Debug|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Debug|x86.Build.0 = Debug|Any CPU
+ {FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|x86.ActiveCfg = Release|Any CPU
+ {FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|x86.Build.0 = Release|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Release|Any CPU.Build.0 = Release|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Release|x86.ActiveCfg = Release|Any CPU
@@ -228,6 +300,10 @@ Global
{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Debug|x86.ActiveCfg = Debug|Any CPU
{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Debug|x86.Build.0 = Debug|Any CPU
+ {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|x86.ActiveCfg = Release|Any CPU
+ {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|x86.Build.0 = Release|Any CPU
{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Release|Any CPU.Build.0 = Release|Any CPU
{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Release|x86.ActiveCfg = Release|Any CPU
@@ -236,6 +312,10 @@ Global
{FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Debug|x86.ActiveCfg = Debug|Any CPU
{FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Debug|x86.Build.0 = Debug|Any CPU
+ {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Proto|x86.ActiveCfg = Release|Any CPU
+ {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Proto|x86.Build.0 = Release|Any CPU
{FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Release|Any CPU.Build.0 = Release|Any CPU
{FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Release|x86.ActiveCfg = Release|Any CPU
@@ -244,6 +324,10 @@ Global
{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Debug|x86.ActiveCfg = Debug|Any CPU
{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Debug|x86.Build.0 = Debug|Any CPU
+ {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Proto|x86.ActiveCfg = Release|Any CPU
+ {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Proto|x86.Build.0 = Release|Any CPU
{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Release|Any CPU.Build.0 = Release|Any CPU
{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Release|x86.ActiveCfg = Release|Any CPU
@@ -252,6 +336,10 @@ Global
{DA39AD38-4A58-47BF-9215-E49768295169}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA39AD38-4A58-47BF-9215-E49768295169}.Debug|x86.ActiveCfg = Debug|Any CPU
{DA39AD38-4A58-47BF-9215-E49768295169}.Debug|x86.Build.0 = Debug|Any CPU
+ {DA39AD38-4A58-47BF-9215-E49768295169}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {DA39AD38-4A58-47BF-9215-E49768295169}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {DA39AD38-4A58-47BF-9215-E49768295169}.Proto|x86.ActiveCfg = Release|Any CPU
+ {DA39AD38-4A58-47BF-9215-E49768295169}.Proto|x86.Build.0 = Release|Any CPU
{DA39AD38-4A58-47BF-9215-E49768295169}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA39AD38-4A58-47BF-9215-E49768295169}.Release|Any CPU.Build.0 = Release|Any CPU
{DA39AD38-4A58-47BF-9215-E49768295169}.Release|x86.ActiveCfg = Release|Any CPU
@@ -260,6 +348,10 @@ Global
{8C2439BD-0E49-4929-A8B1-29CEE228191E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C2439BD-0E49-4929-A8B1-29CEE228191E}.Debug|x86.ActiveCfg = Debug|Any CPU
{8C2439BD-0E49-4929-A8B1-29CEE228191E}.Debug|x86.Build.0 = Debug|Any CPU
+ {8C2439BD-0E49-4929-A8B1-29CEE228191E}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {8C2439BD-0E49-4929-A8B1-29CEE228191E}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {8C2439BD-0E49-4929-A8B1-29CEE228191E}.Proto|x86.ActiveCfg = Release|Any CPU
+ {8C2439BD-0E49-4929-A8B1-29CEE228191E}.Proto|x86.Build.0 = Release|Any CPU
{8C2439BD-0E49-4929-A8B1-29CEE228191E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C2439BD-0E49-4929-A8B1-29CEE228191E}.Release|Any CPU.Build.0 = Release|Any CPU
{8C2439BD-0E49-4929-A8B1-29CEE228191E}.Release|x86.ActiveCfg = Release|Any CPU
@@ -268,6 +360,10 @@ Global
{F47196DC-186D-4055-BAF2-658282A12F33}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F47196DC-186D-4055-BAF2-658282A12F33}.Debug|x86.ActiveCfg = Debug|Any CPU
{F47196DC-186D-4055-BAF2-658282A12F33}.Debug|x86.Build.0 = Debug|Any CPU
+ {F47196DC-186D-4055-BAF2-658282A12F33}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {F47196DC-186D-4055-BAF2-658282A12F33}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {F47196DC-186D-4055-BAF2-658282A12F33}.Proto|x86.ActiveCfg = Release|Any CPU
+ {F47196DC-186D-4055-BAF2-658282A12F33}.Proto|x86.Build.0 = Release|Any CPU
{F47196DC-186D-4055-BAF2-658282A12F33}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F47196DC-186D-4055-BAF2-658282A12F33}.Release|Any CPU.Build.0 = Release|Any CPU
{F47196DC-186D-4055-BAF2-658282A12F33}.Release|x86.ActiveCfg = Release|Any CPU
@@ -276,6 +372,10 @@ Global
{D4C88934-5893-467E-A55C-A11ECD6479FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4C88934-5893-467E-A55C-A11ECD6479FE}.Debug|x86.ActiveCfg = Debug|Any CPU
{D4C88934-5893-467E-A55C-A11ECD6479FE}.Debug|x86.Build.0 = Debug|Any CPU
+ {D4C88934-5893-467E-A55C-A11ECD6479FE}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {D4C88934-5893-467E-A55C-A11ECD6479FE}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {D4C88934-5893-467E-A55C-A11ECD6479FE}.Proto|x86.ActiveCfg = Release|Any CPU
+ {D4C88934-5893-467E-A55C-A11ECD6479FE}.Proto|x86.Build.0 = Release|Any CPU
{D4C88934-5893-467E-A55C-A11ECD6479FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4C88934-5893-467E-A55C-A11ECD6479FE}.Release|Any CPU.Build.0 = Release|Any CPU
{D4C88934-5893-467E-A55C-A11ECD6479FE}.Release|x86.ActiveCfg = Release|Any CPU
@@ -284,6 +384,10 @@ Global
{6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Debug|x86.ActiveCfg = Debug|Any CPU
{6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Debug|x86.Build.0 = Debug|Any CPU
+ {6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Proto|x86.ActiveCfg = Release|Any CPU
+ {6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Proto|x86.Build.0 = Release|Any CPU
{6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Release|Any CPU.Build.0 = Release|Any CPU
{6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Release|x86.ActiveCfg = Release|Any CPU
@@ -292,6 +396,10 @@ Global
{0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Debug|x86.ActiveCfg = Debug|Any CPU
{0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Debug|x86.Build.0 = Debug|Any CPU
+ {0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Proto|x86.ActiveCfg = Release|Any CPU
+ {0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Proto|x86.Build.0 = Release|Any CPU
{0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Release|Any CPU.Build.0 = Release|Any CPU
{0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Release|x86.ActiveCfg = Release|Any CPU
@@ -300,6 +408,10 @@ Global
{004982C6-93EA-4E70-B4F0-BE7D7219926A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{004982C6-93EA-4E70-B4F0-BE7D7219926A}.Debug|x86.ActiveCfg = Debug|Any CPU
{004982C6-93EA-4E70-B4F0-BE7D7219926A}.Debug|x86.Build.0 = Debug|Any CPU
+ {004982C6-93EA-4E70-B4F0-BE7D7219926A}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {004982C6-93EA-4E70-B4F0-BE7D7219926A}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {004982C6-93EA-4E70-B4F0-BE7D7219926A}.Proto|x86.ActiveCfg = Release|Any CPU
+ {004982C6-93EA-4E70-B4F0-BE7D7219926A}.Proto|x86.Build.0 = Release|Any CPU
{004982C6-93EA-4E70-B4F0-BE7D7219926A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{004982C6-93EA-4E70-B4F0-BE7D7219926A}.Release|Any CPU.Build.0 = Release|Any CPU
{004982C6-93EA-4E70-B4F0-BE7D7219926A}.Release|x86.ActiveCfg = Release|Any CPU
@@ -308,6 +420,10 @@ Global
{243A81AC-A954-4601-833A-60EEEFB00FCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{243A81AC-A954-4601-833A-60EEEFB00FCD}.Debug|x86.ActiveCfg = Debug|Any CPU
{243A81AC-A954-4601-833A-60EEEFB00FCD}.Debug|x86.Build.0 = Debug|Any CPU
+ {243A81AC-A954-4601-833A-60EEEFB00FCD}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {243A81AC-A954-4601-833A-60EEEFB00FCD}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {243A81AC-A954-4601-833A-60EEEFB00FCD}.Proto|x86.ActiveCfg = Release|Any CPU
+ {243A81AC-A954-4601-833A-60EEEFB00FCD}.Proto|x86.Build.0 = Release|Any CPU
{243A81AC-A954-4601-833A-60EEEFB00FCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{243A81AC-A954-4601-833A-60EEEFB00FCD}.Release|Any CPU.Build.0 = Release|Any CPU
{243A81AC-A954-4601-833A-60EEEFB00FCD}.Release|x86.ActiveCfg = Release|Any CPU
@@ -316,6 +432,10 @@ Global
{B4595EB6-053A-400E-AA1B-7727F1BC900F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B4595EB6-053A-400E-AA1B-7727F1BC900F}.Debug|x86.ActiveCfg = Debug|Any CPU
{B4595EB6-053A-400E-AA1B-7727F1BC900F}.Debug|x86.Build.0 = Debug|Any CPU
+ {B4595EB6-053A-400E-AA1B-7727F1BC900F}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {B4595EB6-053A-400E-AA1B-7727F1BC900F}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {B4595EB6-053A-400E-AA1B-7727F1BC900F}.Proto|x86.ActiveCfg = Release|Any CPU
+ {B4595EB6-053A-400E-AA1B-7727F1BC900F}.Proto|x86.Build.0 = Release|Any CPU
{B4595EB6-053A-400E-AA1B-7727F1BC900F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B4595EB6-053A-400E-AA1B-7727F1BC900F}.Release|Any CPU.Build.0 = Release|Any CPU
{B4595EB6-053A-400E-AA1B-7727F1BC900F}.Release|x86.ActiveCfg = Release|Any CPU
@@ -324,6 +444,10 @@ Global
{A559D7E8-7EFD-473A-B618-A10B41AB523B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A559D7E8-7EFD-473A-B618-A10B41AB523B}.Debug|x86.ActiveCfg = Debug|Any CPU
{A559D7E8-7EFD-473A-B618-A10B41AB523B}.Debug|x86.Build.0 = Debug|Any CPU
+ {A559D7E8-7EFD-473A-B618-A10B41AB523B}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {A559D7E8-7EFD-473A-B618-A10B41AB523B}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {A559D7E8-7EFD-473A-B618-A10B41AB523B}.Proto|x86.ActiveCfg = Release|Any CPU
+ {A559D7E8-7EFD-473A-B618-A10B41AB523B}.Proto|x86.Build.0 = Release|Any CPU
{A559D7E8-7EFD-473A-B618-A10B41AB523B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A559D7E8-7EFD-473A-B618-A10B41AB523B}.Release|Any CPU.Build.0 = Release|Any CPU
{A559D7E8-7EFD-473A-B618-A10B41AB523B}.Release|x86.ActiveCfg = Release|Any CPU
@@ -332,6 +456,10 @@ Global
{AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Debug|x86.ActiveCfg = Debug|Any CPU
{AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Debug|x86.Build.0 = Debug|Any CPU
+ {AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Proto|x86.ActiveCfg = Release|Any CPU
+ {AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Proto|x86.Build.0 = Release|Any CPU
{AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Release|Any CPU.Build.0 = Release|Any CPU
{AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Release|x86.ActiveCfg = Release|Any CPU
@@ -340,6 +468,10 @@ Global
{956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Debug|x86.ActiveCfg = Debug|Any CPU
{956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Debug|x86.Build.0 = Debug|Any CPU
+ {956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Proto|x86.ActiveCfg = Release|Any CPU
+ {956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Proto|x86.Build.0 = Release|Any CPU
{956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Release|Any CPU.Build.0 = Release|Any CPU
{956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Release|x86.ActiveCfg = Release|Any CPU
@@ -348,6 +480,10 @@ Global
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Debug|Any CPU.Build.0 = Debug|Any CPU
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Debug|x86.ActiveCfg = Debug|Any CPU
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Debug|x86.Build.0 = Debug|Any CPU
+ {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|x86.ActiveCfg = Release|Any CPU
+ {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|x86.Build.0 = Release|Any CPU
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Release|Any CPU.ActiveCfg = Release|Any CPU
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Release|Any CPU.Build.0 = Release|Any CPU
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Release|x86.ActiveCfg = Release|Any CPU
@@ -356,6 +492,10 @@ Global
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|x86.ActiveCfg = Debug|Any CPU
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|x86.Build.0 = Debug|Any CPU
+ {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|x86.ActiveCfg = Release|Any CPU
+ {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|x86.Build.0 = Release|Any CPU
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.Build.0 = Release|Any CPU
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|x86.ActiveCfg = Release|Any CPU
@@ -364,6 +504,10 @@ Global
{649FA588-F02E-457C-9FCF-87E46407481E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{649FA588-F02E-457C-9FCF-87E46407481E}.Debug|x86.ActiveCfg = Debug|Any CPU
{649FA588-F02E-457C-9FCF-87E46407481E}.Debug|x86.Build.0 = Debug|Any CPU
+ {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|x86.ActiveCfg = Release|Any CPU
+ {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|x86.Build.0 = Release|Any CPU
{649FA588-F02E-457C-9FCF-87E46407481E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{649FA588-F02E-457C-9FCF-87E46407481E}.Release|Any CPU.Build.0 = Release|Any CPU
{649FA588-F02E-457C-9FCF-87E46407481E}.Release|x86.ActiveCfg = Release|Any CPU
@@ -372,6 +516,10 @@ Global
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|x86.ActiveCfg = Debug|Any CPU
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|x86.Build.0 = Debug|Any CPU
+ {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Proto|x86.ActiveCfg = Release|Any CPU
+ {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Proto|x86.Build.0 = Release|Any CPU
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|Any CPU.Build.0 = Release|Any CPU
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|x86.ActiveCfg = Release|Any CPU
@@ -380,6 +528,10 @@ Global
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Debug|x86.ActiveCfg = Debug|Any CPU
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Debug|x86.Build.0 = Debug|Any CPU
+ {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|x86.ActiveCfg = Release|Any CPU
+ {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|x86.Build.0 = Release|Any CPU
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Release|Any CPU.Build.0 = Release|Any CPU
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Release|x86.ActiveCfg = Release|Any CPU
@@ -388,6 +540,10 @@ Global
{C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Debug|x86.ActiveCfg = Debug|Any CPU
{C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Debug|x86.Build.0 = Debug|Any CPU
+ {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|x86.ActiveCfg = Release|Any CPU
+ {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|x86.Build.0 = Release|Any CPU
{C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Release|Any CPU.Build.0 = Release|Any CPU
{C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Release|x86.ActiveCfg = Release|Any CPU
@@ -396,6 +552,10 @@ Global
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Debug|x86.ActiveCfg = Debug|Any CPU
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Debug|x86.Build.0 = Debug|Any CPU
+ {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|x86.ActiveCfg = Release|Any CPU
+ {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|x86.Build.0 = Release|Any CPU
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Release|Any CPU.Build.0 = Release|Any CPU
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Release|x86.ActiveCfg = Release|Any CPU
@@ -404,38 +564,22 @@ Global
{88E2D422-6852-46E3-A740-83E391DC7973}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88E2D422-6852-46E3-A740-83E391DC7973}.Debug|x86.ActiveCfg = Debug|Any CPU
{88E2D422-6852-46E3-A740-83E391DC7973}.Debug|x86.Build.0 = Debug|Any CPU
+ {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|x86.ActiveCfg = Release|Any CPU
+ {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|x86.Build.0 = Release|Any CPU
{88E2D422-6852-46E3-A740-83E391DC7973}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88E2D422-6852-46E3-A740-83E391DC7973}.Release|Any CPU.Build.0 = Release|Any CPU
{88E2D422-6852-46E3-A740-83E391DC7973}.Release|x86.ActiveCfg = Release|Any CPU
{88E2D422-6852-46E3-A740-83E391DC7973}.Release|x86.Build.0 = Release|Any CPU
- {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Debug|x86.ActiveCfg = Debug|Any CPU
- {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Debug|x86.Build.0 = Debug|Any CPU
- {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Release|Any CPU.Build.0 = Release|Any CPU
- {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Release|x86.ActiveCfg = Release|Any CPU
- {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Release|x86.Build.0 = Release|Any CPU
- {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Debug|x86.ActiveCfg = Debug|Any CPU
- {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Debug|x86.Build.0 = Debug|Any CPU
- {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Release|Any CPU.Build.0 = Release|Any CPU
- {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Release|x86.ActiveCfg = Release|Any CPU
- {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Release|x86.Build.0 = Release|Any CPU
- {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Debug|x86.ActiveCfg = Debug|Any CPU
- {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Debug|x86.Build.0 = Debug|Any CPU
- {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Release|Any CPU.Build.0 = Release|Any CPU
- {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Release|x86.ActiveCfg = Release|Any CPU
- {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Release|x86.Build.0 = Release|Any CPU
{6BA13AA4-C25F-480F-856B-8E8000299A72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6BA13AA4-C25F-480F-856B-8E8000299A72}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6BA13AA4-C25F-480F-856B-8E8000299A72}.Debug|x86.ActiveCfg = Debug|Any CPU
{6BA13AA4-C25F-480F-856B-8E8000299A72}.Debug|x86.Build.0 = Debug|Any CPU
+ {6BA13AA4-C25F-480F-856B-8E8000299A72}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
+ {6BA13AA4-C25F-480F-856B-8E8000299A72}.Proto|Any CPU.Build.0 = Proto|Any CPU
+ {6BA13AA4-C25F-480F-856B-8E8000299A72}.Proto|x86.ActiveCfg = Proto|Any CPU
+ {6BA13AA4-C25F-480F-856B-8E8000299A72}.Proto|x86.Build.0 = Proto|Any CPU
{6BA13AA4-C25F-480F-856B-8E8000299A72}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6BA13AA4-C25F-480F-856B-8E8000299A72}.Release|Any CPU.Build.0 = Release|Any CPU
{6BA13AA4-C25F-480F-856B-8E8000299A72}.Release|x86.ActiveCfg = Release|Any CPU
@@ -444,6 +588,10 @@ Global
{12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Debug|Any CPU.Build.0 = Debug|Any CPU
{12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Debug|x86.ActiveCfg = Debug|Any CPU
{12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Debug|x86.Build.0 = Debug|Any CPU
+ {12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
+ {12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Proto|Any CPU.Build.0 = Proto|Any CPU
+ {12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Proto|x86.ActiveCfg = Proto|Any CPU
+ {12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Proto|x86.Build.0 = Proto|Any CPU
{12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Release|Any CPU.ActiveCfg = Release|Any CPU
{12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Release|Any CPU.Build.0 = Release|Any CPU
{12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Release|x86.ActiveCfg = Release|Any CPU
@@ -452,6 +600,10 @@ Global
{A333B85A-DC23-49B6-9797-B89A7951E92D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A333B85A-DC23-49B6-9797-B89A7951E92D}.Debug|x86.ActiveCfg = Debug|Any CPU
{A333B85A-DC23-49B6-9797-B89A7951E92D}.Debug|x86.Build.0 = Debug|Any CPU
+ {A333B85A-DC23-49B6-9797-B89A7951E92D}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
+ {A333B85A-DC23-49B6-9797-B89A7951E92D}.Proto|Any CPU.Build.0 = Proto|Any CPU
+ {A333B85A-DC23-49B6-9797-B89A7951E92D}.Proto|x86.ActiveCfg = Proto|Any CPU
+ {A333B85A-DC23-49B6-9797-B89A7951E92D}.Proto|x86.Build.0 = Proto|Any CPU
{A333B85A-DC23-49B6-9797-B89A7951E92D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A333B85A-DC23-49B6-9797-B89A7951E92D}.Release|Any CPU.Build.0 = Release|Any CPU
{A333B85A-DC23-49B6-9797-B89A7951E92D}.Release|x86.ActiveCfg = Release|Any CPU
@@ -460,6 +612,10 @@ Global
{E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Debug|x86.ActiveCfg = Debug|Any CPU
{E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Debug|x86.Build.0 = Debug|Any CPU
+ {E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
+ {E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Proto|Any CPU.Build.0 = Proto|Any CPU
+ {E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Proto|x86.ActiveCfg = Proto|Any CPU
+ {E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Proto|x86.Build.0 = Proto|Any CPU
{E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Release|Any CPU.Build.0 = Release|Any CPU
{E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Release|x86.ActiveCfg = Release|Any CPU
@@ -468,6 +624,10 @@ Global
{D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Debug|x86.ActiveCfg = Debug|Any CPU
{D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Debug|x86.Build.0 = Debug|Any CPU
+ {D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
+ {D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Proto|Any CPU.Build.0 = Proto|Any CPU
+ {D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Proto|x86.ActiveCfg = Proto|Any CPU
+ {D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Proto|x86.Build.0 = Proto|Any CPU
{D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Release|Any CPU.Build.0 = Release|Any CPU
{D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Release|x86.ActiveCfg = Release|Any CPU
@@ -476,6 +636,10 @@ Global
{1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Debug|x86.ActiveCfg = Debug|Any CPU
{1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Debug|x86.Build.0 = Debug|Any CPU
+ {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
+ {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Proto|Any CPU.Build.0 = Proto|Any CPU
+ {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Proto|x86.ActiveCfg = Proto|Any CPU
+ {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Proto|x86.Build.0 = Proto|Any CPU
{1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Release|Any CPU.Build.0 = Release|Any CPU
{1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Release|x86.ActiveCfg = Release|Any CPU
@@ -484,6 +648,10 @@ Global
{4239EFEA-E746-446A-BF7A-51FCBAB13946}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4239EFEA-E746-446A-BF7A-51FCBAB13946}.Debug|x86.ActiveCfg = Debug|Any CPU
{4239EFEA-E746-446A-BF7A-51FCBAB13946}.Debug|x86.Build.0 = Debug|Any CPU
+ {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Proto|x86.ActiveCfg = Release|Any CPU
+ {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Proto|x86.Build.0 = Release|Any CPU
{4239EFEA-E746-446A-BF7A-51FCBAB13946}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4239EFEA-E746-446A-BF7A-51FCBAB13946}.Release|Any CPU.Build.0 = Release|Any CPU
{4239EFEA-E746-446A-BF7A-51FCBAB13946}.Release|x86.ActiveCfg = Release|Any CPU
@@ -492,6 +660,10 @@ Global
{2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Debug|x86.ActiveCfg = Debug|Any CPU
{2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Debug|x86.Build.0 = Debug|Any CPU
+ {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Proto|x86.ActiveCfg = Release|Any CPU
+ {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Proto|x86.Build.0 = Release|Any CPU
{2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Release|Any CPU.Build.0 = Release|Any CPU
{2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Release|x86.ActiveCfg = Release|Any CPU
@@ -500,6 +672,10 @@ Global
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Debug|x86.ActiveCfg = Debug|Any CPU
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Debug|x86.Build.0 = Debug|Any CPU
+ {E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Proto|x86.ActiveCfg = Release|Any CPU
+ {E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Proto|x86.Build.0 = Release|Any CPU
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Release|Any CPU.Build.0 = Release|Any CPU
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Release|x86.ActiveCfg = Release|Any CPU
@@ -508,6 +684,10 @@ Global
{C4586A06-1402-48BC-8E35-A1B8642F895B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4586A06-1402-48BC-8E35-A1B8642F895B}.Debug|x86.ActiveCfg = Debug|Any CPU
{C4586A06-1402-48BC-8E35-A1B8642F895B}.Debug|x86.Build.0 = Debug|Any CPU
+ {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|x86.ActiveCfg = Release|Any CPU
+ {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|x86.Build.0 = Release|Any CPU
{C4586A06-1402-48BC-8E35-A1B8642F895B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C4586A06-1402-48BC-8E35-A1B8642F895B}.Release|Any CPU.Build.0 = Release|Any CPU
{C4586A06-1402-48BC-8E35-A1B8642F895B}.Release|x86.ActiveCfg = Release|Any CPU
@@ -516,6 +696,10 @@ Global
{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|x86.ActiveCfg = Debug|Any CPU
{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|x86.Build.0 = Debug|Any CPU
+ {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Proto|x86.ActiveCfg = Release|Any CPU
+ {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Proto|x86.Build.0 = Release|Any CPU
{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|Any CPU.Build.0 = Release|Any CPU
{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|x86.ActiveCfg = Release|Any CPU
@@ -524,6 +708,10 @@ Global
{FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Debug|x86.ActiveCfg = Debug|Any CPU
{FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Debug|x86.Build.0 = Debug|Any CPU
+ {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Proto|x86.ActiveCfg = Release|Any CPU
+ {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Proto|x86.Build.0 = Release|Any CPU
{FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Release|Any CPU.Build.0 = Release|Any CPU
{FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Release|x86.ActiveCfg = Release|Any CPU
@@ -532,6 +720,10 @@ Global
{0385564F-07B4-4264-AB8A-17C393E9140C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0385564F-07B4-4264-AB8A-17C393E9140C}.Debug|x86.ActiveCfg = Debug|Any CPU
{0385564F-07B4-4264-AB8A-17C393E9140C}.Debug|x86.Build.0 = Debug|Any CPU
+ {0385564F-07B4-4264-AB8A-17C393E9140C}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
+ {0385564F-07B4-4264-AB8A-17C393E9140C}.Proto|Any CPU.Build.0 = Proto|Any CPU
+ {0385564F-07B4-4264-AB8A-17C393E9140C}.Proto|x86.ActiveCfg = Proto|Any CPU
+ {0385564F-07B4-4264-AB8A-17C393E9140C}.Proto|x86.Build.0 = Proto|Any CPU
{0385564F-07B4-4264-AB8A-17C393E9140C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0385564F-07B4-4264-AB8A-17C393E9140C}.Release|Any CPU.Build.0 = Release|Any CPU
{0385564F-07B4-4264-AB8A-17C393E9140C}.Release|x86.ActiveCfg = Release|Any CPU
@@ -540,6 +732,10 @@ Global
{400FAB03-786E-40CC-85A8-04B0C2869B14}.Debug|Any CPU.Build.0 = Debug|Any CPU
{400FAB03-786E-40CC-85A8-04B0C2869B14}.Debug|x86.ActiveCfg = Debug|Any CPU
{400FAB03-786E-40CC-85A8-04B0C2869B14}.Debug|x86.Build.0 = Debug|Any CPU
+ {400FAB03-786E-40CC-85A8-04B0C2869B14}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {400FAB03-786E-40CC-85A8-04B0C2869B14}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {400FAB03-786E-40CC-85A8-04B0C2869B14}.Proto|x86.ActiveCfg = Release|Any CPU
+ {400FAB03-786E-40CC-85A8-04B0C2869B14}.Proto|x86.Build.0 = Release|Any CPU
{400FAB03-786E-40CC-85A8-04B0C2869B14}.Release|Any CPU.ActiveCfg = Release|Any CPU
{400FAB03-786E-40CC-85A8-04B0C2869B14}.Release|Any CPU.Build.0 = Release|Any CPU
{400FAB03-786E-40CC-85A8-04B0C2869B14}.Release|x86.ActiveCfg = Release|Any CPU
@@ -548,6 +744,10 @@ Global
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Debug|x86.ActiveCfg = Debug|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Debug|x86.Build.0 = Debug|Any CPU
+ {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|x86.ActiveCfg = Release|Any CPU
+ {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|x86.Build.0 = Release|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|Any CPU.Build.0 = Release|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|x86.ActiveCfg = Release|Any CPU
@@ -556,6 +756,10 @@ Global
{18227628-DF90-4C47-AF3D-CC72D2EDD986}.Debug|Any CPU.Build.0 = Debug|Any CPU
{18227628-DF90-4C47-AF3D-CC72D2EDD986}.Debug|x86.ActiveCfg = Debug|Any CPU
{18227628-DF90-4C47-AF3D-CC72D2EDD986}.Debug|x86.Build.0 = Debug|Any CPU
+ {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Proto|x86.ActiveCfg = Release|Any CPU
+ {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Proto|x86.Build.0 = Release|Any CPU
{18227628-DF90-4C47-AF3D-CC72D2EDD986}.Release|Any CPU.ActiveCfg = Release|Any CPU
{18227628-DF90-4C47-AF3D-CC72D2EDD986}.Release|Any CPU.Build.0 = Release|Any CPU
{18227628-DF90-4C47-AF3D-CC72D2EDD986}.Release|x86.ActiveCfg = Release|Any CPU
@@ -564,18 +768,137 @@ Global
{6D93CEBD-4540-4D96-A153-B440A661FD09}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D93CEBD-4540-4D96-A153-B440A661FD09}.Debug|x86.ActiveCfg = Debug|Any CPU
{6D93CEBD-4540-4D96-A153-B440A661FD09}.Debug|x86.Build.0 = Debug|Any CPU
+ {6D93CEBD-4540-4D96-A153-B440A661FD09}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {6D93CEBD-4540-4D96-A153-B440A661FD09}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {6D93CEBD-4540-4D96-A153-B440A661FD09}.Proto|x86.ActiveCfg = Release|Any CPU
+ {6D93CEBD-4540-4D96-A153-B440A661FD09}.Proto|x86.Build.0 = Release|Any CPU
{6D93CEBD-4540-4D96-A153-B440A661FD09}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D93CEBD-4540-4D96-A153-B440A661FD09}.Release|Any CPU.Build.0 = Release|Any CPU
{6D93CEBD-4540-4D96-A153-B440A661FD09}.Release|x86.ActiveCfg = Release|Any CPU
{6D93CEBD-4540-4D96-A153-B440A661FD09}.Release|x86.Build.0 = Release|Any CPU
+ {4CBEE353-EB7F-4A47-988B-0070AEB4EE7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4CBEE353-EB7F-4A47-988B-0070AEB4EE7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4CBEE353-EB7F-4A47-988B-0070AEB4EE7A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4CBEE353-EB7F-4A47-988B-0070AEB4EE7A}.Debug|x86.Build.0 = Debug|Any CPU
+ {4CBEE353-EB7F-4A47-988B-0070AEB4EE7A}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {4CBEE353-EB7F-4A47-988B-0070AEB4EE7A}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {4CBEE353-EB7F-4A47-988B-0070AEB4EE7A}.Proto|x86.ActiveCfg = Release|Any CPU
+ {4CBEE353-EB7F-4A47-988B-0070AEB4EE7A}.Proto|x86.Build.0 = Release|Any CPU
+ {4CBEE353-EB7F-4A47-988B-0070AEB4EE7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4CBEE353-EB7F-4A47-988B-0070AEB4EE7A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4CBEE353-EB7F-4A47-988B-0070AEB4EE7A}.Release|x86.ActiveCfg = Release|Any CPU
+ {4CBEE353-EB7F-4A47-988B-0070AEB4EE7A}.Release|x86.Build.0 = Release|Any CPU
+ {6BCFED7A-3F67-4180-B307-C7D69D191D8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6BCFED7A-3F67-4180-B307-C7D69D191D8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6BCFED7A-3F67-4180-B307-C7D69D191D8C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6BCFED7A-3F67-4180-B307-C7D69D191D8C}.Debug|x86.Build.0 = Debug|Any CPU
+ {6BCFED7A-3F67-4180-B307-C7D69D191D8C}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
+ {6BCFED7A-3F67-4180-B307-C7D69D191D8C}.Proto|Any CPU.Build.0 = Debug|Any CPU
+ {6BCFED7A-3F67-4180-B307-C7D69D191D8C}.Proto|x86.ActiveCfg = Debug|Any CPU
+ {6BCFED7A-3F67-4180-B307-C7D69D191D8C}.Proto|x86.Build.0 = Debug|Any CPU
+ {6BCFED7A-3F67-4180-B307-C7D69D191D8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6BCFED7A-3F67-4180-B307-C7D69D191D8C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6BCFED7A-3F67-4180-B307-C7D69D191D8C}.Release|x86.ActiveCfg = Release|Any CPU
+ {6BCFED7A-3F67-4180-B307-C7D69D191D8C}.Release|x86.Build.0 = Release|Any CPU
+ {E93E7D28-1C6B-4E04-BE83-68428CF7E039}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E93E7D28-1C6B-4E04-BE83-68428CF7E039}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E93E7D28-1C6B-4E04-BE83-68428CF7E039}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E93E7D28-1C6B-4E04-BE83-68428CF7E039}.Debug|x86.Build.0 = Debug|Any CPU
+ {E93E7D28-1C6B-4E04-BE83-68428CF7E039}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
+ {E93E7D28-1C6B-4E04-BE83-68428CF7E039}.Proto|Any CPU.Build.0 = Debug|Any CPU
+ {E93E7D28-1C6B-4E04-BE83-68428CF7E039}.Proto|x86.ActiveCfg = Debug|Any CPU
+ {E93E7D28-1C6B-4E04-BE83-68428CF7E039}.Proto|x86.Build.0 = Debug|Any CPU
+ {E93E7D28-1C6B-4E04-BE83-68428CF7E039}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E93E7D28-1C6B-4E04-BE83-68428CF7E039}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E93E7D28-1C6B-4E04-BE83-68428CF7E039}.Release|x86.ActiveCfg = Release|Any CPU
+ {E93E7D28-1C6B-4E04-BE83-68428CF7E039}.Release|x86.Build.0 = Release|Any CPU
+ {9482211E-23D0-4BD0-9893-E4AA5559F67A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9482211E-23D0-4BD0-9893-E4AA5559F67A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9482211E-23D0-4BD0-9893-E4AA5559F67A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9482211E-23D0-4BD0-9893-E4AA5559F67A}.Debug|x86.Build.0 = Debug|Any CPU
+ {9482211E-23D0-4BD0-9893-E4AA5559F67A}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
+ {9482211E-23D0-4BD0-9893-E4AA5559F67A}.Proto|Any CPU.Build.0 = Debug|Any CPU
+ {9482211E-23D0-4BD0-9893-E4AA5559F67A}.Proto|x86.ActiveCfg = Debug|Any CPU
+ {9482211E-23D0-4BD0-9893-E4AA5559F67A}.Proto|x86.Build.0 = Debug|Any CPU
+ {9482211E-23D0-4BD0-9893-E4AA5559F67A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9482211E-23D0-4BD0-9893-E4AA5559F67A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9482211E-23D0-4BD0-9893-E4AA5559F67A}.Release|x86.ActiveCfg = Release|Any CPU
+ {9482211E-23D0-4BD0-9893-E4AA5559F67A}.Release|x86.Build.0 = Release|Any CPU
+ {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Debug|x86.Build.0 = Debug|Any CPU
+ {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Proto|x86.ActiveCfg = Release|Any CPU
+ {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Proto|x86.Build.0 = Release|Any CPU
+ {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Release|x86.ActiveCfg = Release|Any CPU
+ {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Release|x86.Build.0 = Release|Any CPU
+ {1D8D778E-8D6B-4A8C-88A6-BE578988FBE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1D8D778E-8D6B-4A8C-88A6-BE578988FBE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1D8D778E-8D6B-4A8C-88A6-BE578988FBE8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1D8D778E-8D6B-4A8C-88A6-BE578988FBE8}.Debug|x86.Build.0 = Debug|Any CPU
+ {1D8D778E-8D6B-4A8C-88A6-BE578988FBE8}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
+ {1D8D778E-8D6B-4A8C-88A6-BE578988FBE8}.Proto|Any CPU.Build.0 = Proto|Any CPU
+ {1D8D778E-8D6B-4A8C-88A6-BE578988FBE8}.Proto|x86.ActiveCfg = Proto|Any CPU
+ {1D8D778E-8D6B-4A8C-88A6-BE578988FBE8}.Proto|x86.Build.0 = Proto|Any CPU
+ {1D8D778E-8D6B-4A8C-88A6-BE578988FBE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1D8D778E-8D6B-4A8C-88A6-BE578988FBE8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1D8D778E-8D6B-4A8C-88A6-BE578988FBE8}.Release|x86.ActiveCfg = Release|Any CPU
+ {1D8D778E-8D6B-4A8C-88A6-BE578988FBE8}.Release|x86.Build.0 = Release|Any CPU
+ {C32806E0-71C2-40E4-AEC4-517F73F6A18A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C32806E0-71C2-40E4-AEC4-517F73F6A18A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C32806E0-71C2-40E4-AEC4-517F73F6A18A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C32806E0-71C2-40E4-AEC4-517F73F6A18A}.Debug|x86.Build.0 = Debug|Any CPU
+ {C32806E0-71C2-40E4-AEC4-517F73F6A18A}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
+ {C32806E0-71C2-40E4-AEC4-517F73F6A18A}.Proto|Any CPU.Build.0 = Proto|Any CPU
+ {C32806E0-71C2-40E4-AEC4-517F73F6A18A}.Proto|x86.ActiveCfg = Proto|Any CPU
+ {C32806E0-71C2-40E4-AEC4-517F73F6A18A}.Proto|x86.Build.0 = Proto|Any CPU
+ {C32806E0-71C2-40E4-AEC4-517F73F6A18A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C32806E0-71C2-40E4-AEC4-517F73F6A18A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C32806E0-71C2-40E4-AEC4-517F73F6A18A}.Release|x86.ActiveCfg = Release|Any CPU
+ {C32806E0-71C2-40E4-AEC4-517F73F6A18A}.Release|x86.Build.0 = Release|Any CPU
+ {7B345E51-F2C0-4D4B-B0E0-05432EC9D5E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7B345E51-F2C0-4D4B-B0E0-05432EC9D5E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7B345E51-F2C0-4D4B-B0E0-05432EC9D5E1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7B345E51-F2C0-4D4B-B0E0-05432EC9D5E1}.Debug|x86.Build.0 = Debug|Any CPU
+ {7B345E51-F2C0-4D4B-B0E0-05432EC9D5E1}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
+ {7B345E51-F2C0-4D4B-B0E0-05432EC9D5E1}.Proto|Any CPU.Build.0 = Proto|Any CPU
+ {7B345E51-F2C0-4D4B-B0E0-05432EC9D5E1}.Proto|x86.ActiveCfg = Proto|Any CPU
+ {7B345E51-F2C0-4D4B-B0E0-05432EC9D5E1}.Proto|x86.Build.0 = Proto|Any CPU
+ {7B345E51-F2C0-4D4B-B0E0-05432EC9D5E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7B345E51-F2C0-4D4B-B0E0-05432EC9D5E1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7B345E51-F2C0-4D4B-B0E0-05432EC9D5E1}.Release|x86.ActiveCfg = Release|Any CPU
+ {7B345E51-F2C0-4D4B-B0E0-05432EC9D5E1}.Release|x86.Build.0 = Release|Any CPU
+ {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Debug|x86.Build.0 = Debug|Any CPU
+ {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Proto|Any CPU.ActiveCfg = Release|Any CPU
+ {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Proto|Any CPU.Build.0 = Release|Any CPU
+ {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Proto|x86.ActiveCfg = Release|Any CPU
+ {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Proto|x86.Build.0 = Release|Any CPU
+ {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Release|x86.ActiveCfg = Release|Any CPU
+ {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
+ {3F044931-FB83-4433-B934-AE66AB27B278} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
+ {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
+ {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
+ {D086C8C6-D00D-4C3B-9AB2-A4286C9F5922} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
+ {35636A82-401A-4C3A-B2AB-EB7DC5E9C268} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
+ {CCAB6E50-34C6-42AF-A6B0-567C29FCD91B} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
{991DCF75-C2EB-42B6-9A0D-AA1D2409D519} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} = {3881429D-A97A-49EB-B7AE-A82BA5FE9C77}
{59ADCE46-9740-4079-834D-9A03A3494EBC} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
+ {025CE01B-98F3-4C3C-B486-2C0BD038D011} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{DED3BBD7-53F4-428A-8C9F-27968E768605} = {3058BC79-8E79-4645-B05D-48CC182FA8A6}
{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
@@ -584,7 +907,6 @@ Global
{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7} = {CCAB6E50-34C6-42AF-A6B0-567C29FCD91B}
{FCFB214C-462E-42B3-91CA-FC557EFEE74F} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44} = {CCAB6E50-34C6-42AF-A6B0-567C29FCD91B}
- {C9B1D3F5-4971-4F04-9C26-37E3AC809AB4} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
{FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
{DA39AD38-4A58-47BF-9215-E49768295169} = {3F044931-FB83-4433-B934-AE66AB27B278}
@@ -605,14 +927,8 @@ Global
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{D0E98C0D-490B-4C61-9329-0862F6E87645} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{C163E892-5BF7-4B59-AA99-B0E8079C67C4} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
- {3F044931-FB83-4433-B934-AE66AB27B278} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
{88E2D422-6852-46E3-A740-83E391DC7973} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
- {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
- {604F0DAA-2D33-48DD-B162-EDF0B672803D} = {C9B1D3F5-4971-4F04-9C26-37E3AC809AB4}
- {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7} = {C9B1D3F5-4971-4F04-9C26-37E3AC809AB4}
- {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4} = {C9B1D3F5-4971-4F04-9C26-37E3AC809AB4}
- {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
{6BA13AA4-C25F-480F-856B-8E8000299A72} = {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA}
{12AC2813-E895-4AAA-AE6C-94E21DA09F64} = {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA}
{A333B85A-DC23-49B6-9797-B89A7951E92D} = {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA}
@@ -621,18 +937,25 @@ Global
{1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6} = {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA}
{4239EFEA-E746-446A-BF7A-51FCBAB13946} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
{2E60864A-E3FF-4BCC-810F-DC7C34E6B236} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
- {D086C8C6-D00D-4C3B-9AB2-A4286C9F5922} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903} = {D086C8C6-D00D-4C3B-9AB2-A4286C9F5922}
{C4586A06-1402-48BC-8E35-A1B8642F895B} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
{887630A3-4B1D-40EA-B8B3-2D842E9C40DB} = {35636A82-401A-4C3A-B2AB-EB7DC5E9C268}
- {35636A82-401A-4C3A-B2AB-EB7DC5E9C268} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
{FF76BD3C-5E0A-4752-B6C3-044F6E15719B} = {35636A82-401A-4C3A-B2AB-EB7DC5E9C268}
{0385564F-07B4-4264-AB8A-17C393E9140C} = {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA}
{400FAB03-786E-40CC-85A8-04B0C2869B14} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
{B0689A4E-07D8-494D-A0C8-791CB1D74E54} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
{18227628-DF90-4C47-AF3D-CC72D2EDD986} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
- {CCAB6E50-34C6-42AF-A6B0-567C29FCD91B} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
{6D93CEBD-4540-4D96-A153-B440A661FD09} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
+ {4CBEE353-EB7F-4A47-988B-0070AEB4EE7A} = {6235B3AF-774D-4EA1-8F37-789E767F6368}
+ {6BCFED7A-3F67-4180-B307-C7D69D191D8C} = {6235B3AF-774D-4EA1-8F37-789E767F6368}
+ {E93E7D28-1C6B-4E04-BE83-68428CF7E039} = {6235B3AF-774D-4EA1-8F37-789E767F6368}
+ {9482211E-23D0-4BD0-9893-E4AA5559F67A} = {6235B3AF-774D-4EA1-8F37-789E767F6368}
+ {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8} = {647810D0-5307-448F-99A2-E83917010DAE}
+ {BED74F9E-A0D2-48E2-9EE7-449832100487} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
+ {1D8D778E-8D6B-4A8C-88A6-BE578988FBE8} = {BED74F9E-A0D2-48E2-9EE7-449832100487}
+ {C32806E0-71C2-40E4-AEC4-517F73F6A18A} = {BED74F9E-A0D2-48E2-9EE7-449832100487}
+ {7B345E51-F2C0-4D4B-B0E0-05432EC9D5E1} = {BED74F9E-A0D2-48E2-9EE7-449832100487}
+ {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC} = {647810D0-5307-448F-99A2-E83917010DAE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {48EDBBBE-C8EE-4E3C-8B19-97184A487B37}
diff --git a/build.cmd b/build.cmd
deleted file mode 100644
index ad12b5d8717..00000000000
--- a/build.cmd
+++ /dev/null
@@ -1,1087 +0,0 @@
-rem Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
-@if "%_echo%"=="" echo off
-setlocal enableDelayedExpansion
-
-:ARGUMENTS_VALIDATION
-if /I "%1" == "--help" (goto :USAGE)
-if /I "%1" == "/help" (goto :USAGE)
-if /I "%1" == "/h" (goto :USAGE)
-if /I "%1" == "/?" (goto :USAGE)
-goto :ARGUMENTS_OK
-
-
-:USAGE
-
-echo Build and run a subset of test suites
-echo.
-echo Usage:
-echo.
-echo build.cmd ^
-echo ^
-echo ^
-echo ^
-echo ^
-echo ^
-echo ^
-echo ^
-echo.
-echo No arguments default to default", meaning this (no testing)
-echo.
-echo build.cmd net40
-echo.
-echo.Other examples:
-echo.
-echo. build.cmd net40 (build compiler for .NET Framework)
-echo. build.cmd coreclr (build compiler for .NET Core)
-echo. build.cmd buildfromsource (build compiler for .NET Core -- Verify that buildfromsource works)
-echo. build.cmd vs (build Visual Studio IDE Tools)
-echo. build.cmd all (build everything)
-echo. build.cmd test (build and test default targets)
-echo. build.cmd net40 test (build and test compiler for .NET Framework)
-echo. build.cmd coreclr test (build and test compiler for .NET Core)
-echo. build.cmd vs test (build and test Visual Studio IDE Tools)
-echo. build.cmd all test (build and test everything)
-echo. build.cmd nobuild test include Conformance (run only tests marked with Conformance category)
-echo. build.cmd nobuild test include Expensive (run only tests marked with Expensive category)
-echo.
-goto :success
-
-:ARGUMENTS_OK
-
-rem disable setup build by setting FSC_BUILD_SETUP=0
-if /i "%FSC_BUILD_SETUP%" == "" (set FSC_BUILD_SETUP=1)
-
-rem by default don't build coreclr lkg. However allow configuration by setting an environment variable : set BUILD_PROTO_WITH_CORECLR_LKG = 1
-if "%BUILD_PROTO_WITH_CORECLR_LKG%" =="" (set BUILD_PROTO_WITH_CORECLR_LKG=0)
-
-set BUILD_PROTO=0
-set BUILD_PHASE=1
-set BUILD_NET40=0
-set BUILD_NET40_FSHARP_CORE=0
-set BUILD_CORECLR=0
-set BUILD_FROMSOURCE=0
-set BUILD_VS=0
-set BUILD_FCS=0
-set BUILD_CONFIG=Release
-set BUILD_DIAG=
-set BUILD_PUBLICSIGN=0
-set BUILD_FSHARP_PROJ=1
-
-set TEST_NET40_COMPILERUNIT_SUITE=0
-set TEST_NET40_COREUNIT_SUITE=0
-set TEST_NET40_FSHARP_SUITE=0
-set TEST_NET40_FSHARPQA_SUITE=0
-set TEST_CORECLR_COREUNIT_SUITE=0
-set TEST_CORECLR_FSHARP_SUITE=0
-set TEST_VS_IDEUNIT_SUITE=0
-set TEST_FCS=0
-set TEST_END_2_END=0
-set INCLUDE_TEST_TAGS=
-
-set COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES=0
-
-set SIGN_TYPE=%PB_SIGNTYPE%
-
-REM ------------------ Parse all arguments -----------------------
-
-set _autoselect=1
-set _autoselect_tests=0
-set no_test=0
-set /a counter=0
-for /l %%x in (1 1 9) do (
- set /a counter=!counter!+1
- set /a nextcounter=!counter!+1
- call :PROCESS_ARG %%!counter! %%!nextcounter! "!counter!"
-)
-for %%i in (%BUILD_FSC_DEFAULT%) do ( call :PROCESS_ARG %%i )
-
-REM apply defaults
-
-if /i "%_buildexit%" == "1" (
- exit /B %_buildexitvalue%
-)
-
-if /i "%_autoselect%" == "1" (
- set BUILD_NET40_FSHARP_CORE=1
- set BUILD_NET40=1
-)
-
-if /i "%_autoselect_tests%" == "1" (
- if /i "%BUILD_NET40_FSHARP_CORE%" == "1" (
- set BUILD_NUGET=1
- set TEST_NET40_COREUNIT_SUITE=1
- )
-
- if /i "%BUILD_NET40%" == "1" (
- set BUILD_NUGET=1
- set TEST_NET40_COMPILERUNIT_SUITE=1
- set TEST_NET40_COREUNIT_SUITE=1
- set TEST_NET40_FSHARP_SUITE=1
- set TEST_NET40_FSHARPQA_SUITE=1
- )
-
- if /i "%BUILD_FCS%" == "1" (
- set TEST_FCS=1
- )
-
- if /i "%BUILD_CORECLR%" == "1" (
- set TEST_CORECLR_FSHARP_SUITE=1
- set TEST_CORECLR_COREUNIT_SUITE=1
- )
-
- if /i "%BUILD_VS%" == "1" (
- set TEST_VS_IDEUNIT_SUITE=1
- )
-)
-
-goto :MAIN
-
-REM ------------------ Procedure to parse one argument -----------------------
-
-:PROCESS_ARG
-set ARG=%~1
-set ARG2=%~2
-if "%ARG%" == "1" if "%2" == "" (set ARG=default)
-if "%2" == "" if not "%ARG%" == "default" goto :EOF
-
-rem Do no work
-if /i "%ARG%" == "none" (
- set _buildexit=1
- set _buildexitvalue=0
-)
-
-if /i "%ARG%" == "net40-lib" (
- set _autoselect=0
- set BUILD_NET40_FSHARP_CORE=1
-)
-
-if /i "%ARG%" == "net40" (
- set _autoselect=0
- set BUILD_NET40_FSHARP_CORE=1
- set BUILD_NET40=1
- set COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES=1
-)
-
-if /i "%ARG%" == "coreclr" (
- set _autoselect=0
- set BUILD_CORECLR=1
- set BUILD_FROMSOURCE=1
-)
-
-if /i "%ARG%" == "buildfromsource" (
- set _autoselect=0
- set BUILD_PROTO_WITH_CORECLR_LKG=1
- set BUILD_FROMSOURCE=1
-)
-
-if /i "%ARG%" == "vs" (
- set _autoselect=0
- set BUILD_NET40=1
- set BUILD_VS=1
- set COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES=1
-)
-
-if /i "%ARG%" == "fcs" (
- set _autoselect=0
- set BUILD_FCS=1
-)
-
-if /i "%ARG%" == "vstest" (
- set TEST_VS_IDEUNIT_SUITE=1
-)
-
-if /i "%ARG%" == "nobuild" (
- set BUILD_PHASE=0
-)
-if /i "%ARG%" == "all" (
- set _autoselect=0
- set COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES=1
- set BUILD_PROTO=1
- set BUILD_PROTO_WITH_CORECLR_LKG=1
- set BUILD_NET40=1
- set BUILD_CORECLR=1
- set BUILD_VS=1
- set BUILD_FCS=1
- set BUILD_SETUP=%FSC_BUILD_SETUP%
- set BUILD_NUGET=1
- set CI=1
-)
-
-if /i "%ARG%" == "microbuild" (
- set _autoselect=0
- set BUILD_PROTO=1
- set BUILD_NET40=1
- set BUILD_NET40_FSHARP_CORE=1
- set BUILD_PROTO_WITH_CORECLR_LKG=1
- set BUILD_CORECLR=1
- set BUILD_VS=1
- set BUILD_SETUP=%FSC_BUILD_SETUP%
- set BUILD_NUGET=1
- set BUILD_MICROBUILD=1
-
- set TEST_NET40_COMPILERUNIT_SUITE=1
- set TEST_NET40_COREUNIT_SUITE=1
- set TEST_NET40_FSHARP_SUITE=1
- set TEST_NET40_FSHARPQA_SUITE=1
- set TEST_CORECLR_COREUNIT_SUITE=0
- set TEST_CORECLR_FSHARP_SUITE=0
- set TEST_VS_IDEUNIT_SUITE=1
- set CI=1
-
- REM redirecting TEMP directories
- set TEMP=%~dp0artifacts\tmp
- set TMP=%~dp0artifacts\tmp
-)
-
-if /i "%ARG%" == "nuget" (
- set _autoselect=0
-
- set BUILD_PROTO=1
- set BUILD_NET40_FSHARP_CORE=1
- set BUILD_NET40=1
- set BUILD_CORECLR=1
- set BUILD_NUGET=1
-)
-
-REM These divide "ci" into three chunks which can be done in parallel
-if /i "%ARG%" == "ci_part1" (
- set _autoselect=0
-
- REM what we do - build and test Visual F# Tools, including setup and nuget
- set BUILD_PROTO=1
- set BUILD_NUGET=1
- set BUILD_NET40=1
- set BUILD_NET40_FSHARP_CORE=1
- set BUILD_VS=1
- set TEST_VS_IDEUNIT_SUITE=1
- set BUILD_CORECLR=1
- set BUILD_SETUP=%FSC_BUILD_SETUP%
- set CI=1
-)
-
-if /i "%ARG%" == "ci_part2" (
- set _autoselect=0
-
- REM what we do - test F# on .NET Framework
- set BUILD_PROTO=1
- set BUILD_NET40=1
- set BUILD_NET40_FSHARP_CORE=1
- set BUILD_NUGET=1
- set TEST_NET40_COMPILERUNIT_SUITE=1
- set TEST_NET40_COREUNIT_SUITE=1
- set TEST_NET40_FSHARPQA_SUITE=1
- set TEST_NET40_FSHARP_SUITE=1
- set CI=1
-)
-
-if /i "%ARG%" == "ci_part3" (
- set _autoselect=0
-
- REM what we do: test F# on Core CLR: nuget requires coreclr, fcs requires coreclr
- set BUILD_PROTO_WITH_CORECLR_LKG=1
- set BUILD_PROTO=1
- set BUILD_CORECLR=1
- set BUILD_NET40_FSHARP_CORE=1
- set BUILD_NET40=1
- set TEST_CORECLR_FSHARP_SUITE=1
- set TEST_CORECLR_COREUNIT_SUITE=1
- set CI=1
-)
-
-if /i "%ARG%" == "ci_part4" (
- set _autoselect=0
-
- REM what we do: test F# on Core CLR: nuget requires coreclr, fcs requires coreclr
- set BUILD_PROTO_WITH_CORECLR_LKG=1
- set BUILD_PROTO=1
- set BUILD_CORECLR=1
- set BUILD_NET40_FSHARP_CORE=1
- set BUILD_NET40=1
- set BUILD_NUGET=1
- set BUILD_FCS=1
- set TEST_FCS=1
- set CI=1
-)
-
-if /i "%ARG%" == "end-2-end" (
- set BUILD_PROTO=1
- set BUILD_CORECLR=1
- set BUILD_NET40_FSHARP_CORE=1
- set BUILD_NET40=1
- set TEST_END_2_END=1
-)
-
-if /i "%ARG%" == "proto" (
- set _autoselect=0
- set BUILD_PROTO=1
-)
-
-if /i "%ARG%" == "diag" (
- set BUILD_DIAG=/v:detailed
- if not defined APPVEYOR ( set BUILD_LOG=fsharp_build_log.log )
-)
-
-if /i "%ARG%" == "debug" (
- set BUILD_CONFIG=Debug
-)
-
-if /i "%ARG%" == "release" (
- set BUILD_CONFIG=Release
-)
-
-if /i "%ARG%" == "test-sign" (
- set SIGN_TYPE=test
-)
-
-if /i "%ARG%" == "real-sign" (
- set SIGN_TYPE=real
-)
-
-if /i "%ARG%" == "test" (
- set _autoselect_tests=1
-)
-
-if /i "%ARG%" == "no-test" (
- set no_test=1
-)
-
-if /i "%ARG%" == "include" (
- set /a counter=!counter!+1
- if "!INCLUDE_TEST_TAGS!" == "" ( set INCLUDE_TEST_TAGS=%ARG2% ) else (set INCLUDE_TEST_TAGS=%ARG2%;!INCLUDE_TEST_TAGS! )
-)
-
-if /i "%ARG%" == "test-all" (
- set _autoselect=0
- set BUILD_PROTO=1
- set BUILD_PROTO_WITH_CORECLR_LKG=1
- set BUILD_NET40=1
- set BUILD_NET40_FSHARP_CORE=1
- set BUILD_CORECLR=1
- set BUILD_VS=1
- set BUILD_FCS=1
- set BUILD_SETUP=%FSC_BUILD_SETUP%
- set BUILD_NUGET=1
-
- set TEST_NET40_COMPILERUNIT_SUITE=1
- set TEST_NET40_COREUNIT_SUITE=1
- set TEST_NET40_FSHARP_SUITE=1
- set TEST_NET40_FSHARPQA_SUITE=1
- set TEST_CORECLR_COREUNIT_SUITE=1
- set TEST_VS_IDEUNIT_SUITE=1
- set TEST_FCS=1
- set TEST_END_2_END=1
-)
-
-if /i "%ARG%" == "test-net40-fsharpqa" (
- set _autoselect=0
- set BUILD_NET40=1
- set BUILD_NET40_FSHARP_CORE=1
- set TEST_NET40_FSHARPQA_SUITE=1
-)
-
-if /i "%ARG%" == "test-compiler-unit" (
- set _autoselect=0
- set BUILD_NET40=1
- set BUILD_NET40_FSHARP_CORE=1
- set TEST_NET40_COMPILERUNIT_SUITE=1
-)
-
-if /i "%ARG%" == "test-net40-ideunit" (
- set _autoselect=0
- set BUILD_NET40=1
- set BUILD_NET40_FSHARP_CORE=1
- set BUILD_VS=1
- set TEST_VS_IDEUNIT_SUITE=1
-)
-
-if /i "%ARG%" == "test-net40-coreunit" (
- set _autoselect=0
- set BUILD_NET40_FSHARP_CORE=1
- set BUILD_NUGET=1
- set TEST_NET40_COREUNIT_SUITE=1
-)
-
-if /i "%ARG%" == "test-coreclr-coreunit" (
- set _autoselect=0
- set BUILD_PROTO_WITH_CORECLR_LKG=1
- set BUILD_CORECLR=1
- set BUILD_NUGET=1
- set TEST_CORECLR_COREUNIT_SUITE=1
-)
-
-if /i "%ARG%" == "test-net40-fsharp" (
- set _autoselect=0
- set BUILD_NET40=1
- set BUILD_NET40_FSHARP_CORE=1
- set TEST_NET40_FSHARP_SUITE=1
-)
-
-if /i "%ARG%" == "test-fcs" (
- set _autoselect=0
- set BUILD_FCS=1
- set TEST_FCS=1
-)
-
-if /i "%ARG%" == "test-coreclr-fsharp" (
- set _autoselect=0
- set BUILD_NET40=1
- set BUILD_NET40_FSHARP_CORE=1
- set BUILD_PROTO_WITH_CORECLR_LKG=1
- set BUILD_CORECLR=1
- set TEST_CORECLR_FSHARP_SUITE=1
-)
-
-if /i "%ARG%" == "publicsign" (
- set BUILD_PUBLICSIGN=1
-)
-
-if /i "%ARG%" == "init" (
- set BUILD_PROTO_WITH_CORECLR_LKG=1
-)
-
-goto :EOF
-:: Note: "goto :EOF" returns from an in-batchfile "call" command
-:: in preference to returning from the entire batch file.
-
-REM ------------------ Report config -----------------------
-
-:MAIN
-
-REM after this point, ARG variable should not be used, use only BUILD_* or TEST_*
-
-REM all PB_* variables override any settings
-
-REM if the `PB_SKIPTESTS` variable is set to 'true' then no tests should be built or run, even if explicitly specified
-if /i "%PB_SKIPTESTS%" == "true" (
- set TEST_NET40_COMPILERUNIT_SUITE=0
- set TEST_NET40_COREUNIT_SUITE=0
- set TEST_NET40_FSHARP_SUITE=0
- set TEST_NET40_FSHARPQA_SUITE=0
- set TEST_CORECLR_COREUNIT_SUITE=0
- set TEST_CORECLR_FSHARP_SUITE=0
- set TEST_VS_IDEUNIT_SUITE=0
-)
-
-if /i "%TEST_NET40_FSHARP_SUITE" == "1" (
- if /i "%TEST_CORECLR_FSHARP_SUITE%" == "1" (
- TEST_END_2_END=1
- )
-)
-
-rem Decide if Proto need building
-if NOT EXIST "%~dp0artifacts\bin\fsc\Proto\net472\fsc.exe" (
- set BUILD_PROTO=1
-)
-
-rem decide if FSharp.Proj needs building
-if "%BUILD_NET40%"=="0" if "%BUILD_NET40_FSHARP_CORE%"=="0" if "%BUILD_CORECLR%"=="0" if "%BUILD_VS%"=="0" if "%BUILD_FCS%"=="0" if "%TEST_NET40_COMPILERUNIT_SUITE%"=="0" if "%TEST_NET40_COREUNIT_SUITE%"=="0" if "%TEST_NET40_FSHARP_SUITE%"=="0" if "%TEST_NET40_FSHARPQA_SUITE%"=="0" if "%TEST_CORECLR_COREUNIT_SUITE%"=="0" if "%TEST_CORECLR_FSHARP_SUITE%"=="0" if "%TEST_VS_IDEUNIT_SUITE%"=="0" if "%TEST_FCS%"=="0" if "%TEST_END_2_END%"=="0" if "%COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES%"=="0" (
- set BUILD_FSHARP_PROJ=0
-)
-
-rem
-rem This stops the dotnet cli from hunting around and
-rem finding the highest possible dotnet sdk version to use.
-rem
-rem description of dotnet lookup here:
-rem https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet?tabs=netcore2x
-set DOTNET_MULTILEVEL_LOOKUP=false
-
-echo Build/Tests configuration:
-echo.
-echo BUILD_PROTO=%BUILD_PROTO%
-echo BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG%
-echo BUILD_NET40=%BUILD_NET40%
-echo BUILD_NET40_FSHARP_CORE=%BUILD_NET40_FSHARP_CORE%
-echo BUILD_CORECLR=%BUILD_CORECLR%
-echo BUILD_VS=%BUILD_VS%
-echo BUILD_FCS=%BUILD_FCS%
-echo BUILD_SETUP=%BUILD_SETUP%
-echo BUILD_NUGET=%BUILD_NUGET%
-echo BUILD_CONFIG=%BUILD_CONFIG%
-echo BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN%
-echo BUILD_MICROBUILD=%BUILD_MICROBUILD%
-echo BUILD_FROMSOURCE=%BUILD_FROMSOURCE%
-echo BUILD_FSHARP_PROJ=%BUILD_FSHARP_PROJ%
-echo.
-echo PB_SKIPTESTS=%PB_SKIPTESTS%
-echo PB_RESTORESOURCE=%PB_RESTORESOURCE%
-echo.
-echo SIGN_TYPE=%SIGN_TYPE%
-echo.
-echo COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES=%COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES%
-echo.
-echo TEST_FCS=%TEST_FCS%
-echo TEST_NET40_COMPILERUNIT_SUITE=%TEST_NET40_COMPILERUNIT_SUITE%
-echo TEST_NET40_COREUNIT_SUITE=%TEST_NET40_COREUNIT_SUITE%
-echo TEST_NET40_FSHARP_SUITE=%TEST_NET40_FSHARP_SUITE%
-echo TEST_NET40_FSHARPQA_SUITE=%TEST_NET40_FSHARPQA_SUITE%
-echo TEST_CORECLR_COREUNIT_SUITE=%TEST_CORECLR_COREUNIT_SUITE%
-echo TEST_CORECLR_FSHARP_SUITE=%TEST_CORECLR_FSHARP_SUITE%
-echo TEST_VS_IDEUNIT_SUITE=%TEST_VS_IDEUNIT_SUITE%
-echo INCLUDE_TEST_TAGS=%INCLUDE_TEST_TAGS%
-echo TEMP=%TEMP%
-
-:: load Visual Studio 2017 developer command prompt if VS150COMNTOOLS is not set
-
-:: If this is not set, VsDevCmd.bat will change %cd% to [USERPROFILE]\source, causing the build to fail.
-SET VSCMD_START_DIR=%cd%
-
-:: Try find installation path of VS2017 with vswhere.exe
-if "%VS150COMNTOOLS%" EQU "" if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\" (
- for /f "usebackq delims=" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -property installationPath`) do set VS_INSTALLATION_PATH=%%i
-)
-
-if "%VS_INSTALLATION_PATH%" NEQ "" (
- call "%VS_INSTALLATION_PATH%\Common7\Tools\VsDevCmd.bat"
-)
-
-:: If there's no installation of VS2017 or VS2017 Preview, use the build tools
-if "%VS150COMNTOOLS%" EQU "" if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" (
- call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat"
-)
-
-echo.
-echo Environment
-set
-echo.
-echo.
-
-echo ---------------- Done with arguments, starting preparation -----------------
-rem set TargetFrameworkSDKToolsDirectory --- needed for sdk to find al.exe.
-if not "%TargetFrameworkSDKToolsDirectory%" == "" ( goto have_TargetFrameworkSDKToolsDirectory )
-set TargetFrameworkSDKToolsDirectory=%WindowsSDK_ExecutablePath_x64%
-
-if not "%TargetFrameworkSDKToolsDirectory%" == "" ( goto have_TargetFrameworkSDKToolsDirectory )
-set TargetFrameworkSDKToolsDirectory=%WindowsSDK_ExecutablePath_x86%
-
-:have_TargetFrameworkSDKToolsDirectory
-
-if "%RestorePackages%"=="" (
- set RestorePackages=true
-)
-
-@echo VSSDKToolsPath: %VSSDKToolsPath%
-@echo VSSDKIncludes: %VSSDKIncludes%
-@echo TargetFrameworkSDKToolsDirectory: %TargetFrameworkSDKToolsDirectory%
-
-@call src\update.cmd signonly
-
-:: Check prerequisites
-if not "%VisualStudioVersion%" == "" goto vsversionset
-if exist "%VS160COMNTOOLS%\..\ide\devenv.exe" set VisualStudioVersion=16.0
-if not "%VisualStudioVersion%" == "" goto vsversionset
-
-if not "%VisualStudioVersion%" == "" goto vsversionset
-if exist "%VS150COMNTOOLS%\..\ide\devenv.exe" set VisualStudioVersion=15.0
-if not "%VisualStudioVersion%" == "" goto vsversionset
-
-if not "%VisualStudioVersion%" == "" goto vsversionset
-if exist "%VS150COMNTOOLS%\..\..\ide\devenv.exe" set VisualStudioVersion=15.0
-if not "%VisualStudioVersion%" == "" goto vsversionset
-
-if exist "%VS140COMNTOOLS%\..\ide\devenv.exe" set VisualStudioVersion=14.0
-if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\common7\ide\devenv.exe" set VisualStudioVersion=14.0
-if exist "%ProgramFiles%\Microsoft Visual Studio 14.0\common7\ide\devenv.exe" set VisualStudioVersion=14.0
-if not "%VisualStudioVersion%" == "" goto vsversionset
-
-if exist "%VS120COMNTOOLS%\..\ide\devenv.exe" set VisualStudioVersion=12.0
-if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\common7\ide\devenv.exe" set VisualStudioVersion=12.0
-if exist "%ProgramFiles%\Microsoft Visual Studio 12.0\common7\ide\devenv.exe" set VisualStudioVersion=12.0
-
-:vsversionset
-if "%VisualStudioVersion%" == "" echo Error: Could not find an installation of Visual Studio && goto :failure
-
-if exist "%VS160COMNTOOLS%\..\..\MSBuild\Current\Bin\MSBuild.exe" (
- set _msbuildexe="%VS160COMNTOOLS%\..\..\MSBuild\Current\Bin\MSBuild.exe"
- goto :havemsbuild
-)
-if exist "%VS150COMNTOOLS%\..\..\MSBuild\15.0\Bin\MSBuild.exe" (
- set _msbuildexe="%VS150COMNTOOLS%\..\..\MSBuild\15.0\Bin\MSBuild.exe"
- goto :havemsbuild
-)
-if exist "%ProgramFiles(x86)%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe" (
- set _msbuildexe="%ProgramFiles(x86)%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe"
- goto :havemsbuild
-)
-if exist "%ProgramFiles%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe" (
- set _msbuildexe="%ProgramFiles%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe"
- goto :havemsbuild
-)
-echo Error: Could not find MSBuild.exe. && goto :failure
-goto :eof
-
-:havemsbuild
-set _nrswitch=/nr:false
-
-set msbuildflags=%_nrswitch% /nologo /clp:Summary /v:minimal
-set _ngenexe="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\ngen.exe"
-if not exist %_ngenexe% echo Error: Could not find ngen.exe. && goto :failure
-
-echo ---------------- Done with prepare, starting package restore ----------------
-
-:: Restore the Tools directory
-call "%~dp0init-tools.cmd"
-set _dotnetexe=%~dp0artifacts\toolset\dotnet\dotnet.exe
-set path=%~dp0artifacts\toolset\dotnet;%path%
-
-if not "%PB_PackageVersionPropsUrl%" == "" (
- echo ----------- do dependency uptake check -----------
-
- set dependencyUptakeDir=%~dp0artifacts\dependencyUptake
- if not exist "!dependencyUptakeDir!" mkdir "!dependencyUptakeDir!"
-
- :: download package version overrides
- echo powershell -noprofile -executionPolicy RemoteSigned -command "Invoke-WebRequest -Uri '%PB_PackageVersionPropsUrl%' -OutFile '!dependencyUptakeDir!\PackageVersions.props'"
- powershell -noprofile -executionPolicy RemoteSigned -command "Invoke-WebRequest -Uri '%PB_PackageVersionPropsUrl%' -OutFile '!dependencyUptakeDir!\PackageVersions.props'"
- if ERRORLEVEL 1 echo Error downloading package version properties && goto :failure
-)
-
-if "%RestorePackages%" == "true" (
- if "%BUILD_FCS%" == "1" (
- cd fcs
- .paket\paket.exe restore
- cd..
- @if ERRORLEVEL 1 echo Error: Paket restore failed && goto :failure
- )
-)
-
-echo ---------------- Done with package restore, verify buildfrom source ---------------
-if "%BUILD_PROTO_WITH_CORECLR_LKG%" == "1" (
- pushd src
- call buildfromsource.cmd
- @if ERRORLEVEL 1 echo Error: buildfromsource.cmd failed && goto :failure
- popd
-)
-
-echo ---------------- Done with package restore, starting proto ------------------------
-set logdir=%~dp0artifacts\log\%BUILD_CONFIG%
-if not exist "!logdir!" mkdir "!logdir!"
-
-rem Build Proto
-if "%BUILD_PROTO%" == "1" (
- rmdir /s /q artifacts/bin/fsc/Proto
-
- echo %_msbuildexe% proto.proj /t:Restore /bl:%~dp0artifacts\log\Proto\proto.proj.restore.binlog
- %_msbuildexe% proto.proj /t:Restore /bl:%~dp0artifacts\log\Proto\proto.proj.restore.binlog
- @if ERRORLEVEL 1 echo Error restoring proto failed && goto :failure
-
- echo %_msbuildexe% proto.proj /t:Build /bl:%~dp0artifacts\log\Proto\proto.proj.build.binlog
- %_msbuildexe% proto.proj /t:Build /bl:%~dp0artifacts\log\Proto\proto.proj.build.binlog
- @if ERRORLEVEL 1 echo Error building proto failed && goto :failure
-)
-
-echo ---------------- Done with SDK restore, starting build ------------------------
-
-if "%BUILD_PHASE%" == "1" if "%BUILD_FSHARP_PROJ%" == "1" (
-
- echo %_dotnetexe% restore fsharp.proj /p:Configuration=%BUILD_CONFIG% /bl:!logdir!\fsharp.proj.restore.binlog
- %_dotnetexe% restore fsharp.proj /p:Configuration=%BUILD_CONFIG% /bl:!logdir!\fsharp.proj.restore.binlog
-
- echo %_msbuildexe% fsharp.proj /t:Build /p:Configuration=%BUILD_CONFIG% /p:BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN% /bl:!logdir!\fsharp.proj.build.binlog
- %_msbuildexe% fsharp.proj /t:Build /p:Configuration=%BUILD_CONFIG% /p:BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN% /bl:!logdir!\fsharp.proj.build.binlog
-
- @if ERRORLEVEL 1 echo Error build failed && goto :failure
-)
-
-echo ---------------- Done with build, starting assembly version checks ---------------
-set asmvercheckpath=%~dp0tests\fsharpqa\testenv\src\AssemblyVersionCheck
-
-if "%BUILD_NET40%" == "1" (
- echo #r @"%USERPROFILE%\.nuget\packages\Newtonsoft.Json\9.0.1\lib\net45\Newtonsoft.Json.dll">%asmvercheckpath%\assemblies.fsx
- echo "%~dp0artifacts\bin\fsi\%BUILD_CONFIG%\net472\fsi.exe" "%asmvercheckpath%\AssemblyVersionCheck.fsx" -- "%~dp0build\config\AssemblySignToolData.json" "%~dp0artifacts"
- "%~dp0artifacts\bin\fsi\%BUILD_CONFIG%\net472\fsi.exe" "%asmvercheckpath%\AssemblyVersionCheck.fsx" -- "%~dp0build\config\AssemblySignToolData.json" "%~dp0artifacts"
- if ERRORLEVEL 1 echo Error verifying assembly versions and commit hashes. && goto :failure
-)
-
-echo ---------------- Done with assembly version checks, starting assembly signing ---------------
-
-if not "%SIGN_TYPE%" == "" (
- echo %_msbuildexe% build\projects\Signing.proj /t:Restore
- %_msbuildexe% build\projects\Signing.proj /t:Restore
-
- echo %_msbuildexe% build\projects\Signing.proj /t:DoSigning /p:SignType=%SIGN_TYPE% /p:Configuration=%BUILD_CONFIG% /p:BinaryBasePath=%~dp0artifacts /p:ConfigFile=%~dp0build\config\AssemblySignToolData.json
- %_msbuildexe% build\projects\Signing.proj /t:DoSigning /p:SignType=%SIGN_TYPE% /p:Configuration=%BUILD_CONFIG% /p:BinaryBasePath=%~dp0artifacts /p:ConfigFile=%~dp0build\config\AssemblySignToolData.json
-
- if ERRORLEVEL 1 echo Error running sign tool && goto :failure
-)
-
-if not "%SIGN_TYPE%" == "" (
- echo %_msbuildexe% build\projects\Signing.proj /t:DoSigning /p:SignType=%SIGN_TYPE% /p:Configuration=%BUILD_CONFIG% /p:BinaryBasepath=%~dp0artifacts\packages\%BUILD_CONFIG% /p:ConfigFile=%~dp0build\config\PackageSignToolData.json
- %_msbuildexe% build\projects\Signing.proj /t:DoSigning /p:SignType=%SIGN_TYPE% /p:Configuration=%BUILD_CONFIG% /p:BinaryBasepath=%~dp0artifacts\packages\%BUILD_CONFIG% /p:ConfigFile=%~dp0build\config\PackageSignToolData.json
- if ERRORLEVEL 1 echo Error running sign tool && goto :failure
-)
-
-if "%BUILD_SETUP%" == "1" (
- echo %_msbuildexe% %msbuildflags% setup\build-insertion.proj /p:Configuration=%BUILD_CONFIG% /bl:!logdir!\msbuild.build-insertion.build.%BUILD_CONFIG%.binlog
- %_msbuildexe% %msbuildflags% setup\build-insertion.proj /p:Configuration=%BUILD_CONFIG% /bl:!logdir!\msbuild.build-insertion.build.%BUILD_CONFIG%.binlog
- if ERRORLEVEL 1 echo Error building insertion packages && goto :failure
-)
-
-if not "%SIGN_TYPE%" == "" (
- echo %_msbuildexe% build\projects\Signing.proj /t:DoSigning /p:SignType=%SIGN_TYPE% /p:Configuration=%BUILD_CONFIG% /p:BinaryBasepath=%~dp0artifacts\VSSetup\%BUILD_CONFIG%\Insertion /p:ConfigFile=%~dp0build\config\InsertionSignToolData.json
- %_msbuildexe% build\projects\Signing.proj /t:DoSigning /p:SignType=%SIGN_TYPE% /p:Configuration=%BUILD_CONFIG% /p:BinaryBasePath=%~dp0artifacts\VSSetup\%BUILD_CONFIG%\Insertion /p:ConfigFile=%~dp0build\config\InsertionSignToolData.json
- if ERRORLEVEL 1 echo Error running sign tool && goto :failure
-)
-
-echo ---------------- Done with signing, building insertion files ---------------
-
-if "%BUILD_SETUP%" == "1" (
- echo %_msbuildexe% %msbuildflags% setup\Swix\Microsoft.FSharp.vsmanproj /p:Configuration=%BUILD_CONFIG% /bl:!logdir!\msbuild.setup-swix.build.%BUILD_CONFIG%.binlog
- %_msbuildexe% %msbuildflags% setup\Swix\Microsoft.FSharp.vsmanproj /p:Configuration=%BUILD_CONFIG% /bl:!logdir!\msbuild.setup-swix.build.%BUILD_CONFIG%.binlog
- if ERRORLEVEL 1 echo Error building .vsmanproj && goto :failure
-)
-
-echo ---------------- Done building insertion files, starting pack/update/prepare ---------------
-
-set X86_PROGRAMFILES=%ProgramFiles%
-if "%OSARCH%"=="AMD64" set X86_PROGRAMFILES=%ProgramFiles(x86)%
-
-set SYSWOW64=.
-if "%OSARCH%"=="AMD64" set SYSWOW64=SysWoW64
-
-if not "%OSARCH%"=="x86" set REGEXE32BIT=%WINDIR%\syswow64\reg.exe
-
-echo SDK environment vars from Registry
-echo ==================================
-
-for /d %%i in (%WINDIR%\Microsoft.NET\Framework\v4.0.?????) do set CORDIR=%%i
-set PATH=%PATH%;%CORDIR%
-
-set REGEXE32BIT=reg.exe
-
-IF NOT DEFINED SNEXE32 IF EXIST "%WINSDKNETFXTOOLS%\sn.exe" set SNEXE32=%WINSDKNETFXTOOLS%sn.exe
-IF NOT DEFINED SNEXE64 IF EXIST "%WINSDKNETFXTOOLS%x64\sn.exe" set SNEXE64=%WINSDKNETFXTOOLS%x64\sn.exe
-
-echo.
-echo SDK environment vars
-echo =======================
-echo WINSDKNETFXTOOLS: %WINSDKNETFXTOOLS%
-echo SNEXE32: %SNEXE32%
-echo SNEXE64: %SNEXE64%
-echo
-
-if "%TEST_NET40_COMPILERUNIT_SUITE%" == "0" if "%TEST_FCS%" == "0" if "%TEST_NET40_COREUNIT_SUITE%" == "0" if "TEST_CORECLR_FSHARP_SUITE" == "0" if "%TEST_CORECLR_COREUNIT_SUITE%" == "0" if "%TEST_VS_IDEUNIT_SUITE%" == "0" if "%TEST_NET40_FSHARP_SUITE%" == "0" if "%TEST_NET40_FSHARPQA_SUITE%" == "0" goto :success
-
-if "%no_test%" == "1" goto :success
-
-echo ---------------- Done with update, starting tests -----------------------
-
-if NOT "%INCLUDE_TEST_TAGS%" == "" (
- set TTAGS_ARG_RUNALL=-ttags:%INCLUDE_TEST_TAGS%
-)
-
-set link_exe=%~dp0tests\fsharpqa\testenv\bin\link\link.exe
-if not exist "%link_exe%" (
- echo Error: failed to find "%link_exe%" use nuget to restore the VisualCppTools package
- goto :failure
-)
-
-if /I not "%single_threaded%" == "true" (set PARALLEL_ARG=-procs:%NUMBER_OF_PROCESSORS%) else set PARALLEL_ARG=-procs:0
-
-set FSCBINPATH=%~dp0artifacts\bin\fsc\%BUILD_CONFIG%\net472
-set FSIANYCPUBINPATH=%~dp0artifacts\bin\fsiAnyCpu\%BUILD_CONFIG%\net472
-set FSIBINPATH=%~dp0artifacts\bin\fsi\%BUILD_CONFIG%\net472
-
-ECHO FSCBINPATH=%FSCBINPATH%
-ECHO FSIANYCPUBINPATH=%FSIANYCPUBINPATH%
-ECHO FSIBINPATH=%FSIBINPATH%
-ECHO link_exe=%link_exe%
-
-REM ---------------- test-net40-fsharp -----------------------
-
-set TESTLOGDIR=%~dp0artifacts\TestResults\%BUILD_CONFIG%
-if "%TEST_NET40_FSHARP_SUITE%" == "1" (
-
- set LOGFILE=%TESTLOGDIR%\FSharp.Tests.FSharpSuite_net472.trx
- echo "%_dotnetexe%" test "%~dp0tests\fsharp\FSharp.Tests.FSharpSuite.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f net472 -l "trx;LogFileName=!LOGFILE!"
- "%_dotnetexe%" test "%~dp0tests\fsharp\FSharp.Tests.FSharpSuite.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f net472 -l "trx;LogFileName=!LOGFILE!"
-
- if errorlevel 1 (
- echo --------------------------------------------------------------
- echo Error: Running tests net40-fsharp failed, see file `!LOGFILE!`
- echo --------------------------------------------------------------
- goto :failure
- )
-
- if not exist "!LOGFILE!" (
- echo --------------------------------------------------------
- echo Test results file !LOGFILE! not found, ensure tests ran.
- echo --------------------------------------------------------
- goto :failure
- )
-)
-
-REM ---------------- test-fcs -----------------------
-
-if "%TEST_FCS%" == "1" (
-
- set LOGFILE=%TESTLOGDIR%\FSharp.Compiler.Service.Tests_net46.trx
- echo "%_dotnetexe%" test "%~dp0fcs\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -s "%~dp0fcs\FSharp.Compiler.Service.Tests\app.runsettings" --no-restore --no-build -c %BUILD_CONFIG% -f net46 -l "trx;LogFileName=!LOGFILE!"
- "%_dotnetexe%" test "%~dp0fcs\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -s "%~dp0fcs\FSharp.Compiler.Service.Tests\app.runsettings" --no-restore --no-build -c %BUILD_CONFIG% -f net46 -l "trx;LogFileName=!LOGFILE!"
-
- if errorlevel 1 (
- echo --------------------------------------------------------------
- echo Error: Running net40 fcs tests, see file `!LOGFILE!`
- echo --------------------------------------------------------------
- goto :failure
- )
-
- if not exist "!LOGFILE!" (
- echo --------------------------------------------------------
- echo Test results file !LOGFILE! not found, ensure tests ran.
- echo --------------------------------------------------------
- goto :failure
- )
-
- set LOGFILE=%TESTLOGDIR%\FSharp.Compiler.Service.Tests_netcoreapp2.0.trx
- echo "%_dotnetexe%" test "%~dp0fcs\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -s "%~dp0fcs\FSharp.Compiler.Service.Tests\app.runsettings" --no-restore --no-build -c %BUILD_CONFIG% -f netcoreapp2.0 -l "trx;LogFileName=!LOGFILE!"
- "%_dotnetexe%" test "%~dp0fcs\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -s "%~dp0fcs\FSharp.Compiler.Service.Tests\app.runsettings" --no-restore --no-build -c %BUILD_CONFIG% -f netcoreapp2.0 -l "trx;LogFileName=!LOGFILE!"
-
- if errorlevel 1 (
- echo --------------------------------------------------------------
- echo Error: Running coreclr fcs tests, see file `!LOGFILE!`
- echo --------------------------------------------------------------
- goto :failure
- )
-
- if not exist "!LOGFILE!" (
- echo --------------------------------------------------------
- echo Test results file !LOGFILE! not found, ensure tests ran.
- echo --------------------------------------------------------
- goto :failure
- )
-)
-
-REM ---------------- end2end -----------------------
-if "%TEST_END_2_END%" == "1" (
-
- pushd %~dp0tests\EndToEndBuildTests
-
- echo Execute end to end compiler tests
- echo call EndToEndBuildTests.cmd
- call EndToEndBuildTests.cmd
- if errorlevel 1 (
- popd
- Echo end to end tests failed.
- goto :failure
- )
-)
-
-REM ---------------- net40-fsharpqa -----------------------
-
-set OSARCH=%PROCESSOR_ARCHITECTURE%
-
-rem Set this to 1 in order to use an external compiler host process
-rem This only has an effect when running the FSHARPQA tests, but can
-rem greatly speed up execution since fsc.exe does not need to be spawned thousands of times
-set HOSTED_COMPILER=1
-
-if "%TEST_NET40_FSHARPQA_SUITE%" == "1" (
-
- set CSC_PIPE=%USERPROFILE%\.nuget\packages\Microsoft.Net.Compilers\2.7.0\tools\csc.exe
- set FSC=!FSCBINPATH!\fsc.exe
- set FSI=!FSIBINPATH!\fsi.exe
- set FSIANYCPU=!FSIANYCPUBINPATH!\fsi.exe
- set FSCOREDLLPATH=!FSCBinPath!\FSharp.Core.dll
- set PATH=!FSCBINPATH!;!FSIBINPATH!;!FSIANYCPUBINPATH!;!PATH!
- set perlexe=%USERPROFILE%\.nuget\packages\StrawberryPerl64\5.22.2.1\Tools\perl\bin\perl.exe
- if not exist !perlexe! (echo Error: perl was not downloaded from check the packages directory: !perlexe! && goto :failure )
-
- set RESULTSDIR=%~dp0artifacts\TestResults\%BUILD_CONFIG%
- set OUTPUTFILE=test-net40-fsharpqa-results.log
- set ERRORFILE=test-net40-fsharpqa-errors.log
- set FAILENV=test-net40-fsharpqa-errors
-
- pushd %~dp0tests\fsharpqa\source
- echo !perlexe! %~dp0tests\fsharpqa\testenv\bin\runall.pl -resultsroot !RESULTSDIR! -results !OUTPUTFILE! -log !ERRORFILE! -fail !FAILENV! -cleanup:no !TTAGS_ARG_RUNALL! !PARALLEL_ARG!
- !perlexe! %~dp0tests\fsharpqa\testenv\bin\runall.pl -resultsroot !RESULTSDIR! -results !OUTPUTFILE! -log !ERRORFILE! -fail !FAILENV! -cleanup:no !TTAGS_ARG_RUNALL! !PARALLEL_ARG!
-
- popd
- if ERRORLEVEL 1 (
- echo -----------------------------------------------------------------
- type "!RESULTSDIR!\!OUTPUTFILE!"
- echo -----------------------------------------------------------------
- type "!RESULTSDIR!\!ERRORFILE!"
- echo -----------------------------------------------------------------
- echo Error: Running tests net40-fsharpqa failed, see logs above -- FAILED
- echo -----------------------------------------------------------------
- goto :failure
- )
-)
-
-REM ---------------- net40-compilerunit -----------------------
-
-if "%TEST_NET40_COMPILERUNIT_SUITE%" == "1" (
-
- set LOGFILE=%TESTLOGDIR%\FSharp.Compiler.UnitTests_net472.trx
- echo "%_dotnetexe%" test "%~dp0tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f net472 -l "trx;LogFileName=!LOGFILE!"
- "%_dotnetexe%" test "%~dp0tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f net472 -l "trx;LogFileName=!LOGFILE!"
-
- if errorlevel 1 (
- echo -----------------------------------------------------------------
- echo Error: Running tests net40-compilerunit failed, see file `!LOGFILE!`
- echo -----------------------------------------------------------------
- goto :failure
- )
-
- if not exist "!LOGFILE!" (
- echo --------------------------------------------------------
- echo Test results file !LOGFILE! not found, ensure tests ran.
- echo --------------------------------------------------------
- goto :failure
- )
-
- set LOGFILE=%TESTLOGDIR%\FSharp.Build.UnitTests_net472.trx
- echo "%_dotnetexe%" test "%~dp0tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f net472 -l "trx;LogFileName=!LOGFILE!"
- "%_dotnetexe%" test "%~dp0tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f net472 -l "trx;LogFileName=!LOGFILE!"
-
- if errorlevel 1 (
- echo -----------------------------------------------------------------
- echo Error: Running tests net40-compilernit failed, see file `!LOGFILE!`
- echo -----------------------------------------------------------------
- goto :failure
- )
-
- if not exist "!LOGFILE!" (
- echo --------------------------------------------------------
- echo Test results file !LOGFILE! not found, ensure tests ran.
- echo --------------------------------------------------------
- goto :failure
- )
-)
-
-REM ---------------- net40-coreunit -----------------------
-
-if "%TEST_NET40_COREUNIT_SUITE%" == "1" (
-
- set LOGFILE=%TESTLOGDIR%\FSharp.Core.UnitTests_net472.trx
- echo "%_dotnetexe%" test "%~dp0tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f net472 -l "trx;LogFileName=!LOGFILE!"
- "%_dotnetexe%" test "%~dp0tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f net472 -l "trx;LogFileName=!LOGFILE!"
-
- if errorlevel 1 (
- echo -----------------------------------------------------------------
- echo Error: Running tests net40-coreunit failed, see file `!LOGFILE!`
- echo -----------------------------------------------------------------
- goto :failure
- )
-
- if not exist "!LOGFILE!" (
- echo --------------------------------------------------------
- echo Test results file !LOGFILE! not found, ensure tests ran.
- echo --------------------------------------------------------
- goto :failure
- )
-)
-
-REM ---------------- coreclr-coreunit -----------------------
-
-if "%TEST_CORECLR_COREUNIT_SUITE%" == "1" (
-
- set LOGFILE=%TESTLOGDIR%\FSharp.Build.UnitTests_netcoreapp2.0.trx
- echo "%_dotnetexe%" test "%~dp0tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f netcoreapp2.0 -l "trx;LogFileName=!LOGFILE!"
- "%_dotnetexe%" test "%~dp0tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f netcoreapp2.0 -l "trx;LogFileName=!LOGFILE!"
-
- if errorlevel 1 (
- echo -----------------------------------------------------------------
- echo Error: Running tests coreclr-compilernit failed, see file `!LOGFILE!`
- echo -----------------------------------------------------------------
- goto :failure
- )
-
- if not exist "!LOGFILE!" (
- echo --------------------------------------------------------
- echo Test results file !LOGFILE! not found, ensure tests ran.
- echo --------------------------------------------------------
- goto :failure
- )
-
- set LOGFILE=%TESTLOGDIR%\FSharp.Core.UnitTests_netcoreapp2.0.trx
- echo "%_dotnetexe%" test "%~dp0tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f netcoreapp2.0 -l "trx;LogFileName=!LOGFILE!"
- "%_dotnetexe%" test "%~dp0tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f netcoreapp2.0 -l "trx;LogFileName=!LOGFILE!"
-
- if errorlevel 1 (
- echo ------------------------------------------------------------------
- echo Error: Running tests coreclr-coreunit failed, see file `!LOGFILE!`
- echo ------------------------------------------------------------------
- goto :failure
- )
-
- if not exist "!LOGFILE!" (
- echo --------------------------------------------------------
- echo Test results file !LOGFILE! not found, ensure tests ran.
- echo --------------------------------------------------------
- goto :failure
- )
-)
-
-REM ---------------- coreclr-fsharp -----------------------
-
-if "%TEST_CORECLR_FSHARP_SUITE%" == "1" (
- set LOGFILE=%TESTLOGDIR%\FSharp.Tests.FSharpSuite_netcoreapp2.0.trx
- echo "%_dotnetexe%" test "%~dp0tests\fsharp\FSharp.Tests.FSharpSuite.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f netcoreapp2.0 -l "trx;LogFileName=!LOGFILE!"
- "%_dotnetexe%" test "%~dp0tests\fsharp\FSharp.Tests.FSharpSuite.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f netcoreapp2.0 -l "trx;LogFileName=!LOGFILE!"
-
- if errorlevel 1 (
- echo ----------------------------------------------------------------
- echo Error: Running tests coreclr-fsharp failed, see file `!LOGFILE!`
- echo ----------------------------------------------------------------
- goto :failure
- )
-
- if not exist "!LOGFILE!" (
- echo --------------------------------------------------------
- echo Test results file !LOGFILE! not found, ensure tests ran.
- echo --------------------------------------------------------
- goto :failure
- )
-)
-
-REM ---------------- vs-ideunit -----------------------
-
-if "%TEST_VS_IDEUNIT_SUITE%" == "1" (
- set LOGFILE=%TESTLOGDIR%\GetTypesVSUnitTests_net472.trx
- echo "%_dotnetexe%" test "%~dp0vsintegration\tests\GetTypesVSUnitTests\GetTypesVSUnitTests.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f net472 -l "trx;LogFileName=!LOGFILE!"
- "%_dotnetexe%" test "%~dp0vsintegration\tests\GetTypesVSUnitTests\GetTypesVSUnitTests.fsproj" --no-restore --no-build -c %BUILD_CONFIG% -f net472 -l "trx;LogFileName=!LOGFILE!"
-
- if errorlevel 1 (
- echo ---------------------------------------------------------------------------
- echo Error: Running tests net40-gettypesvsunittests failed, see file `!LOGFILE!`
- echo ---------------------------------------------------------------------------
- goto :failure
- )
-
- if not exist "!LOGFILE!" (
- echo --------------------------------------------------------
- echo Test results file !LOGFILE! not found, ensure tests ran.
- echo --------------------------------------------------------
- goto :failure
- )
-
- set LOGFILE=%TESTLOGDIR%\VisualFSharp.UnitTests_net472.trx
- echo "%_dotnetexe%" test "%~dp0vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj" -s "%~dp0vsintegration\tests\UnitTests\app.runsettings" --no-restore --no-build -c %BUILD_CONFIG% -f net472 -l "trx;LogFileName=!LOGFILE!"
- "%_dotnetexe%" test "%~dp0vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj" -s "%~dp0vsintegration\tests\UnitTests\app.runsettings" --no-restore --no-build -c %BUILD_CONFIG% -f net472 -l "trx;LogFileName=!LOGFILE!"
- if errorlevel 1 (
- echo ------------------------------------------------------------
- echo Error: Running tests vs-ideunit failed, see file `!LOGFILE!`
- echo ------------------------------------------------------------
- goto :failure
- )
-
- if not exist "!LOGFILE!" (
- echo --------------------------------------------------------
- echo Test results file !LOGFILE! not found, ensure tests ran.
- echo --------------------------------------------------------
- goto :failure
- )
-)
-
-goto :success
-REM ------ exit -------------------------------------
-:failure
-endlocal
-@echo
-exit /b 1
-
-:success
-endlocal
-exit /b 0
diff --git a/build.sh b/build.sh
index 4e78c56091c..6c74895c02c 100755
--- a/build.sh
+++ b/build.sh
@@ -1,3 +1,16 @@
-#!/bin/sh
+#!/usr/bin/env bash
-make Configuration=release
+source="${BASH_SOURCE[0]}"
+
+# resolve $SOURCE until the file is no longer a symlink
+while [[ -h $source ]]; do
+ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+ source="$(readlink "$source")"
+
+ # if $source was a relative symlink, we need to resolve it relative to the path where the
+ # symlink file was located
+ [[ $source != /* ]] && source="$scriptroot/$source"
+done
+
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+"$scriptroot/eng/build.sh" --build --restore $@
diff --git a/build/config/AssemblySignToolData.json b/build/config/AssemblySignToolData.json
deleted file mode 100644
index 8e8aebed7d6..00000000000
--- a/build/config/AssemblySignToolData.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "sign": [
- {
- "certificate": "Microsoft",
- "strongName": "StrongName",
- "values": [
- "bin\\FSharp.Core\\*\\*\\FSharp.Core.dll",
- "bin\\FSharp.Core\\*\\*\\*\\FSharp.Core.resources.dll",
- "bin\\FSharp.Build\\*\\*\\FSharp.Build.dll",
- "bin\\FSharp.Build\\*\\*\\*\\FSharp.Build.resources.dll",
- "bin\\FSharp.Compiler.Private\\*\\*\\FSharp.Compiler.Private.dll",
- "bin\\FSharp.Compiler.Private\\*\\*\\*\\FSharp.Compiler.Private.resources.dll",
- "bin\\FSharp.Compiler.Server.Shared\\*\\*\\FSharp.Compiler.Server.Shared.dll",
- "bin\\FSharp.Compiler.Interactive.Settings\\*\\*\\FSharp.Compiler.Interactive.Settings.dll",
- "bin\\FSharp.Compiler.Interactive.Settings\\*\\*\\*\\FSharp.Compiler.Interactive.Settings.resources.dll",
- "bin\\fsc\\*\\*\\fsc.exe",
- "bin\\fsi\\*\\*\\fsi.exe",
- "bin\\fsiAnyCpu\\*\\*\\fsiAnyCpu.exe",
- "bin\\FSharp.VS.FSI\\*\\*\\FSharp.VS.FSI.dll",
- "bin\\FSharp.VS.FSI\\*\\*\\*\\FSharp.VS.FSI.resources.dll",
- "bin\\FSharp.LanguageService.Base\\*\\*\\FSharp.LanguageService.Base.dll",
- "bin\\FSharp.LanguageService.Base\\*\\*\\*\\FSharp.LanguageService.Base.resources.dll",
- "bin\\FSharp.LanguageService\\*\\*\\FSharp.LanguageService.dll",
- "bin\\FSharp.LanguageService\\*\\*\\*\\FSharp.LanguageService.resources.dll",
- "bin\\FSharp.UIResources\\*\\*\\FSharp.UIResources.dll",
- "bin\\FSharp.UIResources\\*\\*\\*\\FSharp.UIResources.resources.dll",
- "bin\\FSharp.Editor\\*\\*\\FSharp.Editor.dll",
- "bin\\FSharp.Editor\\*\\*\\*\\FSharp.Editor.resources.dll",
- "bin\\FSharp.PatternMatcher\\*\\*\\FSharp.PatternMatcher.dll",
- "bin\\FSharp.PropertiesPages\\*\\*\\FSharp.ProjectSystem.PropertyPages.dll",
- "bin\\FSharp.PropertiesPages\\*\\*\\*\\FSharp.ProjectSystem.PropertyPages.resources.dll",
- "bin\\ProjectSystem\\*\\*\\FSharp.ProjectSystem.FSharp.dll",
- "bin\\ProjectSystem\\*\\*\\*\\FSharp.ProjectSystem.FSharp.resources.dll",
- "bin\\ProjectSystem.Base\\*\\*\\FSharp.ProjectSystem.Base.dll",
- "bin\\ProjectSystem.Base\\*\\*\\*\\FSharp.ProjectSystem.Base.resources.dll"
- ]
- },
- {
- "certificate": "VsixSHA2",
- "strongName": null,
- "values": [
- "bin\\VisualFSharpFull\\*\\*\\VisualFSharpFull.vsix",
- "bin\\VisualFSharpTemplates\\*\\*\\VisualFSharpTemplate.vsix",
- "VSSetup\\*\\Insertion\\Microsoft.FSharp.Dependencies.vsix",
- "VSSetup\\*\\Insertion\\Microsoft.FSharp.VSIX.Full.Resources.*.vsix"
- ]
- },
- {
- "certificate": "NuGet",
- "strongName": null,
- "values": [
- "packages\\*\\*.nupkg"
- ]
- }
- ],
- "exclude": [
- "e_sqlite3.dll",
- "FSharp.Core.UnitTests.dll",
- "FSharp.Data.TypeProviders.dll",
- "Microsoft.Build.dll",
- "Microsoft.Build.Framework.dll",
- "Microsoft.Build.Tasks.Core.dll",
- "Microsoft.Build.Utilities.Core.dll",
- "Newtonsoft.Json.dll",
- "System.Collections.Immutable.dll",
- "System.Reflection.Metadata.dll",
- "System.ValueTuple.4.4.0.nupkg",
- "System.ValueTuple.dll"
- ]
-}
diff --git a/build/config/InsertionSignToolData.json b/build/config/InsertionSignToolData.json
deleted file mode 100644
index d81579b12c9..00000000000
--- a/build/config/InsertionSignToolData.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "sign": [
- {
- "certificate": "VsixSHA2",
- "strongName": null,
- "values": [
- "Microsoft.FSharp.Compiler.vsix",
- "Microsoft.FSharp.Compiler.Resources.*.vsix",
- "Microsoft.FSharp.Dependencies.vsix",
- "Microsoft.FSharp.IDE.vsix",
- "Microsoft.FSharp.SDK.vsix"
- ]
- }
- ],
- "exclude": [
- "fsc.exe",
- "FSharp.Build.dll",
- "FSharp.Build.resources.dll",
- "FSharp.Core.dll",
- "FSharp.Core.resources.dll",
- "FSharp.Compiler.Private.dll",
- "FSharp.Compiler.Private.resources.dll",
- "FSharp.Compiler.Server.Shared.dll",
- "FSharp.Compiler.Interactive.Settings.dll",
- "FSharp.Compiler.Interactive.Settings.resources.dll",
- "fsi.exe",
- "fsiAnyCpu.exe",
- "FSharp.Data.TypeProviders.dll",
- "Microsoft.Build.dll",
- "Microsoft.Build.Framework.dll",
- "Microsoft.Build.Tasks.Core.dll",
- "Microsoft.Build.Utilities.Core.dll",
- "System.Collections.Immutable.dll",
- "System.Reflection.Metadata.dll",
- "System.ValueTuple.dll"
- ]
-}
diff --git a/build/config/PackageSignToolData.json b/build/config/PackageSignToolData.json
deleted file mode 100644
index bee55c6df1c..00000000000
--- a/build/config/PackageSignToolData.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "sign": [
- {
- "certificate": "NuGet",
- "strongName": null,
- "values": [
- "*.nupkg"
- ]
- }
- ],
- "exclude": [
- "FSharp.Build.resources.dll",
- "FSharp.Compiler.Interactive.Settings.resources.dll",
- "FSharp.Compiler.Private.resources.dll",
- "FSharp.Core.resources.dll",
- "fsc.exe",
- "FSharp.Build.dll",
- "FSharp.Compiler.Interactive.Settings.dll",
- "FSharp.Compiler.Private.dll",
- "FSharp.Core.dll",
- "FSharp.Core.UnitTests.dll",
- "fsi.exe"
- ]
-}
\ No newline at end of file
diff --git a/build/projects/Directory.Build.props b/build/projects/Directory.Build.props
deleted file mode 100644
index bb8eac309b1..00000000000
--- a/build/projects/Directory.Build.props
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/build/projects/Directory.Build.targets b/build/projects/Directory.Build.targets
deleted file mode 100644
index ccd47cc0a9a..00000000000
--- a/build/projects/Directory.Build.targets
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/build/projects/Signing.proj b/build/projects/Signing.proj
deleted file mode 100644
index 9e981e135ec..00000000000
--- a/build/projects/Signing.proj
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
- net46
- $(NuGetPackageRoot)RoslynTools.SignTool\$(RoslynToolsSignToolPackageVersion)\tools\SignTool.exe
- -msbuildPath "$(MSBuildBinPath)\msbuild.exe" -nugetPackagesPath "$(NuGetPackageRoot.TrimEnd('\'))" -config "$(ConfigFile)"
- -testSign $(SignToolArgs)
- -test $(SignToolArgs)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build/targets/AssemblyVersions.props b/build/targets/AssemblyVersions.props
deleted file mode 100644
index 659befe5d13..00000000000
--- a/build/targets/AssemblyVersions.props
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- $([System.DateTime]::Now.ToString(yyyyMMdd.0))
-
- $(BUILD_BUILDNUMBER.Replace(".DRAFT", ""))
-
-
- <_Build_Year>$(BUILD_BUILDNUMBER.Substring(0, 4))
- <_Build_Month>$(BUILD_BUILDNUMBER.Substring(4, 2))
- <_Build_Day>$(BUILD_BUILDNUMBER.Substring(6, 2))
- <_Build_Number>$(BUILD_BUILDNUMBER.Substring(9))
- $(_Build_Year).$(_Build_Month).$(_Build_Day).$(_Build_Number)
-
- 4.6
- $(FSLanguageVersion)
- $(FSCoreMajorVersion).2
- $(FSCoreMajorVersion).0.0
- $(FSCorePackageVersion).0
-
- 10.4
- $(FSPackageMajorVersion).2
- $(FSPackageMajorVersion).0.0
-
- 16
- 0
- $(VSMajorVersion).0
- $(VSMajorVersion).$(VSMinorVersion).0.0
-
-
- $(BUILD_BUILDNUMBER.Split('.')[0].Substring(2))
- $(BUILD_BUILDNUMBER.Split('.')[1].PadLeft(2, '0'))
- $(BuildTimeStamp_Date)$(BuildTimeStamp_Number)
- $(VSAssemblyVersion.Split('.')[0]).$(VSAssemblyVersion.Split('.')[1]).$(BUILD_BUILDNUMBER)
- 42.42.42.42
- $(BuildTimeStamp_Date)-$(BuildTimeStamp_Number)
-
-
-
-
-
-
-
-
-
diff --git a/build/targets/CommonPackages.targets b/build/targets/CommonPackages.targets
deleted file mode 100644
index dc21381a3a8..00000000000
--- a/build/targets/CommonPackages.targets
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/build/targets/ConvertPortablePdbs.targets b/build/targets/ConvertPortablePdbs.targets
deleted file mode 100644
index 9d65dab2dc4..00000000000
--- a/build/targets/ConvertPortablePdbs.targets
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
- $(SymStoreDirectory)\$(TargetFramework)
- $(NuGetPackageRoot)Pdb2Pdb\$(Pdb2PdbPackageVersion)\tools\Pdb2Pdb.exe
- "$(TargetPath)" /out "$(ConvertedPdbsDirectory)\$(TargetName).pdb" /srcsvrvar SRC_INDEX=public
-
-
-
-
-
-
-
-
- $(TargetDir)\$(TargetName).pdb
-
-
-
-
-
-
-
diff --git a/build/targets/GenerateAssemblyAttributes.targets b/build/targets/GenerateAssemblyAttributes.targets
deleted file mode 100644
index 7b747c9dd92..00000000000
--- a/build/targets/GenerateAssemblyAttributes.targets
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
-
- false
-
-
-
-
- $(IntermediateOutputPath)$(MSBuildProjectName).AssemblyLevelAttributes$(DefaultLanguageSourceExtension)
-
-
- $(NoWarn);2003
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(FSCoreVersion)
-
-
- $(FSProductVersion)
-
-
- $(VSAssemblyVersion)
-
- $(IntermediateOutputPath)$(MSBuildProjectName).AssemblyVersion$(DefaultLanguageSourceExtension)
-
-
-
- <_UseWriteCodeFragmentHack Condition="'$(OS)' == 'Unix' and '$(Language)' == 'F#'">true
-
-
-
- <_AssemblyVersionAttributes Include="System.Reflection.AssemblyCompanyAttribute">
- <_Parameter1>Microsoft Corporation
-
- <_AssemblyVersionAttributes Include="System.Reflection.AssemblyCopyrightAttribute">
- <_Parameter1>© Microsoft Corporation. All Rights Reserved.
-
- <_AssemblyVersionAttributes Include="System.Reflection.AssemblyDescriptionAttribute">
- <_Parameter1>$(AssemblyName)
-
- <_AssemblyVersionAttributes Include="System.Reflection.AssemblyFileVersionAttribute">
- <_Parameter1>$(Build_FileVersion)
-
- <_AssemblyVersionAttributes Include="System.Reflection.AssemblyInformationalVersionAttribute">
- <_Parameter1>$(MicroBuildAssemblyVersion). Commit Hash: $(GitHeadSha).
-
- <_AssemblyVersionAttributes Include="System.Reflection.AssemblyProductAttribute">
- <_Parameter1>Microsoft® F#
-
- <_AssemblyVersionAttributes Include="System.Reflection.AssemblyTitleAttribute">
- <_Parameter1>$(AssemblyName)
-
- <_AssemblyVersionAttributes Include="System.Reflection.AssemblyVersionAttribute">
- <_Parameter1>$(MicroBuildAssemblyVersion)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_LinesToWrite Include="// <auto-generated>" />
- <_LinesToWrite Include="namespace FSharp" />
- <_LinesToWrite Include="open System" />
- <_LinesToWrite Include="open System.Reflection" />
- <_LinesToWrite Include="[<assembly: %(_AssemblyVersionAttributes.Identity)("%(_AssemblyVersionAttributes._Parameter1)")>]" />
- <_LinesToWrite Include="do()" />
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build/targets/GenerateInternalsVisibleTo.targets b/build/targets/GenerateInternalsVisibleTo.targets
deleted file mode 100644
index 4950837d36a..00000000000
--- a/build/targets/GenerateInternalsVisibleTo.targets
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
- $(IntermediateOutputPath)$(MSBuildProjectName).InternalsVisibleTo$(DefaultLanguageSourceExtension)
-
-
-
-
- false
-
-
-
-
-
- <_PublicKey>002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293
-
-
- <_PublicKey>002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee
-
-
- <_InternalsVisibleToAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
- <_Parameter1 Condition="'%(InternalsVisibleTo.Key)' != ''">%(InternalsVisibleTo.Identity), PublicKey=%(InternalsVisibleTo.Key)
- <_Parameter1 Condition="'%(InternalsVisibleTo.Key)' == ''">%(InternalsVisibleTo.Identity), PublicKey=$(_PublicKey)
-
-
-
-
-
-
-
-
- <_UseWriteCodeFragmentHack Condition="'$(OS)' == 'Unix' and '$(Language)' == 'F#'">true
-
-
-
-
-
-
-
-
-
-
-
-
- <_LinesToWrite Include="// <auto-generated>" />
- <_LinesToWrite Include="namespace FSharp" />
- <_LinesToWrite Include="open System" />
- <_LinesToWrite Include="open System.Reflection" />
- <_LinesToWrite Include="[<assembly: %(_InternalsVisibleToAttribute.Identity)("%(_InternalsVisibleToAttribute._Parameter1)")>]" />
- <_LinesToWrite Include="do()" />
-
-
-
-
-
-
-
-
-
diff --git a/build/targets/GitHash.props b/build/targets/GitHash.props
deleted file mode 100644
index 30f2d03b915..00000000000
--- a/build/targets/GitHash.props
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
- $(MSBuildThisFileDirectory)..\..\
-
-
-
-
-
- $(BUILD_SOURCEVERSION)
-
-
-
-
-
- $(GIT_COMMIT)
-
-
-
-
-
- <developer build>
-
-
-
-
-
-
- <_DotGitDir>$(RepoRoot).git
- <_HeadFileContent Condition="Exists('$(_DotGitDir)/HEAD')">$([System.IO.File]::ReadAllText('$(_DotGitDir)/HEAD').Trim())
- <_RefPath Condition="$(_HeadFileContent.StartsWith('ref: '))">$(_DotGitDir)/$(_HeadFileContent.Substring(5))
- $([System.IO.File]::ReadAllText('$(_RefPath)').Trim())
- $(_HeadFileContent)
-
-
-
-
-
diff --git a/build/targets/NGenOrCrossGen.targets b/build/targets/NGenOrCrossGen.targets
deleted file mode 100644
index 3dba4fc5b2d..00000000000
--- a/build/targets/NGenOrCrossGen.targets
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
- $(windir)\Microsoft.NET\Framework64\v4.0.30319\ngen.exe
- $(windir)\Microsoft.NET\Framework\v4.0.30319\ngen.exe
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- false
-
-
-
-
diff --git a/eng/Build.ps1 b/eng/Build.ps1
new file mode 100644
index 00000000000..f00118e5bd2
--- /dev/null
+++ b/eng/Build.ps1
@@ -0,0 +1,301 @@
+#
+# This script controls the F# build process. This encompasess everything from build, testing to
+# publishing of NuGet packages. The intent is to structure it to allow for a simple flow of logic
+# between the following phases:
+#
+# - restore
+# - build
+# - sign
+# - pack
+# - test
+# - publish
+#
+# Each of these phases has a separate command which can be executed independently. For instance
+# it's fine to call `build.ps1 -build -testDesktop` followed by repeated calls to
+# `.\build.ps1 -testDesktop`.
+
+[CmdletBinding(PositionalBinding=$false)]
+param (
+ [string][Alias('c')]$configuration = "Debug",
+ [string][Alias('v')]$verbosity = "m",
+ [string]$msbuildEngine = "vs",
+
+ # Actions
+ [switch][Alias('r')]$restore,
+ [switch]$noRestore,
+ [switch][Alias('b')]$build,
+ [switch]$rebuild,
+ [switch]$sign,
+ [switch]$pack,
+ [switch]$publish,
+ [switch]$launch,
+ [switch]$help,
+
+ # Options
+ [switch][Alias('proto')]$bootstrap,
+ [string]$bootstrapConfiguration = "Proto",
+ [string]$bootstrapTfm = "net472",
+ [switch][Alias('bl')]$binaryLog,
+ [switch]$ci,
+ [switch]$official,
+ [switch]$procdump,
+ [switch]$deployExtensions,
+ [switch]$prepareMachine,
+ [switch]$useGlobalNuGetCache = $true,
+ [switch]$warnAsError = $true,
+ [switch][Alias('test')]$testDesktop,
+ [switch]$testCoreClr,
+ [switch]$testFSharpQA,
+ [switch]$testFSharpCore,
+ [switch]$testVs,
+ [switch]$testAll,
+
+ [parameter(ValueFromRemainingArguments=$true)][string[]]$properties)
+
+Set-StrictMode -version 2.0
+$ErrorActionPreference = "Stop"
+
+function Print-Usage() {
+ Write-Host "Common settings:"
+ Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)"
+ Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]"
+ Write-Host " -deployExtensions Deploy built vsixes"
+ Write-Host " -binaryLog Create MSBuild binary log (short: -bl)"
+ Write-Host ""
+ Write-Host "Actions:"
+ Write-Host " -restore Restore packages (short: -r)"
+ Write-Host " -build Build main solution (short: -b)"
+ Write-Host " -rebuild Rebuild main solution"
+ Write-Host " -pack Build NuGet packages, VS insertion manifests and installer"
+ Write-Host " -sign Sign our binaries"
+ Write-Host " -publish Publish build artifacts (e.g. symbols)"
+ Write-Host " -launch Launch Visual Studio in developer hive"
+ Write-Host " -help Print help and exit"
+ Write-Host ""
+ Write-Host "Test actions"
+ Write-Host " -testAll Run all tests"
+ Write-Host " -testDesktop Run tests against full .NET Framework"
+ Write-Host " -testCoreClr Run tests against CoreCLR"
+ Write-Host " -testFSharpQA Run F# Cambridge tests"
+ Write-Host " -testFSharpCore Run FSharpCore unit tests"
+ Write-Host " -testVs Run F# editor unit tests"
+ Write-Host ""
+ Write-Host "Advanced settings:"
+ Write-Host " -ci Set when running on CI server"
+ Write-Host " -official Set when building an official build"
+ Write-Host " -bootstrap Build using a bootstrap compiler"
+ Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
+ Write-Host " -procdump Monitor test runs with procdump"
+ Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
+ Write-Host " -useGlobalNuGetCache Use global NuGet cache."
+ Write-Host ""
+ Write-Host "Command line arguments starting with '/p:' are passed through to MSBuild."
+}
+
+# Process the command line arguments and establish defaults for the values which are not
+# specified.
+function Process-Arguments() {
+ if ($help -or (($properties -ne $null) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
+ Print-Usage
+ exit 0
+ }
+
+ if ($testAll) {
+ $script:testDesktop = $True
+ $script:testCoreClr = $True
+ $script:testFSharpQA = $True
+ $script:testVs = $True
+ }
+
+ if ($noRestore) {
+ $script:restore = $False;
+ }
+
+ foreach ($property in $properties) {
+ if (!$property.StartsWith("/p:", "InvariantCultureIgnoreCase")) {
+ Write-Host "Invalid argument: $property"
+ Print-Usage
+ exit 1
+ }
+ }
+}
+
+function Update-Arguments() {
+ if (-Not (Test-Path "$ArtifactsDir\Bootstrap\fsc.exe")) {
+ $script:bootstrap = $True
+ }
+}
+
+function BuildSolution() {
+ # VisualFSharp.sln can't be built with dotnet due to WPF, WinForms and VSIX build task dependencies
+ $solution = "VisualFSharp.sln"
+
+ Write-Host "$($solution):"
+
+ $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" }
+ $projects = Join-Path $RepoRoot $solution
+ $officialBuildId = if ($official) { $env:BUILD_BUILDNUMBER } else { "" }
+ $toolsetBuildProj = InitializeToolset
+ $quietRestore = !$ci
+ $testTargetFrameworks = if ($testCoreClr) { "netcoreapp2.1" } else { "" }
+
+ # Do not set the property to true explicitly, since that would override value projects might set.
+ $suppressExtensionDeployment = if (!$deployExtensions) { "/p:DeployExtension=false" } else { "" }
+
+ MSBuild $toolsetBuildProj `
+ $bl `
+ /p:Configuration=$configuration `
+ /p:Projects=$projects `
+ /p:RepoRoot=$RepoRoot `
+ /p:Restore=$restore `
+ /p:Build=$build `
+ /p:Rebuild=$rebuild `
+ /p:Pack=$pack `
+ /p:Sign=$sign `
+ /p:Publish=$publish `
+ /p:ContinuousIntegrationBuild=$ci `
+ /p:OfficialBuildId=$officialBuildId `
+ /p:BootstrapBuildPath=$bootstrapDir `
+ /p:QuietRestore=$quietRestore `
+ /p:QuietRestoreBinaryLog=$binaryLog `
+ /p:TestTargetFrameworks=$testTargetFrameworks `
+ $suppressExtensionDeployment `
+ @properties
+}
+
+function TestAndAddToPath([string] $testPath) {
+ if (Test-Path $testPath) {
+ $env:PATH = "$testPath;$env:PATH"
+ Write-Host "Added [$testPath] to the path."
+ }
+}
+
+function UpdatePath() {
+ # add highest framework dir
+ $subdir = ""
+ foreach ($child in Get-ChildItem "$env:WINDIR\Microsoft.NET\Framework\v4.0.?????") {
+ $subdir = $child
+ }
+ TestAndAddToPath $subdir
+
+ # add windows SDK dir for ildasm.exe
+ foreach ($child in Get-ChildItem "${env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.?.? Tools") {
+ $subdir = $child
+ }
+ TestAndAddToPath $subdir
+
+ TestAndAddToPath "$ArtifactsDir\bin\fsc\$configuration\net472"
+ TestAndAddToPath "$ArtifactsDir\bin\fsiAnyCpu\$configuration\net472"
+}
+
+function VerifyAssemblyVersions() {
+ $fsiPath = Join-Path $ArtifactsDir "bin\fsi\Proto\net472\fsi.exe"
+
+ # Only verify versions on CI or official build
+ if ($ci -or $official) {
+ $asmVerCheckPath = "$RepoRoot\scripts"
+ Exec-Console $fsiPath """$asmVerCheckPath\AssemblyVersionCheck.fsx"" -- ""$ArtifactsDir"""
+ }
+}
+
+function TestUsingNUnit([string] $testProject, [string] $targetFramework) {
+ $dotnetPath = InitializeDotNetCli
+ $dotnetExe = Join-Path $dotnetPath "dotnet.exe"
+ $projectName = [System.IO.Path]::GetFileNameWithoutExtension($testProject)
+ $testLogPath = "$ArtifactsDir\TestResults\$configuration\${projectName}_$targetFramework.xml"
+ $testBinLogPath = "$LogDir\${projectName}_$targetFramework.binlog"
+ $args = "test $testProject --no-restore --no-build -c $configuration -f $targetFramework -v n --test-adapter-path . --logger ""nunit;LogFilePath=$testLogPath"" /bl:$testBinLogPath"
+ Exec-Console $dotnetExe $args
+}
+
+function Prepare-TempDir() {
+ Copy-Item (Join-Path $RepoRoot "tests\Resources\Directory.Build.props") $TempDir
+ Copy-Item (Join-Path $RepoRoot "tests\Resources\Directory.Build.targets") $TempDir
+}
+
+try {
+ Process-Arguments
+
+ . (Join-Path $PSScriptRoot "build-utils.ps1")
+
+ Update-Arguments
+
+ Push-Location $RepoRoot
+
+ if ($ci) {
+ Prepare-TempDir
+ }
+
+ if ($bootstrap) {
+ $bootstrapDir = Make-BootstrapBuild
+ }
+
+ if ($restore -or $build -or $rebuild -or $pack -or $sign -or $publish) {
+ BuildSolution
+ }
+
+ if ($build) {
+ VerifyAssemblyVersions
+ }
+
+ $desktopTargetFramework = "net472"
+ $coreclrTargetFramework = "netcoreapp2.1"
+
+ if ($testDesktop) {
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $desktopTargetFramework
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $desktopTargetFramework
+ TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $desktopTargetFramework
+ }
+
+ if ($testCoreClr) {
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
+ TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $coreclrTargetFramework
+ }
+
+ if ($testFSharpQA) {
+ Push-Location "$RepoRoot\tests\fsharpqa\source"
+ $resultsRoot = "$ArtifactsDir\TestResults\$configuration"
+ $resultsLog = "test-net40-fsharpqa-results.log"
+ $errorLog = "test-net40-fsharpqa-errors.log"
+ $failLog = "test-net40-fsharpqa-errors"
+ $perlExe = "$env:USERPROFILE\.nuget\packages\StrawberryPerl64\5.22.2.1\Tools\perl\bin\perl.exe"
+ Create-Directory $resultsRoot
+ UpdatePath
+ $env:HOSTED_COMPILER = 1
+ $env:CSC_PIPE = "$env:USERPROFILE\.nuget\packages\Microsoft.Net.Compilers\2.7.0\tools\csc.exe"
+ $env:FSCOREDLLPATH = "$ArtifactsDir\bin\fsc\$configuration\net472\FSharp.Core.dll"
+ $env:LINK_EXE = "$RepoRoot\tests\fsharpqa\testenv\bin\link\link.exe"
+ $env:OSARCH = $env:PROCESSOR_ARCHITECTURE
+ Exec-Console $perlExe """$RepoRoot\tests\fsharpqa\testenv\bin\runall.pl"" -resultsroot ""$resultsRoot"" -results $resultsLog -log $errorLog -fail $failLog -cleanup:no -procs:$env:NUMBER_OF_PROCESSORS"
+ Pop-Location
+ }
+
+ if ($testFSharpCore) {
+ Write-Host "Environment Variables"
+ Get-Childitem Env:
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $desktopTargetFramework
+ TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
+ }
+
+
+ if ($testVs) {
+ Write-Host "Environment Variables"
+ Get-Childitem Env:
+ TestUsingNUnit -testProject "$RepoRoot\vsintegration\tests\GetTypesVS.UnitTests\GetTypesVS.UnitTests.fsproj" -targetFramework $desktopTargetFramework
+ TestUsingNUnit -testProject "$RepoRoot\vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj" -targetFramework $desktopTargetFramework
+ }
+
+ ExitWithExitCode 0
+}
+catch {
+ Write-Host $_
+ Write-Host $_.Exception
+ Write-Host $_.ScriptStackTrace
+ ExitWithExitCode 1
+}
+finally {
+ Pop-Location
+}
diff --git a/eng/CIBuild.cmd b/eng/CIBuild.cmd
new file mode 100644
index 00000000000..84640d7efc5
--- /dev/null
+++ b/eng/CIBuild.cmd
@@ -0,0 +1,2 @@
+@echo off
+powershell -noprofile -executionPolicy RemoteSigned -file "%~dp0\Build.ps1" -ci -restore -build -bootstrap -pack -sign -publish -binaryLog %*
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
new file mode 100644
index 00000000000..5ea98bd6922
--- /dev/null
+++ b/eng/Version.Details.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+ https://github.com/dotnet/arcade
+ b3bcf3034ff395bd09066114379ec64736b13633
+
+
+
diff --git a/build/targets/PackageVersions.props b/eng/Versions.props
similarity index 64%
rename from build/targets/PackageVersions.props
rename to eng/Versions.props
index 0db67180960..d6cedf2f55a 100644
--- a/build/targets/PackageVersions.props
+++ b/eng/Versions.props
@@ -1,7 +1,44 @@
-
-
+
+ false
+
+ true
+ true
+ true
+ true
+ true
+
+
+
+ beta
+ 4.6
+ $(FSCoreMajorVersion).2
+ $(FSCoreMajorVersion).0
+ $(FSCoreVersion).0
+
+ 10.4
+ $(FSPackageMajorVersion).2
+ $(FSPackageVersion)
+ $(FSProductVersion).0
+
+ 16
+ 1
+ $(VSMajorVersion).0
+ $(VSMajorVersion).$(VSMinorVersion).0
+ $(VSAssemblyVersion).0
+
+
+
+
+ $(FSCoreVersion)
+ $(FSCorePackageVersion)
+ $(FSProductVersion)
+ $(VSAssemblyVersion)
+ $(VersionPrefix)
+
+
+
$(RestoreSources);
@@ -13,17 +50,15 @@
https://api.nuget.org/v3/index.json;
https://dotnet.myget.org/F/roslyn/api/v3/index.json;
https://dotnet.myget.org/F/symreader-converter/api/v3/index.json;
+ https://myget.org/F/vs-devcore/api/v3/index.json;
+ https://myget.org/F/vs-editor/api/v3/index.json;
+ https://vside.myget.org/F/vssdk/api/v3/index.json;
+ https://vside.myget.org/F/vs-impl/api/v3/index.json;
https://myget.org/F/roslyn_concord/api/v3/index.json;
https://vside.myget.org/F/devcore/api/v3/index.json;
-
-
- $(PB_RestoreSource);$(RestoreSources)
- $(MSBuildThisFileDirectory)..\..\artifacts\dependencyUptake\PackageVersions.props
-
- $([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\..\RoslynPackageVersion.txt').Trim())
-
+ $([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\RoslynPackageVersion.txt').Trim())
1.5.0
4.3.0
@@ -51,80 +86,73 @@
4.3.0
4.3.0
4.4.0
-
$(RoslynPackageVersion)
$(RoslynPackageVersion)
$(RoslynPackageVersion)
$(RoslynPackageVersion)
$(RoslynPackageVersion)
-
15.8.166
$(MicrosoftBuildOverallPackagesVersion)
$(MicrosoftBuildOverallPackagesVersion)
$(MicrosoftBuildOverallPackagesVersion)
$(MicrosoftBuildOverallPackagesVersion)
-
8.0.1
14.0.25420
- 15.6.27740
- 15.0.26201-alpha
+ 16.0.467
+ 16.0.467
1.1.4322
- 15.0.26201
- 15.0.26201
- 15.6.27740
- 15.6.27740
- 15.6.27740
- 8.0.50727
+ 16.0.467
+ 16.0.28727
+ 16.0.28729
+ 16.0.467
+ 16.0.467
+ 16.0.467
+ 8.0.50728
7.10.6071
- 15.0.26201
- 8.0.50727
+ 16.0.28729
+ 8.0.50728
16.0.201-pre-g7d366164d0
2.3.6152103
14.3.25407
- 15.0.26201
- 15.0.26201
- 15.0.26201
+ 16.0.28729
+ 16.0.28729
+ 16.0.28729
10.0.30319
11.0.50727
15.0.25123-Dev15Preview
7.10.6072
- 8.0.50727
- 9.0.30729
- 10.0.30319
- 11.0.61030
- 12.0.30110
- 15.6.27740
+ 8.0.50728
+ 9.0.30730
+ 10.0.30320
+ 11.0.61031
+ 12.0.30111
+ 16.0.467
7.10.6071
- 8.0.50727
- 10.0.30319
+ 8.0.50728
+ 10.0.30320
12.0.30112
- 15.6.27740
- 15.6.27740
- 15.3.23
- 15.0.26201
- 15.3.15
+ 16.0.467
+ 16.0.467
+ 16.0.102
+ 16.0.28729
+ 15.3.58
9.0.30729
- 15.6.170
+ 16.0.2264
12.0.4
7.0.4
8.0.4
11.0.4
7.0.4
-
0.2.0
1.0.0
1.0.147
- 10.1.0
- 1.0.0
-
3.0.0-alpha4
1.0.30
- 1.1.0-beta1-63314-01
8.0.0-alpha
2.7.0
2.0.3
@@ -135,13 +163,8 @@
3.11.0
3.11.2
3.11.0
+ 2.1.36
1.0.0-beta2-dev3
5.22.2.1
- 0.2.0-beta-000081
-
-
-
-
-
diff --git a/eng/build-utils.ps1 b/eng/build-utils.ps1
new file mode 100644
index 00000000000..089e987f70d
--- /dev/null
+++ b/eng/build-utils.ps1
@@ -0,0 +1,255 @@
+# Collection of powershell build utility functions that we use across our scripts.
+
+Set-StrictMode -version 2.0
+$ErrorActionPreference="Stop"
+
+# Import Arcade functions
+. (Join-Path $PSScriptRoot "common\tools.ps1")
+
+$VSSetupDir = Join-Path $ArtifactsDir "VSSetup\$configuration"
+$PackagesDir = Join-Path $ArtifactsDir "packages\$configuration"
+
+$binaryLog = if (Test-Path variable:binaryLog) { $binaryLog } else { $false }
+$nodeReuse = if (Test-Path variable:nodeReuse) { $nodeReuse } else { $false }
+$bootstrapDir = if (Test-Path variable:bootstrapDir) { $bootstrapDir } else { "" }
+$bootstrapConfiguration = if (Test-Path variable:bootstrapConfiguration) { $bootstrapConfiguration } else { "Proto" }
+$bootstrapTfm = if (Test-Path variable:bootstrapTfm) { $bootstrapTfm } else { "net472" }
+$properties = if (Test-Path variable:properties) { $properties } else { @() }
+
+function GetProjectOutputBinary([string]$fileName, [string]$projectName = "", [string]$configuration = $script:configuration, [string]$tfm = "net472", [string]$rid = "", [bool]$published = $false) {
+ $projectName = if ($projectName -ne "") { $projectName } else { [System.IO.Path]::GetFileNameWithoutExtension($fileName) }
+ $publishDir = if ($published) { "publish\" } else { "" }
+ $ridDir = if ($rid -ne "") { "$rid\" } else { "" }
+ return Join-Path $ArtifactsDir "bin\$projectName\$configuration\$tfm\$ridDir$publishDir$fileName"
+}
+
+# Handy function for executing a command in powershell and throwing if it
+# fails.
+#
+# Use this when the full command is known at script authoring time and
+# doesn't require any dynamic argument build up. Example:
+#
+# Exec-Block { & $msbuild Test.proj }
+#
+# Original sample came from: http://jameskovacs.com/2010/02/25/the-exec-problem/
+function Exec-Block([scriptblock]$cmd) {
+ & $cmd
+
+ # Need to check both of these cases for errors as they represent different items
+ # - $?: did the powershell script block throw an error
+ # - $lastexitcode: did a windows command executed by the script block end in error
+ if ((-not $?) -or ($lastexitcode -ne 0)) {
+ throw "Command failed to execute: $cmd"
+ }
+}
+
+function Exec-CommandCore([string]$command, [string]$commandArgs, [switch]$useConsole = $true) {
+ if ($useConsole) {
+ $exitCode = Exec-Process $command $commandArgs
+ if ($exitCode -ne 0) {
+ throw "Command failed to execute with exit code $($exitCode): $command $commandArgs"
+ }
+ return
+ }
+
+ $startInfo = New-Object System.Diagnostics.ProcessStartInfo
+ $startInfo.FileName = $command
+ $startInfo.Arguments = $commandArgs
+
+ $startInfo.UseShellExecute = $false
+ $startInfo.WorkingDirectory = Get-Location
+ $startInfo.RedirectStandardOutput = $true
+ $startInfo.CreateNoWindow = $true
+
+ $process = New-Object System.Diagnostics.Process
+ $process.StartInfo = $startInfo
+ $process.Start() | Out-Null
+
+ $finished = $false
+ try {
+ # The OutputDataReceived event doesn't fire as events are sent by the
+ # process in powershell. Possibly due to subtlties of how Powershell
+ # manages the thread pool that I'm not aware of. Using blocking
+ # reading here as an alternative which is fine since this blocks
+ # on completion already.
+ $out = $process.StandardOutput
+ while (-not $out.EndOfStream) {
+ $line = $out.ReadLine()
+ Write-Output $line
+ }
+
+ while (-not $process.WaitForExit(100)) {
+ # Non-blocking loop done to allow ctr-c interrupts
+ }
+
+ $finished = $true
+ if ($process.ExitCode -ne 0) {
+ throw "Command failed to execute with exit code $($process.ExitCode): $command $commandArgs"
+ }
+ }
+ finally {
+ # If we didn't finish then an error occured or the user hit ctrl-c. Either
+ # way kill the process
+ if (-not $finished) {
+ $process.Kill()
+ }
+ }
+}
+
+# Handy function for executing a windows command which needs to go through
+# windows command line parsing.
+#
+# Use this when the command arguments are stored in a variable. Particularly
+# when the variable needs reparsing by the windows command line. Example:
+#
+# $args = "/p:ManualBuild=true Test.proj"
+# Exec-Command $msbuild $args
+#
+function Exec-Command([string]$command, [string]$commandArgs) {
+ Exec-CommandCore -command $command -commandArgs $commandargs -useConsole:$false
+}
+
+# Functions exactly like Exec-Command but lets the process re-use the current
+# console. This means items like colored output will function correctly.
+#
+# In general this command should be used in place of
+# Exec-Command $msbuild $args | Out-Host
+#
+function Exec-Console([string]$command, [string]$commandArgs) {
+ Exec-CommandCore -command $command -commandArgs $commandargs -useConsole:$true
+}
+
+# Handy function for executing a powershell script in a clean environment with
+# arguments. Prefer this over & sourcing a script as it will both use a clean
+# environment and do proper error checking
+function Exec-Script([string]$script, [string]$scriptArgs = "") {
+ Exec-Command "powershell" "-noprofile -executionPolicy RemoteSigned -file `"$script`" $scriptArgs"
+}
+
+# Ensure the proper .NET Core SDK is available. Returns the location to the dotnet.exe.
+function Ensure-DotnetSdk() {
+ return Join-Path (InitializeDotNetCli -install:$true) "dotnet.exe"
+}
+
+function Get-VersionCore([string]$name, [string]$versionFile) {
+ $name = $name.Replace(".", "")
+ $name = $name.Replace("-", "")
+ $nodeName = "$($name)Version"
+ $x = [xml](Get-Content -raw $versionFile)
+ $node = $x.SelectSingleNode("//Project/PropertyGroup/$nodeName")
+ if ($node -ne $null) {
+ return $node.InnerText
+ }
+
+ throw "Cannot find package $name in $versionFile"
+
+}
+
+# Return the version of the NuGet package as used in this repo
+function Get-PackageVersion([string]$name) {
+ return Get-VersionCore $name (Join-Path $EngRoot "Versions.props")
+}
+
+# Locate the directory where our NuGet packages will be deployed. Needs to be kept in sync
+# with the logic in Version.props
+function Get-PackagesDir() {
+ $d = $null
+ if ($env:NUGET_PACKAGES -ne $null) {
+ $d = $env:NUGET_PACKAGES
+ }
+ else {
+ $d = Join-Path $env:UserProfile ".nuget\packages\"
+ }
+
+ Create-Directory $d
+ return $d
+}
+
+# Locate the directory of a specific NuGet package which is restored via our main
+# toolset values.
+function Get-PackageDir([string]$name, [string]$version = "") {
+ if ($version -eq "") {
+ $version = Get-PackageVersion $name
+ }
+
+ $p = Get-PackagesDir
+ $p = Join-Path $p $name.ToLowerInvariant()
+ $p = Join-Path $p $version
+ return $p
+}
+
+function Run-MSBuild([string]$projectFilePath, [string]$buildArgs = "", [string]$logFileName = "", [switch]$parallel = $true, [switch]$summary = $true, [switch]$warnAsError = $true, [string]$configuration = $script:configuration) {
+ # Because we override the C#/VB toolset to build against our LKG package, it is important
+ # that we do not reuse MSBuild nodes from other jobs/builds on the machine. Otherwise,
+ # we'll run into issues such as https://github.com/dotnet/roslyn/issues/6211.
+ # MSBuildAdditionalCommandLineArgs=
+ $args = "/p:TreatWarningsAsErrors=true /nologo /nodeReuse:false /p:Configuration=$configuration ";
+
+ if ($warnAsError) {
+ $args += " /warnaserror"
+ }
+
+ if ($summary) {
+ $args += " /consoleloggerparameters:Verbosity=minimal;summary"
+ } else {
+ $args += " /consoleloggerparameters:Verbosity=minimal"
+ }
+
+ if ($parallel) {
+ $args += " /m"
+ }
+
+ if ($binaryLog) {
+ if ($logFileName -eq "") {
+ $logFileName = [IO.Path]::GetFileNameWithoutExtension($projectFilePath)
+ }
+ $logFileName = [IO.Path]::ChangeExtension($logFileName, ".binlog")
+ $logFilePath = Join-Path $LogDir $logFileName
+ $args += " /bl:$logFilePath"
+ }
+
+ if ($official) {
+ $args += " /p:OfficialBuildId=" + $env:BUILD_BUILDNUMBER
+ }
+
+ if ($ci) {
+ $args += " /p:ContinuousIntegrationBuild=true"
+ }
+
+ if ($bootstrapDir -ne "") {
+ $args += " /p:BootstrapBuildPath=$bootstrapDir"
+ }
+
+ $args += " $buildArgs"
+ $args += " $projectFilePath"
+ $args += " $properties"
+
+ $buildTool = InitializeBuildTool
+ Exec-Console $buildTool.Path "$($buildTool.Command) $args"
+}
+
+# Create a bootstrap build of the compiler. Returns the directory where the bootstrap build
+# is located.
+#
+# Important to not set $script:bootstrapDir here yet as we're actually in the process of
+# building the bootstrap.
+function Make-BootstrapBuild() {
+ Write-Host "Building bootstrap compiler"
+
+ $dir = Join-Path $ArtifactsDir "Bootstrap"
+ Remove-Item -re $dir -ErrorAction SilentlyContinue
+ Create-Directory $dir
+
+ # prepare FsLex and Fsyacc
+ Run-MSBuild "$RepoRoot\src\buildtools\buildtools.proj" "/restore /t:Build" -logFileName "BuildTools" -configuration $bootstrapConfiguration
+ Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\netcoreapp2.0\*" -Destination $dir
+ Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\netcoreapp2.0\*" -Destination $dir
+
+ # prepare compiler
+ $projectPath = "$RepoRoot\proto.proj"
+ Run-MSBuild $projectPath "/restore /t:Build" -logFileName "Bootstrap" -configuration $bootstrapConfiguration
+ Copy-Item "$ArtifactsDir\bin\fsc\$bootstrapConfiguration\$bootstrapTfm\*" -Destination $dir
+ Copy-Item "$ArtifactsDir\bin\fsi\$bootstrapConfiguration\$bootstrapTfm\*" -Destination $dir
+
+ return $dir
+}
diff --git a/eng/build.sh b/eng/build.sh
new file mode 100755
index 00000000000..887d11bffb4
--- /dev/null
+++ b/eng/build.sh
@@ -0,0 +1,249 @@
+#!/usr/bin/env bash
+# Copyright (c) .NET Foundation and contributors. All rights reserved.
+# Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+# Stop script if unbound variable found (use ${var:-} if intentional)
+set -u
+
+usage()
+{
+ echo "Common settings:"
+ echo " --configuration Build configuration: 'Debug' or 'Release' (short: -c)"
+ echo " --verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
+ echo " --binaryLog Create MSBuild binary log (short: -bl)"
+ echo ""
+ echo "Actions:"
+ echo " --restore Restore projects required to build (short: -r)"
+ echo " --build Build all projects (short: -b)"
+ echo " --rebuild Rebuild all projects"
+ echo " --pack Build nuget packages"
+ echo " --publish Publish build artifacts"
+ echo " --help Print help and exit"
+ echo ""
+ echo "Test actions:"
+ echo " --testcoreclr Run unit tests on .NET Core (short: --test, -t)"
+ echo ""
+ echo "Advanced settings:"
+ echo " --ci Building in CI"
+ echo " --docker Run in a docker container if applicable"
+ echo " --skipAnalyzers Do not run analyzers during build operations"
+ echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
+ echo ""
+ echo "Command line arguments starting with '/p:' are passed through to MSBuild."
+}
+
+source="${BASH_SOURCE[0]}"
+
+# resolve $source until the file is no longer a symlink
+while [[ -h "$source" ]]; do
+ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+ source="$(readlink "$source")"
+ # if $source was a relative symlink, we need to resolve it relative to the path where the
+ # symlink file was located
+ [[ $source != /* ]] && source="$scriptroot/$source"
+done
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+
+restore=false
+build=false
+rebuild=false
+pack=false
+publish=false
+test_core_clr=false
+
+configuration="Debug"
+verbosity='minimal'
+binary_log=false
+ci=false
+skip_analyzers=false
+prepare_machine=false
+properties=""
+
+docker=false
+args=""
+
+if [[ $# = 0 ]]
+then
+ usage
+ exit 1
+fi
+
+while [[ $# > 0 ]]; do
+ opt="$(echo "$1" | awk '{print tolower($0)}')"
+ case "$opt" in
+ --help|-h)
+ usage
+ exit 0
+ ;;
+ --configuration|-c)
+ configuration=$2
+ args="$args $1"
+ shift
+ ;;
+ --verbosity|-v)
+ verbosity=$2
+ args="$args $1"
+ shift
+ ;;
+ --binarylog|-bl)
+ binary_log=true
+ ;;
+ --restore|-r)
+ restore=true
+ ;;
+ --norestore)
+ restore=false
+ ;;
+ --build|-b)
+ build=true
+ ;;
+ --rebuild)
+ rebuild=true
+ ;;
+ --pack)
+ pack=true
+ ;;
+ --publish)
+ publish=true
+ ;;
+ --testcoreclr|--test|-t)
+ test_core_clr=true
+ ;;
+ --ci)
+ ci=true
+ ;;
+ --skipanalyzers)
+ skip_analyzers=true
+ ;;
+ --preparemachine)
+ prepare_machine=true
+ ;;
+ --docker)
+ docker=true
+ shift
+ continue
+ ;;
+ /p:*)
+ properties="$properties $1"
+ ;;
+ *)
+ echo "Invalid argument: $1"
+ usage
+ exit 1
+ ;;
+ esac
+ args="$args $1"
+ shift
+done
+
+# Import Arcade functions
+. "$scriptroot/common/tools.sh"
+
+function TestUsingNUnit() {
+ testproject=""
+ targetframework=""
+ while [[ $# > 0 ]]; do
+ opt="$(echo "$1" | awk '{print tolower($0)}')"
+ case "$opt" in
+ --testproject)
+ testproject=$2
+ shift
+ ;;
+ --targetframework)
+ targetframework=$2
+ shift
+ ;;
+ *)
+ echo "Invalid argument: $1"
+ exit 1
+ ;;
+ esac
+ shift
+ done
+
+ if [[ "$testproject" == "" || "$targetframework" == "" ]]; then
+ echo "--testproject and --targetframework must be specified"
+ exit 1
+ fi
+
+ projectname=$(basename -- "$testproject")
+ projectname="${projectname%.*}"
+ testlogpath="$artifacts_dir/TestResults/$configuration/${projectname}_$targetframework.xml"
+ args="test \"$testproject\" --no-restore --no-build -c $configuration -f $targetframework --test-adapter-path . --logger \"nunit;LogFilePath=$testlogpath\""
+ "$DOTNET_INSTALL_DIR/dotnet" $args
+}
+
+function BuildSolution {
+ local solution="FSharp.sln"
+ echo "$solution:"
+
+ InitializeToolset
+ local toolset_build_proj=$_InitializeToolset
+
+ local bl=""
+ if [[ "$binary_log" = true ]]; then
+ bl="/bl:\"$log_dir/Build.binlog\""
+ fi
+
+ local projects="$repo_root/$solution"
+
+ # https://github.com/dotnet/roslyn/issues/23736
+ local enable_analyzers=!$skip_analyzers
+ UNAME="$(uname)"
+ if [[ "$UNAME" == "Darwin" ]]; then
+ enable_analyzers=false
+ fi
+
+ # NuGet often exceeds the limit of open files on Mac and Linux
+ # https://github.com/NuGet/Home/issues/2163
+ if [[ "$UNAME" == "Darwin" || "$UNAME" == "Linux" ]]; then
+ ulimit -n 6500
+ fi
+
+ local quiet_restore=""
+ if [[ "$ci" != true ]]; then
+ quiet_restore=true
+ fi
+
+ # build bootstrap tools
+ bootstrap_config=Proto
+ MSBuild "$repo_root/src/buildtools/buildtools.proj" \
+ /restore \
+ /p:Configuration=$bootstrap_config \
+ /t:Build
+
+ bootstrap_dir=$artifacts_dir/Bootstrap
+ mkdir -p "$bootstrap_dir"
+ cp $artifacts_dir/bin/fslex/$bootstrap_config/netcoreapp2.0/* $bootstrap_dir
+ cp $artifacts_dir/bin/fsyacc/$bootstrap_config/netcoreapp2.0/* $bootstrap_dir
+
+ # do real build
+ MSBuild $toolset_build_proj \
+ $bl \
+ /p:Configuration=$configuration \
+ /p:Projects="$projects" \
+ /p:RepoRoot="$repo_root" \
+ /p:Restore=$restore \
+ /p:Build=$build \
+ /p:Rebuild=$rebuild \
+ /p:Pack=$pack \
+ /p:Publish=$publish \
+ /p:UseRoslynAnalyzers=$enable_analyzers \
+ /p:ContinuousIntegrationBuild=$ci \
+ /p:QuietRestore=$quiet_restore \
+ /p:QuietRestoreBinaryLog="$binary_log" \
+ $properties
+}
+
+InitializeDotNetCli $restore
+
+BuildSolution
+
+if [[ "$test_core_clr" == true ]]; then
+ coreclrtestframework=netcoreapp2.1
+ TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj" --targetframework $coreclrtestframework
+ TestUsingNUnit --testproject "$repo_root/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj" --targetframework $coreclrtestframework
+ TestUsingNUnit --testproject "$repo_root/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj" --targetframework $coreclrtestframework
+fi
+
+ExitWithExitCode 0
diff --git a/eng/cibuild.sh b/eng/cibuild.sh
new file mode 100755
index 00000000000..290f7ebaa58
--- /dev/null
+++ b/eng/cibuild.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+source="${BASH_SOURCE[0]}"
+
+# resolve $SOURCE until the file is no longer a symlink
+while [[ -h $source ]]; do
+ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+ source="$(readlink "$source")"
+
+ # if $source was a relative symlink, we need to resolve it relative to the path where
+ # the symlink file was located
+ [[ $source != /* ]] && source="$scriptroot/$source"
+done
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd)"
+
+echo "Building this commit:"
+git show --no-patch --pretty=raw HEAD
+
+. "$scriptroot/build.sh" --ci --restore --build --pack --publish --binaryLog "$@"
diff --git a/eng/common/PublishBuildAssets.cmd b/eng/common/PublishBuildAssets.cmd
deleted file mode 100644
index 3c6e4ff829d..00000000000
--- a/eng/common/PublishBuildAssets.cmd
+++ /dev/null
@@ -1,3 +0,0 @@
-@echo off
-powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0sdk-task.ps1""" -msbuildEngine dotnet -restore -projects PublishBuildAssets.proj -ci %*"
-exit /b %ErrorLevel%
diff --git a/eng/common/PublishToPackageFeed.proj b/eng/common/PublishToPackageFeed.proj
index 7dc478d981f..25362ff060c 100644
--- a/eng/common/PublishToPackageFeed.proj
+++ b/eng/common/PublishToPackageFeed.proj
@@ -10,25 +10,57 @@
netcoreapp2.1
-
+
+
+
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
+ https://dotnetfeed.blob.core.windows.net/arcade-validation/index.json
+
+
+
+
+ AssetManifestPath="%(ManifestFiles.Identity)"
+ BlobAssetsBasePath="$(BlobBasePath)"
+ PackageAssetsBasePath="$(PackageBasePath)" />
diff --git a/eng/common/build.ps1 b/eng/common/build.ps1
index 8279dc71339..d0147db4bd5 100644
--- a/eng/common/build.ps1
+++ b/eng/common/build.ps1
@@ -11,7 +11,7 @@ Param(
[switch][Alias('b')]$build,
[switch] $rebuild,
[switch] $deploy,
- [switch] $test,
+ [switch][Alias('t')]$test,
[switch] $integrationTest,
[switch] $performanceTest,
[switch] $sign,
@@ -40,10 +40,10 @@ function Print-Usage() {
Write-Host " -rebuild Rebuild solution"
Write-Host " -deploy Deploy built VSIXes"
Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
- Write-Host " -test Run all unit tests in the solution"
- Write-Host " -pack Package build outputs into NuGet packages and Willow components"
+ Write-Host " -test Run all unit tests in the solution (short: -t)"
Write-Host " -integrationTest Run all integration tests in the solution"
Write-Host " -performanceTest Run all performance tests in the solution"
+ Write-Host " -pack Package build outputs into NuGet packages and Willow components"
Write-Host " -sign Sign build outputs"
Write-Host " -publish Publish artifacts (e.g. symbols)"
Write-Host ""
@@ -51,9 +51,11 @@ function Print-Usage() {
Write-Host "Advanced settings:"
Write-Host " -projects Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
Write-Host " -ci Set when running on CI server"
- Write-Host " -prepareMachine Prepare machine for CI run"
+ Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
+ Write-Host " -warnAsError Sets warnaserror msbuild parameter ('true' or 'false')"
Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host ""
+
Write-Host "Command line arguments not listed above are passed thru to msbuild."
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
}
@@ -99,12 +101,11 @@ function Build {
/p:PerformanceTest=$performanceTest `
/p:Sign=$sign `
/p:Publish=$publish `
- /p:ContinuousIntegrationBuild=$ci `
@properties
}
try {
- if ($help -or (($properties -ne $null) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
+ if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
Print-Usage
exit 0
}
diff --git a/eng/common/build.sh b/eng/common/build.sh
old mode 100755
new mode 100644
index 4fe8b41ed70..40b1e8ec73e
--- a/eng/common/build.sh
+++ b/eng/common/build.sh
@@ -10,20 +10,24 @@ set -e
usage()
{
echo "Common settings:"
- echo " --configuration Build configuration: 'Debug' or 'Release' (short: --c)"
+ echo " --configuration Build configuration: 'Debug' or 'Release' (short: -c)"
echo " --verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
echo " --binaryLog Create MSBuild binary log (short: -bl)"
+ echo " --help Print help and exit (short: -h)"
echo ""
+
echo "Actions:"
echo " --restore Restore dependencies (short: -r)"
- echo " --build Build all projects (short: -b)"
- echo " --rebuild Rebuild all projects"
- echo " --test Run all unit tests (short: -t)"
+ echo " --build Build solution (short: -b)"
+ echo " --rebuild Rebuild solution"
+ echo " --test Run all unit tests in the solution (short: -t)"
+ echo " --integrationTest Run all integration tests in the solution"
+ echo " --performanceTest Run all performance tests in the solution"
+ echo " --pack Package build outputs into NuGet packages and Willow components"
echo " --sign Sign build outputs"
echo " --publish Publish artifacts (e.g. symbols)"
- echo " --pack Package build outputs into NuGet packages and Willow components"
- echo " --help Print help and exit (short: -h)"
echo ""
+
echo "Advanced settings:"
echo " --projects Project or solution file(s) to build"
echo " --ci Set when running on CI server"
@@ -32,6 +36,7 @@ usage()
echo " --warnAsError Sets warnaserror msbuild parameter ('true' or 'false')"
echo ""
echo "Command line arguments starting with '/p:' are passed through to MSBuild."
+ echo "Arguments can also be passed in with a single hyphen."
}
source="${BASH_SOURCE[0]}"
@@ -50,10 +55,10 @@ restore=false
build=false
rebuild=false
test=false
-pack=false
-publish=false
integration_test=false
performance_test=false
+pack=false
+publish=false
sign=false
public=false
ci=false
@@ -66,78 +71,82 @@ projects=''
configuration='Debug'
prepare_machine=false
verbosity='minimal'
+
properties=''
while [[ $# > 0 ]]; do
- opt="$(echo "$1" | awk '{print tolower($0)}')"
+ opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
case "$opt" in
- --help|-h)
+ -help|-h)
usage
exit 0
;;
- --configuration|-c)
+ -configuration|-c)
configuration=$2
shift
;;
- --verbosity|-v)
+ -verbosity|-v)
verbosity=$2
shift
;;
- --binarylog|-bl)
+ -binarylog|-bl)
binary_log=true
;;
- --restore|-r)
+ -restore|-r)
restore=true
;;
- --build|-b)
+ -build|-b)
build=true
;;
- --rebuild)
+ -rebuild)
rebuild=true
;;
- --pack)
+ -pack)
pack=true
;;
- --test|-t)
+ -test|-t)
test=true
;;
- --integrationtest)
+ -integrationtest)
integration_test=true
;;
- --performancetest)
+ -performancetest)
performance_test=true
;;
- --sign)
+ -sign)
sign=true
;;
- --publish)
+ -publish)
publish=true
;;
- --preparemachine)
+ -preparemachine)
prepare_machine=true
;;
- --projects)
+ -projects)
projects=$2
shift
;;
- --ci)
+ -ci)
ci=true
;;
- --warnaserror)
+ -warnaserror)
warn_as_error=$2
shift
;;
- --nodereuse)
+ -nodereuse)
node_reuse=$2
shift
;;
- /p:*)
+ -p:*|/p:*)
+ properties="$properties $1"
+ ;;
+ -m:*|/m:*)
properties="$properties $1"
;;
- /m:*)
+ -bl:*|/bl:*)
properties="$properties $1"
;;
- /bl:*)
+ -dl:*|/dl:*)
properties="$properties $1"
;;
*)
@@ -191,7 +200,6 @@ function Build {
/p:PerformanceTest=$performance_test \
/p:Sign=$sign \
/p:Publish=$publish \
- /p:ContinuousIntegrationBuild=$ci \
$properties
ExitWithExitCode 0
diff --git a/eng/common/cibuild.sh b/eng/common/cibuild.sh
old mode 100755
new mode 100644
diff --git a/eng/common/cross/armel/tizen-build-rootfs.sh b/eng/common/cross/armel/tizen-build-rootfs.sh
old mode 100755
new mode 100644
diff --git a/eng/common/cross/armel/tizen-fetch.sh b/eng/common/cross/armel/tizen-fetch.sh
old mode 100755
new mode 100644
diff --git a/eng/common/cross/build-android-rootfs.sh b/eng/common/cross/build-android-rootfs.sh
old mode 100755
new mode 100644
diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh
old mode 100755
new mode 100644
diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1
index 96cad844ba3..2467ebdd422 100644
--- a/eng/common/darc-init.ps1
+++ b/eng/common/darc-init.ps1
@@ -19,7 +19,7 @@ function InstallDarcCli ($darcVersion) {
# Until we can anonymously query the BAR API for the latest arcade-services
# build applied to the PROD channel, this is hardcoded.
if (-not $darcVersion) {
- $darcVersion = '1.1.0-beta.19057.9'
+ $darcVersion = '1.1.0-beta.19151.3'
}
$arcadeServicesSource = 'https://dotnetfeed.blob.core.windows.net/dotnet-arcade/index.json'
diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh
old mode 100755
new mode 100644
index bad07c3ae61..8d63dd711b2
--- a/eng/common/darc-init.sh
+++ b/eng/common/darc-init.sh
@@ -1,6 +1,24 @@
#!/usr/bin/env bash
source="${BASH_SOURCE[0]}"
+darcVersion="1.1.0-beta.19151.3"
+
+while [[ $# > 0 ]]; do
+ opt="$(echo "$1" | awk '{print tolower($0)}')"
+ case "$opt" in
+ --darcversion)
+ darcVersion=$2
+ shift
+ ;;
+ *)
+ echo "Invalid argument: $1"
+ usage
+ exit 1
+ ;;
+ esac
+
+ shift
+done
# resolve $source until the file is no longer a symlink
while [[ -h "$source" ]]; do
@@ -27,12 +45,11 @@ function InstallDarcCli {
echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g)
fi
- ReadGlobalVersion "Microsoft.DotNet.Arcade.Sdk"
- local toolset_version=$_ReadGlobalVersion
+ local arcadeServicesSource="https://dotnetfeed.blob.core.windows.net/dotnet-arcade/index.json"
echo "Installing Darc CLI version $toolset_version..."
echo "You may need to restart your command shell if this is the first dotnet tool you have installed."
- echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $toolset_version -v $verbosity -g)
+ echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g)
}
InstallDarcCli
diff --git a/eng/common/generate-graph-files.ps1 b/eng/common/generate-graph-files.ps1
new file mode 100644
index 00000000000..76f57076a32
--- /dev/null
+++ b/eng/common/generate-graph-files.ps1
@@ -0,0 +1,87 @@
+Param(
+ [Parameter(Mandatory=$true)][string] $barToken, # Token generated at https://maestro-prod.westus2.cloudapp.azure.com/Account/Tokens
+ [Parameter(Mandatory=$true)][string] $gitHubPat, # GitHub personal access token from https://github.com/settings/tokens (no auth scopes needed)
+ [Parameter(Mandatory=$true)][string] $azdoPat, # Azure Dev Ops tokens from https://dev.azure.com/dnceng/_details/security/tokens (code read scope needed)
+ [Parameter(Mandatory=$true)][string] $outputFolder, # Where the graphviz.txt file will be created
+ [string] $darcVersion = '1.1.0-beta.19169.5', # darc's version
+ [string] $graphvizVersion = '2.38', # GraphViz version
+ [switch] $includeToolset # Whether the graph should include toolset dependencies or not. i.e. arcade, optimization. For more about
+ # toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies
+)
+
+$ErrorActionPreference = "Stop"
+. $PSScriptRoot\tools.ps1
+
+Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
+
+function CheckExitCode ([string]$stage)
+{
+ $exitCode = $LASTEXITCODE
+ if ($exitCode -ne 0) {
+ Write-Host "Something failed in stage: '$stage'. Check for errors above. Exiting now..."
+ ExitWithExitCode $exitCode
+ }
+}
+
+try {
+ Push-Location $PSScriptRoot
+
+ Write-Host "Installing darc..."
+ . .\darc-init.ps1 -darcVersion $darcVersion
+ CheckExitCode "Running darc-init"
+
+ $engCommonBaseDir = Join-Path $PSScriptRoot "native\"
+ $graphvizInstallDir = CommonLibrary\Get-NativeInstallDirectory
+ $nativeToolBaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external"
+ $installBin = Join-Path $graphvizInstallDir "bin"
+
+ Write-Host "Installing dot..."
+ .\native\install-tool.ps1 -ToolName graphviz -InstallPath $installBin -BaseUri $nativeToolBaseUri -CommonLibraryDirectory $engCommonBaseDir -Version $graphvizVersion -Verbose
+
+ $darcExe = "$env:USERPROFILE\.dotnet\tools"
+ $darcExe = Resolve-Path "$darcExe\darc.exe"
+
+ Create-Directory $outputFolder
+
+ # Generate 3 graph descriptions:
+ # 1. Flat with coherency information
+ # 2. Graphviz (dot) file
+ # 3. Standard dependency graph
+ $graphVizFilePath = "$outputFolder\graphviz.txt"
+ $graphVizImageFilePath = "$outputFolder\graph.png"
+ $normalGraphFilePath = "$outputFolder\graph-full.txt"
+ $flatGraphFilePath = "$outputFolder\graph-flat.txt"
+ $baseOptions = "get-dependency-graph --github-pat $gitHubPat --azdev-pat $azdoPat --password $barToken"
+
+ if ($includeToolset) {
+ Write-Host "Toolsets will be included in the graph..."
+ $baseOptions += " --include-toolset"
+ }
+
+ Write-Host "Generating standard dependency graph..."
+ Invoke-Expression "& `"$darcExe`" $baseOptions --output-file $normalGraphFilePath"
+ CheckExitCode "Generating normal dependency graph"
+
+ Write-Host "Generating flat dependency graph and graphviz file..."
+ Invoke-Expression "& `"$darcExe`" $baseOptions --flat --coherency --graphviz $graphVizFilePath --output-file $flatGraphFilePath"
+ CheckExitCode "Generating flat and graphviz dependency graph"
+
+ Write-Host "Generating graph image $graphVizFilePath"
+ $dotFilePath = Join-Path $installBin "graphviz\$graphvizVersion\release\bin\dot.exe"
+ Invoke-Expression "& `"$dotFilePath`" -Tpng -o'$graphVizImageFilePath' `"$graphVizFilePath`""
+ CheckExitCode "Generating graphviz image"
+
+ Write-Host "'$graphVizFilePath', '$flatGraphFilePath', '$normalGraphFilePath' and '$graphVizImageFilePath' created!"
+}
+catch {
+ if (!$includeToolset) {
+ Write-Host "This might be a toolset repo which includes only toolset dependencies. " -NoNewline -ForegroundColor Yellow
+ Write-Host "Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again..." -ForegroundColor Yellow
+ }
+ Write-Host $_
+ Write-Host $_.Exception
+ Write-Host $_.ScriptStackTrace
+ ExitWithExitCode 1
+} finally {
+ Pop-Location
+}
\ No newline at end of file
diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1
index e25c60fed42..495a563a758 100644
--- a/eng/common/init-tools-native.ps1
+++ b/eng/common/init-tools-native.ps1
@@ -98,10 +98,20 @@ try {
Write-Verbose "Executing '$LocalInstallerCommand'"
Invoke-Expression "$LocalInstallerCommand"
if ($LASTEXITCODE -Ne "0") {
- Write-Error "Execution failed"
- exit 1
+ $errMsg = "$ToolName installation failed"
+ if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) {
+ Write-Warning $errMsg
+ $toolInstallationFailure = $true
+ } else {
+ Write-Error $errMsg
+ exit 1
+ }
}
}
+
+ if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
+ exit 1
+ }
}
else {
Write-Host "No native tools defined in global.json"
diff --git a/eng/common/init-tools-native.sh b/eng/common/init-tools-native.sh
old mode 100755
new mode 100644
diff --git a/eng/common/internal/Directory.Build.props b/eng/common/internal/Directory.Build.props
new file mode 100644
index 00000000000..e33179ef373
--- /dev/null
+++ b/eng/common/internal/Directory.Build.props
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/eng/common/internal/Tools.csproj b/eng/common/internal/Tools.csproj
new file mode 100644
index 00000000000..1a81ff906f6
--- /dev/null
+++ b/eng/common/internal/Tools.csproj
@@ -0,0 +1,23 @@
+
+
+
+
+ net472
+ false
+
+
+
+
+
+
+
+
+
+ https://devdiv.pkgs.visualstudio.com/_packaging/8f470c7e-ac49-4afe-a6ee-cf784e438b93/nuget/v3/index.json;
+ https://devdiv.pkgs.visualstudio.com/_packaging/VS/nuget/v3/index.json;
+
+
+
+
+
+
diff --git a/eng/common/msbuild.sh b/eng/common/msbuild.sh
old mode 100755
new mode 100644
diff --git a/eng/common/native/common-library.sh b/eng/common/native/common-library.sh
old mode 100755
new mode 100644
diff --git a/eng/common/native/install-cmake.sh b/eng/common/native/install-cmake.sh
old mode 100755
new mode 100644
diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1
index 9ba7530122f..d0eec5163ef 100644
--- a/eng/common/sdk-task.ps1
+++ b/eng/common/sdk-task.ps1
@@ -1,48 +1,47 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
- [string] $projects = "",
- [string][Alias('v')]$verbosity = "minimal",
+ [string] $configuration = "Debug",
+ [string] $task,
+ [string] $verbosity = "minimal",
[string] $msbuildEngine = $null,
- [bool] $warnAsError = $true,
- [switch][Alias('bl')]$binaryLog,
- [switch][Alias('r')]$restore,
- [switch] $ci,
+ [switch] $restore,
[switch] $prepareMachine,
[switch] $help,
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
)
+$ci = $true
+$binaryLog = $true
+$warnAsError = $true
+
. $PSScriptRoot\tools.ps1
function Print-Usage() {
- Write-Host "Common settings:"
- Write-Host " -v[erbosity] Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]"
- Write-Host " -[bl|binaryLog] Output binary log (short: -bl)"
- Write-Host " -help Print help and exit"
- Write-Host ""
+ Write-Host "Common settings:"
+ Write-Host " -task Name of Arcade task (name of a project in SdkTasks directory of the Arcade SDK package)"
+ Write-Host " -restore Restore dependencies"
+ Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]"
+ Write-Host " -help Print help and exit"
+ Write-Host ""
- Write-Host "Advanced settings:"
- Write-Host " -restore Restore dependencies (short: -r)"
- Write-Host " -projects Semi-colon delimited list of sln/proj's from the Arcade sdk to build. Globbing is supported (*.sln)"
- Write-Host " -ci Set when running on CI server"
- Write-Host " -prepareMachine Prepare machine for CI run"
- Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
- Write-Host ""
- Write-Host "Command line arguments not listed above are passed thru to msbuild."
- Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
+ Write-Host "Advanced settings:"
+ Write-Host " -prepareMachine Prepare machine for CI run"
+ Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
+ Write-Host ""
+ Write-Host "Command line arguments not listed above are passed thru to msbuild."
}
-function Build {
- $toolsetBuildProj = InitializeToolset
+function Build([string]$target) {
+ $logSuffix = if ($target -eq "Execute") { "" } else { ".$target" }
+ $log = Join-Path $LogDir "$task$logSuffix.binlog"
+ $outputPath = Join-Path $ToolsetDir "$task\\"
- $toolsetBuildProj = Join-Path (Split-Path $toolsetBuildProj -Parent) "SdkTasks\SdkTask.proj"
- $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "SdkTask.binlog") } else { "" }
- MSBuild $toolsetBuildProj `
- $bl `
- /p:Projects=$projects `
- /p:Restore=$restore `
+ MSBuild $taskProject `
+ /bl:$log `
+ /t:$target `
+ /p:Configuration=$configuration `
/p:RepoRoot=$RepoRoot `
- /p:ContinuousIntegrationBuild=$ci `
+ /p:BaseIntermediateOutputPath=$outputPath `
@properties
}
@@ -52,17 +51,23 @@ try {
exit 0
}
- if ($projects -eq "") {
- Write-Error "Missing required parameter '-projects '"
+ if ($task -eq "") {
+ Write-Host "Missing required parameter '-task '" -ForegroundColor Red
Print-Usage
ExitWithExitCode 1
}
- if ($ci) {
- $binaryLog = $true
+ $taskProject = GetSdkTaskProject $task
+ if (!(Test-Path $taskProject)) {
+ Write-Host "Unknown task: $task" -ForegroundColor Red
+ ExitWithExitCode 1
+ }
+
+ if ($restore) {
+ Build "Restore"
}
- Build
+ Build "Execute"
}
catch {
Write-Host $_
diff --git a/eng/common/templates/job/generate-graph-files.yml b/eng/common/templates/job/generate-graph-files.yml
new file mode 100644
index 00000000000..e54ce956f90
--- /dev/null
+++ b/eng/common/templates/job/generate-graph-files.yml
@@ -0,0 +1,48 @@
+parameters:
+ # Optional: dependencies of the job
+ dependsOn: ''
+
+ # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
+ pool: {}
+
+ # Optional: Include toolset dependencies in the generated graph files
+ includeToolset: false
+
+jobs:
+- job: Generate_Graph_Files
+
+ dependsOn: ${{ parameters.dependsOn }}
+
+ displayName: Generate Graph Files
+
+ pool: ${{ parameters.pool }}
+
+ variables:
+ # Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
+ # DotNet-AllOrgs-Darc-Pats provides: dn-bot-devdiv-dnceng-rw-code-pat
+ - group: Publish-Build-Assets
+ - group: DotNet-AllOrgs-Darc-Pats
+ - name: _GraphArguments
+ value: -gitHubPat $(BotAccount-dotnet-maestro-bot-PAT)
+ -azdoPat $(dn-bot-devdiv-dnceng-rw-code-pat)
+ -barToken $(MaestroAccessToken)
+ -outputFolder '$(Build.StagingDirectory)/GraphFiles/'
+ - ${{ if ne(parameters.includeToolset, 'false') }}:
+ - name: _GraphArguments
+ value: ${{ variables._GraphArguments }} -includeToolset
+
+ steps:
+ - task: PowerShell@2
+ displayName: Generate Graph Files
+ inputs:
+ filePath: eng\common\generate-graph-files.ps1
+ arguments: $(_GraphArguments)
+ continueOnError: true
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Graph to Artifacts
+ inputs:
+ PathtoPublish: '$(Build.StagingDirectory)/GraphFiles'
+ PublishLocation: Container
+ ArtifactName: GraphFiles
+ continueOnError: true
+ condition: always()
diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml
index 5e293db35d7..74dd81fdc0a 100644
--- a/eng/common/templates/job/job.yml
+++ b/eng/common/templates/job/job.yml
@@ -41,18 +41,11 @@ parameters:
enablePublishTestResults: false
# Optional: enable sending telemetry
- # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
- # _HelixBuildConfig - differentiate between Debug, Release, other
- # _HelixType - Example: build/product/
- # _HelixSource - Example: official/dotnet/arcade/$(Build.SourceBranch)
enableTelemetry: false
- # Optional: If specified, then automatically derive "_HelixSource" variable for telemetry
+ # Optional: define the helix repo for telemeetry (example: 'dotnet/arcade')
helixRepo: ''
- # Optional: Define the type for helix telemetry (must end in '/')
- helixType: build/product/
-
# Required: name of the job
name: ''
@@ -115,29 +108,24 @@ jobs:
- name: ${{ pair.key }}
value: ${{ pair.value }}
- # Add additional variables
- - ${{ if and(ne(parameters.helixRepo, ''), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
- - name: _HelixSource
- value: official/${{ parameters.helixRepo }}/$(Build.SourceBranch)
- - ${{ if and(ne(parameters.helixRepo, ''), or(ne(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest'))) }}:
- - name: _HelixSource
- value: pr/${{ parameters.helixRepo }}/$(Build.SourceBranch)
- - name: _HelixType
- value: ${{ parameters.helixType }}
- - name: _HelixBuildConfig
- value: $(_BuildConfig)
+ # DotNet-HelixApi-Access provides 'HelixApiAccessToken' for internal builds
+ - ${{ if and(eq(parameters.enableTelemetry, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - group: DotNet-HelixApi-Access
${{ if ne(parameters.workspace, '') }}:
workspace: ${{ parameters.workspace }}
steps:
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
- - template: /eng/common/templates/steps/telemetry-start.yml
- parameters:
- buildConfig: $(_HelixBuildConfig)
- helixSource: $(_HelixSource)
- helixType: $(_HelixType)
+ # Telemetry tasks are built from https://github.com/dotnet/arcade-extensions
+ - task: sendStartTelemetry@0
+ displayName: 'Send Helix Start Telemetry'
+ inputs:
+ helixRepo: ${{ parameters.helixRepo }}
+ buildConfig: $(_BuildConfig)
runAsPublic: ${{ parameters.runAsPublic }}
+ continueOnError: ${{ parameters.continueOnError }}
+ condition: always()
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
@@ -165,11 +153,15 @@ jobs:
TeamName: $(_TeamName)
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
- - template: /eng/common/templates/steps/telemetry-end.yml
+ # Telemetry tasks are built from https://github.com/dotnet/arcade-extensions
+ - task: sendEndTelemetry@0
+ displayName: 'Send Helix End Telemetry'
+ continueOnError: ${{ parameters.continueOnError }}
+ condition: always()
- ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
- task: PublishBuildArtifacts@1
- displayName: Publish Logs to VSTS
+ displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
PublishLocation: Container
@@ -187,7 +179,7 @@ jobs:
continueOnError: true
condition: always()
- - ${{ if and(eq(parameters.enablePublishBuildAssets, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - ${{ if and(eq(parameters.enablePublishBuildAssets, true), ne(variables['_PublishUsingPipelines'], 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- task: CopyFiles@2
displayName: Gather Asset Manifests
inputs:
@@ -202,4 +194,4 @@ jobs:
PublishLocation: Container
ArtifactName: AssetManifests
continueOnError: ${{ parameters.continueOnError }}
- condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
\ No newline at end of file
+ condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml
index c094658fefc..620bd3c62e7 100644
--- a/eng/common/templates/job/publish-build-assets.yml
+++ b/eng/common/templates/job/publish-build-assets.yml
@@ -20,6 +20,9 @@ parameters:
# if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.
runAsPublic: false
+ # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing
+ publishUsingPipelines: false
+
jobs:
- job: Asset_Registry_Publish
@@ -44,12 +47,16 @@ jobs:
downloadPath: '$(Build.StagingDirectory)/Download'
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
- - script: eng\common\publishbuildassets.cmd
- /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
- /p:BuildAssetRegistryToken=$(MaestroAccessToken)
- /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com
- /p:Configuration=$(_BuildConfig)
+ - task: PowerShell@2
displayName: Publish Build Assets
+ inputs:
+ filePath: eng\common\sdk-task.ps1
+ arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet
+ /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
+ /p:BuildAssetRegistryToken=$(MaestroAccessToken)
+ /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com
+ /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }}
+ /p:Configuration=$(_BuildConfig)
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
- ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml
index c7226b12ed2..6a2f98c036f 100644
--- a/eng/common/templates/jobs/jobs.yml
+++ b/eng/common/templates/jobs/jobs.yml
@@ -14,25 +14,28 @@ parameters:
# Optional: Enable publishing to the build asset registry
enablePublishBuildAssets: false
+ # Optional: Enable publishing using release pipelines
+ enablePublishUsingPipelines: false
+
+ graphFileGeneration:
+ # Optional: Enable generating the graph files at the end of the build
+ enabled: false
+ # Optional: Include toolset dependencies in the generated graph files
+ includeToolset: false
+
# Optional: Include PublishTestResults task
enablePublishTestResults: false
# Optional: enable sending telemetry
- # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
- # _HelixBuildConfig - differentiate between Debug, Release, other
- # _HelixType - Example: build/product/
- # _HelixSource - Example: official/dotnet/arcade/$(Build.SourceBranch)
+ # if enabled then the 'helixRepo' parameter should also be specified
enableTelemetry: false
# Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
jobs: []
- # Optional: If specified, then automatically derive "_HelixSource" variable for telemetry
+ # Optional: define the helix repo for telemetry (example: 'dotnet/arcade')
helixRepo: ''
- # Optional: Define the type for helix telemetry (must end in '/')
- helixType: build/product/
-
# Optional: Override automatically derived dependsOn value for "publish build assets" job
publishBuildAssetsDependsOn: ''
@@ -73,5 +76,15 @@ jobs:
pool:
vmImage: vs2017-win2016
runAsPublic: ${{ parameters.runAsPublic }}
+ publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }}
enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}
-
+
+- ${{ if and(eq(parameters.graphFileGeneration.enabled, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - template: ../job/generate-graph-files.yml
+ parameters:
+ continueOnError: ${{ parameters.continueOnError }}
+ includeToolset: ${{ parameters.graphFileGeneration.includeToolset }}
+ dependsOn:
+ - Asset_Registry_Publish
+ pool:
+ vmImage: vs2017-win2016
diff --git a/eng/common/templates/phases/publish-build-assets.yml b/eng/common/templates/phases/publish-build-assets.yml
index 0df6203b506..211967debab 100644
--- a/eng/common/templates/phases/publish-build-assets.yml
+++ b/eng/common/templates/phases/publish-build-assets.yml
@@ -28,12 +28,15 @@ phases:
SecretsFilter: 'MaestroAccessToken'
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
- - script: eng\common\publishbuildassets.cmd
- -configuration $(_BuildConfig)
- /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
- /p:BuildAssetRegistryToken=$(MaestroAccessToken)
- /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com
+ - task: PowerShell@2
displayName: Publish Build Assets
+ inputs:
+ filePath: eng\common\sdk-task.ps1
+ arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet
+ /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
+ /p:BuildAssetRegistryToken=$(MaestroAccessToken)
+ /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com
+ /p:Configuration=$(_BuildConfig)
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
- task: PublishBuildArtifacts@1
diff --git a/eng/common/templates/steps/send-to-helix.yml b/eng/common/templates/steps/send-to-helix.yml
index a5835c0f473..0187597681e 100644
--- a/eng/common/templates/steps/send-to-helix.yml
+++ b/eng/common/templates/steps/send-to-helix.yml
@@ -1,32 +1,34 @@
parameters:
- HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/
- HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/'
- HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number
- HelixTargetQueues: '' # required -- semicolon delimited list of Helix queues to test on; see https://helix.dot.net/api/2018-03-14/info/queues for a list of queues
- HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group
- HelixPreCommands: '' # optional -- commands to run before Helix work item execution
- HelixPostCommands: '' # optional -- commands to run after Helix work item execution
- WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects
- WorkItemCommand: '' # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects
- WorkItemTimeout: '' # optional -- a timeout in seconds for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects
- CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload
- XUnitProjects: '' # optional -- semicolon delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true
- XUnitPublishTargetFramework: '' # optional -- framework to use to publish your xUnit projects
- XUnitRuntimeTargetFramework: '' # optional -- framework to use for the xUnit console runner
- XUnitRunnerVersion: '' # optional -- version of the xUnit nuget package you wish to use on Helix; required for XUnitProjects
- IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion
- DotNetCliPackageType: '' # optional -- either 'sdk' or 'runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json
- DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json
- EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control
- WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget."
- IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set
- Creator: '' # optional -- if the build is external, use this to specify who is sending the job
- condition: succeeded() # optional -- condition for step to execute; defaults to succeeded()
- continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false
+ HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/
+ HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/'
+ HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number
+ HelixTargetQueues: '' # required -- semicolon delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues
+ HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group
+ HelixPreCommands: '' # optional -- commands to run before Helix work item execution
+ HelixPostCommands: '' # optional -- commands to run after Helix work item execution
+ WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects
+ WorkItemCommand: '' # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects
+ WorkItemTimeout: '' # optional -- a timeout in seconds for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects
+ CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload
+ XUnitProjects: '' # optional -- semicolon delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true
+ XUnitWorkItemTimeout: '' # optional -- the workitem timeout in seconds for all workitems created from the xUnit projects specified by XUnitProjects
+ XUnitPublishTargetFramework: '' # optional -- framework to use to publish your xUnit projects
+ XUnitRuntimeTargetFramework: '' # optional -- framework to use for the xUnit console runner
+ XUnitRunnerVersion: '' # optional -- version of the xUnit nuget package you wish to use on Helix; required for XUnitProjects
+ IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion
+ DotNetCliPackageType: '' # optional -- either 'sdk' or 'runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json
+ DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json
+ EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control
+ WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget."
+ IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set
+ Creator: '' # optional -- if the build is external, use this to specify who is sending the job
+ DisplayNamePrefix: 'Send job to Helix' # optional -- rename the beginning of the displayName of the steps in AzDO
+ condition: succeeded() # optional -- condition for step to execute; defaults to succeeded()
+ continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false
steps:
- - powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"'
- displayName: Send job to Helix (Windows)
+ - powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj /restore /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"'
+ displayName: ${{ parameters.DisplayNamePrefix }} (Windows)
env:
BuildConfig: $(_BuildConfig)
HelixSource: ${{ parameters.HelixSource }}
@@ -41,6 +43,7 @@ steps:
WorkItemTimeout: ${{ parameters.WorkItemTimeout }}
CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }}
XUnitProjects: ${{ parameters.XUnitProjects }}
+ XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }}
XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }}
XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }}
XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }}
@@ -50,10 +53,11 @@ steps:
EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
Creator: ${{ parameters.Creator }}
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken)
condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT'))
continueOnError: ${{ parameters.continueOnError }}
- - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog
- displayName: Send job to Helix (Unix)
+ - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj /restore /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog
+ displayName: ${{ parameters.DisplayNamePrefix }} (Unix)
env:
BuildConfig: $(_BuildConfig)
HelixSource: ${{ parameters.HelixSource }}
@@ -68,6 +72,7 @@ steps:
WorkItemTimeout: ${{ parameters.WorkItemTimeout }}
CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }}
XUnitProjects: ${{ parameters.XUnitProjects }}
+ XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }}
XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }}
XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }}
XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }}
@@ -77,5 +82,6 @@ steps:
EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
Creator: ${{ parameters.Creator }}
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken)
condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT'))
- continueOnError: ${{ parameters.continueOnError }}
+ continueOnError: ${{ parameters.continueOnError }}
\ No newline at end of file
diff --git a/eng/common/templates/steps/telemetry-end.yml b/eng/common/templates/steps/telemetry-end.yml
index 9b61481e7e1..fadc04ca1b9 100644
--- a/eng/common/templates/steps/telemetry-end.yml
+++ b/eng/common/templates/steps/telemetry-end.yml
@@ -1,3 +1,7 @@
+parameters:
+ maxRetries: 5
+ retryDelay: 10 # in seconds
+
steps:
- bash: |
if [ "$AGENT_JOBSTATUS" = "Succeeded" ] || [ "$AGENT_JOBSTATUS" = "PartiallySucceeded" ]; then
@@ -7,27 +11,41 @@ steps:
fi
warningCount=0
- # create a temporary file for curl output
- res=`mktemp`
-
- curlResult=`
- curl --verbose --output $res --write-out "%{http_code}"\
- -H 'Content-Type: application/json' \
- -H "X-Helix-Job-Token: $Helix_JobToken" \
- -H 'Content-Length: 0' \
- -X POST -G "https://helix.dot.net/api/2018-03-14/telemetry/job/build/$Helix_WorkItemId/finish" \
- --data-urlencode "errorCount=$errorCount" \
- --data-urlencode "warningCount=$warningCount"`
- curlStatus=$?
-
- if [ $curlStatus -eq 0 ]; then
- if [ $curlResult -gt 299 ] || [ $curlResult -lt 200 ]; then
- curlStatus=$curlResult
+ curlStatus=1
+ retryCount=0
+ # retry loop to harden against spotty telemetry connections
+ # we don't retry successes and 4xx client errors
+ until [[ $curlStatus -eq 0 || ( $curlStatus -ge 400 && $curlStatus -le 499 ) || $retryCount -ge $MaxRetries ]]
+ do
+ if [ $retryCount -gt 0 ]; then
+ echo "Failed to send telemetry to Helix; waiting $RetryDelay seconds before retrying..."
+ sleep $RetryDelay
fi
- fi
+
+ # create a temporary file for curl output
+ res=`mktemp`
+
+ curlResult=`
+ curl --verbose --output $res --write-out "%{http_code}"\
+ -H 'Content-Type: application/json' \
+ -H "X-Helix-Job-Token: $Helix_JobToken" \
+ -H 'Content-Length: 0' \
+ -X POST -G "https://helix.dot.net/api/2018-03-14/telemetry/job/build/$Helix_WorkItemId/finish" \
+ --data-urlencode "errorCount=$errorCount" \
+ --data-urlencode "warningCount=$warningCount"`
+ curlStatus=$?
+
+ if [ $curlStatus -eq 0 ]; then
+ if [ $curlResult -gt 299 ] || [ $curlResult -lt 200 ]; then
+ curlStatus=$curlResult
+ fi
+ fi
+
+ let retryCount++
+ done
if [ $curlStatus -ne 0 ]; then
- echo "Failed to Send Build Finish information"
+ echo "Failed to Send Build Finish information after $retryCount retries"
vstsLogOutput="vso[task.logissue type=error;sourcepath=templates/steps/telemetry-end.yml;code=1;]Failed to Send Build Finish information: $curlStatus"
echo "##$vstsLogOutput"
exit 1
@@ -37,6 +55,8 @@ steps:
# defined via VSTS variables in start-job.sh
Helix_JobToken: $(Helix_JobToken)
Helix_WorkItemId: $(Helix_WorkItemId)
+ MaxRetries: ${{ parameters.maxRetries }}
+ RetryDelay: ${{ parameters.retryDelay }}
condition: and(always(), ne(variables['Agent.Os'], 'Windows_NT'))
- powershell: |
if (($env:Agent_JobStatus -eq 'Succeeded') -or ($env:Agent_JobStatus -eq 'PartiallySucceeded')) {
@@ -46,13 +66,30 @@ steps:
}
$WarningCount = 0
- try {
- Invoke-RestMethod -Uri "https://helix.dot.net/api/2018-03-14/telemetry/job/build/$env:Helix_WorkItemId/finish?errorCount=$ErrorCount&warningCount=$WarningCount" -Method Post -ContentType "application/json" -Body "" `
- -Headers @{ 'X-Helix-Job-Token'=$env:Helix_JobToken }
+ # Basic retry loop to harden against server flakiness
+ $retryCount = 0
+ while ($retryCount -lt $env:MaxRetries) {
+ try {
+ Invoke-RestMethod -Uri "https://helix.dot.net/api/2018-03-14/telemetry/job/build/$env:Helix_WorkItemId/finish?errorCount=$ErrorCount&warningCount=$WarningCount" -Method Post -ContentType "application/json" -Body "" `
+ -Headers @{ 'X-Helix-Job-Token'=$env:Helix_JobToken }
+ break
+ }
+ catch {
+ $statusCode = $_.Exception.Response.StatusCode.value__
+ if ($statusCode -ge 400 -and $statusCode -le 499) {
+ Write-Host "##vso[task.logissue]error Failed to send telemetry to Helix (status code $statusCode); not retrying (4xx client error)"
+ Write-Host "##vso[task.logissue]error ", $_.Exception.GetType().FullName, $_.Exception.Message
+ exit 1
+ }
+ Write-Host "Failed to send telemetry to Helix (status code $statusCode); waiting $env:RetryDelay seconds before retrying..."
+ $retryCount++
+ sleep $env:RetryDelay
+ continue
+ }
}
- catch {
- Write-Error $_
- Write-Error $_.Exception
+
+ if ($retryCount -ge $env:MaxRetries) {
+ Write-Host "##vso[task.logissue]error Failed to send telemetry to Helix after $retryCount retries."
exit 1
}
displayName: Send Windows Build End Telemetry
@@ -60,4 +97,6 @@ steps:
# defined via VSTS variables in start-job.ps1
Helix_JobToken: $(Helix_JobToken)
Helix_WorkItemId: $(Helix_WorkItemId)
+ MaxRetries: ${{ parameters.maxRetries }}
+ RetryDelay: ${{ parameters.retryDelay }}
condition: and(always(),eq(variables['Agent.Os'], 'Windows_NT'))
diff --git a/eng/common/templates/steps/telemetry-start.yml b/eng/common/templates/steps/telemetry-start.yml
index 79c128c5de8..32c01ef0b55 100644
--- a/eng/common/templates/steps/telemetry-start.yml
+++ b/eng/common/templates/steps/telemetry-start.yml
@@ -3,6 +3,8 @@ parameters:
helixType: 'undefined_defaulted_in_telemetry.yml'
buildConfig: ''
runAsPublic: false
+ maxRetries: 5
+ retryDelay: 10 # in seconds
steps:
- ${{ if and(eq(parameters.runAsPublic, 'false'), not(eq(variables['System.TeamProject'], 'public'))) }}:
@@ -30,7 +32,7 @@ steps:
}
}
JobListStuff
-
+
cat $jobInfo
# create a temporary file for curl output
@@ -38,30 +40,44 @@ steps:
accessTokenParameter="?access_token=$HelixApiAccessToken"
- curlResult=`
- cat $jobInfo |\
- curl --trace - --verbose --output $res --write-out "%{http_code}" \
- -H 'Content-Type: application/json' \
- -X POST "https://helix.dot.net/api/2018-03-14/telemetry/job$accessTokenParameter" -d @-`
- curlStatus=$?
+ curlStatus=1
+ retryCount=0
+ # retry loop to harden against spotty telemetry connections
+ # we don't retry successes and 4xx client errors
+ until [[ $curlStatus -eq 0 || ( $curlStatus -ge 400 && $curlStatus -le 499 ) || $retryCount -ge $MaxRetries ]]
+ do
+ if [ $retryCount -gt 0 ]; then
+ echo "Failed to send telemetry to Helix; waiting $RetryDelay seconds before retrying..."
+ sleep $RetryDelay
+ fi
+
+ curlResult=`
+ cat $jobInfo |\
+ curl --trace - --verbose --output $res --write-out "%{http_code}" \
+ -H 'Content-Type: application/json' \
+ -X POST "https://helix.dot.net/api/2018-03-14/telemetry/job$accessTokenParameter" -d @-`
+ curlStatus=$?
- if [ $curlStatus -eq 0 ]; then
- if [ $curlResult -gt 299 ] || [ $curlResult -lt 200 ]; then
- curlStatus=$curlResult
+ if [ $curlStatus -eq 0 ]; then
+ if [ $curlResult -gt 299 ] || [ $curlResult -lt 200 ]; then
+ curlStatus=$curlResult
+ fi
fi
- fi
+
+ let retryCount++
+ done
curlResult=`cat $res`
-
+
# validate status of curl command
if [ $curlStatus -ne 0 ]; then
- echo "Failed To Send Job Start information"
+ echo "Failed To Send Job Start information after $retryCount retries"
# We have to append the ## vso prefix or vso will pick up the command when it dumps the inline script into the shell
vstsLogOutput="vso[task.logissue type=error;sourcepath=telemetry/start-job.sh;code=1;]Failed to Send Job Start information: $curlStatus"
echo "##$vstsLogOutput"
exit 1
fi
-
+
# Set the Helix_JobToken variable
export Helix_JobToken=`echo $curlResult | xargs echo` # Strip Quotes
echo "##vso[task.setvariable variable=Helix_JobToken;issecret=true;]$Helix_JobToken"
@@ -75,29 +91,44 @@ steps:
Attempt: 1
OperatingSystem: $(Agent.Os)
Configuration: ${{ parameters.buildConfig }}
+ MaxRetries: ${{ parameters.maxRetries }}
+ RetryDelay: ${{ parameters.retryDelay }}
condition: and(always(), ne(variables['Agent.Os'], 'Windows_NT'))
- bash: |
- res=`mktemp`
- curlResult=`
- curl --verbose --output $res --write-out "%{http_code}"\
- -H 'Content-Type: application/json' \
- -H "X-Helix-Job-Token: $Helix_JobToken" \
- -H 'Content-Length: 0' \
- -X POST -G "https://helix.dot.net/api/2018-03-14/telemetry/job/build" \
- --data-urlencode "buildUri=$BuildUri"`
- curlStatus=$?
-
- if [ $curlStatus -eq 0 ]; then
- if [ $curlResult -gt 299 ] || [ $curlResult -lt 200 ]; then
- curlStatus=$curlResult
+ curlStatus=1
+ retryCount=0
+ # retry loop to harden against spotty telemetry connections
+ # we don't retry successes and 4xx client errors
+ until [[ $curlStatus -eq 0 || ( $curlStatus -ge 400 && $curlStatus -le 499 ) || $retryCount -ge $MaxRetries ]]
+ do
+ if [ $retryCount -gt 0 ]; then
+ echo "Failed to send telemetry to Helix; waiting $RetryDelay seconds before retrying..."
+ sleep $RetryDelay
fi
- fi
- curlResult=`cat $res`
+ res=`mktemp`
+ curlResult=`
+ curl --verbose --output $res --write-out "%{http_code}"\
+ -H 'Content-Type: application/json' \
+ -H "X-Helix-Job-Token: $Helix_JobToken" \
+ -H 'Content-Length: 0' \
+ -X POST -G "https://helix.dot.net/api/2018-03-14/telemetry/job/build" \
+ --data-urlencode "buildUri=$BuildUri"`
+ curlStatus=$?
+
+ if [ $curlStatus -eq 0 ]; then
+ if [ $curlResult -gt 299 ] || [ $curlResult -lt 200 ]; then
+ curlStatus=$curlResult
+ fi
+ fi
+
+ curlResult=`cat $res`
+ let retryCount++
+ done
# validate status of curl command
if [ $curlStatus -ne 0 ]; then
- echo "Failed to Send Build Start information"
+ echo "Failed to Send Build Start information after $retryCount retries"
vstsLogOutput="vso[task.logissue type=error;sourcepath=telemetry/build/start.sh;code=1;]Failed to Send Build Start information: $curlStatus"
echo "##$vstsLogOutput"
exit 1
@@ -109,8 +140,10 @@ steps:
env:
BuildUri: $(System.TaskDefinitionsUri)$(System.TeamProject)/_build/index?buildId=$(Build.BuildId)&_a=summary
Helix_JobToken: $(Helix_JobToken)
+ MaxRetries: ${{ parameters.maxRetries }}
+ RetryDelay: ${{ parameters.retryDelay }}
condition: and(always(), ne(variables['Agent.Os'], 'Windows_NT'))
-
+
- powershell: |
$jobInfo = [pscustomobject]@{
QueueId=$env:QueueId;
@@ -120,17 +153,42 @@ steps:
Attempt=$env:Attempt;
Properties=[pscustomobject]@{ operatingSystem=$env:OperatingSystem; configuration=$env:Configuration };
}
-
+
$jobInfoJson = $jobInfo | ConvertTo-Json
if ($env:HelixApiAccessToken) {
$accessTokenParameter="?access_token=$($env:HelixApiAccessToken)"
}
Write-Host "Job Info: $jobInfoJson"
- $jobToken = Invoke-RestMethod -Uri "https://helix.dot.net/api/2018-03-14/telemetry/job$($accessTokenParameter)" -Method Post -ContentType "application/json" -Body $jobInfoJson
+
+ # Basic retry loop to harden against server flakiness
+ $retryCount = 0
+ while ($retryCount -lt $env:MaxRetries) {
+ try {
+ $jobToken = Invoke-RestMethod -Uri "https://helix.dot.net/api/2018-03-14/telemetry/job$($accessTokenParameter)" -Method Post -ContentType "application/json" -Body $jobInfoJson
+ break
+ }
+ catch {
+ $statusCode = $_.Exception.Response.StatusCode.value__
+ if ($statusCode -ge 400 -and $statusCode -le 499) {
+ Write-Host "##vso[task.logissue]error Failed to send telemetry to Helix (status code $statusCode); not retrying (4xx client error)"
+ Write-Host "##vso[task.logissue]error ", $_.Exception.GetType().FullName, $_.Exception.Message
+ exit 1
+ }
+ Write-Host "Failed to send telemetry to Helix (status code $statusCode); waiting $env:RetryDelay seconds before retrying..."
+ $retryCount++
+ sleep $env:RetryDelay
+ continue
+ }
+ }
+
+ if ($retryCount -ge $env:MaxRetries) {
+ Write-Host "##vso[task.logissue]error Failed to send telemetry to Helix after $retryCount retries."
+ exit 1
+ }
+
$env:Helix_JobToken = $jobToken
Write-Host "##vso[task.setvariable variable=Helix_JobToken;issecret=true;]$env:Helix_JobToken"
- displayName: Send Windows Job Start Telemetry
env:
HelixApiAccessToken: $(HelixApiAccessToken)
Source: ${{ parameters.helixSource }}
@@ -140,15 +198,44 @@ steps:
Attempt: 1
OperatingSystem: $(Agent.Os)
Configuration: ${{ parameters.buildConfig }}
+ MaxRetries: ${{ parameters.maxRetries }}
+ RetryDelay: ${{ parameters.retryDelay }}
condition: and(always(), eq(variables['Agent.Os'], 'Windows_NT'))
+ displayName: Send Windows Job Start Telemetry
- powershell: |
- $workItemId = Invoke-RestMethod -Uri "https://helix.dot.net/api/2018-03-14/telemetry/job/build?buildUri=$([Net.WebUtility]::UrlEncode($env:BuildUri))" -Method Post -ContentType "application/json" -Body "" `
- -Headers @{ 'X-Helix-Job-Token'=$env:Helix_JobToken }
-
+ # Basic retry loop to harden against server flakiness
+ $retryCount = 0
+ while ($retryCount -lt $env:MaxRetries) {
+ try {
+ $workItemId = Invoke-RestMethod -Uri "https://helix.dot.net/api/2018-03-14/telemetry/job/build?buildUri=$([Net.WebUtility]::UrlEncode($env:BuildUri))" -Method Post -ContentType "application/json" -Body "" `
+ -Headers @{ 'X-Helix-Job-Token'=$env:Helix_JobToken }
+ break
+ }
+ catch {
+ $statusCode = $_.Exception.Response.StatusCode.value__
+ if ($statusCode -ge 400 -and $statusCode -le 499) {
+ Write-Host "##vso[task.logissue]error Failed to send telemetry to Helix (status code $statusCode); not retrying (4xx client error)"
+ Write-Host "##vso[task.logissue]error ", $_.Exception.GetType().FullName, $_.Exception.Message
+ exit 1
+ }
+ Write-Host "Failed to send telemetry to Helix (status code $statusCode); waiting $env:RetryDelay seconds before retrying..."
+ $retryCount++
+ sleep $env:RetryDelay
+ continue
+ }
+ }
+
+ if ($retryCount -ge $env:MaxRetries) {
+ Write-Host "##vso[task.logissue]error Failed to send telemetry to Helix after $retryCount retries."
+ exit 1
+ }
+
$env:Helix_WorkItemId = $workItemId
Write-Host "##vso[task.setvariable variable=Helix_WorkItemId]$env:Helix_WorkItemId"
displayName: Send Windows Build Start Telemetry
env:
BuildUri: $(System.TaskDefinitionsUri)$(System.TeamProject)/_build/index?buildId=$(Build.BuildId)&_a=summary
Helix_JobToken: $(Helix_JobToken)
+ MaxRetries: ${{ parameters.maxRetries }}
+ RetryDelay: ${{ parameters.retryDelay }}
condition: and(always(), eq(variables['Agent.Os'], 'Windows_NT'))
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index 4204dc14f89..de7523cae58 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -161,9 +161,10 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
return $installScript
}
-function InstallDotNetSdk([string] $dotnetRoot, [string] $version) {
+function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = "") {
$installScript = GetDotNetInstallScript $dotnetRoot
- & $installScript -Version $version -InstallDir $dotnetRoot
+ $archArg = if ($architecture) { $architecture } else { "" }
+ & $installScript -Version $version -InstallDir $dotnetRoot -Architecture $archArg
if ($lastExitCode -ne 0) {
Write-Host "Failed to install dotnet cli (exit code '$lastExitCode')." -ForegroundColor Red
ExitWithExitCode $lastExitCode
@@ -210,7 +211,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
$vsMajorVersion = $vsInfo.installationVersion.Split('.')[0]
InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion
- } elseif ($install) {
+ } else {
if (Get-Member -InputObject $GlobalJson.tools -Name "xcopy-msbuild") {
$xcopyMSBuildVersion = $GlobalJson.tools.'xcopy-msbuild'
@@ -220,9 +221,10 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
$xcopyMSBuildVersion = "$vsMajorVersion.$($vsMinVersion.Minor).0-alpha"
}
- $vsInstallDir = InstallXCopyMSBuild $xcopyMSBuildVersion
- } else {
- throw "Unable to find Visual Studio that has required version and components installed"
+ $vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
+ if ($vsInstallDir -eq $null) {
+ throw "Unable to find Visual Studio that has required version and components installed"
+ }
}
$msbuildVersionDir = if ([int]$vsMajorVersion -lt 16) { "$vsMajorVersion.0" } else { "Current" }
@@ -240,12 +242,20 @@ function InitializeVisualStudioEnvironmentVariables([string] $vsInstallDir, [str
}
}
-function InstallXCopyMSBuild([string] $packageVersion) {
+function InstallXCopyMSBuild([string]$packageVersion) {
+ return InitializeXCopyMSBuild $packageVersion -install $true
+}
+
+function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
$packageName = "RoslynTools.MSBuild"
$packageDir = Join-Path $ToolsDir "msbuild\$packageVersion"
$packagePath = Join-Path $packageDir "$packageName.$packageVersion.nupkg"
if (!(Test-Path $packageDir)) {
+ if (!$install) {
+ return $null
+ }
+
Create-Directory $packageDir
Write-Host "Downloading $packageName $packageVersion"
Invoke-WebRequest "https://dotnet.myget.org/F/roslyn-tools/api/v2/package/$packageName/$packageVersion/" -OutFile $packagePath
@@ -376,6 +386,11 @@ function GetNuGetPackageCachePath() {
return $env:NUGET_PACKAGES
}
+# Returns a full path to an Arcade SDK task project file.
+function GetSdkTaskProject([string]$taskName) {
+ return Join-Path (Split-Path (InitializeToolset) -Parent) "SdkTasks\$taskName.proj"
+}
+
function InitializeToolset() {
if (Test-Path variable:global:_ToolsetBuildProj) {
return $global:_ToolsetBuildProj
@@ -394,7 +409,7 @@ function InitializeToolset() {
}
if (-not $restore) {
- Write-Host "Toolset version $toolsetVersion has not been restored."
+ Write-Host "Toolset version $toolsetVersion has not been restored." -ForegroundColor Red
ExitWithExitCode 1
}
@@ -402,15 +417,15 @@ function InitializeToolset() {
$proj = Join-Path $ToolsetDir "restore.proj"
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "ToolsetRestore.binlog") } else { "" }
-
+
'' | Set-Content $proj
- MSBuild $proj $bl /t:__WriteToolsetLocation /noconsolelogger /p:__ToolsetLocationOutputFile=$toolsetLocationFile
-
+ MSBuild $proj $bl /t:__WriteToolsetLocation /clp:ErrorsOnly`;NoSummary /p:__ToolsetLocationOutputFile=$toolsetLocationFile
+
$path = Get-Content $toolsetLocationFile -TotalCount 1
if (!(Test-Path $path)) {
throw "Invalid toolset path: $path"
}
-
+
return $global:_ToolsetBuildProj = $path
}
@@ -446,7 +461,7 @@ function MSBuild() {
$buildTool = InitializeBuildTool
- $cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse"
+ $cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci"
if ($warnAsError) {
$cmdArgs += " /warnaserror /p:TreatWarningsAsErrors=true"
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
old mode 100755
new mode 100644
index 8a253bef513..ecdece1f855
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -153,7 +153,12 @@ function InstallDotNetSdk {
GetDotNetInstallScript "$root"
local install_script=$_GetDotNetInstallScript
- bash "$install_script" --version $version --install-dir "$root" || {
+ local arch_arg=""
+ if [[ $# == 3 ]]; then
+ arch_arg="--architecture $3"
+ fi
+
+ bash "$install_script" --version $version --install-dir "$root" $arch_arg || {
local exit_code=$?
echo "Failed to install dotnet SDK (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
@@ -233,11 +238,15 @@ function InitializeToolset {
ExitWithExitCode 2
fi
- local toolset_restore_log="$log_dir/ToolsetRestore.binlog"
local proj="$toolset_dir/restore.proj"
+ local bl=""
+ if [[ "$binary_log" == true ]]; then
+ bl="/bl:$log_dir/ToolsetRestore.binlog"
+ fi
+
echo '' > "$proj"
- MSBuild "$proj" /t:__WriteToolsetLocation /noconsolelogger /bl:"$toolset_restore_log" /p:__ToolsetLocationOutputFile="$toolset_location_file"
+ MSBuild "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file"
local toolset_build_proj=`cat "$toolset_location_file"`
@@ -284,7 +293,7 @@ function MSBuild {
warnaserror_switch="/warnaserror"
fi
- "$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error "$@" || {
+ "$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" || {
local exit_code=$?
echo "Build failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
diff --git a/eng/targets/NGenBinaries.targets b/eng/targets/NGenBinaries.targets
new file mode 100644
index 00000000000..6e4ad9799f6
--- /dev/null
+++ b/eng/targets/NGenBinaries.targets
@@ -0,0 +1,33 @@
+
+
+
+
+ true
+ true
+ false
+
+
+
+
+ $(windir)\Microsoft.NET\Framework64\v4.0.30319\ngen.exe
+ $(windir)\Microsoft.NET\Framework\v4.0.30319\ngen.exe
+ $(WindowsSDK_ExecutablePath_x86)sn.exe
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/eng/targets/NuGet.targets b/eng/targets/NuGet.targets
new file mode 100644
index 00000000000..c2db06b6c1a
--- /dev/null
+++ b/eng/targets/NuGet.targets
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eng/targets/Settings.props b/eng/targets/Settings.props
new file mode 100644
index 00000000000..0022b125e42
--- /dev/null
+++ b/eng/targets/Settings.props
@@ -0,0 +1,11 @@
+
+
+
+ MIT
+ Microsoft and F# Software Foundation
+ Visual F# Compiler FSharp functional programming
+ $(CopyrightMicrosoft)
+ $(ArtifactsBinDir)
+
+
+
diff --git a/fcs/Directory.Build.props b/fcs/Directory.Build.props
index 3478a48aa9a..3179fe221f9 100644
--- a/fcs/Directory.Build.props
+++ b/fcs/Directory.Build.props
@@ -1,4 +1,12 @@
+
+
+
+ $(RestoreSources);
+ https://api.nuget.org/v3/index.json;
+
+
+
$(UserProfile)\.nuget\packages\
$(HOME)/.nuget/packages/
diff --git a/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj b/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
index 4f57056e404..346edc8bddd 100644
--- a/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
+++ b/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
@@ -5,7 +5,7 @@
- net45
+ net461
true
$(DefineConstants);CROSS_PLATFORM_COMPILER
$(DefineConstants);ENABLE_MONO_SUPPORT
@@ -28,6 +28,7 @@
+
diff --git a/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj b/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
index 5bbb337e36a..932e3b87c16 100644
--- a/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
+++ b/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
@@ -2,7 +2,7 @@
- net45
+ net461
true
@@ -20,13 +20,14 @@
ProjectCrackerOptions.fs
-
-
-
+
+
+
+
diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets
index 45e62e6f25a..bd1c93e7979 100644
--- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets
+++ b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCracker.targets
@@ -1,7 +1,7 @@
-
-
+
+
diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
index 9f690c58ea1..648aacb3c21 100644
--- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
+++ b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
@@ -6,7 +6,7 @@
Exe
- net45
+ net461
true
$(DefineConstants);CROSS_PLATFORM_COMPILER
$(DefineConstants);ENABLE_MONO_SUPPORT
@@ -23,7 +23,7 @@
-
+
$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll
false
diff --git a/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj b/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj
index fc00709da42..30d3c96317f 100644
--- a/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj
+++ b/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj
@@ -1,7 +1,7 @@
- net45;netstandard2.0
+ net461;netstandard2.0
false
$(NoWarn);0067;1591
diff --git a/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj b/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
index 55696e34ffe..c6d2243856a 100644
--- a/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
+++ b/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
@@ -5,7 +5,7 @@
- net46;netcoreapp2.0
+ net461;netcoreapp2.0
true
4.1.19
$(NoWarn);44;75;
@@ -80,14 +80,15 @@
-
+
+
-
+
diff --git a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
index 897d6e1bcf6..ebd96c88b52 100644
--- a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
+++ b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
@@ -6,7 +6,7 @@
- net45;netstandard2.0
+ net461;netstandard2.0
true
$(DefineConstants);COMPILER_SERVICE_AS_DLL
$(DefineConstants);COMPILER
@@ -483,6 +483,9 @@
CodeGen/IlxGen.fs
+
+ Driver\DotNetFrameworkDependencies.fs
+
Driver/CompileOps.fsi
@@ -635,6 +638,7 @@
+
@@ -647,7 +651,7 @@
-
+
diff --git a/fcs/README.md b/fcs/README.md
index 8f86342739e..ac97222a3c6 100644
--- a/fcs/README.md
+++ b/fcs/README.md
@@ -12,12 +12,16 @@ Basically we are packaging up the compiler as a DLL and publishing it as a NuGet
There are subtle differences between FSharp.Compiler.Service and FSharp.Compiler.Private (shipped with the Visual F# Tools)
- FCS has a public API
-- FCS is built against **.NET 4.5** and **FSharp.Core 4.0.0.0** to give broader reach
+
+- FCS is built against **.NET 4.6.1** and **FSharp.Core NuGet 4.6.2** to give broader reach
+
- FCS has a NuGet package
-- FCS has a .NET Standard 1.6 version in the nuget package
+
+- FCS has a .NET Standard 2.0 version in the nuget package
+
- FCS testing also tests the "Project Cracker" (see below)
-- FCS doesn't add the System.ValueTuple.dll reference by default, see ``#if COMPILER_SERVICE_AS_DLL`` in compiler codebase
+- FCS doesn't add the System.ValueTuple.dll reference by default, see ``#if COMPILER_SERVICE_AS_DLL`` in compiler codebase
## Version Numbers
diff --git a/fcs/RELEASE_NOTES.md b/fcs/RELEASE_NOTES.md
index 67ac7bcc6b9..d925996ddfe 100644
--- a/fcs/RELEASE_NOTES.md
+++ b/fcs/RELEASE_NOTES.md
@@ -1,3 +1,6 @@
+#### 23.0.1
+ * FSharp.Compiler.Service nuget now uses net461, netstandard2.0 and FSharp.Core 4.6.2
+
#### 22.0.3
* [Add entity.DeclaringEntity](https://github.com/Microsoft/visualfsharp/pull/4633), [FCS feature request](https://github.com/fsharp/FSharp.Compiler.Service/issues/830)
@@ -10,7 +13,7 @@
#### 21.0.1
* Use new .NET SDK project files
- * FSharp.Compiler.Service nuget now uses net45 and netstandard2.0
+ * FSharp.Compiler.Service nuget now uses net461 and netstandard2.0
* FSharp.Compiler.Service netstandard2.0 now supports type providers
#### 19.0.1
diff --git a/fcs/build.fsx b/fcs/build.fsx
index 5a533714524..d1d575c4f76 100644
--- a/fcs/build.fsx
+++ b/fcs/build.fsx
@@ -31,7 +31,7 @@ let dotnetExePath =
if File.Exists(pathToCli) then
pathToCli
else
- DotNetCli.InstallDotNetSDK "2.1.504"
+ DotNetCli.InstallDotNetSDK "2.2.105"
let runDotnet workingDir args =
let result =
@@ -92,7 +92,9 @@ Target "BuildVersion" (fun _ ->
Target "Build" (fun _ ->
runDotnet __SOURCE_DIRECTORY__ "build ../src/buildtools/buildtools.proj -v n -c Proto"
- runDotnet __SOURCE_DIRECTORY__ "build FSharp.Compiler.Service.sln -v n -c release"
+ let fslexPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fslex/Proto/netcoreapp2.0/fslex.dll"
+ let fsyaccPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fsyacc/Proto/netcoreapp2.0/fsyacc.dll"
+ runDotnet __SOURCE_DIRECTORY__ (sprintf "build FSharp.Compiler.Service.sln -v n -c Release /p:FsLexPath=%s /p:FsYaccPath=%s" fslexPath fsyaccPath)
)
Target "Test" (fun _ ->
@@ -100,11 +102,12 @@ Target "Test" (fun _ ->
runDotnet __SOURCE_DIRECTORY__ "build ../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n /restore /p:DisableCompilerRedirection=true"
// Now run the tests
- runDotnet __SOURCE_DIRECTORY__ "test FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --no-restore --no-build -v n -c release"
+ let logFilePath = Path.Combine(__SOURCE_DIRECTORY__, "..", "artifacts", "TestResults", "Release", "FSharp.Compiler.Service.Test.xml")
+ runDotnet __SOURCE_DIRECTORY__ (sprintf "test FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --no-restore --no-build -v n -c Release --test-adapter-path . --logger \"nunit;LogFilePath=%s\"" logFilePath)
)
Target "NuGet" (fun _ ->
- runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service.sln -v n -c release"
+ runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service.sln -v n -c Release"
)
Target "GenerateDocsEn" (fun _ ->
diff --git a/fcs/docsrc/content/caches.fsx b/fcs/docsrc/content/caches.fsx
index b2cd9317753..a0a198896cb 100644
--- a/fcs/docsrc/content/caches.fsx
+++ b/fcs/docsrc/content/caches.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Notes on the FSharpChecker caches
=================================================
diff --git a/fcs/docsrc/content/compiler.fsx b/fcs/docsrc/content/compiler.fsx
index a934bc82094..c87f755ed35 100644
--- a/fcs/docsrc/content/compiler.fsx
+++ b/fcs/docsrc/content/compiler.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Hosted Compiler
===============
diff --git a/fcs/docsrc/content/corelib.fsx b/fcs/docsrc/content/corelib.fsx
index 61c249d2ac5..4e175e95eec 100644
--- a/fcs/docsrc/content/corelib.fsx
+++ b/fcs/docsrc/content/corelib.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Notes on FSharp.Core.dll
=================================================
diff --git a/fcs/docsrc/content/editor.fsx b/fcs/docsrc/content/editor.fsx
index 70b6abff459..b8af9d0117b 100644
--- a/fcs/docsrc/content/editor.fsx
+++ b/fcs/docsrc/content/editor.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Editor services
==================================
diff --git a/fcs/docsrc/content/filesystem.fsx b/fcs/docsrc/content/filesystem.fsx
index 6c968803bbe..6c4d973d497 100644
--- a/fcs/docsrc/content/filesystem.fsx
+++ b/fcs/docsrc/content/filesystem.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Virtualized File System
==========================================
diff --git a/fcs/docsrc/content/interactive.fsx b/fcs/docsrc/content/interactive.fsx
index 94a004b36fd..301f77f34e3 100644
--- a/fcs/docsrc/content/interactive.fsx
+++ b/fcs/docsrc/content/interactive.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Interactive Service: Embedding F# Interactive
=============================================
diff --git a/fcs/docsrc/content/ja/compiler.fsx b/fcs/docsrc/content/ja/compiler.fsx
index db49ab825d0..788c715294f 100644
--- a/fcs/docsrc/content/ja/compiler.fsx
+++ b/fcs/docsrc/content/ja/compiler.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラの組み込み
====================
diff --git a/fcs/docsrc/content/ja/corelib.fsx b/fcs/docsrc/content/ja/corelib.fsx
index fc47377cfaa..4dcd09e1154 100644
--- a/fcs/docsrc/content/ja/corelib.fsx
+++ b/fcs/docsrc/content/ja/corelib.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラサービス: FSharp.Core.dll についてのメモ
==================================================
diff --git a/fcs/docsrc/content/ja/editor.fsx b/fcs/docsrc/content/ja/editor.fsx
index 439791d3c5e..f8a33e9a75a 100644
--- a/fcs/docsrc/content/ja/editor.fsx
+++ b/fcs/docsrc/content/ja/editor.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラサービス: エディタサービス
====================================
diff --git a/fcs/docsrc/content/ja/filesystem.fsx b/fcs/docsrc/content/ja/filesystem.fsx
index 453a145ebaf..6a75cb61961 100644
--- a/fcs/docsrc/content/ja/filesystem.fsx
+++ b/fcs/docsrc/content/ja/filesystem.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラサービス: ファイルシステム仮想化
==========================================
diff --git a/fcs/docsrc/content/ja/interactive.fsx b/fcs/docsrc/content/ja/interactive.fsx
index c67b5f27464..59bae44f01b 100644
--- a/fcs/docsrc/content/ja/interactive.fsx
+++ b/fcs/docsrc/content/ja/interactive.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
インタラクティブサービス: F# Interactiveの組み込み
==================================================
diff --git a/fcs/docsrc/content/ja/project.fsx b/fcs/docsrc/content/ja/project.fsx
index 0249107d9c4..8b70e3df5f7 100644
--- a/fcs/docsrc/content/ja/project.fsx
+++ b/fcs/docsrc/content/ja/project.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラサービス: プロジェクトの分析
======================================
diff --git a/fcs/docsrc/content/ja/symbols.fsx b/fcs/docsrc/content/ja/symbols.fsx
index c4a5097394e..ff62b0de6b2 100644
--- a/fcs/docsrc/content/ja/symbols.fsx
+++ b/fcs/docsrc/content/ja/symbols.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラサービス: シンボルの処理
==================================
diff --git a/fcs/docsrc/content/ja/tokenizer.fsx b/fcs/docsrc/content/ja/tokenizer.fsx
index 405bdef14ad..4daf29b7ead 100644
--- a/fcs/docsrc/content/ja/tokenizer.fsx
+++ b/fcs/docsrc/content/ja/tokenizer.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラサービス:F#トークナイザを使用する
============================================
diff --git a/fcs/docsrc/content/ja/untypedtree.fsx b/fcs/docsrc/content/ja/untypedtree.fsx
index 54c78975025..447e3742fff 100644
--- a/fcs/docsrc/content/ja/untypedtree.fsx
+++ b/fcs/docsrc/content/ja/untypedtree.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../../artifacts/bin/fcs/net45"
+#I "../../../../artifacts/bin/fcs/net461"
(**
コンパイラサービス:型無し構文木の処理
======================================
diff --git a/fcs/docsrc/content/project.fsx b/fcs/docsrc/content/project.fsx
index fc9439e6ad7..72bf7993f4b 100644
--- a/fcs/docsrc/content/project.fsx
+++ b/fcs/docsrc/content/project.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Project Analysis
==================================
@@ -324,7 +324,7 @@ into the output folder of your application by the build process. If
you install using Paket or NuGet, then this will be configured for you
automatically. If not, you should reference the provided `.targets`
file manually in your application. This can be found in the NuGet
-package at `build/net45/FSharp.Compiler.Service.ProjectCrackerTool.targets`.
+package at `build/net461/FSharp.Compiler.Service.ProjectCrackerTool.targets`.
The reason for this split was so the analysis of an F# project
file is performed out of process, in order that the necessary assembly
diff --git a/fcs/docsrc/content/queue.fsx b/fcs/docsrc/content/queue.fsx
index 31ac1526d6c..ccc7ccabbff 100644
--- a/fcs/docsrc/content/queue.fsx
+++ b/fcs/docsrc/content/queue.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Notes on the FSharpChecker operations queue
=================================================
diff --git a/fcs/docsrc/content/react.fsx b/fcs/docsrc/content/react.fsx
index 2dfa557238d..ef5ccbf4952 100644
--- a/fcs/docsrc/content/react.fsx
+++ b/fcs/docsrc/content/react.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Reacting to Changes
============================================
@@ -19,7 +19,7 @@ referenced DLLs may change on disk, or referenced files may change.
The ``FSharpChecker`` component from FSharp.Compiler.Service does _not_ actively "listen"
to changes in the file system. However ``FSharpChecker`` _does_ repeatedly ask for
time stamps from the file system which it uses to decide if recomputation is needed.
-FCS doesn�t listen for changes directly - for example, it creates no ``FileWatcher`` object (and the
+FCS doesn't listen for changes directly - for example, it creates no ``FileWatcher`` object (and the
``IFileSystem`` API has no ability to create such objects). This is partly for legacy reasons,
and partly because some hosts forbid the creation of FileWatcher objects.
@@ -33,7 +33,7 @@ stays up-to-date when changes are observed.
If you want to more actively listen for changes, then you should add watchers for the
files specified in the ``DependencyFiles`` property of ``FSharpCheckFileResults`` and ``FSharpCheckProjectResults``.
-Here�s what you need to do:
+Here�s what you need to do:
* When your client notices an CHANGE event on a DependencyFile, it should schedule a refresh call to perform the ParseAndCheckFileInProject (or other operation) again.
This will result in fresh FileSystem calls to compute time stamps.
@@ -42,8 +42,8 @@ Here
for all active projects in which the file occurs. This will result in fresh FileSystem calls to compute time
stamps, and fresh calls to compute whether files exist.
-* Generally clients don�t listen for DELETE events on files. Although it would be logically more consistent
- to do so, in practice it�s very irritating for a "project clean" to invalidate all intellisense and
+* Generally clients don�t listen for DELETE events on files. Although it would be logically more consistent
+ to do so, in practice it�s very irritating for a "project clean" to invalidate all intellisense and
cause lots of red squiggles. Some source control tools also make a change by removing and adding files, which
is best noticed as a single change event.
diff --git a/fcs/docsrc/content/symbols.fsx b/fcs/docsrc/content/symbols.fsx
index 60eb199f990..74701e8b73d 100644
--- a/fcs/docsrc/content/symbols.fsx
+++ b/fcs/docsrc/content/symbols.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Working with symbols
============================================
diff --git a/fcs/docsrc/content/tokenizer.fsx b/fcs/docsrc/content/tokenizer.fsx
index f562c8b0574..7a46a3c91f6 100644
--- a/fcs/docsrc/content/tokenizer.fsx
+++ b/fcs/docsrc/content/tokenizer.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Using the F# tokenizer
=========================================
diff --git a/fcs/docsrc/content/typedtree.fsx b/fcs/docsrc/content/typedtree.fsx
index b5d20b4dab3..43bb55ba730 100644
--- a/fcs/docsrc/content/typedtree.fsx
+++ b/fcs/docsrc/content/typedtree.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Processing typed expression tree
=================================================
diff --git a/fcs/docsrc/content/untypedtree.fsx b/fcs/docsrc/content/untypedtree.fsx
index 4dd89a8d8a9..959e14fb944 100644
--- a/fcs/docsrc/content/untypedtree.fsx
+++ b/fcs/docsrc/content/untypedtree.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../../artifacts/bin/fcs/net45"
+#I "../../../artifacts/bin/fcs/net461"
(**
Compiler Services: Processing untyped syntax tree
=================================================
diff --git a/fcs/docsrc/tools/generate.fsx b/fcs/docsrc/tools/generate.fsx
index 000f25f6a47..3ef4b0a1bde 100644
--- a/fcs/docsrc/tools/generate.fsx
+++ b/fcs/docsrc/tools/generate.fsx
@@ -32,7 +32,7 @@ open FSharp.MetadataFormat
let root = "."
// Paths with template/source/output locations
-let bin = __SOURCE_DIRECTORY__ @@ "../../../release/fcs/net45"
+let bin = __SOURCE_DIRECTORY__ @@ "../../../release/fcs/net461"
let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../../../docs"
let files = __SOURCE_DIRECTORY__ @@ "../files"
diff --git a/fcs/docsrc/tools/generate.ja.fsx b/fcs/docsrc/tools/generate.ja.fsx
index feaeb592d35..bf9f77ce99e 100644
--- a/fcs/docsrc/tools/generate.ja.fsx
+++ b/fcs/docsrc/tools/generate.ja.fsx
@@ -18,9 +18,9 @@ let info =
// For typical project, no changes are needed below
// --------------------------------------------------------------------------------------
-#I "../../packages/FSharpVSPowerTools.Core/lib/net45"
+#I "../../packages/FSharpVSPowerTools.Core/lib/net461"
#I "../../packages/FSharp.Formatting/lib/net40"
-#I "../../packages/FSharp.Compiler.Service/lib/net45"
+#I "../../packages/FSharp.Compiler.Service/lib/net461"
#I "../../packages/FAKE/tools"
#r "FSharpVSPowerTools.Core.dll"
#r "System.Web.Razor.dll"
@@ -41,7 +41,7 @@ open FSharp.MetadataFormat
let root = "."
// Paths with template/source/output locations
-let bin = __SOURCE_DIRECTORY__ @@ "../../../release/fcs/net45"
+let bin = __SOURCE_DIRECTORY__ @@ "../../../release/fcs/net461"
let content = __SOURCE_DIRECTORY__ @@ "../content/ja"
let outputJa = __SOURCE_DIRECTORY__ @@ "../../../docs/ja"
let files = __SOURCE_DIRECTORY__ @@ "../files"
diff --git a/fcs/paket.dependencies b/fcs/paket.dependencies
index ccaead9f031..284a402166f 100644
--- a/fcs/paket.dependencies
+++ b/fcs/paket.dependencies
@@ -1,6 +1,6 @@
-framework: net45, net46
+framework: net461
source https://www.nuget.org/api/v2/
-nuget FAKE
+nuget FAKE 4.64.6
nuget FSharp.Formatting
diff --git a/fcs/paket.lock b/fcs/paket.lock
index 1ead25b452a..908c7de8d1f 100644
--- a/fcs/paket.lock
+++ b/fcs/paket.lock
@@ -1,4 +1,4 @@
-RESTRICTION: || (== net45) (== net46)
+RESTRICTION: == net461
NUGET
remote: https://www.nuget.org/api/v2
FAKE (4.64.6)
diff --git a/fcs/samples/EditorService/EditorService.fsproj b/fcs/samples/EditorService/EditorService.fsproj
index b8bc0bd72cb..4f86815c922 100644
--- a/fcs/samples/EditorService/EditorService.fsproj
+++ b/fcs/samples/EditorService/EditorService.fsproj
@@ -2,7 +2,7 @@
- net46;netcoreapp2.0
+ net461;netcoreapp2.0
true
Exe
false
@@ -12,12 +12,13 @@
+
-
+
diff --git a/fcs/samples/FscExe/FscExe.fsproj b/fcs/samples/FscExe/FscExe.fsproj
index a55de16348f..4a4dcc02e0d 100644
--- a/fcs/samples/FscExe/FscExe.fsproj
+++ b/fcs/samples/FscExe/FscExe.fsproj
@@ -2,7 +2,7 @@
- net46
+ net461
true
Exe
false
@@ -14,11 +14,12 @@
+
-
+
diff --git a/fcs/samples/FsiExe/FsiExe.fsproj b/fcs/samples/FsiExe/FsiExe.fsproj
index f015a84b003..526d71589c8 100644
--- a/fcs/samples/FsiExe/FsiExe.fsproj
+++ b/fcs/samples/FsiExe/FsiExe.fsproj
@@ -2,7 +2,7 @@
- net46
+ net461
true
Exe
false
@@ -16,11 +16,12 @@
+
-
+
diff --git a/fcs/samples/InteractiveService/InteractiveService.fsproj b/fcs/samples/InteractiveService/InteractiveService.fsproj
index 12931c823c2..36ada2d3db2 100644
--- a/fcs/samples/InteractiveService/InteractiveService.fsproj
+++ b/fcs/samples/InteractiveService/InteractiveService.fsproj
@@ -2,7 +2,7 @@
- net46
+ net461
true
Exe
false
@@ -12,11 +12,12 @@
+
-
+
diff --git a/fcs/samples/Tokenizer/Tokenizer.fsproj b/fcs/samples/Tokenizer/Tokenizer.fsproj
index 12931c823c2..36ada2d3db2 100644
--- a/fcs/samples/Tokenizer/Tokenizer.fsproj
+++ b/fcs/samples/Tokenizer/Tokenizer.fsproj
@@ -2,7 +2,7 @@
- net46
+ net461
true
Exe
false
@@ -12,11 +12,12 @@
+
-
+
diff --git a/fcs/samples/UntypedTree/UntypedTree.fsproj b/fcs/samples/UntypedTree/UntypedTree.fsproj
index 86a1e39baf7..60879414172 100644
--- a/fcs/samples/UntypedTree/UntypedTree.fsproj
+++ b/fcs/samples/UntypedTree/UntypedTree.fsproj
@@ -2,7 +2,7 @@
- net46
+ net461
true
Exe
false
@@ -12,11 +12,12 @@
+
-
+
diff --git a/fsharp.proj b/fsharp.proj
deleted file mode 100644
index beb3636f950..00000000000
--- a/fsharp.proj
+++ /dev/null
@@ -1,178 +0,0 @@
-
-
-
- Debug
- AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}
-
-
-
-
- true
- false
- false
- false
- false
-
- false
- false
- false
- false
- false
-
-
-
-
- true
- true
- true
- true
- true
- true
-
- true
- true
- true
- true
- true
- true
- true
- true
-
-
-
-
- true
- true
-
-
-
-
-
-
-
- TargetFramework=netstandard1.6
- TargetFramework=net45
-
-
- TargetFramework=netstandard2.0
- TargetFramework=net472
-
-
- TargetFramework=netstandard2.0
- TargetFramework=net472
-
-
- TargetFramework=net472
-
-
- TargetFramework=netstandard2.0
- TargetFramework=net472
-
-
- TargetFramework=netcoreapp2.1
- TargetFramework=net472
-
-
- TargetFramework=netcoreapp2.1
- TargetFramework=net472
-
-
- TargetFramework=net472
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_RunningRestore>true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/global.json b/global.json
index ac6900880b3..3345384598f 100644
--- a/global.json
+++ b/global.json
@@ -1,9 +1,16 @@
{
- "tools": {
- "dotnet": "2.1.500"
- },
- "msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19069.2",
- "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
+ "tools": {
+ "dotnet": "2.1.504",
+ "vs": {
+ "version": "16.0",
+ "components": [
+ "Microsoft.Net.Core.Component.SDK.2.1",
+ "Microsoft.VisualStudio.Component.FSharp"
+ ]
}
+ },
+ "msbuild-sdks": {
+ "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19171.3",
+ "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
+ }
}
diff --git a/packages.config b/packages.config
deleted file mode 100644
index 709d225851d..00000000000
--- a/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/proto.proj b/proto.proj
index 443d7015fb5..84103f6fdf8 100644
--- a/proto.proj
+++ b/proto.proj
@@ -6,7 +6,6 @@
-
TargetFramework=net472
TargetFramework=netcoreapp2.1
@@ -15,6 +14,10 @@
TargetFramework=net472
TargetFramework=netcoreapp2.1
+
+ TargetFramework=net472
+ TargetFramework=netcoreapp2.1
+
diff --git a/restore.sh b/restore.sh
new file mode 100755
index 00000000000..58a2abb50f7
--- /dev/null
+++ b/restore.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+source="${BASH_SOURCE[0]}"
+
+# resolve $SOURCE until the file is no longer a symlink
+while [[ -h $source ]]; do
+ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+ source="$(readlink "$source")"
+
+ # if $source was a relative symlink, we need to resolve it relative to the path where the
+ # symlink file was located
+ [[ $source != /* ]] && source="$scriptroot/$source"
+done
+
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+"$scriptroot/eng/build.sh" --restore $@
diff --git a/scripts/AssemblyVersionCheck.fsx b/scripts/AssemblyVersionCheck.fsx
new file mode 100644
index 00000000000..0f3816a2e6c
--- /dev/null
+++ b/scripts/AssemblyVersionCheck.fsx
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
+
+open System
+open System.Diagnostics
+open System.IO
+open System.Reflection
+open System.Text.RegularExpressions
+
+module AssemblyVersionCheck =
+
+ let private versionZero = Version(0, 0, 0, 0)
+ let private versionOne = Version(1, 0, 0, 0)
+ let private commitHashPattern = new Regex(@"Commit Hash: ()|([0-9a-fA-F]{40})", RegexOptions.Compiled)
+ let private devVersionPattern = new Regex(@"-(ci|dev)", RegexOptions.Compiled)
+
+ let verifyAssemblyVersions (binariesPath:string) =
+ let excludedAssemblies =
+ [ "FSharp.Data.TypeProviders.dll" ]
+ |> Set.ofList
+ let fsharpAssemblies =
+ [ "FSharp*.dll"
+ "fsc.exe"
+ "fsc.dll"
+ "fsi*.exe"
+ "fsi*.dll" ]
+ |> List.map (fun p -> Directory.EnumerateFiles(binariesPath, p, SearchOption.AllDirectories))
+ |> Seq.concat
+ |> List.ofSeq
+ |> List.filter (fun p -> (Set.contains (Path.GetFileName(p)) excludedAssemblies) |> not)
+
+ // verify that all assemblies have a version number other than 0.0.0.0 or 1.0.0.0
+ let failedVersionCheck =
+ fsharpAssemblies
+ |> List.filter (fun a ->
+ let assemblyVersion = AssemblyName.GetAssemblyName(a).Version
+ assemblyVersion = versionZero || assemblyVersion = versionOne)
+ if failedVersionCheck.Length > 0 then
+ printfn "The following assemblies had a version of %A or %A" versionZero versionOne
+ printfn "%s\r\n" <| String.Join("\r\n", failedVersionCheck)
+ else
+ printfn "All shipping assemblies had an appropriate version number."
+
+ // verify that all assemblies have a commit hash
+ let failedCommitHash =
+ fsharpAssemblies
+ |> List.filter (fun a ->
+ let fileProductVersion = FileVersionInfo.GetVersionInfo(a).ProductVersion
+ not (commitHashPattern.IsMatch(fileProductVersion) || devVersionPattern.IsMatch(fileProductVersion)))
+ if failedCommitHash.Length > 0 then
+ printfn "The following assemblies don't have a commit hash set"
+ printfn "%s\r\n" <| String.Join("\r\n", failedCommitHash)
+ else
+ printfn "All shipping assemblies had an appropriate commit hash."
+
+ // return code is the number of failures
+ failedVersionCheck.Length + failedCommitHash.Length
+
+let main (argv:string array) =
+ if argv.Length <> 1 then
+ printfn "Usage: fsi.exe AssemblyVersionCheck.fsx -- path/to/binaries"
+ 1
+ else
+ AssemblyVersionCheck.verifyAssemblyVersions argv.[0]
+
+Environment.GetCommandLineArgs()
+|> Seq.skipWhile ((<>) "--")
+|> Seq.skip 1
+|> Array.ofSeq
+|> main
diff --git a/src/scripts/VerifyAllTranslations.fsx b/scripts/VerifyAllTranslations.fsx
similarity index 91%
rename from src/scripts/VerifyAllTranslations.fsx
rename to scripts/VerifyAllTranslations.fsx
index 24e2d4eebb3..5c19dd08154 100644
--- a/src/scripts/VerifyAllTranslations.fsx
+++ b/scripts/VerifyAllTranslations.fsx
@@ -28,7 +28,6 @@ let hasUntranslatedStrings (xlfFile:string) =
let filesWithMissingTranslations =
Directory.EnumerateFiles(baseDirectory, "*.xlf", SearchOption.AllDirectories)
- |> Seq.filter (fun (file:string) -> file.EndsWith(".en.xlf") |> not) // the english baseline files are never translated
|> Seq.filter hasUntranslatedStrings
|> Seq.toList
diff --git a/init-tools.cmd b/scripts/init-tools.cmd
similarity index 91%
rename from init-tools.cmd
rename to scripts/init-tools.cmd
index cbdeb27afef..3b17a835b9e 100644
--- a/init-tools.cmd
+++ b/scripts/init-tools.cmd
@@ -1,8 +1,8 @@
@echo off
setlocal enabledelayedexpansion
-set /p DOTNET_TOOLS_VERSION=<"%~dp0DotnetCLIToolsVersion.txt"
-set DOTNET_TOOLS_PATH=%~dp0artifacts\toolset\dotnet
+set /p DOTNET_TOOLS_VERSION=<"%~dp0..\DotnetCLIToolsVersion.txt"
+set DOTNET_TOOLS_PATH=%~dp0..\artifacts\toolset\dotnet
set dotnetexe=%DOTNET_TOOLS_PATH%\dotnet.exe
set sdksentinel=%DOTNET_TOOLS_PATH%\sdk-version.txt
diff --git a/init-tools.sh b/scripts/init-tools.sh
old mode 100755
new mode 100644
similarity index 98%
rename from init-tools.sh
rename to scripts/init-tools.sh
index 9d5a2e2f8c6..67067dd4867
--- a/init-tools.sh
+++ b/scripts/init-tools.sh
@@ -7,10 +7,10 @@ __TOOLRUNTIME_DIR=$__scriptpath/Tools
__DOTNET_PATH=$__TOOLRUNTIME_DIR/dotnetcli
__DOTNET_CMD=$__DOTNET_PATH/dotnet
-__DOTNET_VERSION=$(cat $__scriptpath/DotnetCLIVersion.txt)
+__DOTNET_VERSION=$(cat $__scriptpath/../DotnetCLIVersion.txt)
if [ -z "$__BUILDTOOLS_SOURCE" ]; then __BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json; fi
-__BUILD_TOOLS_PACKAGE_VERSION=$(cat $__scriptpath/BuildToolsVersion.txt)
+__BUILD_TOOLS_PACKAGE_VERSION=$(cat $__scriptpath/../BuildToolsVersion.txt)
__BUILD_TOOLS_PATH=$__PACKAGES_DIR/microsoft.dotnet.buildtools/$__BUILD_TOOLS_PACKAGE_VERSION/lib
diff --git a/scripts/verify-translations.cmd b/scripts/verify-translations.cmd
new file mode 100644
index 00000000000..b61d9533b07
--- /dev/null
+++ b/scripts/verify-translations.cmd
@@ -0,0 +1,3 @@
+@echo off
+
+%~dp0..\artifacts\bin\fsi\Release\net472\fsi.exe %~dp0VerifyAllTranslations.fsx -- %~dp0
diff --git a/setup/Directory.Build.props b/setup/Directory.Build.props
index bd233e75785..a3d9a484d65 100644
--- a/setup/Directory.Build.props
+++ b/setup/Directory.Build.props
@@ -1,7 +1,6 @@
-
-
+
true
@@ -13,9 +12,6 @@
$(ArtifactsDir)\VSSetup.obj\$(Configuration)\$(MSBuildProjectName)
$(SetupRootFolder)..\artifacts\VSSetup\$(Configuration)
$(SetupRootFolder)..\artifacts\VSSetup\$(Configuration)\Insertion
-
-
- $(VSMajorVersion).$(VSMinorVersion).$(BUILD_BUILDNUMBER)
diff --git a/setup/Directory.Build.targets b/setup/Directory.Build.targets
deleted file mode 100644
index ccd47cc0a9a..00000000000
--- a/setup/Directory.Build.targets
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/setup/Localization.props b/setup/Localization.props
deleted file mode 100644
index 37c13afcd2c..00000000000
--- a/setup/Localization.props
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
- ENU
- 1033
- 9
- en
- en-US
- false
-
-
- CHT
- 1028
- 31748
- zh-Hant
- zh-TW
- true
-
-
- CSY
- 1029
- 5
- cs
- cs-CZ
- true
-
-
- DEU
- 1031
- 7
- de
- de-DE
- true
-
-
- FRA
- 1036
- 12
- fr
- fr-FR
- true
-
-
- ITA
- 1040
- 16
- it
- it-IT
- true
-
-
- JPN
- 1041
- 17
- ja
- ja-JP
- true
-
-
- KOR
- 1042
- 18
- ko
- ko-KR
- true
-
-
- PLK
- 1045
- 21
- pl
- pl-PL
- true
-
-
- PTB
- 1046
- 1046
- pt-BR
- pt-BR
- true
-
-
- RUS
- 1049
- 25
- ru
- ru-RU
- true
-
-
- TRK
- 1055
- 31
- tr
- tr-TR
- true
-
-
- CHS
- 2052
- 4
- zh-Hans
- zh-CN
- true
-
-
- ESN
- 3082
- 10
- es
- es-ES
- true
-
-
-
-
diff --git a/setup/Swix/Directory.Build.props b/setup/Swix/Directory.Build.props
index f64df1d29de..772bd04080a 100644
--- a/setup/Swix/Directory.Build.props
+++ b/setup/Swix/Directory.Build.props
@@ -1,9 +1,9 @@
+
-
- Debug
+ Microsoft.FSharp
neutral
false
vsix
diff --git a/setup/Swix/Directory.Build.targets b/setup/Swix/Directory.Build.targets
index 974c6da4f1b..ca0fe04d03a 100644
--- a/setup/Swix/Directory.Build.targets
+++ b/setup/Swix/Directory.Build.targets
@@ -1,10 +1,22 @@
+
+
$(ArtifactsDir)\VSSetup\$(Configuration)\Insertion\$(OutputName).vsix
-
-
+
+
+ false
+
+
+
+
+
+
+
+
+
diff --git a/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj
new file mode 100644
index 00000000000..c0b0eff808e
--- /dev/null
+++ b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj
@@ -0,0 +1,129 @@
+
+
+
+ net472
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_Line>
+
+
+
+
+ <_BuiltSwrLines Include="$(_Line)" />
+
+
+
+
+
+ <_SwrFilePath>$(IntermediateOutputPath)Microsoft.FSharp.Compiler.swr
+
+
+
+
+
+
+ <_Lines>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/setup/Swix/Microsoft.FSharp.Compiler.Resources/Empty.swr b/setup/Swix/Microsoft.FSharp.Compiler.Resources/Empty.swr
deleted file mode 100644
index 32da88c9291..00000000000
--- a/setup/Swix/Microsoft.FSharp.Compiler.Resources/Empty.swr
+++ /dev/null
@@ -1,5 +0,0 @@
-use vs
-
-package name=Microsoft.FSharp.Compiler.Resources
- version=$(FSharpPackageVersion)
- vs.package.language=$(LocaleSpecificCulture)
diff --git a/setup/Swix/Microsoft.FSharp.Compiler.Resources/Files.swr b/setup/Swix/Microsoft.FSharp.Compiler.Resources/Files.swr
deleted file mode 100644
index 9fed4387c96..00000000000
--- a/setup/Swix/Microsoft.FSharp.Compiler.Resources/Files.swr
+++ /dev/null
@@ -1,11 +0,0 @@
-use vs
-
-package name=Microsoft.FSharp.Compiler.Resources
- version=$(FSharpPackageVersion)
- vs.package.language=$(LocaleSpecificCulture)
-
-folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharpCompiler\$(LocaleParentCulture)"
- file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\net472\$(LocaleParentCulture)\FSharp.Build.resources.dll"
- file source="$(BinariesFolder)\FSharp.Compiler.Interactive.Settings\$(Configuration)\net472\$(LocaleParentCulture)\FSharp.Compiler.Interactive.Settings.resources.dll"
- file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\net472\$(LocaleParentCulture)\FSharp.Compiler.Private.resources.dll"
- file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\$(LocaleParentCulture)\FSharp.Core.resources.dll"
diff --git a/setup/Swix/Microsoft.FSharp.Compiler.Resources/Microsoft.FSharp.Compiler.Resources.swixproj b/setup/Swix/Microsoft.FSharp.Compiler.Resources/Microsoft.FSharp.Compiler.Resources.swixproj
deleted file mode 100644
index ac8e74d4854..00000000000
--- a/setup/Swix/Microsoft.FSharp.Compiler.Resources/Microsoft.FSharp.Compiler.Resources.swixproj
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
- Microsoft.FSharp.Compiler.Resources.$(LocaleCode)
-
-
-
- $(PackagePreprocessorDefinitions);BinariesFolder=$(BinariesFolder)
- $(PackagePreprocessorDefinitions);Configuration=$(Configuration)
- $(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion)
- $(PackagePreprocessorDefinitions);LocaleParentCulture=$(LocaleParentCulture)
- $(PackagePreprocessorDefinitions);LocaleSpecificCulture=$(LocaleSpecificCulture)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/setup/Swix/Microsoft.FSharp.Compiler/Dependencies.swr b/setup/Swix/Microsoft.FSharp.Compiler/Dependencies.swr
deleted file mode 100644
index c5dcc628603..00000000000
--- a/setup/Swix/Microsoft.FSharp.Compiler/Dependencies.swr
+++ /dev/null
@@ -1,9 +0,0 @@
-use vs
-
-package name=Microsoft.FSharp.Compiler
- version=$(FSharpPackageVersion)
-
-vs.dependencies
- vs.dependency id=Microsoft.FSharp.Dependencies
- version=$(FSharpPackageVersion)
- type=Required
diff --git a/setup/Swix/Microsoft.FSharp.Compiler/Files.swr b/setup/Swix/Microsoft.FSharp.Compiler/Files.swr
deleted file mode 100644
index f378338eef8..00000000000
--- a/setup/Swix/Microsoft.FSharp.Compiler/Files.swr
+++ /dev/null
@@ -1,38 +0,0 @@
-use vs
-
-package name=Microsoft.FSharp.Compiler
- version=$(FSharpPackageVersion)
-
-folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp"
-
- file source=$(BinariesFolder)\fsc\$(Configuration)\net472\fsc.exe vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe"
- file source="$(BinariesFolder)\fsc\$(Configuration)\net472\fsc.exe.config"
-
- file source=$(BinariesFolder)\fsi\$(Configuration)\net472\fsi.exe vs.file.ngen=yes vs.file.ngenArchitecture=X86 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsi.exe"
- file source="$(BinariesFolder)\fsi\$(Configuration)\net472\fsi.exe.config"
-
- file source="$(BinariesFolder)\fsiAnyCpu\$(Configuration)\net472\fsiAnyCpu.exe" vs.file.ngen=yes vs.file.ngenArchitecture=X64 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsiAnyCpu.exe"
- file source="$(BinariesFolder)\fsiAnyCpu\$(Configuration)\net472\fsiAnyCpu.exe.config"
-
- file source="$(BinariesFolder)\FSharp.Compiler.Interactive.Settings\$(Configuration)\net472\FSharp.Compiler.Interactive.Settings.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
- file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\net472\FSharp.Compiler.Private.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
- file source="$(BinariesFolder)\FSharp.Compiler.Server.Shared\$(Configuration)\net472\FSharp.Compiler.Server.Shared.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
-
- file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
- file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.optdata"
- file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.sigdata"
-
- file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\net472\FSharp.Build.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
-
- file source="$(PackagesFolder)\Microsoft.VisualFSharp.Type.Providers.Redist\$(MicrosoftVisualFSharpTypeProvidersRedistPackageVersion)\content\4.3.0.0\FSharp.Data.TypeProviders.dll"
- file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\net472\Microsoft.Build.dll"
- file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\net472\Microsoft.Build.Framework.dll"
- file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\net472\Microsoft.Build.Tasks.Core.dll"
- file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\net472\Microsoft.Build.Utilities.Core.dll"
- file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\net472\Microsoft.Portable.FSharp.Targets"
- file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\net472\System.Collections.Immutable.dll"
- file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\net472\System.Reflection.Metadata.dll"
- file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\net472\Microsoft.FSharp.NetSdk.props"
- file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\net472\Microsoft.FSharp.NetSdk.targets"
- file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\net472\Microsoft.FSharp.Overrides.NetSdk.targets"
- file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\net472\Microsoft.FSharp.Targets"
diff --git a/setup/Swix/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.swixproj b/setup/Swix/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.swixproj
deleted file mode 100644
index f256dd46779..00000000000
--- a/setup/Swix/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.swixproj
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
- Microsoft.FSharp.Compiler
-
-
-
- $(PackagePreprocessorDefinitions);BinariesFolder=$(BinariesFolder)
- $(PackagePreprocessorDefinitions);Configuration=$(Configuration)
- $(PackagePreprocessorDefinitions);PackagesFolder=$(NuGetPackageRoot)
- $(PackagePreprocessorDefinitions);FSharpTreeRoot=$(FSharpTreeRoot)
- $(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion)
- $(PackagePreprocessorDefinitions);MicrosoftVisualFSharpTypeProvidersRedistPackageVersion=$(MicrosoftVisualFSharpTypeProvidersRedistPackageVersion)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/setup/Swix/Microsoft.FSharp.Dependencies/Dependencies.swr b/setup/Swix/Microsoft.FSharp.Dependencies/Dependencies.swr
index 97fadaec582..82f9caaec1f 100644
--- a/setup/Swix/Microsoft.FSharp.Dependencies/Dependencies.swr
+++ b/setup/Swix/Microsoft.FSharp.Dependencies/Dependencies.swr
@@ -1,9 +1,9 @@
use vs
package name=Microsoft.FSharp.Dependencies
- version=$(FSharpPackageVersion)
+ version=$(VsixVersion)
vs.dependencies
vs.dependency id=Microsoft.FSharp.SDK
- version=$(FSharpPackageVersion)
+ version=$(VsixVersion)
type=Required
diff --git a/setup/Swix/Microsoft.FSharp.Dependencies/Files.swr b/setup/Swix/Microsoft.FSharp.Dependencies/Files.swr
index f927497e193..9b2836fd190 100644
--- a/setup/Swix/Microsoft.FSharp.Dependencies/Files.swr
+++ b/setup/Swix/Microsoft.FSharp.Dependencies/Files.swr
@@ -1,7 +1,7 @@
use vs
package name=Microsoft.FSharp.Dependencies
- version=$(FSharpPackageVersion)
+ version=$(VsixVersion)
folder "InstallDir:MSBuild\Microsoft\VisualStudio\v$(VSGeneralVersion)\FSharp"
file "Microsoft.FSharp.targets" source="$(SetupShimsDir)\Microsoft.FSharp.Shim.targets"
@@ -11,4 +11,4 @@ folder "InstallDir:MSBuild\Microsoft\VisualStudio\v$(VSGeneralVersion)\FSharp"
file "Microsoft.FSharp.NetSdk.props" source="$(SetupShimsDir)\Microsoft.FSharp.NetSdk.Shim.props"
folder "InstallDir:Common7\Tools\VsDevCmd\Ext"
- file source="fsharp.bat"
+ file source="$(ProjectDir)\fsharp.bat"
diff --git a/setup/Swix/Microsoft.FSharp.Dependencies/Microsoft.FSharp.Dependencies.csproj b/setup/Swix/Microsoft.FSharp.Dependencies/Microsoft.FSharp.Dependencies.csproj
new file mode 100644
index 00000000000..268f1d84dea
--- /dev/null
+++ b/setup/Swix/Microsoft.FSharp.Dependencies/Microsoft.FSharp.Dependencies.csproj
@@ -0,0 +1,19 @@
+
+
+
+ net472
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/setup/Swix/Microsoft.FSharp.Dependencies/Microsoft.FSharp.Dependencies.swixproj b/setup/Swix/Microsoft.FSharp.Dependencies/Microsoft.FSharp.Dependencies.swixproj
deleted file mode 100644
index e30eaaf0fe1..00000000000
--- a/setup/Swix/Microsoft.FSharp.Dependencies/Microsoft.FSharp.Dependencies.swixproj
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
- Microsoft.FSharp.Dependencies
-
-
-
- $(PackagePreprocessorDefinitions);BinariesFolder=$(BinariesFolder)
- $(PackagePreprocessorDefinitions);Configuration=$(Configuration)
- $(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion)
- $(PackagePreprocessorDefinitions);SetupShimsDir=$(MSBuildThisFileDirectory)..\..\shims
- $(PackagePreprocessorDefinitions);TargetFramework=$(TargetFramework)
- $(PackagePreprocessorDefinitions);VSGeneralVersion=$(VSGeneralVersion)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/setup/Swix/Microsoft.FSharp.IDE/Dependencies.swr b/setup/Swix/Microsoft.FSharp.IDE/Dependencies.swr
index 875b8af13f6..9ed63a9ff0c 100644
--- a/setup/Swix/Microsoft.FSharp.IDE/Dependencies.swr
+++ b/setup/Swix/Microsoft.FSharp.IDE/Dependencies.swr
@@ -1,19 +1,19 @@
use vs
package name=Microsoft.FSharp.IDE
- version=$(FSharpPackageVersion)
+ version=$(VsixVersion)
vs.dependencies
vs.dependency id=Microsoft.FSharp.Dependencies
- version=$(FSharpPackageVersion)
+ version=$(VsixVersion)
type=Required
vs.dependency id=Microsoft.FSharp.VSIX.Full.Core
- version=$(FSharpPackageVersion)
+ version=$(VsixVersion)
type=Required
when=Microsoft.VisualStudio.Product.Enterprise,Microsoft.VisualStudio.Product.Professional,Microsoft.VisualStudio.Product.Community
vs.dependency id=Microsoft.FSharp.VSIX.Full.Resources
- version=$(FSharpPackageVersion)
+ version=$(VsixVersion)
type=Required
when=Microsoft.VisualStudio.Product.Enterprise,Microsoft.VisualStudio.Product.Professional,Microsoft.VisualStudio.Product.Community
diff --git a/setup/Swix/Microsoft.FSharp.IDE/Files.swr b/setup/Swix/Microsoft.FSharp.IDE/Files.swr
index 2e0ee2bcf3b..79257b19395 100644
--- a/setup/Swix/Microsoft.FSharp.IDE/Files.swr
+++ b/setup/Swix/Microsoft.FSharp.IDE/Files.swr
@@ -1,7 +1,7 @@
use vs
package name=Microsoft.FSharp.IDE
- version=$(FSharpPackageVersion)
+ version=$(VsixVersion)
folder "InstallDir:Common7\IDE\NewScriptItems"
file source="$(SetupResourcesDir)\NewFileDialog\Script\NewFSharpScriptItems.vsdir"
diff --git a/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.csproj b/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.csproj
new file mode 100644
index 00000000000..e7226c491eb
--- /dev/null
+++ b/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.csproj
@@ -0,0 +1,17 @@
+
+
+
+ net472
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.swixproj b/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.swixproj
deleted file mode 100644
index 223a7262fcb..00000000000
--- a/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.swixproj
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
- Microsoft.FSharp.IDE
-
-
-
- $(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion)
- $(PackagePreprocessorDefinitions);SetupResourcesDir=$(MSBuildThisFileDirectory)..\..\resources
- $(PackagePreprocessorDefinitions);TargetFramework=$(TargetFramework)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/setup/Swix/Microsoft.FSharp.SDK/Files.swr b/setup/Swix/Microsoft.FSharp.SDK/Files.swr
index cffd90ed366..38ac95d4ec8 100644
--- a/setup/Swix/Microsoft.FSharp.SDK/Files.swr
+++ b/setup/Swix/Microsoft.FSharp.SDK/Files.swr
@@ -1,7 +1,7 @@
use vs
package name=Microsoft.FSharp.SDK
- version=$(FSharpPackageVersion)
+ version=$(VsixVersion)
folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharpSdk"
diff --git a/setup/Swix/Microsoft.FSharp.SDK/Microsoft.FSharp.SDK.csproj b/setup/Swix/Microsoft.FSharp.SDK/Microsoft.FSharp.SDK.csproj
new file mode 100644
index 00000000000..190a403755d
--- /dev/null
+++ b/setup/Swix/Microsoft.FSharp.SDK/Microsoft.FSharp.SDK.csproj
@@ -0,0 +1,23 @@
+
+
+
+ net472
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/setup/Swix/Microsoft.FSharp.SDK/Microsoft.FSharp.SDK.swixproj b/setup/Swix/Microsoft.FSharp.SDK/Microsoft.FSharp.SDK.swixproj
deleted file mode 100644
index aac26eaaa0d..00000000000
--- a/setup/Swix/Microsoft.FSharp.SDK/Microsoft.FSharp.SDK.swixproj
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
- Microsoft.FSharp.SDK
-
-
-
- $(PackagePreprocessorDefinitions);PackagesFolder=$(NuGetPackageRoot)
- $(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion)
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/setup/Swix/Microsoft.FSharp.Vsix.Resources/Empty.swr b/setup/Swix/Microsoft.FSharp.Vsix.Resources/Empty.swr
deleted file mode 100644
index dd1ca136dac..00000000000
--- a/setup/Swix/Microsoft.FSharp.Vsix.Resources/Empty.swr
+++ /dev/null
@@ -1,6 +0,0 @@
-use vs
-
-package name=Microsoft.FSharp.VSIX.Full.Resources
- version=$(FSharpPackageVersion)
- vs.package.language=$(LocaleSpecificCulture)
- vs.package.installSize=1
diff --git a/setup/Swix/Microsoft.FSharp.Vsix.Resources/Files.swr b/setup/Swix/Microsoft.FSharp.Vsix.Resources/Files.swr
deleted file mode 100644
index 61dddfcf048..00000000000
--- a/setup/Swix/Microsoft.FSharp.Vsix.Resources/Files.swr
+++ /dev/null
@@ -1,20 +0,0 @@
-use vs
-
-package name=Microsoft.FSharp.VSIX.Full.Resources
- version=$(FSharpPackageVersion)
- vs.package.language=$(LocaleSpecificCulture)
-
-folder "InstallDir:Common7\IDE\PublicAssemblies\$(LocaleParentCulture)"
- file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\$(LocaleParentCulture)\FSharp.Core.resources.dll" vs.file.ngen=yes
-
-folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp\$(LocaleParentCulture)"
- file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\net472\$(LocaleParentCulture)\FSharp.Compiler.Private.resources.dll" vs.file.ngen=yes
- file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\$(LocaleParentCulture)\FSharp.Core.resources.dll" vs.file.ngen=yes
- file source="$(BinariesFolder)\FSharp.Editor\$(Configuration)\net472\$(LocaleParentCulture)\FSharp.Editor.resources.dll" vs.file.ngen=yes
- file source="$(BinariesFolder)\FSharp.LanguageService.Base\$(Configuration)\net472\$(LocaleParentCulture)\FSharp.LanguageService.Base.resources.dll" vs.file.ngen=yes
- file source="$(BinariesFolder)\FSharp.LanguageService\$(Configuration)\net472\$(LocaleParentCulture)\FSharp.LanguageService.resources.dll" vs.file.ngen=yes
- file source="$(BinariesFolder)\ProjectSystem.Base\$(Configuration)\net472\$(LocaleParentCulture)\FSharp.ProjectSystem.Base.resources.dll" vs.file.ngen=yes
- file source="$(BinariesFolder)\ProjectSystem\$(Configuration)\net472\$(LocaleParentCulture)\FSharp.ProjectSystem.FSharp.resources.dll" vs.file.ngen=yes
- file source="$(BinariesFolder)\FSharp.PropertiesPages\$(Configuration)\net472\$(LocaleParentCulture)\FSharp.ProjectSystem.PropertyPages.resources.dll" vs.file.ngen=yes
- file source="$(BinariesFolder)\FSharp.UIResources\$(Configuration)\net472\$(LocaleParentCulture)\FSharp.UIResources.resources.dll" vs.file.ngen=yes
- file source="$(BinariesFolder)\FSharp.VS.FSI\$(Configuration)\net472\$(LocaleParentCulture)\FSharp.VS.FSI.resources.dll" vs.file.ngen=yes
diff --git a/setup/Swix/Microsoft.FSharp.Vsix.Resources/Microsoft.FSharp.Vsix.Resources.swixproj b/setup/Swix/Microsoft.FSharp.Vsix.Resources/Microsoft.FSharp.Vsix.Resources.swixproj
deleted file mode 100644
index d8952b40fe7..00000000000
--- a/setup/Swix/Microsoft.FSharp.Vsix.Resources/Microsoft.FSharp.Vsix.Resources.swixproj
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
- Microsoft.FSharp.VSIX.Full.Resources.$(LocaleCode)
-
-
-
- $(PackagePreprocessorDefinitions);Configuration=$(Configuration)
- $(PackagePreprocessorDefinitions);BinariesFolder=$(BinariesFolder)
- $(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion)
- $(PackagePreprocessorDefinitions);LocaleCode=$(LocaleCode)
- $(PackagePreprocessorDefinitions);LocaleId=$(LocaleId)
- $(PackagePreprocessorDefinitions);LocaleParentId=$(LocaleParentId)
- $(PackagePreprocessorDefinitions);LocaleParentCulture=$(LocaleParentCulture)
- $(PackagePreprocessorDefinitions);LocaleSpecificCulture=$(LocaleSpecificCulture)
- $(PackagePreprocessorDefinitions);IsLangPack=$(IsLangPack)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/setup/Swix/Microsoft.FSharp.Vsix.Resources/Templates.swr b/setup/Swix/Microsoft.FSharp.Vsix.Resources/Templates.swr
deleted file mode 100644
index 5de89f0cadd..00000000000
--- a/setup/Swix/Microsoft.FSharp.Vsix.Resources/Templates.swr
+++ /dev/null
@@ -1,13 +0,0 @@
-use vs
-
-package name=Microsoft.FSharp.VSIX.Full.Resources
- version=$(FSharpPackageVersion)
- vs.package.language=$(LocaleSpecificCulture)
-
-folder "InstallDir:Common7\IDE\ProjectTemplates\FSharp\$(LocaleId)"
- folder "ConsoleApplication"
- file source="$(BinariesFolder)\ConsoleProject\$(Configuration)\$(LocaleParentId)\ConsoleApplication.zip"
- folder "Library"
- file source="$(BinariesFolder)\LibraryProject\$(Configuration)\$(LocaleParentId)\Library.zip"
- folder "Tutorial"
- file source="$(BinariesFolder)\TutorialProject\$(Configuration)\$(LocaleParentId)\Tutorial.zip"
diff --git a/setup/Swix/Microsoft.FSharp.vsmanproj b/setup/Swix/Microsoft.FSharp.vsmanproj
deleted file mode 100644
index 8780e94b2b5..00000000000
--- a/setup/Swix/Microsoft.FSharp.vsmanproj
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
- true
- true
- $(ArtifactsDir)\VSSetup\$(Configuration)\Insertion
- $(OutputPath)
- $(FSharpPackageVersion)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/setup/build-insertion.proj b/setup/build-insertion.proj
deleted file mode 100644
index b132d3edfea..00000000000
--- a/setup/build-insertion.proj
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
- .
- Debug
-
-
-
-
-
- Swix\Microsoft.FSharp.SDK\Microsoft.FSharp.SDK.swixproj
-
-
- Swix\Microsoft.FSharp.Compiler\Microsoft.FSharp.Compiler.swixproj
-
-
-
-
-
-
-
-
-
-
- AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/setup/fsharp-setup-build.csproj b/setup/fsharp-setup-build.csproj
deleted file mode 100644
index 074879dc20e..00000000000
--- a/setup/fsharp-setup-build.csproj
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
- net46
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Swix\Microsoft.FSharp.Dependencies\Microsoft.FSharp.Dependencies.swixproj
-
-
- Swix\Microsoft.FSharp.IDE\Microsoft.FSharp.IDE.swixproj
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}
-
-
-
-
-
diff --git a/setup/publish-assets.ps1 b/setup/publish-assets.ps1
index bfa905bbad9..3d1a505bfd2 100644
--- a/setup/publish-assets.ps1
+++ b/setup/publish-assets.ps1
@@ -2,7 +2,7 @@
.SYNOPSIS
Publishes the VSIX package on MyGet.
-.PARAMETER binariesPath
+.PARAMETER artifactsPath
The root directory where the build outputs are written.
.PARAMETER branchName
@@ -14,7 +14,7 @@ The API key used to authenticate with MyGet.
#>
Param(
- [string]$binariesPath = $null,
+ [string]$artifactsPath = $null,
[string]$branchName = $null,
[string]$apiKey = $null,
[string]$configuration = $null
@@ -41,7 +41,7 @@ try {
}
$branchName = $branchName.Replace("/", "_") # can't have slashes in the branch name
- $vsix = Join-Path $binariesPath "VisualFSharpFull\$configuration\net46\VisualFSharpFull.vsix"
+ $vsix = Join-Path $artifactsPath "VSSetup\$configuration\VisualFSharpFull.vsix"
Write-Host " Uploading '$vsix' to '$requestUrl'."
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
deleted file mode 100644
index bb8eac309b1..00000000000
--- a/src/Directory.Build.props
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
deleted file mode 100644
index ccd47cc0a9a..00000000000
--- a/src/Directory.Build.targets
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/src/absil/il.fs b/src/absil/il.fs
index 6a5714125bb..5f648282107 100644
--- a/src/absil/il.fs
+++ b/src/absil/il.fs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
+// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
module FSharp.Compiler.AbstractIL.IL
@@ -6,7 +6,6 @@ module FSharp.Compiler.AbstractIL.IL
#nowarn "343" // The type 'ILAssemblyRef' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'.
#nowarn "346" // The struct, record or union type 'IlxExtensionType' has an explicit implementation of 'Object.Equals'. ...
-
open System
open System.Diagnostics
open System.IO
@@ -50,9 +49,9 @@ let int_order = LanguagePrimitives.FastGenericComparer
let notlazy v = Lazy<_>.CreateFromValue v
/// A little ugly, but the idea is that if a data structure does not
-/// contain lazy values then we don't add laziness. So if the thing to map
+/// contain lazy values then we don't add laziness. So if the thing to map
/// is already evaluated then immediately apply the function.
-let lazyMap f (x:Lazy<_>) =
+let lazyMap f (x: Lazy<_>) =
if x.IsValueCreated then notlazy (f (x.Force())) else lazy (f (x.Force()))
[]
@@ -75,14 +74,14 @@ type PrimaryAssembly =
// Utilities: type names
// --------------------------------------------------------------------
-let splitNameAt (nm:string) idx =
+let splitNameAt (nm: string) idx =
if idx < 0 then failwith "splitNameAt: idx < 0"
let last = nm.Length - 1
if idx > last then failwith "splitNameAt: idx > last"
(nm.Substring(0, idx)),
(if idx < last then nm.Substring (idx+1, last - idx) else "")
-let rec splitNamespaceAux (nm:string) =
+let rec splitNamespaceAux (nm: string) =
match nm.IndexOf '.' with
| -1 -> [nm]
| idx ->
@@ -111,7 +110,7 @@ let splitNamespaceToArray nm =
let x = Array.ofList (splitNamespace nm)
x)
-let splitILTypeName (nm:string) =
+let splitILTypeName (nm: string) =
match nm.LastIndexOf '.' with
| -1 -> [], nm
| idx ->
@@ -126,7 +125,7 @@ let emptyStringArray = ([| |] : string[])
// Foo.Bar,"1.0"
// This is because the ImportSystemType code goes via Abstract IL type references. Ultimately this probably isn't
// the best way to do things.
-let splitILTypeNameWithPossibleStaticArguments (nm:string) =
+let splitILTypeNameWithPossibleStaticArguments (nm: string) =
let nm, suffix =
match nm.IndexOf ',' with
| -1 -> nm, None
@@ -154,7 +153,7 @@ let unsplitTypeName (ns, n) =
| [] -> String.concat "." ns + "." + n
| _ -> n
-let splitTypeNameRightAux (nm:string) =
+let splitTypeNameRightAux (nm: string) =
let idx = nm.LastIndexOf '.'
if idx = -1 then None, nm else
let s1, s2 = splitNameAt nm idx
@@ -196,20 +195,20 @@ type LazyOrderedMultiMap<'Key, 'Data when 'Key : equality>(keyf : 'Data -> 'Key,
//---------------------------------------------------------------------
-// SHA1 hash-signing algorithm. Used to get the public key token from
+// SHA1 hash-signing algorithm. Used to get the public key token from
// the public key.
//---------------------------------------------------------------------
-let b0 n = (n &&& 0xFF)
-let b1 n = ((n >>> 8) &&& 0xFF)
-let b2 n = ((n >>> 16) &&& 0xFF)
-let b3 n = ((n >>> 24) &&& 0xFF)
+let b0 n = (n &&& 0xFF)
+let b1 n = ((n >>> 8) &&& 0xFF)
+let b2 n = ((n >>> 16) &&& 0xFF)
+let b3 n = ((n >>> 24) &&& 0xFF)
module SHA1 =
- let inline (>>>&) (x:int) (y:int) = int32 (uint32 x >>> y)
+ let inline (>>>&) (x: int) (y: int) = int32 (uint32 x >>> y)
let f(t, b, c, d) =
if t < 20 then (b &&& c) ||| ((~~~b) &&& d)
@@ -232,19 +231,19 @@ module SHA1 =
type SHAStream =
{ stream: byte[]
mutable pos: int
- mutable eof: bool }
+ mutable eof: bool }
- let rotLeft32 x n = (x <<< n) ||| (x >>>& (32-n))
+ let rotLeft32 x n = (x <<< n) ||| (x >>>& (32-n))
// padding and length (in bits!) recorded at end
- let shaAfterEof sha =
+ let shaAfterEof sha =
let n = sha.pos
let len = sha.stream.Length
if n = len then 0x80
else
let padded_len = (((len + 9 + 63) / 64) * 64) - 8
- if n < padded_len - 8 then 0x0
+ if n < padded_len - 8 then 0x0
elif (n &&& 63) = 56 then int32 ((int64 len * int64 8) >>> 56) &&& 0xff
elif (n &&& 63) = 57 then int32 ((int64 len * int64 8) >>> 48) &&& 0xff
elif (n &&& 63) = 58 then int32 ((int64 len * int64 8) >>> 40) &&& 0xff
@@ -261,7 +260,7 @@ module SHA1 =
sha.pos <- sha.pos + 1
b
- let shaRead32 sha =
+ let shaRead32 sha =
let b0 = shaRead8 sha
let b1 = shaRead8 sha
let b2 = shaRead8 sha
@@ -307,11 +306,11 @@ module SHA1 =
let sha1HashBytes s =
let (_h0, _h1, _h2, h3, h4) = sha1Hash { stream = s; pos = 0; eof = false } // the result of the SHA algorithm is stored in registers 3 and 4
- Array.map byte [| b0 h4; b1 h4; b2 h4; b3 h4; b0 h3; b1 h3; b2 h3; b3 h3; |]
+ Array.map byte [| b0 h4; b1 h4; b2 h4; b3 h4; b0 h3; b1 h3; b2 h3; b3 h3; |]
let sha1HashInt64 s =
let (_h0,_h1,_h2,h3,h4) = sha1Hash { stream = s; pos = 0; eof = false } // the result of the SHA algorithm is stored in registers 3 and 4
- (int64 h3 <<< 32) ||| int64 h4
+ (int64 h3 <<< 32) ||| int64 h4
let sha1HashBytes s = SHA1.sha1HashBytes s
let sha1HashInt64 s = SHA1.sha1HashInt64 s
@@ -371,7 +370,7 @@ let isMscorlib data =
data.assemRefName = "mscorlib"
[]
-type ILAssemblyRef(data) =
+type ILAssemblyRef(data) =
let uniqueStamp = AssemblyRefUniqueStampGenerator.Encode(data)
member x.Name=data.assemRefName
@@ -404,14 +403,14 @@ type ILAssemblyRef(data) =
assemRefVersion=version
assemRefLocale=locale }
- static member FromAssemblyName (aname:System.Reflection.AssemblyName) =
+ static member FromAssemblyName (aname: System.Reflection.AssemblyName) =
let locale = None
let publicKey =
- match aname.GetPublicKey() with
+ match aname.GetPublicKey() with
| null | [| |] ->
- match aname.GetPublicKeyToken() with
+ match aname.GetPublicKeyToken() with
| null | [| |] -> None
| bytes -> Some (PublicKeyToken bytes)
| bytes ->
@@ -428,8 +427,8 @@ type ILAssemblyRef(data) =
member aref.QualifiedName =
let b = new System.Text.StringBuilder(100)
- let add (s:string) = (b.Append(s) |> ignore)
- let addC (s:char) = (b.Append(s) |> ignore)
+ let add (s: string) = b.Append(s) |> ignore
+ let addC (s: char) = b.Append(s) |> ignore
add(aref.Name)
match aref.Version with
| None -> ()
@@ -454,7 +453,7 @@ type ILAssemblyRef(data) =
let convDigit(digit) =
let digitc =
if digit < 10
- then System.Convert.ToInt32 '0' + digit
+ then System.Convert.ToInt32 '0' + digit
else System.Convert.ToInt32 'a' + (digit - 10)
System.Convert.ToChar(digitc)
for i = 0 to pkt.Length-1 do
@@ -491,15 +490,15 @@ type ILScopeRef =
| Module of ILModuleRef
| Assembly of ILAssemblyRef
- member x.IsLocalRef = match x with ILScopeRef.Local -> true | _ -> false
+ member x.IsLocalRef = match x with ILScopeRef.Local -> true | _ -> false
- member x.IsModuleRef = match x with ILScopeRef.Module _ -> true | _ -> false
+ member x.IsModuleRef = match x with ILScopeRef.Module _ -> true | _ -> false
member x.IsAssemblyRef= match x with ILScopeRef.Assembly _ -> true | _ -> false
- member x.ModuleRef = match x with ILScopeRef.Module x -> x | _ -> failwith "not a module reference"
+ member x.ModuleRef = match x with ILScopeRef.Module x -> x | _ -> failwith "not a module reference"
- member x.AssemblyRef = match x with ILScopeRef.Assembly x -> x | _ -> failwith "not an assembly reference"
+ member x.AssemblyRef = match x with ILScopeRef.Assembly x -> x | _ -> failwith "not an assembly reference"
member x.QualifiedName =
match x with
@@ -550,15 +549,15 @@ type ILCallingConv =
| Callconv of ILThisConvention * ILArgConvention
- member x.ThisConv = let (Callconv(a, _b)) = x in a
+ member x.ThisConv = let (Callconv(a, _b)) = x in a
- member x.BasicConv = let (Callconv(_a, b)) = x in b
+ member x.BasicConv = let (Callconv(_a, b)) = x in b
- member x.IsInstance = match x.ThisConv with ILThisConvention.Instance -> true | _ -> false
+ member x.IsInstance = match x.ThisConv with ILThisConvention.Instance -> true | _ -> false
member x.IsInstanceExplicit = match x.ThisConv with ILThisConvention.InstanceExplicit -> true | _ -> false
- member x.IsStatic = match x.ThisConv with ILThisConvention.Static -> true | _ -> false
+ member x.IsStatic = match x.ThisConv with ILThisConvention.Static -> true | _ -> false
static member Instance = ILCallingConvStatics.Instance
@@ -569,7 +568,7 @@ and ILCallingConvStatics() =
static let instanceCallConv = Callconv(ILThisConvention.Instance, ILArgConvention.Default)
- static let staticCallConv = Callconv(ILThisConvention.Static, ILArgConvention.Default)
+ static let staticCallConv = Callconv(ILThisConvention.Static, ILArgConvention.Default)
static member Instance = instanceCallConv
@@ -604,7 +603,7 @@ type ILTypeRef =
member x.ApproxId = x.hashCode
- member x.AsBoxedType (tspec:ILTypeSpec) =
+ member x.AsBoxedType (tspec: ILTypeSpec) =
if isNil tspec.tspecInst then
let v = x.asBoxedType
match box v with
@@ -696,13 +695,13 @@ and []
ILType =
| Void
- | Array of ILArrayShape * ILType
- | Value of ILTypeSpec
- | Boxed of ILTypeSpec
- | Ptr of ILType
- | Byref of ILType
- | FunctionPointer of ILCallingSignature
- | TypeVar of uint16
+ | Array of ILArrayShape * ILType
+ | Value of ILTypeSpec
+ | Boxed of ILTypeSpec
+ | Ptr of ILType
+ | Byref of ILType
+ | FunctionPointer of ILCallingSignature
+ | TypeVar of uint16
| Modified of bool * ILTypeRef * ILType
member x.BasicQualifiedName =
@@ -778,7 +777,7 @@ and ILTypes = list
let mkILCallSig (cc, args, ret) = { ArgTypes=args; CallingConv=cc; ReturnType=ret}
-let mkILBoxedType (tspec:ILTypeSpec) = tspec.TypeRef.AsBoxedType tspec
+let mkILBoxedType (tspec: ILTypeSpec) = tspec.TypeRef.AsBoxedType tspec
[]
type ILMethodRef =
@@ -864,9 +863,9 @@ type ILFieldSpec =
{ FieldRef: ILFieldRef
DeclaringType: ILType }
- member x.FormalType = x.FieldRef.Type
+ member x.FormalType = x.FieldRef.Type
- member x.Name = x.FieldRef.Name
+ member x.Name = x.FieldRef.Name
member x.DeclaringTypeRef = x.FieldRef.DeclaringTypeRef
@@ -880,7 +879,7 @@ type ILFieldSpec =
// Debug info.
// --------------------------------------------------------------------
-type ILGuid = byte[]
+type ILGuid = byte[]
type ILPlatform =
| X86
@@ -939,7 +938,7 @@ type ILSourceMarker =
override x.ToString() = sprintf "(%d, %d)-(%d, %d)" x.Line x.Column x.EndLine x.EndColumn
type ILAttribElem =
- | String of string option
+ | String of string option
| Bool of bool
| Char of char
| SByte of int8
@@ -957,7 +956,7 @@ type ILAttribElem =
| TypeRef of ILTypeRef option
| Array of ILType * ILAttribElem list
-type ILAttributeNamedArg = (string * ILType * bool * ILAttribElem)
+type ILAttributeNamedArg = (string * ILType * bool * ILAttribElem)
[]
type ILAttribute =
@@ -1014,7 +1013,7 @@ let mkILCustomAttrs l = match l with [] -> emptyILCustomAttrs | _ -> mkILCustomA
let emptyILCustomAttrsStored = ILAttributesStored.Given emptyILCustomAttrs
-let storeILCustomAttrs (attrs: ILAttributes) = if attrs.AsArray.Length = 0 then emptyILCustomAttrsStored else ILAttributesStored.Given attrs
+let storeILCustomAttrs (attrs: ILAttributes) = if attrs.AsArray.Length = 0 then emptyILCustomAttrsStored else ILAttributesStored.Given attrs
let mkILCustomAttrsReader f = ILAttributesStored.Reader f
@@ -1102,9 +1101,9 @@ type ILInstr =
| AI_cgt_un
| AI_clt
| AI_clt_un
- | AI_conv of ILBasicType
- | AI_conv_ovf of ILBasicType
- | AI_conv_ovf_un of ILBasicType
+ | AI_conv of ILBasicType
+ | AI_conv_ovf of ILBasicType
+ | AI_conv_ovf_un of ILBasicType
| AI_mul
| AI_mul_ovf
| AI_mul_ovf_un
@@ -1126,66 +1125,66 @@ type ILInstr =
| AI_ckfinite
| AI_nop
| AI_ldc of ILBasicType * ILConst
- | I_ldarg of uint16
- | I_ldarga of uint16
- | I_ldind of ILAlignment * ILVolatility * ILBasicType
- | I_ldloc of uint16
- | I_ldloca of uint16
- | I_starg of uint16
- | I_stind of ILAlignment * ILVolatility * ILBasicType
- | I_stloc of uint16
-
- | I_br of ILCodeLabel
- | I_jmp of ILMethodSpec
+ | I_ldarg of uint16
+ | I_ldarga of uint16
+ | I_ldind of ILAlignment * ILVolatility * ILBasicType
+ | I_ldloc of uint16
+ | I_ldloca of uint16
+ | I_starg of uint16
+ | I_stind of ILAlignment * ILVolatility * ILBasicType
+ | I_stloc of uint16
+
+ | I_br of ILCodeLabel
+ | I_jmp of ILMethodSpec
| I_brcmp of ILComparisonInstr * ILCodeLabel
- | I_switch of ILCodeLabel list
+ | I_switch of ILCodeLabel list
| I_ret
- | I_call of ILTailcall * ILMethodSpec * ILVarArgs
+ | I_call of ILTailcall * ILMethodSpec * ILVarArgs
| I_callvirt of ILTailcall * ILMethodSpec * ILVarArgs
| I_callconstraint of ILTailcall * ILType * ILMethodSpec * ILVarArgs
- | I_calli of ILTailcall * ILCallingSignature * ILVarArgs
- | I_ldftn of ILMethodSpec
- | I_newobj of ILMethodSpec * ILVarArgs
+ | I_calli of ILTailcall * ILCallingSignature * ILVarArgs
+ | I_ldftn of ILMethodSpec
+ | I_newobj of ILMethodSpec * ILVarArgs
| I_throw
| I_endfinally
| I_endfilter
- | I_leave of ILCodeLabel
+ | I_leave of ILCodeLabel
| I_rethrow
- | I_ldsfld of ILVolatility * ILFieldSpec
- | I_ldfld of ILAlignment * ILVolatility * ILFieldSpec
- | I_ldsflda of ILFieldSpec
- | I_ldflda of ILFieldSpec
- | I_stsfld of ILVolatility * ILFieldSpec
- | I_stfld of ILAlignment * ILVolatility * ILFieldSpec
- | I_ldstr of string
- | I_isinst of ILType
- | I_castclass of ILType
- | I_ldtoken of ILToken
- | I_ldvirtftn of ILMethodSpec
-
- | I_cpobj of ILType
- | I_initobj of ILType
- | I_ldobj of ILAlignment * ILVolatility * ILType
- | I_stobj of ILAlignment * ILVolatility * ILType
- | I_box of ILType
- | I_unbox of ILType
- | I_unbox_any of ILType
- | I_sizeof of ILType
-
- | I_ldelem of ILBasicType
- | I_stelem of ILBasicType
- | I_ldelema of ILReadonly * bool * ILArrayShape * ILType
- | I_ldelem_any of ILArrayShape * ILType
- | I_stelem_any of ILArrayShape * ILType
- | I_newarr of ILArrayShape * ILType
+ | I_ldsfld of ILVolatility * ILFieldSpec
+ | I_ldfld of ILAlignment * ILVolatility * ILFieldSpec
+ | I_ldsflda of ILFieldSpec
+ | I_ldflda of ILFieldSpec
+ | I_stsfld of ILVolatility * ILFieldSpec
+ | I_stfld of ILAlignment * ILVolatility * ILFieldSpec
+ | I_ldstr of string
+ | I_isinst of ILType
+ | I_castclass of ILType
+ | I_ldtoken of ILToken
+ | I_ldvirtftn of ILMethodSpec
+
+ | I_cpobj of ILType
+ | I_initobj of ILType
+ | I_ldobj of ILAlignment * ILVolatility * ILType
+ | I_stobj of ILAlignment * ILVolatility * ILType
+ | I_box of ILType
+ | I_unbox of ILType
+ | I_unbox_any of ILType
+ | I_sizeof of ILType
+
+ | I_ldelem of ILBasicType
+ | I_stelem of ILBasicType
+ | I_ldelema of ILReadonly * bool * ILArrayShape * ILType
+ | I_ldelem_any of ILArrayShape * ILType
+ | I_stelem_any of ILArrayShape * ILType
+ | I_newarr of ILArrayShape * ILType
| I_ldlen
- | I_mkrefany of ILType
+ | I_mkrefany of ILType
| I_refanytype
- | I_refanyval of ILType
+ | I_refanyval of ILType
| I_break
| I_seqpoint of ILSourceMarker
@@ -1194,17 +1193,17 @@ type ILInstr =
| I_localloc
| I_cpblk of ILAlignment * ILVolatility
- | I_initblk of ILAlignment * ILVolatility
+ | I_initblk of ILAlignment * ILVolatility
(* FOR EXTENSIONS, e.g. MS-ILX *)
| EI_ilzero of ILType
- | EI_ldlen_multi of int32 * int32
+ | EI_ldlen_multi of int32 * int32
[]
type ILExceptionClause =
| Finally of (ILCodeLabel * ILCodeLabel)
- | Fault of (ILCodeLabel * ILCodeLabel)
+ | Fault of (ILCodeLabel * ILCodeLabel)
| FilterCatch of (ILCodeLabel * ILCodeLabel) * (ILCodeLabel * ILCodeLabel)
| TypeCatch of ILType * (ILCodeLabel * ILCodeLabel)
@@ -1229,7 +1228,7 @@ type ILLocalDebugInfo =
[]
type ILCode =
{ Labels: Dictionary
- Instrs:ILInstr[]
+ Instrs: ILInstr[]
Exceptions: ILExceptionSpec list
Locals: ILLocalDebugInfo list }
@@ -1248,7 +1247,7 @@ type ILMethodBody =
NoInlining: bool
AggressiveInlining: bool
Locals: ILLocals
- Code: ILCode
+ Code: ILCode
SourceMarker: ILSourceMarker option }
[]
@@ -1428,7 +1427,7 @@ let storeILSecurityDecls (x: ILSecurityDecls) = if x.AsArray.Length = 0 then emp
let mkILSecurityDeclsReader f = ILSecurityDeclsStored.Reader f
[]
-type PInvokeCharBestFit =
+type PInvokeCharBestFit =
| UseAssembly
| Enabled
| Disabled
@@ -1476,7 +1475,7 @@ type ILParameter =
IsOut: bool
IsOptional: bool
CustomAttrsStored: ILAttributesStored
- MetadataIndex: int32 }
+ MetadataIndex: int32 }
member x.CustomAttrs = x.CustomAttrsStored.GetCustomAttrs x.MetadataIndex
@@ -1487,7 +1486,7 @@ type ILReturn =
{ Marshal: ILNativeType option
Type: ILType
CustomAttrsStored: ILAttributesStored
- MetadataIndex: int32 }
+ MetadataIndex: int32 }
member x.CustomAttrs = x.CustomAttrsStored.GetCustomAttrs x.MetadataIndex
@@ -1516,7 +1515,7 @@ type MethodKind =
[]
type MethodBody =
| IL of ILMethodBody
- | PInvoke of PInvokeMethod (* platform invoke to native *)
+ | PInvoke of PInvokeMethod (* platform invoke to native *)
| Abstract
| Native
| NotAvailable
@@ -1536,7 +1535,7 @@ let mkMethBodyAux mb = ILLazyMethodBody (notlazy mb)
let mkMethBodyLazyAux mb = ILLazyMethodBody mb
-let typesOfILParams (ps:ILParameters) : ILTypes = ps |> List.map (fun p -> p.Type)
+let typesOfILParams (ps: ILParameters) : ILTypes = ps |> List.map (fun p -> p.Type)
[]
type ILGenericVariance =
@@ -1567,23 +1566,23 @@ type ILGenericParameterDefs = ILGenericParameterDef list
let memberAccessOfFlags flags =
let f = (flags &&& 0x00000007)
- if f = 0x00000001 then ILMemberAccess.Private
- elif f = 0x00000006 then ILMemberAccess.Public
- elif f = 0x00000004 then ILMemberAccess.Family
- elif f = 0x00000002 then ILMemberAccess.FamilyAndAssembly
- elif f = 0x00000005 then ILMemberAccess.FamilyOrAssembly
- elif f = 0x00000003 then ILMemberAccess.Assembly
+ if f = 0x00000001 then ILMemberAccess.Private
+ elif f = 0x00000006 then ILMemberAccess.Public
+ elif f = 0x00000004 then ILMemberAccess.Family
+ elif f = 0x00000002 then ILMemberAccess.FamilyAndAssembly
+ elif f = 0x00000005 then ILMemberAccess.FamilyOrAssembly
+ elif f = 0x00000003 then ILMemberAccess.Assembly
else ILMemberAccess.CompilerControlled
-let convertMemberAccess (ilMemberAccess:ILMemberAccess) =
+let convertMemberAccess (ilMemberAccess: ILMemberAccess) =
match ilMemberAccess with
- | ILMemberAccess.Public -> MethodAttributes.Public
- | ILMemberAccess.Private -> MethodAttributes.Private
- | ILMemberAccess.Assembly -> MethodAttributes.Assembly
- | ILMemberAccess.FamilyAndAssembly -> MethodAttributes.FamANDAssem
- | ILMemberAccess.CompilerControlled -> MethodAttributes.PrivateScope
- | ILMemberAccess.FamilyOrAssembly -> MethodAttributes.FamORAssem
- | ILMemberAccess.Family -> MethodAttributes.Family
+ | ILMemberAccess.Public -> MethodAttributes.Public
+ | ILMemberAccess.Private -> MethodAttributes.Private
+ | ILMemberAccess.Assembly -> MethodAttributes.Assembly
+ | ILMemberAccess.FamilyAndAssembly -> MethodAttributes.FamANDAssem
+ | ILMemberAccess.CompilerControlled -> MethodAttributes.PrivateScope
+ | ILMemberAccess.FamilyOrAssembly -> MethodAttributes.FamORAssem
+ | ILMemberAccess.Family -> MethodAttributes.Family
let inline conditionalAdd condition flagToAdd source = if condition then source ||| flagToAdd else source &&& ~~~flagToAdd
@@ -1591,7 +1590,7 @@ let NoMetadataIdx = -1
[]
type ILMethodDef (name: string, attributes: MethodAttributes, implAttributes: MethodImplAttributes, callingConv: ILCallingConv,
- parameters: ILParameters, ret: ILReturn, body: ILLazyMethodBody, isEntryPoint:bool, genericParams: ILGenericParameterDefs,
+ parameters: ILParameters, ret: ILReturn, body: ILLazyMethodBody, isEntryPoint: bool, genericParams: ILGenericParameterDefs,
securityDeclsStored: ILSecurityDeclsStored, customAttrsStored: ILAttributesStored, metadataIndex: int32) =
new (name, attributes, implAttributes, callingConv, parameters, ret, body, isEntryPoint, genericParams, securityDecls, customAttrs) =
@@ -1625,7 +1624,7 @@ type ILMethodDef (name: string, attributes: MethodAttributes, implAttributes: Me
member x.With (?name: string, ?attributes: MethodAttributes, ?implAttributes: MethodImplAttributes,
?callingConv: ILCallingConv, ?parameters: ILParameters, ?ret: ILReturn,
- ?body: ILLazyMethodBody, ?securityDecls: ILSecurityDecls, ?isEntryPoint:bool,
+ ?body: ILLazyMethodBody, ?securityDecls: ILSecurityDecls, ?isEntryPoint: bool,
?genericParams: ILGenericParameterDefs, ?customAttrs: ILAttributes) =
ILMethodDef (name = defaultArg name x.Name,
@@ -1659,37 +1658,37 @@ type ILMethodDef (name: string, attributes: MethodAttributes, implAttributes: Me
member x.SourceMarker = x.MethodBody.SourceMarker
- member x.MaxStack = x.MethodBody.MaxStack
+ member x.MaxStack = x.MethodBody.MaxStack
- member x.IsZeroInit = x.MethodBody.IsZeroInit
+ member x.IsZeroInit = x.MethodBody.IsZeroInit
- member md.CallingSignature = mkILCallSig (md.CallingConv, md.ParameterTypes, md.Return.Type)
+ member md.CallingSignature = mkILCallSig (md.CallingConv, md.ParameterTypes, md.Return.Type)
- member x.IsClassInitializer = x.Name = ".cctor"
- member x.IsConstructor = x.Name = ".ctor"
+ member x.IsClassInitializer = x.Name = ".cctor"
+ member x.IsConstructor = x.Name = ".ctor"
- member x.Access = memberAccessOfFlags (int x.Attributes)
- member x.IsStatic = x.Attributes &&& MethodAttributes.Static <> enum 0
- member x.IsNonVirtualInstance = not x.IsStatic && not x.IsVirtual
- member x.IsVirtual = x.Attributes &&& MethodAttributes.Virtual <> enum 0
- member x.IsFinal = x.Attributes &&& MethodAttributes.Final <> enum 0
- member x.IsNewSlot = x.Attributes &&& MethodAttributes.NewSlot <> enum 0
+ member x.Access = memberAccessOfFlags (int x.Attributes)
+ member x.IsStatic = x.Attributes &&& MethodAttributes.Static <> enum 0
+ member x.IsNonVirtualInstance = not x.IsStatic && not x.IsVirtual
+ member x.IsVirtual = x.Attributes &&& MethodAttributes.Virtual <> enum 0
+ member x.IsFinal = x.Attributes &&& MethodAttributes.Final <> enum 0
+ member x.IsNewSlot = x.Attributes &&& MethodAttributes.NewSlot <> enum 0
member x.IsCheckAccessOnOverride= x.Attributes &&& MethodAttributes.CheckAccessOnOverride <> enum 0
- member x.IsAbstract = x.Attributes &&& MethodAttributes.Abstract <> enum 0
- member x.IsHideBySig = x.Attributes &&& MethodAttributes.HideBySig <> enum 0
- member x.IsSpecialName = x.Attributes &&& MethodAttributes.SpecialName <> enum 0
- member x.IsUnmanagedExport = x.Attributes &&& MethodAttributes.UnmanagedExport <> enum 0
- member x.IsReqSecObj = x.Attributes &&& MethodAttributes.RequireSecObject <> enum 0
- member x.HasSecurity = x.Attributes &&& MethodAttributes.HasSecurity <> enum 0
-
- member x.IsManaged = x.ImplAttributes &&& MethodImplAttributes.Managed <> enum 0
- member x.IsForwardRef = x.ImplAttributes &&& MethodImplAttributes.ForwardRef <> enum 0
- member x.IsInternalCall = x.ImplAttributes &&& MethodImplAttributes.InternalCall <> enum 0
- member x.IsPreserveSig = x.ImplAttributes &&& MethodImplAttributes.PreserveSig <> enum 0
- member x.IsSynchronized = x.ImplAttributes &&& MethodImplAttributes.Synchronized <> enum 0
- member x.IsNoInline = x.ImplAttributes &&& MethodImplAttributes.NoInlining <> enum 0
+ member x.IsAbstract = x.Attributes &&& MethodAttributes.Abstract <> enum 0
+ member x.IsHideBySig = x.Attributes &&& MethodAttributes.HideBySig <> enum 0
+ member x.IsSpecialName = x.Attributes &&& MethodAttributes.SpecialName <> enum 0
+ member x.IsUnmanagedExport = x.Attributes &&& MethodAttributes.UnmanagedExport <> enum 0
+ member x.IsReqSecObj = x.Attributes &&& MethodAttributes.RequireSecObject <> enum 0
+ member x.HasSecurity = x.Attributes &&& MethodAttributes.HasSecurity <> enum 0
+
+ member x.IsManaged = x.ImplAttributes &&& MethodImplAttributes.Managed <> enum 0
+ member x.IsForwardRef = x.ImplAttributes &&& MethodImplAttributes.ForwardRef <> enum 0
+ member x.IsInternalCall = x.ImplAttributes &&& MethodImplAttributes.InternalCall <> enum 0
+ member x.IsPreserveSig = x.ImplAttributes &&& MethodImplAttributes.PreserveSig <> enum 0
+ member x.IsSynchronized = x.ImplAttributes &&& MethodImplAttributes.Synchronized <> enum 0
+ member x.IsNoInline = x.ImplAttributes &&& MethodImplAttributes.NoInlining <> enum 0
member x.IsAggressiveInline= x.ImplAttributes &&& MethodImplAttributes.AggressiveInlining <> enum 0
- member x.IsMustRun = x.ImplAttributes &&& MethodImplAttributes.NoOptimization <> enum 0
+ member x.IsMustRun = x.ImplAttributes &&& MethodImplAttributes.NoOptimization <> enum 0
member x.WithSpecialName = x.With(attributes = (x.Attributes ||| MethodAttributes.SpecialName))
member x.WithHideBySig() =
@@ -1838,19 +1837,19 @@ type ILPropertyDefs =
member x.AsList = let (ILProperties t) = x in t.Entries()
member x.LookupByName s = let (ILProperties t) = x in t.[s]
-let convertFieldAccess (ilMemberAccess:ILMemberAccess) =
+let convertFieldAccess (ilMemberAccess: ILMemberAccess) =
match ilMemberAccess with
- | ILMemberAccess.Assembly -> FieldAttributes.Assembly
- | ILMemberAccess.CompilerControlled -> enum(0)
- | ILMemberAccess.FamilyAndAssembly -> FieldAttributes.FamANDAssem
- | ILMemberAccess.FamilyOrAssembly -> FieldAttributes.FamORAssem
- | ILMemberAccess.Family -> FieldAttributes.Family
- | ILMemberAccess.Private -> FieldAttributes.Private
- | ILMemberAccess.Public -> FieldAttributes.Public
+ | ILMemberAccess.Assembly -> FieldAttributes.Assembly
+ | ILMemberAccess.CompilerControlled -> enum(0)
+ | ILMemberAccess.FamilyAndAssembly -> FieldAttributes.FamANDAssem
+ | ILMemberAccess.FamilyOrAssembly -> FieldAttributes.FamORAssem
+ | ILMemberAccess.Family -> FieldAttributes.Family
+ | ILMemberAccess.Private -> FieldAttributes.Private
+ | ILMemberAccess.Public -> FieldAttributes.Public
[]
type ILFieldDef(name: string, fieldType: ILType, attributes: FieldAttributes, data: byte[] option,
- literalValue: ILFieldInit option, offset: int32 option, marshal: ILNativeType option,
+ literalValue: ILFieldInit option, offset: int32 option, marshal: ILNativeType option,
customAttrsStored: ILAttributesStored, metadataIndex: int32) =
new (name, fieldType, attributes, data, literalValue, offset, marshal, customAttrs) =
@@ -1866,7 +1865,7 @@ type ILFieldDef(name: string, fieldType: ILType, attributes: FieldAttributes, da
member x.CustomAttrs = customAttrsStored.GetCustomAttrs x.MetadataIndex
member x.MetadataIndex = metadataIndex
- member x.With(?name: string, ?fieldType: ILType, ?attributes: FieldAttributes, ?data: byte[] option, ?literalValue: ILFieldInit option, ?offset: int32 option, ?marshal: ILNativeType option, ?customAttrs: ILAttributes) =
+ member x.With(?name: string, ?fieldType: ILType, ?attributes: FieldAttributes, ?data: byte[] option, ?literalValue: ILFieldInit option, ?offset: int32 option, ?marshal: ILNativeType option, ?customAttrs: ILAttributes) =
ILFieldDef(name=defaultArg name x.Name,
fieldType=defaultArg fieldType x.FieldType,
attributes=defaultArg attributes x.Attributes,
@@ -1890,7 +1889,7 @@ type ILFieldDef(name: string, fieldType: ILType, attributes: FieldAttributes, da
member x.WithFieldMarshal(marshal) = x.With(marshal = marshal, attributes = (x.Attributes |> conditionalAdd marshal.IsSome FieldAttributes.HasFieldMarshal))
-// Index table by name. Keep a canonical list to make sure field order is not disturbed for binary manipulation.
+// Index table by name. Keep a canonical list to make sure field order is not disturbed for binary manipulation.
type ILFieldDefs =
| ILFields of LazyOrderedMultiMap
@@ -1961,12 +1960,12 @@ type ILTypeDefKind =
| Enum
| Delegate
-let typeKindOfFlags nm _mdefs _fdefs (super:ILType option) flags =
+let typeKindOfFlags nm _mdefs _fdefs (super: ILType option) flags =
if (flags &&& 0x00000020) <> 0x0 then ILTypeDefKind.Interface
else
let isEnum, isDelegate, isMulticastDelegate, isValueType =
match super with
- | None -> false , false, false, false
+ | None -> false, false, false, false
| Some ty ->
ty.TypeSpec.Name = "System.Enum",
ty.TypeSpec.Name = "System.Delegate",
@@ -1974,17 +1973,17 @@ let typeKindOfFlags nm _mdefs _fdefs (super:ILType option) flags =
ty.TypeSpec.Name = "System.ValueType" && nm <> "System.Enum"
let selfIsMulticastDelegate = nm = "System.MulticastDelegate"
if isEnum then ILTypeDefKind.Enum
- elif (isDelegate && not selfIsMulticastDelegate) || isMulticastDelegate then ILTypeDefKind.Delegate
+ elif (isDelegate && not selfIsMulticastDelegate) || isMulticastDelegate then ILTypeDefKind.Delegate
elif isValueType then ILTypeDefKind.ValueType
else ILTypeDefKind.Class
let convertTypeAccessFlags access =
match access with
| ILTypeDefAccess.Public -> TypeAttributes.Public
- | ILTypeDefAccess.Private -> TypeAttributes.NotPublic
+ | ILTypeDefAccess.Private -> TypeAttributes.NotPublic
| ILTypeDefAccess.Nested ILMemberAccess.Public -> TypeAttributes.NestedPublic
- | ILTypeDefAccess.Nested ILMemberAccess.Private -> TypeAttributes.NestedPrivate
- | ILTypeDefAccess.Nested ILMemberAccess.Family -> TypeAttributes.NestedFamily
+ | ILTypeDefAccess.Nested ILMemberAccess.Private -> TypeAttributes.NestedPrivate
+ | ILTypeDefAccess.Nested ILMemberAccess.Family -> TypeAttributes.NestedFamily
| ILTypeDefAccess.Nested ILMemberAccess.CompilerControlled -> TypeAttributes.NestedPrivate
| ILTypeDefAccess.Nested ILMemberAccess.FamilyAndAssembly -> TypeAttributes.NestedFamANDAssem
| ILTypeDefAccess.Nested ILMemberAccess.FamilyOrAssembly -> TypeAttributes.NestedFamORAssem
@@ -2010,17 +2009,17 @@ let convertEncoding encoding =
| ILDefaultPInvokeEncoding.Ansi -> TypeAttributes.AnsiClass
| ILDefaultPInvokeEncoding.Unicode -> TypeAttributes.UnicodeClass
-let convertToNestedTypeAccess (ilMemberAccess:ILMemberAccess) =
+let convertToNestedTypeAccess (ilMemberAccess: ILMemberAccess) =
match ilMemberAccess with
- | ILMemberAccess.Assembly -> TypeAttributes.NestedAssembly
- | ILMemberAccess.CompilerControlled -> failwith "Method access compiler controlled."
- | ILMemberAccess.FamilyAndAssembly -> TypeAttributes.NestedFamANDAssem
- | ILMemberAccess.FamilyOrAssembly -> TypeAttributes.NestedFamORAssem
- | ILMemberAccess.Family -> TypeAttributes.NestedFamily
- | ILMemberAccess.Private -> TypeAttributes.NestedPrivate
- | ILMemberAccess.Public -> TypeAttributes.NestedPublic
+ | ILMemberAccess.Assembly -> TypeAttributes.NestedAssembly
+ | ILMemberAccess.CompilerControlled -> failwith "Method access compiler controlled."
+ | ILMemberAccess.FamilyAndAssembly -> TypeAttributes.NestedFamANDAssem
+ | ILMemberAccess.FamilyOrAssembly -> TypeAttributes.NestedFamORAssem
+ | ILMemberAccess.Family -> TypeAttributes.NestedFamily
+ | ILMemberAccess.Private -> TypeAttributes.NestedPrivate
+ | ILMemberAccess.Public -> TypeAttributes.NestedPublic
-let convertInitSemantics (init:ILTypeInit) =
+let convertInitSemantics (init: ILTypeInit) =
match init with
| ILTypeInit.BeforeField -> TypeAttributes.BeforeFieldInit
| ILTypeInit.OnAny -> enum 0
@@ -2078,11 +2077,11 @@ type ILTypeDef(name: string, attributes: TypeAttributes, layout: ILTypeDefLayout
member x.SecurityDecls = x.SecurityDeclsStored.GetSecurityDecls x.MetadataIndex
- member x.IsClass = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Class
- member x.IsStruct = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.ValueType
+ member x.IsClass = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Class
+ member x.IsStruct = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.ValueType
member x.IsInterface = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Interface
- member x.IsEnum = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Enum
- member x.IsDelegate = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Delegate
+ member x.IsEnum = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Enum
+ member x.IsDelegate = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Delegate
member x.Access = typeAccessOfFlags (int x.Attributes)
member x.IsAbstract = x.Attributes &&& TypeAttributes.Abstract <> enum 0
member x.IsSealed = x.Attributes &&& TypeAttributes.Sealed <> enum 0
@@ -2130,7 +2129,7 @@ and [] ILTypeDefs(f : unit -> ILPreTypeDef[]) =
member x.AsArrayOfPreTypeDefs = array.Value
- member x.FindByName nm =
+ member x.FindByName nm =
let ns, n = splitILTypeName nm
dict.Value.[(ns, n)].GetTypeDef()
@@ -2323,17 +2322,17 @@ let emptyILGenericArgsList = ([]: ILType list)
// --------------------------------------------------------------------
-let mkILNestedTyRef (scope, l, nm) = ILTypeRef.Create(scope, l, nm)
+let mkILNestedTyRef (scope, l, nm) = ILTypeRef.Create(scope, l, nm)
-let mkILTyRef (scope, nm) = mkILNestedTyRef (scope, [], nm)
+let mkILTyRef (scope, nm) = mkILNestedTyRef (scope, [], nm)
type ILGenericArgsList = ILType list
-let mkILTySpec (tref, inst) = ILTypeSpec.Create(tref, inst)
+let mkILTySpec (tref, inst) = ILTypeSpec.Create(tref, inst)
-let mkILNonGenericTySpec tref = mkILTySpec (tref, [])
+let mkILNonGenericTySpec tref = mkILTySpec (tref, [])
-let mkILTyRefInTyRef (tref:ILTypeRef, nm) =
+let mkILTyRefInTyRef (tref: ILTypeRef, nm) =
mkILNestedTyRef (tref.Scope, tref.Enclosing@[tref.Name], nm)
let mkILTy boxed tspec =
@@ -2383,16 +2382,16 @@ let mkILMethSpec (mref, vc, tinst, minst) = mkILMethSpecForMethRefInTy (mref, mk
let mkILMethSpecInTypeRef (tref, vc, cc, nm, args, rty, tinst, minst) =
mkILMethSpec (mkILMethRef ( tref, cc, nm, List.length minst, args, rty), vc, tinst, minst)
-let mkILMethSpecInTy (ty:ILType, cc, nm, args, rty, minst:ILGenericArgs) =
+let mkILMethSpecInTy (ty: ILType, cc, nm, args, rty, minst: ILGenericArgs) =
mkILMethSpecForMethRefInTy (mkILMethRef (ty.TypeRef, cc, nm, minst.Length, args, rty), ty, minst)
let mkILNonGenericMethSpecInTy (ty, cc, nm, args, rty) =
mkILMethSpecInTy (ty, cc, nm, args, rty, [])
-let mkILInstanceMethSpecInTy (ty:ILType, nm, args, rty, minst) =
+let mkILInstanceMethSpecInTy (ty: ILType, nm, args, rty, minst) =
mkILMethSpecInTy (ty, ILCallingConv.Instance, nm, args, rty, minst)
-let mkILNonGenericInstanceMethSpecInTy (ty:ILType, nm, args, rty) =
+let mkILNonGenericInstanceMethSpecInTy (ty: ILType, nm, args, rty) =
mkILInstanceMethSpecInTy (ty, nm, args, rty, [])
let mkILStaticMethSpecInTy (ty, nm, args, rty, minst) =
@@ -2418,7 +2417,7 @@ let mkILFieldRef(tref, nm, ty) = { DeclaringTypeRef=tref; Name=nm; Type=ty}
let mkILFieldSpec (tref, ty) = { FieldRef= tref; DeclaringType=ty }
-let mkILFieldSpecInTy (ty:ILType, nm, fty) =
+let mkILFieldSpecInTy (ty: ILType, nm, fty) =
mkILFieldSpec (mkILFieldRef (ty.TypeRef, nm, fty), ty)
@@ -2429,7 +2428,7 @@ let andTailness x y =
// Basic operations on code.
// --------------------------------------------------------------------
-let formatCodeLabel (x:int) = "L"+string x
+let formatCodeLabel (x: int) = "L"+string x
// ++GLOBAL MUTABLE STATE (concurrency safe)
let codeLabelCount = ref 0
@@ -2437,14 +2436,14 @@ let generateCodeLabel() = System.Threading.Interlocked.Increment(codeLabelCount)
let instrIsRet i =
match i with
- | I_ret -> true
+ | I_ret -> true
| _ -> false
let nonBranchingInstrsToCode instrs : ILCode =
let instrs = Array.ofList instrs
let instrs =
if instrs.Length <> 0 && instrIsRet (Array.last instrs) then instrs
- else Array.append instrs [| I_ret |]
+ else Array.append instrs [| I_ret |]
{ Labels = Dictionary()
Instrs = instrs
@@ -2468,11 +2467,11 @@ let mkILSimpleTypar nm =
CustomAttrsStored = storeILCustomAttrs emptyILCustomAttrs
MetadataIndex = NoMetadataIdx }
-let gparam_of_gactual (_ga:ILType) = mkILSimpleTypar "T"
+let gparam_of_gactual (_ga: ILType) = mkILSimpleTypar "T"
let mkILFormalTypars (x: ILGenericArgsList) = List.map gparam_of_gactual x
-let mkILFormalGenericArgs numtypars (gparams:ILGenericParameterDefs) =
+let mkILFormalGenericArgs numtypars (gparams: ILGenericParameterDefs) =
List.mapi (fun n _gf -> mkILTyvarTy (uint16 (numtypars + n))) gparams
let mkILFormalBoxedTy tref gparams = mkILBoxedTy tref (mkILFormalGenericArgs 0 gparams)
@@ -2483,14 +2482,14 @@ let mkILFormalNamedTy bx tref gparams = mkILNamedTy bx tref (mkILFormalGenericAr
// Operations on class etc. defs.
// --------------------------------------------------------------------
-let mkRefForNestedILTypeDef scope (enc:ILTypeDef list, td:ILTypeDef) =
+let mkRefForNestedILTypeDef scope (enc: ILTypeDef list, td: ILTypeDef) =
mkILNestedTyRef(scope, (enc |> List.map (fun etd -> etd.Name)), td.Name)
// --------------------------------------------------------------------
// Operations on type tables.
// --------------------------------------------------------------------
-let mkILPreTypeDef (td:ILTypeDef) =
+let mkILPreTypeDef (td: ILTypeDef) =
let ns, n = splitILTypeName td.Name
ILPreTypeDef(ns, n, NoMetadataIdx, ILTypeDefStored.Given td)
let mkILPreTypeDefComputed (ns, n, f) =
@@ -2500,8 +2499,8 @@ let mkILPreTypeDefRead (ns, n, idx, f) =
let addILTypeDef td (tdefs: ILTypeDefs) = ILTypeDefs (fun () -> [| yield mkILPreTypeDef td; yield! tdefs.AsArrayOfPreTypeDefs |])
-let mkILTypeDefsFromArray (l: ILTypeDef[]) = ILTypeDefs (fun () -> Array.map mkILPreTypeDef l)
-let mkILTypeDefs l = mkILTypeDefsFromArray (Array.ofList l)
+let mkILTypeDefsFromArray (l: ILTypeDef[]) = ILTypeDefs (fun () -> Array.map mkILPreTypeDef l)
+let mkILTypeDefs l = mkILTypeDefsFromArray (Array.ofList l)
let mkILTypeDefsComputed f = ILTypeDefs f
let emptyILTypeDefs = mkILTypeDefsFromArray [| |]
@@ -2509,9 +2508,9 @@ let emptyILTypeDefs = mkILTypeDefsFromArray [| |]
// Operations on method tables.
// --------------------------------------------------------------------
-let mkILMethodsFromArray xs = ILMethodDefs (fun () -> xs)
-let mkILMethods xs = xs |> Array.ofList |> mkILMethodsFromArray
-let mkILMethodsComputed f = ILMethodDefs f
+let mkILMethodsFromArray xs = ILMethodDefs (fun () -> xs)
+let mkILMethods xs = xs |> Array.ofList |> mkILMethodsFromArray
+let mkILMethodsComputed f = ILMethodDefs f
let emptyILMethods = mkILMethodsFromArray [| |]
let filterILMethodDefs f (mdefs: ILMethodDefs) =
@@ -2621,26 +2620,26 @@ type ILGlobals(primaryScopeRef) =
let m_typ_IntPtr = ILType.Value (mkILNonGenericTySpec (m_mkSysILTypeRef tname_IntPtr))
let m_typ_UIntPtr = ILType.Value (mkILNonGenericTySpec (m_mkSysILTypeRef tname_UIntPtr))
- member x.primaryAssemblyScopeRef = m_typ_Object.TypeRef.Scope
- member x.primaryAssemblyName = m_typ_Object.TypeRef.Scope.AssemblyRef.Name
- member x.typ_Object = m_typ_Object
- member x.typ_String = m_typ_String
- member x.typ_Array = m_typ_Array
- member x.typ_Type = m_typ_Type
- member x.typ_IntPtr = m_typ_IntPtr
- member x.typ_UIntPtr = m_typ_UIntPtr
- member x.typ_Byte = m_typ_Byte
- member x.typ_Int16 = m_typ_Int16
- member x.typ_Int32 = m_typ_Int32
- member x.typ_Int64 = m_typ_Int64
- member x.typ_SByte = m_typ_SByte
- member x.typ_UInt16 = m_typ_UInt16
- member x.typ_UInt32 = m_typ_UInt32
- member x.typ_UInt64 = m_typ_UInt64
- member x.typ_Single = m_typ_Single
- member x.typ_Double = m_typ_Double
- member x.typ_Bool = m_typ_Bool
- member x.typ_Char = m_typ_Char
+ member x.primaryAssemblyScopeRef = m_typ_Object.TypeRef.Scope
+ member x.primaryAssemblyName = m_typ_Object.TypeRef.Scope.AssemblyRef.Name
+ member x.typ_Object = m_typ_Object
+ member x.typ_String = m_typ_String
+ member x.typ_Array = m_typ_Array
+ member x.typ_Type = m_typ_Type
+ member x.typ_IntPtr = m_typ_IntPtr
+ member x.typ_UIntPtr = m_typ_UIntPtr
+ member x.typ_Byte = m_typ_Byte
+ member x.typ_Int16 = m_typ_Int16
+ member x.typ_Int32 = m_typ_Int32
+ member x.typ_Int64 = m_typ_Int64
+ member x.typ_SByte = m_typ_SByte
+ member x.typ_UInt16 = m_typ_UInt16
+ member x.typ_UInt32 = m_typ_UInt32
+ member x.typ_UInt64 = m_typ_UInt64
+ member x.typ_Single = m_typ_Single
+ member x.typ_Double = m_typ_Double
+ member x.typ_Bool = m_typ_Bool
+ member x.typ_Char = m_typ_Char
/// For debugging
[]
@@ -2656,12 +2655,12 @@ let mkNormalCallvirt mspec = I_callvirt (Normalcall, mspec, None)
let mkNormalCallconstraint (ty, mspec) = I_callconstraint (Normalcall, ty, mspec, None)
-let mkNormalNewobj mspec = I_newobj (mspec, None)
+let mkNormalNewobj mspec = I_newobj (mspec, None)
/// Comment on common object cache sizes:
/// mkLdArg - I can't imagine any IL method we generate needing more than this
/// mkLdLoc - I tried 256, and there were LdLoc allocations left, so I upped it o 512. I didn't check again.
-/// mkStLoc - it should be the same as LdLoc (where there's a LdLoc there must be a StLoc)
+/// mkStLoc - it should be the same as LdLoc (where there's a LdLoc there must be a StLoc)
/// mkLdcInt32 - just a guess
let ldargs = [| for i in 0 .. 128 -> I_ldarg (uint16 i) |]
@@ -2693,7 +2692,7 @@ let isILBoxedTy = function ILType.Boxed _ -> true | _ -> false
let isILValueTy = function ILType.Value _ -> true | _ -> false
-let isPrimaryAssemblyTySpec (tspec:ILTypeSpec) n =
+let isPrimaryAssemblyTySpec (tspec: ILTypeSpec) n =
let tref = tspec.TypeRef
let scoref = tref.Scope
(tref.Name = n) &&
@@ -2702,45 +2701,45 @@ let isPrimaryAssemblyTySpec (tspec:ILTypeSpec) n =
| ILScopeRef.Module _ -> false
| ILScopeRef.Local -> true
-let isILBoxedPrimaryAssemblyTy (ty:ILType) n =
+let isILBoxedPrimaryAssemblyTy (ty: ILType) n =
isILBoxedTy ty && isPrimaryAssemblyTySpec ty.TypeSpec n
-let isILValuePrimaryAssemblyTy (ty:ILType) n =
+let isILValuePrimaryAssemblyTy (ty: ILType) n =
isILValueTy ty && isPrimaryAssemblyTySpec ty.TypeSpec n
-let isILObjectTy ty = isILBoxedPrimaryAssemblyTy ty tname_Object
+let isILObjectTy ty = isILBoxedPrimaryAssemblyTy ty tname_Object
-let isILStringTy ty = isILBoxedPrimaryAssemblyTy ty tname_String
+let isILStringTy ty = isILBoxedPrimaryAssemblyTy ty tname_String
-let isILTypedReferenceTy ty = isILValuePrimaryAssemblyTy ty "System.TypedReference"
+let isILTypedReferenceTy ty = isILValuePrimaryAssemblyTy ty "System.TypedReference"
-let isILSByteTy ty = isILValuePrimaryAssemblyTy ty tname_SByte
+let isILSByteTy ty = isILValuePrimaryAssemblyTy ty tname_SByte
-let isILByteTy ty = isILValuePrimaryAssemblyTy ty tname_Byte
+let isILByteTy ty = isILValuePrimaryAssemblyTy ty tname_Byte
-let isILInt16Ty ty = isILValuePrimaryAssemblyTy ty tname_Int16
+let isILInt16Ty ty = isILValuePrimaryAssemblyTy ty tname_Int16
-let isILUInt16Ty ty = isILValuePrimaryAssemblyTy ty tname_UInt16
+let isILUInt16Ty ty = isILValuePrimaryAssemblyTy ty tname_UInt16
-let isILInt32Ty ty = isILValuePrimaryAssemblyTy ty tname_Int32
+let isILInt32Ty ty = isILValuePrimaryAssemblyTy ty tname_Int32
-let isILUInt32Ty ty = isILValuePrimaryAssemblyTy ty tname_UInt32
+let isILUInt32Ty ty = isILValuePrimaryAssemblyTy ty tname_UInt32
-let isILInt64Ty ty = isILValuePrimaryAssemblyTy ty tname_Int64
+let isILInt64Ty ty = isILValuePrimaryAssemblyTy ty tname_Int64
-let isILUInt64Ty ty = isILValuePrimaryAssemblyTy ty tname_UInt64
+let isILUInt64Ty ty = isILValuePrimaryAssemblyTy ty tname_UInt64
-let isILIntPtrTy ty = isILValuePrimaryAssemblyTy ty tname_IntPtr
+let isILIntPtrTy ty = isILValuePrimaryAssemblyTy ty tname_IntPtr
-let isILUIntPtrTy ty = isILValuePrimaryAssemblyTy ty tname_UIntPtr
+let isILUIntPtrTy ty = isILValuePrimaryAssemblyTy ty tname_UIntPtr
-let isILBoolTy ty = isILValuePrimaryAssemblyTy ty tname_Bool
+let isILBoolTy ty = isILValuePrimaryAssemblyTy ty tname_Bool
-let isILCharTy ty = isILValuePrimaryAssemblyTy ty tname_Char
+let isILCharTy ty = isILValuePrimaryAssemblyTy ty tname_Char
-let isILSingleTy ty = isILValuePrimaryAssemblyTy ty tname_Single
+let isILSingleTy ty = isILValuePrimaryAssemblyTy ty tname_Single
-let isILDoubleTy ty = isILValuePrimaryAssemblyTy ty tname_Double
+let isILDoubleTy ty = isILValuePrimaryAssemblyTy ty tname_Double
// --------------------------------------------------------------------
// Rescoping
@@ -2754,7 +2753,7 @@ let rescopeILScopeRef scoref scoref1 =
| ILScopeRef.Module _, _ -> scoref1
| _ -> scoref1
-let rescopeILTypeRef scoref (tref1:ILTypeRef) =
+let rescopeILTypeRef scoref (tref1: ILTypeRef) =
let scoref1 = tref1.Scope
let scoref2 = rescopeILScopeRef scoref scoref1
if scoref1 === scoref2 then tref1
@@ -2763,7 +2762,7 @@ let rescopeILTypeRef scoref (tref1:ILTypeRef) =
// ORIGINAL IMPLEMENTATION (too many allocations
// { tspecTypeRef=rescopeILTypeRef scoref tref
// tspecInst=rescopeILTypes scoref tinst }
-let rec rescopeILTypeSpec scoref (tspec1:ILTypeSpec) =
+let rec rescopeILTypeSpec scoref (tspec1: ILTypeSpec) =
let tref1 = tspec1.TypeRef
let tinst1 = tspec1.GenericArgs
let tref2 = rescopeILTypeRef scoref tref1
@@ -2802,10 +2801,10 @@ and rescopeILTypes scoref i =
if isNil i then i
else List.mapq (rescopeILType scoref) i
-and rescopeILCallSig scoref csig =
+and rescopeILCallSig scoref csig =
mkILCallSig (csig.CallingConv, rescopeILTypes scoref csig.ArgTypes, rescopeILType scoref csig.ReturnType)
-let rescopeILMethodRef scoref (x:ILMethodRef) =
+let rescopeILMethodRef scoref (x: ILMethodRef) =
{ mrefParent = rescopeILTypeRef scoref x.DeclaringTypeRef
mrefCallconv = x.mrefCallconv
mrefGenericArity=x.mrefGenericArity
@@ -2822,18 +2821,18 @@ let rescopeILFieldRef scoref x =
// Instantiate polymorphism in types
// --------------------------------------------------------------------
-let rec instILTypeSpecAux numFree inst (tspec:ILTypeSpec) =
+let rec instILTypeSpecAux numFree inst (tspec: ILTypeSpec) =
ILTypeSpec.Create(tspec.TypeRef, instILGenericArgsAux numFree inst tspec.GenericArgs)
-and instILTypeAux numFree (inst:ILGenericArgs) ty =
+and instILTypeAux numFree (inst: ILGenericArgs) ty =
match ty with
- | ILType.Ptr t -> ILType.Ptr (instILTypeAux numFree inst t)
- | ILType.FunctionPointer t -> ILType.FunctionPointer (instILCallSigAux numFree inst t)
+ | ILType.Ptr t -> ILType.Ptr (instILTypeAux numFree inst t)
+ | ILType.FunctionPointer t -> ILType.FunctionPointer (instILCallSigAux numFree inst t)
| ILType.Array (a, t) -> ILType.Array (a, instILTypeAux numFree inst t)
- | ILType.Byref t -> ILType.Byref (instILTypeAux numFree inst t)
- | ILType.Boxed cr -> mkILBoxedType (instILTypeSpecAux numFree inst cr)
- | ILType.Value cr -> ILType.Value (instILTypeSpecAux numFree inst cr)
- | ILType.TypeVar v ->
+ | ILType.Byref t -> ILType.Byref (instILTypeAux numFree inst t)
+ | ILType.Boxed cr -> mkILBoxedType (instILTypeSpecAux numFree inst cr)
+ | ILType.Value cr -> ILType.Value (instILTypeSpecAux numFree inst cr)
+ | ILType.TypeVar v ->
let v = int v
let top = inst.Length
if v < numFree then ty else
@@ -2845,10 +2844,10 @@ and instILTypeAux numFree (inst:ILGenericArgs) ty =
and instILGenericArgsAux numFree inst i = List.map (instILTypeAux numFree inst) i
-and instILCallSigAux numFree inst csig =
- mkILCallSig (csig.CallingConv, List.map (instILTypeAux numFree inst) csig.ArgTypes, instILTypeAux numFree inst csig.ReturnType)
+and instILCallSigAux numFree inst csig =
+ mkILCallSig (csig.CallingConv, List.map (instILTypeAux numFree inst) csig.ArgTypes, instILTypeAux numFree inst csig.ReturnType)
-let instILType i t = instILTypeAux 0 i t
+let instILType i t = instILTypeAux 0 i t
// --------------------------------------------------------------------
// MS-IL: Parameters, Return types and Locals
@@ -2863,7 +2862,7 @@ let mkILParam (name, ty) : ILParameter =
IsOptional=false
Type=ty
CustomAttrsStored=storeILCustomAttrs emptyILCustomAttrs
- MetadataIndex = NoMetadataIdx }
+ MetadataIndex = NoMetadataIdx }
let mkILParamNamed (s, ty) = mkILParam (Some s, ty)
@@ -2991,7 +2990,7 @@ let mkILClassCtor impl =
// (i.e. overrides by name/signature)
// --------------------------------------------------------------------
-let mk_ospec (ty:ILType, callconv, nm, genparams, formal_args, formal_ret) =
+let mk_ospec (ty: ILType, callconv, nm, genparams, formal_args, formal_ret) =
OverridesSpec (mkILMethRef (ty.TypeRef, callconv, nm, genparams, formal_args, formal_ret), ty)
let mkILGenericVirtualMethod (nm, access, genparams, actual_args, actual_ret, impl) =
@@ -3031,14 +3030,14 @@ let mkILNonGenericInstanceMethod (nm, access, args, ret, impl) =
// --------------------------------------------------------------------
-// Add some code to the end of the .cctor for a type. Create a .cctor
+// Add some code to the end of the .cctor for a type. Create a .cctor
// if one doesn't exist already.
// --------------------------------------------------------------------
-let ilmbody_code2code f (il: ILMethodBody) =
+let ilmbody_code2code f (il: ILMethodBody) =
{il with Code = f il.Code}
-let mdef_code2code f (md: ILMethodDef) =
+let mdef_code2code f (md: ILMethodDef) =
let il =
match md.Body.Contents with
| MethodBody.IL il-> il
@@ -3066,7 +3065,7 @@ let prependInstrsToCode (instrs: ILInstr list) (c2: ILCode) =
{ c2 with Labels = labels
Instrs = Array.append instrs c2.Instrs }
-let prependInstrsToMethod new_code md =
+let prependInstrsToMethod new_code md =
mdef_code2code (prependInstrsToCode new_code) md
// Creates cctor if needed
@@ -3082,7 +3081,7 @@ let cdef_cctorCode2CodeOrCreate tag f (cd: ILTypeDef) =
cd.With(methods = methods)
-let code_of_mdef (md:ILMethodDef) =
+let code_of_mdef (md: ILMethodDef) =
match md.Code with
| Some x -> x
| None -> failwith "code_of_mdef: not IL"
@@ -3090,17 +3089,17 @@ let code_of_mdef (md:ILMethodDef) =
let mkRefToILMethod (tref, md: ILMethodDef) =
mkILMethRef (tref, md.CallingConv, md.Name, md.GenericParams.Length, md.ParameterTypes, md.Return.Type)
-let mkRefToILField (tref, fdef:ILFieldDef) = mkILFieldRef (tref, fdef.Name, fdef.FieldType)
+let mkRefToILField (tref, fdef: ILFieldDef) = mkILFieldRef (tref, fdef.Name, fdef.FieldType)
let mkRefForILMethod scope (tdefs, tdef) mdef = mkRefToILMethod (mkRefForNestedILTypeDef scope (tdefs, tdef), mdef)
-let mkRefForILField scope (tdefs, tdef) (fdef:ILFieldDef) = mkILFieldRef (mkRefForNestedILTypeDef scope (tdefs, tdef), fdef.Name, fdef.FieldType)
+let mkRefForILField scope (tdefs, tdef) (fdef: ILFieldDef) = mkILFieldRef (mkRefForNestedILTypeDef scope (tdefs, tdef), fdef.Name, fdef.FieldType)
// Creates cctor if needed
let prependInstrsToClassCtor instrs tag cd =
cdef_cctorCode2CodeOrCreate tag (prependInstrsToMethod instrs) cd
-let mkILField (isStatic, nm, ty, (init:ILFieldInit option), (at: byte [] option), access, isLiteral) =
+let mkILField (isStatic, nm, ty, (init: ILFieldInit option), (at: byte [] option), access, isLiteral) =
ILFieldDef(name=nm,
fieldType=ty,
attributes=
@@ -3125,7 +3124,7 @@ let mkILLiteralField (nm, ty, init, at, access) = mkILField (true, nm, ty, Some
// Scopes for allocating new temporary variables.
// --------------------------------------------------------------------
-type ILLocalsAllocator(numPrealloc:int) =
+type ILLocalsAllocator(numPrealloc: int) =
let newLocals = ResizeArray()
member tmps.AllocLocal loc =
let locn = uint16(numPrealloc + newLocals.Count)
@@ -3135,29 +3134,29 @@ type ILLocalsAllocator(numPrealloc:int) =
member tmps.Close() = ResizeArray.toList newLocals
-let mkILFieldsLazy l = ILFields (LazyOrderedMultiMap((fun (f:ILFieldDef) -> f.Name), l))
+let mkILFieldsLazy l = ILFields (LazyOrderedMultiMap((fun (f: ILFieldDef) -> f.Name), l))
-let mkILFields l = mkILFieldsLazy (notlazy l)
+let mkILFields l = mkILFieldsLazy (notlazy l)
let emptyILFields = mkILFields []
-let mkILEventsLazy l = ILEvents (LazyOrderedMultiMap((fun (e: ILEventDef) -> e.Name), l))
+let mkILEventsLazy l = ILEvents (LazyOrderedMultiMap((fun (e: ILEventDef) -> e.Name), l))
-let mkILEvents l = mkILEventsLazy (notlazy l)
+let mkILEvents l = mkILEventsLazy (notlazy l)
-let emptyILEvents = mkILEvents []
+let emptyILEvents = mkILEvents []
-let mkILPropertiesLazy l = ILProperties (LazyOrderedMultiMap((fun (p: ILPropertyDef) -> p.Name), l) )
+let mkILPropertiesLazy l = ILProperties (LazyOrderedMultiMap((fun (p: ILPropertyDef) -> p.Name), l) )
-let mkILProperties l = mkILPropertiesLazy (notlazy l)
+let mkILProperties l = mkILPropertiesLazy (notlazy l)
-let emptyILProperties = mkILProperties []
+let emptyILProperties = mkILProperties []
let addExportedTypeToTable (y: ILExportedTypeOrForwarder) tab = Map.add y.Name y tab
-let mkILExportedTypes l = ILExportedTypesAndForwarders (notlazy (List.foldBack addExportedTypeToTable l Map.empty))
+let mkILExportedTypes l = ILExportedTypesAndForwarders (notlazy (List.foldBack addExportedTypeToTable l Map.empty))
-let mkILExportedTypesLazy (l:Lazy<_>) = ILExportedTypesAndForwarders (lazy (List.foldBack addExportedTypeToTable (l.Force()) Map.empty))
+let mkILExportedTypesLazy (l: Lazy<_>) = ILExportedTypesAndForwarders (lazy (List.foldBack addExportedTypeToTable (l.Force()) Map.empty))
let addNestedExportedTypeToTable (y: ILNestedExportedType) tab =
Map.add y.Name y tab
@@ -3173,24 +3172,24 @@ let mkTypeForwarder scopeRef name nested customAttrs access =
let mkILNestedExportedTypes l =
ILNestedExportedTypes (notlazy (List.foldBack addNestedExportedTypeToTable l Map.empty))
-let mkILNestedExportedTypesLazy (l:Lazy<_>) =
+let mkILNestedExportedTypesLazy (l: Lazy<_>) =
ILNestedExportedTypes (lazy (List.foldBack addNestedExportedTypeToTable (l.Force()) Map.empty))
-let mkILResources l = ILResources l
+let mkILResources l = ILResources l
let addMethodImplToTable y tab =
let key = (y.Overrides.MethodRef.Name, y.Overrides.MethodRef.ArgTypes.Length)
let prev = Map.tryFindMulti key tab
Map.add key (y::prev) tab
-let mkILMethodImpls l = ILMethodImpls (notlazy (List.foldBack addMethodImplToTable l Map.empty))
+let mkILMethodImpls l = ILMethodImpls (notlazy (List.foldBack addMethodImplToTable l Map.empty))
-let mkILMethodImplsLazy l = ILMethodImpls (lazy (List.foldBack addMethodImplToTable (Lazy.force l) Map.empty))
+let mkILMethodImplsLazy l = ILMethodImpls (lazy (List.foldBack addMethodImplToTable (Lazy.force l) Map.empty))
-let emptyILMethodImpls = mkILMethodImpls []
+let emptyILMethodImpls = mkILMethodImpls []
/// Make a constructor that simply takes its arguments and stuffs
-/// them in fields. preblock is how to call the superclass constructor....
+/// them in fields. preblock is how to call the superclass constructor....
let mkILStorageCtorWithParamNames(tag, preblock, ty, extraParams, flds, access) =
mkILCtor(access,
(flds |> List.map (fun (pnm, _, ty) -> mkILParamNamed (pnm, ty))) @ extraParams,
@@ -3204,7 +3203,7 @@ let mkILStorageCtorWithParamNames(tag, preblock, ty, extraParams, flds, access)
[ mkLdarg0
mkLdarg (uint16 (n+1))
mkNormalStfld (mkILFieldSpecInTy (ty, nm, fieldTy))
- ]) flds)
+ ]) flds)
end, tag))
let mkILSimpleStorageCtorWithParamNames(tag, baseTySpec, ty, extraParams, flds, access) =
@@ -3232,7 +3231,7 @@ let mkILGenericClass (nm, access, genparams, extends, impl, methods, fields, nes
implements = impl,
layout=ILTypeDefLayout.Auto,
extends = Some extends,
- methods= methods ,
+ methods= methods,
fields= fields,
nestedTypes=nestedTypes,
customAttrs=attrs,
@@ -3314,7 +3313,7 @@ let mkILSimpleModule assemblyName modname dll subsystemVersion useHighEntropyVA
//-----------------------------------------------------------------------
// [instructions_to_code] makes the basic block structure of code from
-// a primitive array of instructions. We
+// a primitive array of instructions. We
// do this be iterating over the instructions, pushing new basic blocks
// everytime we encounter an address that has been recorded
// [bbstartToCodeLabelMap].
@@ -3324,7 +3323,7 @@ let mkILSimpleModule assemblyName modname dll subsystemVersion useHighEntropyVA
// REVIEW: this function shows up on performance traces. If we eliminated the last ILX->IL rewrites from the
// F# compiler we could get rid of this structured code representation from Abstract IL altogether and
// never convert F# code into this form.
-let buildILCode (_methName:string) lab2pc instrs tryspecs localspecs : ILCode =
+let buildILCode (_methName: string) lab2pc instrs tryspecs localspecs : ILCode =
{ Labels = lab2pc
Instrs = instrs
Exceptions = tryspecs
@@ -3335,7 +3334,7 @@ let buildILCode (_methName:string) lab2pc instrs tryspecs localspecs : ILCode =
// Detecting Delegates
// --------------------------------------------------------------------
-let mkILDelegateMethods (access) (ilg: ILGlobals) (iltyp_AsyncCallback, iltyp_IAsyncResult) (parms, rtv:ILReturn) =
+let mkILDelegateMethods (access) (ilg: ILGlobals) (iltyp_AsyncCallback, iltyp_IAsyncResult) (parms, rtv: ILReturn) =
let rty = rtv.Type
let one nm args ret =
let mdef = mkILNonGenericVirtualMethod (nm, access, args, mkILReturn ret, MethodBody.Abstract)
@@ -3348,7 +3347,7 @@ let mkILDelegateMethods (access) (ilg: ILGlobals) (iltyp_AsyncCallback, iltyp_IA
one "EndInvoke" [mkILParamNamed("result", iltyp_IAsyncResult)] rty ]
-let mkCtorMethSpecForDelegate (ilg: ILGlobals) (ty:ILType, useUIntPtr) =
+let mkCtorMethSpecForDelegate (ilg: ILGlobals) (ty: ILType, useUIntPtr) =
let scoref = ty.TypeRef.Scope
mkILInstanceMethSpecInTy (ty, ".ctor", [rescopeILType scoref ilg.typ_Object
rescopeILType scoref (if useUIntPtr then ilg.typ_UIntPtr else ilg.typ_IntPtr)],
@@ -3361,15 +3360,15 @@ type ILEnumInfo =
let getTyOfILEnumInfo info = info.enumType
let computeILEnumInfo (mdName, mdFields: ILFieldDefs) =
- match (List.partition (fun (fd:ILFieldDef) -> fd.IsStatic) mdFields.AsList) with
+ match (List.partition (fun (fd: ILFieldDef) -> fd.IsStatic) mdFields.AsList) with
| staticFields, [vfd] ->
{ enumType = vfd.FieldType
- enumValues = staticFields |> List.map (fun fd -> (fd.Name, match fd.LiteralValue with Some i -> i | None -> failwith ("info_of_enum_tdef: badly formed enum "+mdName+": static field does not have an default value"))) }
+ enumValues = staticFields |> List.map (fun fd -> (fd.Name, match fd.LiteralValue with Some i -> i | None -> failwith ("info_of_enum_tdef: badly formed enum "+mdName+": static field does not have an default value"))) }
| _, [] -> failwith ("info_of_enum_tdef: badly formed enum "+mdName+": no non-static field found")
| _, _ -> failwith ("info_of_enum_tdef: badly formed enum "+mdName+": more than one non-static field found")
//---------------------------------------------------------------------
-// Primitives to help read signatures. These do not use the file cursor, but
+// Primitives to help read signatures. These do not use the file cursor, but
// pass around an int index
//---------------------------------------------------------------------
@@ -3378,7 +3377,7 @@ let sigptr_get_byte bytes sigptr =
let sigptr_get_bool bytes sigptr =
let b0, sigptr = sigptr_get_byte bytes sigptr
- (b0 = 0x01) , sigptr
+ (b0 = 0x01), sigptr
let sigptr_get_u8 bytes sigptr =
let b0, sigptr = sigptr_get_byte bytes sigptr
@@ -3425,9 +3424,9 @@ let sigptr_get_u64 bytes sigptr =
let u, sigptr = sigptr_get_i64 bytes sigptr
uint64 u, sigptr
-let float32_of_bits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x), 0)
+let float32_of_bits (x: int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x), 0)
-let float_of_bits (x:int64) = System.BitConverter.Int64BitsToDouble(x)
+let float_of_bits (x: int64) = System.BitConverter.Int64BitsToDouble(x)
let sigptr_get_ieee32 bytes sigptr =
let u, sigptr = sigptr_get_i32 bytes sigptr
@@ -3437,7 +3436,7 @@ let sigptr_get_ieee64 bytes sigptr =
let u, sigptr = sigptr_get_i64 bytes sigptr
float_of_bits u, sigptr
-let sigptr_get_intarray n (bytes:byte[]) sigptr =
+let sigptr_get_intarray n (bytes: byte[]) sigptr =
let res = Bytes.zeroCreate n
for i = 0 to n - 1 do
res.[i] <- bytes.[sigptr + i]
@@ -3445,7 +3444,7 @@ let sigptr_get_intarray n (bytes:byte[]) sigptr =
let sigptr_get_string n bytes sigptr =
let intarray, sigptr = sigptr_get_intarray n bytes sigptr
- System.Text.Encoding.UTF8.GetString(intarray , 0, intarray.Length), sigptr
+ System.Text.Encoding.UTF8.GetString(intarray, 0, intarray.Length), sigptr
let sigptr_get_z_i32 bytes sigptr =
let b0, sigptr = sigptr_get_byte bytes sigptr
@@ -3461,15 +3460,15 @@ let sigptr_get_z_i32 bytes sigptr =
let b3, sigptr = sigptr_get_byte bytes sigptr
(b0 <<< 24) ||| (b1 <<< 16) ||| (b2 <<< 8) ||| b3, sigptr
-let sigptr_get_serstring bytes sigptr =
+let sigptr_get_serstring bytes sigptr =
let len, sigptr = sigptr_get_z_i32 bytes sigptr
sigptr_get_string ( len) bytes sigptr
-let sigptr_get_serstring_possibly_null bytes sigptr =
+let sigptr_get_serstring_possibly_null bytes sigptr =
let b0, new_sigptr = sigptr_get_byte bytes sigptr
if b0 = 0xFF then // null case
None, new_sigptr
- else // throw away new_sigptr, getting length & text advance
+ else // throw away new_sigptr, getting length & text advance
let len, sigptr = sigptr_get_z_i32 bytes sigptr
let s, sigptr = sigptr_get_string len bytes sigptr
Some(s), sigptr
@@ -3487,14 +3486,14 @@ let z_unsigned_int_size n =
else 3
let z_unsigned_int n =
- if n >= 0 && n <= 0x7F then [| byte n |]
+ if n >= 0 && n <= 0x7F then [| byte n |]
elif n >= 0x80 && n <= 0x3FFF then [| byte (0x80 ||| (n >>>& 8)); byte (n &&& 0xFF) |]
else [| byte (0xc0 ||| (n >>>& 24))
byte ((n >>>& 16) &&& 0xFF)
byte ((n >>>& 8) &&& 0xFF)
byte (n &&& 0xFF) |]
-let string_as_utf8_bytes (s:string) = System.Text.Encoding.UTF8.GetBytes s
+let string_as_utf8_bytes (s: string) = System.Text.Encoding.UTF8.GetBytes s
(* Little-endian encoding of int64 *)
let dw7 n = byte ((n >>> 56) &&& 0xFFL)
@@ -3509,29 +3508,29 @@ let dw3 n = byte ((n >>> 24) &&& 0xFFL)
let dw2 n = byte ((n >>> 16) &&& 0xFFL)
-let dw1 n = byte ((n >>> 8) &&& 0xFFL)
+let dw1 n = byte ((n >>> 8) &&& 0xFFL)
-let dw0 n = byte (n &&& 0xFFL)
+let dw0 n = byte (n &&& 0xFFL)
-let u8AsBytes (i:byte) = [| i |]
+let u8AsBytes (i: byte) = [| i |]
-let u16AsBytes x = let n = (int x) in [| byte (b0 n); byte (b1 n) |]
+let u16AsBytes x = let n = (int x) in [| byte (b0 n); byte (b1 n) |]
let i32AsBytes i = [| byte (b0 i); byte (b1 i); byte (b2 i); byte (b3 i) |]
let i64AsBytes i = [| dw0 i; dw1 i; dw2 i; dw3 i; dw4 i; dw5 i; dw6 i; dw7 i |]
-let i8AsBytes (i:sbyte) = u8AsBytes (byte i)
+let i8AsBytes (i: sbyte) = u8AsBytes (byte i)
-let i16AsBytes (i:int16) = u16AsBytes (uint16 i)
+let i16AsBytes (i: int16) = u16AsBytes (uint16 i)
-let u32AsBytes (i:uint32) = i32AsBytes (int32 i)
+let u32AsBytes (i: uint32) = i32AsBytes (int32 i)
-let u64AsBytes (i:uint64) = i64AsBytes (int64 i)
+let u64AsBytes (i: uint64) = i64AsBytes (int64 i)
-let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x), 0)
+let bits_of_float32 (x: float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x), 0)
-let bits_of_float (x:float) = System.BitConverter.DoubleToInt64Bits(x)
+let bits_of_float (x: float) = System.BitConverter.DoubleToInt64Bits(x)
let ieee32AsBytes i = i32AsBytes (bits_of_float32 i)
@@ -3554,20 +3553,20 @@ let et_R8 = 0x0Duy
let et_STRING = 0x0Euy
let et_PTR = 0x0Fuy
let et_BYREF = 0x10uy
-let et_VALUETYPE = 0x11uy
-let et_CLASS = 0x12uy
-let et_VAR = 0x13uy
-let et_ARRAY = 0x14uy
-let et_WITH = 0x15uy
-let et_TYPEDBYREF = 0x16uy
-let et_I = 0x18uy
-let et_U = 0x19uy
-let et_FNPTR = 0x1Buy
-let et_OBJECT = 0x1Cuy
-let et_SZARRAY = 0x1Duy
-let et_MVAR = 0x1Euy
-let et_CMOD_REQD = 0x1Fuy
-let et_CMOD_OPT = 0x20uy
+let et_VALUETYPE = 0x11uy
+let et_CLASS = 0x12uy
+let et_VAR = 0x13uy
+let et_ARRAY = 0x14uy
+let et_WITH = 0x15uy
+let et_TYPEDBYREF = 0x16uy
+let et_I = 0x18uy
+let et_U = 0x19uy
+let et_FNPTR = 0x1Buy
+let et_OBJECT = 0x1Cuy
+let et_SZARRAY = 0x1Duy
+let et_MVAR = 0x1Euy
+let et_CMOD_REQD = 0x1Fuy
+let et_CMOD_OPT = 0x20uy
let formatILVersion (version: ILVersionInfo) = sprintf "%d.%d.%d.%d" (int version.Major) (int version.Minor) (int version.Build) (int version.Revision)
@@ -3577,69 +3576,69 @@ let encodeCustomAttrString s =
let rec encodeCustomAttrElemType x =
match x with
- | ILType.Value tspec when tspec.Name = tname_SByte -> [| et_I1 |]
- | ILType.Value tspec when tspec.Name = tname_Byte -> [| et_U1 |]
- | ILType.Value tspec when tspec.Name = tname_Int16 -> [| et_I2 |]
- | ILType.Value tspec when tspec.Name = tname_UInt16 -> [| et_U2 |]
- | ILType.Value tspec when tspec.Name = tname_Int32 -> [| et_I4 |]
- | ILType.Value tspec when tspec.Name = tname_UInt32 -> [| et_U4 |]
- | ILType.Value tspec when tspec.Name = tname_Int64 -> [| et_I8 |]
- | ILType.Value tspec when tspec.Name = tname_UInt64 -> [| et_U8 |]
- | ILType.Value tspec when tspec.Name = tname_Double -> [| et_R8 |]
- | ILType.Value tspec when tspec.Name = tname_Single -> [| et_R4 |]
- | ILType.Value tspec when tspec.Name = tname_Char -> [| et_CHAR |]
- | ILType.Value tspec when tspec.Name = tname_Bool -> [| et_BOOLEAN |]
- | ILType.Boxed tspec when tspec.Name = tname_String -> [| et_STRING |]
- | ILType.Boxed tspec when tspec.Name = tname_Object -> [| 0x51uy |]
- | ILType.Boxed tspec when tspec.Name = tname_Type -> [| 0x50uy |]
- | ILType.Value tspec -> Array.append [| 0x55uy |] (encodeCustomAttrString tspec.TypeRef.QualifiedName)
+ | ILType.Value tspec when tspec.Name = tname_SByte -> [| et_I1 |]
+ | ILType.Value tspec when tspec.Name = tname_Byte -> [| et_U1 |]
+ | ILType.Value tspec when tspec.Name = tname_Int16 -> [| et_I2 |]
+ | ILType.Value tspec when tspec.Name = tname_UInt16 -> [| et_U2 |]
+ | ILType.Value tspec when tspec.Name = tname_Int32 -> [| et_I4 |]
+ | ILType.Value tspec when tspec.Name = tname_UInt32 -> [| et_U4 |]
+ | ILType.Value tspec when tspec.Name = tname_Int64 -> [| et_I8 |]
+ | ILType.Value tspec when tspec.Name = tname_UInt64 -> [| et_U8 |]
+ | ILType.Value tspec when tspec.Name = tname_Double -> [| et_R8 |]
+ | ILType.Value tspec when tspec.Name = tname_Single -> [| et_R4 |]
+ | ILType.Value tspec when tspec.Name = tname_Char -> [| et_CHAR |]
+ | ILType.Value tspec when tspec.Name = tname_Bool -> [| et_BOOLEAN |]
+ | ILType.Boxed tspec when tspec.Name = tname_String -> [| et_STRING |]
+ | ILType.Boxed tspec when tspec.Name = tname_Object -> [| 0x51uy |]
+ | ILType.Boxed tspec when tspec.Name = tname_Type -> [| 0x50uy |]
+ | ILType.Value tspec -> Array.append [| 0x55uy |] (encodeCustomAttrString tspec.TypeRef.QualifiedName)
| ILType.Array (shape, elemType) when shape = ILArrayShape.SingleDimensional ->
Array.append [| et_SZARRAY |] (encodeCustomAttrElemType elemType)
- | _ -> failwith "encodeCustomAttrElemType: unrecognized custom element type"
+ | _ -> failwith "encodeCustomAttrElemType: unrecognized custom element type"
/// Given a custom attribute element, work out the type of the .NET argument for that element.
let rec encodeCustomAttrElemTypeForObject x =
match x with
- | ILAttribElem.String _ -> [| et_STRING |]
- | ILAttribElem.Bool _ -> [| et_BOOLEAN |]
- | ILAttribElem.Char _ -> [| et_CHAR |]
- | ILAttribElem.SByte _ -> [| et_I1 |]
- | ILAttribElem.Int16 _ -> [| et_I2 |]
- | ILAttribElem.Int32 _ -> [| et_I4 |]
- | ILAttribElem.Int64 _ -> [| et_I8 |]
- | ILAttribElem.Byte _ -> [| et_U1 |]
- | ILAttribElem.UInt16 _ -> [| et_U2 |]
- | ILAttribElem.UInt32 _ -> [| et_U4 |]
- | ILAttribElem.UInt64 _ -> [| et_U8 |]
- | ILAttribElem.Type _ -> [| 0x50uy |]
+ | ILAttribElem.String _ -> [| et_STRING |]
+ | ILAttribElem.Bool _ -> [| et_BOOLEAN |]
+ | ILAttribElem.Char _ -> [| et_CHAR |]
+ | ILAttribElem.SByte _ -> [| et_I1 |]
+ | ILAttribElem.Int16 _ -> [| et_I2 |]
+ | ILAttribElem.Int32 _ -> [| et_I4 |]
+ | ILAttribElem.Int64 _ -> [| et_I8 |]
+ | ILAttribElem.Byte _ -> [| et_U1 |]
+ | ILAttribElem.UInt16 _ -> [| et_U2 |]
+ | ILAttribElem.UInt32 _ -> [| et_U4 |]
+ | ILAttribElem.UInt64 _ -> [| et_U8 |]
+ | ILAttribElem.Type _ -> [| 0x50uy |]
| ILAttribElem.TypeRef _ -> [| 0x50uy |]
- | ILAttribElem.Null _ -> [| et_STRING |]// yes, the 0xe prefix is used when passing a "null" to a property or argument of type "object" here
- | ILAttribElem.Single _ -> [| et_R4 |]
- | ILAttribElem.Double _ -> [| et_R8 |]
+ | ILAttribElem.Null _ -> [| et_STRING |]// yes, the 0xe prefix is used when passing a "null" to a property or argument of type "object" here
+ | ILAttribElem.Single _ -> [| et_R4 |]
+ | ILAttribElem.Double _ -> [| et_R8 |]
| ILAttribElem.Array (elemTy, _) -> [| yield et_SZARRAY; yield! encodeCustomAttrElemType elemTy |]
let rec decodeCustomAttrElemType (ilg: ILGlobals) bytes sigptr x =
match x with
- | x when x = et_I1 -> ilg.typ_SByte, sigptr
+ | x when x = et_I1 -> ilg.typ_SByte, sigptr
| x when x = et_U1 -> ilg.typ_Byte, sigptr
- | x when x = et_I2 -> ilg.typ_Int16, sigptr
- | x when x = et_U2 -> ilg.typ_UInt16, sigptr
- | x when x = et_I4 -> ilg.typ_Int32, sigptr
- | x when x = et_U4 -> ilg.typ_UInt32, sigptr
- | x when x = et_I8 -> ilg.typ_Int64, sigptr
- | x when x = et_U8 -> ilg.typ_UInt64, sigptr
- | x when x = et_R8 -> ilg.typ_Double, sigptr
- | x when x = et_R4 -> ilg.typ_Single, sigptr
+ | x when x = et_I2 -> ilg.typ_Int16, sigptr
+ | x when x = et_U2 -> ilg.typ_UInt16, sigptr
+ | x when x = et_I4 -> ilg.typ_Int32, sigptr
+ | x when x = et_U4 -> ilg.typ_UInt32, sigptr
+ | x when x = et_I8 -> ilg.typ_Int64, sigptr
+ | x when x = et_U8 -> ilg.typ_UInt64, sigptr
+ | x when x = et_R8 -> ilg.typ_Double, sigptr
+ | x when x = et_R4 -> ilg.typ_Single, sigptr
| x when x = et_CHAR -> ilg.typ_Char, sigptr
- | x when x = et_BOOLEAN -> ilg.typ_Bool, sigptr
- | x when x = et_STRING -> ilg.typ_String, sigptr
- | x when x = et_OBJECT -> ilg.typ_Object, sigptr
- | x when x = et_SZARRAY ->
+ | x when x = et_BOOLEAN -> ilg.typ_Bool, sigptr
+ | x when x = et_STRING -> ilg.typ_String, sigptr
+ | x when x = et_OBJECT -> ilg.typ_Object, sigptr
+ | x when x = et_SZARRAY ->
let et, sigptr = sigptr_get_u8 bytes sigptr
let elemTy, sigptr = decodeCustomAttrElemType ilg bytes sigptr et
mkILArr1DTy elemTy, sigptr
| x when x = 0x50uy -> ilg.typ_Type, sigptr
- | _ -> failwithf "decodeCustomAttrElemType ilg: unrecognized custom element type: %A" x
+ | _ -> failwithf "decodeCustomAttrElemType ilg: unrecognized custom element type: %A" x
/// Given a custom attribute element, encode it to a binary representation according to the rules in Ecma 335 Partition II.
@@ -3651,7 +3650,7 @@ let rec encodeCustomAttrPrimValue ilg c =
| ILAttribElem.TypeRef None
| ILAttribElem.Null -> [| 0xFFuy |]
| ILAttribElem.String (Some s) -> encodeCustomAttrString s
- | ILAttribElem.Char x -> u16AsBytes (uint16 x)
+ | ILAttribElem.Char x -> u16AsBytes (uint16 x)
| ILAttribElem.SByte x -> i8AsBytes x
| ILAttribElem.Int16 x -> i16AsBytes x
| ILAttribElem.Int32 x -> i32AsBytes x
@@ -3684,7 +3683,7 @@ let encodeCustomAttrNamedArg ilg (nm, ty, prop, elem) =
yield! encodeCustomAttrString nm
yield! encodeCustomAttrValue ilg ty elem |]
-let encodeCustomAttrArgs (ilg: ILGlobals) (mspec:ILMethodSpec) (fixedArgs: list<_>) (namedArgs: list<_>) =
+let encodeCustomAttrArgs (ilg: ILGlobals) (mspec: ILMethodSpec) (fixedArgs: list<_>) (namedArgs: list<_>) =
let argtys = mspec.MethodRef.ArgTypes
[| yield! [| 0x01uy; 0x00uy; |]
for (argty, fixedArg) in Seq.zip argtys fixedArgs do
@@ -3693,11 +3692,11 @@ let encodeCustomAttrArgs (ilg: ILGlobals) (mspec:ILMethodSpec) (fixedArgs: list<
for namedArg in namedArgs do
yield! encodeCustomAttrNamedArg ilg namedArg |]
-let encodeCustomAttr (ilg: ILGlobals) (mspec:ILMethodSpec, fixedArgs: list<_>, namedArgs: list<_>) =
+let encodeCustomAttr (ilg: ILGlobals) (mspec: ILMethodSpec, fixedArgs: list<_>, namedArgs: list<_>) =
let args = encodeCustomAttrArgs ilg mspec fixedArgs namedArgs
ILAttribute.Encoded (mspec, args, fixedArgs @ (namedArgs |> List.map (fun (_, _, _, e) -> e)))
-let mkILCustomAttribMethRef (ilg: ILGlobals) (mspec:ILMethodSpec, fixedArgs: list<_>, namedArgs: list<_>) =
+let mkILCustomAttribMethRef (ilg: ILGlobals) (mspec: ILMethodSpec, fixedArgs: list<_>, namedArgs: list<_>) =
encodeCustomAttr ilg (mspec, fixedArgs, namedArgs)
let mkILCustomAttribute ilg (tref, argtys, argvs, propvs) =
@@ -3725,7 +3724,7 @@ let mkPermissionSet (ilg: ILGlobals) (action, attributes: list<(ILTypeRef * (str
let bytes =
[| yield (byte '.')
yield! z_unsigned_int attributes.Length
- for (tref:ILTypeRef, props) in attributes do
+ for (tref: ILTypeRef, props) in attributes do
yield! encodeCustomAttrString tref.QualifiedName
let bytes =
[| yield! z_unsigned_int props.Length
@@ -3763,7 +3762,7 @@ type ILTypeSigParser(tstring : string) =
s
// The format we accept is
- // "{`[, +]}{}{}" E.g.,
+ // "{`[, +]}{}{}" E.g.,
//
// System.Collections.Generic.Dictionary
// `2[
@@ -3777,7 +3776,7 @@ type ILTypeSigParser(tstring : string) =
// Still needs testing with jagged arrays and byref parameters
member private x.ParseType() =
- // Does the type name start with a leading '['? If so, ignore it
+ // Does the type name start with a leading '['? If so, ignore it
// (if the specialization type is in another module, it will be wrapped in bracket)
if here() = '[' then drop()
@@ -3838,7 +3837,7 @@ type ILTypeSigParser(tstring : string) =
ILScopeRef.Local
// strip any extraneous trailing brackets or commas
- if (here() = ']') then drop()
+ if (here() = ']') then drop()
if (here() = ',') then drop()
// build the IL type
@@ -3951,10 +3950,10 @@ let decodeILAttribData (ilg: ILGlobals) (ca: ILAttribute) =
parseElems (v ::acc) (n-1) sigptr
let elems, sigptr = parseElems [] n sigptr
ILAttribElem.Array(elemTy, elems), sigptr
- | ILType.Value _ -> (* assume it is an enumeration *)
+ | ILType.Value _ -> (* assume it is an enumeration *)
let n, sigptr = sigptr_get_i32 bytes sigptr
ILAttribElem.Int32 n, sigptr
- | _ -> failwith "decodeILAttribData: attribute data involves an enum or System.Type value"
+ | _ -> failwith "decodeILAttribData: attribute data involves an enum or System.Type value"
let rec parseFixed argtys sigptr =
match argtys with
[] -> [], sigptr
@@ -3998,7 +3997,7 @@ let decodeILAttribData (ilg: ILGlobals) (ca: ILAttribute) =
// --------------------------------------------------------------------
// Functions to collect up all the references in a full module or
-// assembly manifest. The process also allocates
+// assembly manifest. The process also allocates
// a unique name to each unique internal assembly reference.
// --------------------------------------------------------------------
@@ -4015,8 +4014,9 @@ let emptyILRefs =
ModuleReferences = [] }
(* Now find references. *)
-let refs_of_assemblyRef (s:ILReferencesAccumulator) x = s.refsA.Add x |> ignore
-let refs_of_modref (s:ILReferencesAccumulator) x = s.refsM.Add x |> ignore
+let refs_of_assemblyRef (s: ILReferencesAccumulator) x = s.refsA.Add x |> ignore
+
+let refs_of_modref (s: ILReferencesAccumulator) x = s.refsM.Add x |> ignore
let refs_of_scoref s x =
match x with
@@ -4024,11 +4024,11 @@ let refs_of_scoref s x =
| ILScopeRef.Assembly assemblyRef -> refs_of_assemblyRef s assemblyRef
| ILScopeRef.Module modref -> refs_of_modref s modref
-let refs_of_tref s (x:ILTypeRef) = refs_of_scoref s x.Scope
+let refs_of_tref s (x: ILTypeRef) = refs_of_scoref s x.Scope
let rec refs_of_typ s x =
match x with
- | ILType.Void | ILType.TypeVar _ -> ()
+ | ILType.Void | ILType.TypeVar _ -> ()
| ILType.Modified(_, ty1, ty2) -> refs_of_tref s ty1; refs_of_typ s ty2
| ILType.Array (_, ty)
| ILType.Ptr ty | ILType.Byref ty -> refs_of_typ s ty
@@ -4036,20 +4036,26 @@ let rec refs_of_typ s x =
| ILType.FunctionPointer mref -> refs_of_callsig s mref
and refs_of_inst s i = refs_of_tys s i
-and refs_of_tspec s (x:ILTypeSpec) = refs_of_tref s x.TypeRef; refs_of_inst s x.GenericArgs
-and refs_of_callsig s csig = refs_of_tys s csig.ArgTypes; refs_of_typ s csig.ReturnType
+
+and refs_of_tspec s (x: ILTypeSpec) = refs_of_tref s x.TypeRef; refs_of_inst s x.GenericArgs
+
+and refs_of_callsig s csig = refs_of_tys s csig.ArgTypes; refs_of_typ s csig.ReturnType
+
and refs_of_genparam s x = refs_of_tys s x.Constraints
+
and refs_of_genparams s b = List.iter (refs_of_genparam s) b
and refs_of_dloc s ts = refs_of_tref s ts
-and refs_of_mref s (x:ILMethodRef) =
+and refs_of_mref s (x: ILMethodRef) =
refs_of_dloc s x.DeclaringTypeRef
refs_of_tys s x.mrefArgs
refs_of_typ s x.mrefReturn
and refs_of_fref s x = refs_of_tref s x.DeclaringTypeRef; refs_of_typ s x.Type
+
and refs_of_ospec s (OverridesSpec(mref, ty)) = refs_of_mref s mref; refs_of_typ s ty
+
and refs_of_mspec s (x: ILMethodSpec) =
refs_of_mref s x.MethodRef
refs_of_typ s x.DeclaringType
@@ -4070,7 +4076,9 @@ and refs_of_token s x =
and refs_of_custom_attr s (cattr: ILAttribute) = refs_of_mspec s cattr.Method
and refs_of_custom_attrs s (cas : ILAttributes) = Array.iter (refs_of_custom_attr s) cas.AsArray
+
and refs_of_varargs s tyso = Option.iter (refs_of_tys s) tyso
+
and refs_of_instr s x =
match x with
| I_call (_, mr, varargs) | I_newobj (mr, varargs) | I_callvirt (_, mr, varargs) ->
@@ -4081,7 +4089,7 @@ and refs_of_instr s x =
refs_of_mspec s mr
refs_of_varargs s varargs
| I_calli (_, callsig, varargs) ->
- refs_of_callsig s callsig; refs_of_varargs s varargs
+ refs_of_callsig s callsig; refs_of_varargs s varargs
| I_jmp mr | I_ldftn mr | I_ldvirtftn mr ->
refs_of_mspec s mr
| I_ldsfld (_, fr) | I_ldfld (_, _, fr) | I_ldsflda fr | I_ldflda fr | I_stsfld (_, fr) | I_stfld (_, _, fr) ->
@@ -4090,7 +4098,7 @@ and refs_of_instr s x =
| I_stobj (_, _, ty) | I_box ty |I_unbox ty | I_unbox_any ty | I_sizeof ty
| I_ldelem_any (_, ty) | I_ldelema (_, _, _, ty) |I_stelem_any (_, ty) | I_newarr (_, ty)
| I_mkrefany ty | I_refanyval ty
- | EI_ilzero ty -> refs_of_typ s ty
+ | EI_ilzero ty -> refs_of_typ s ty
| I_ldtoken token -> refs_of_token s token
| I_stelem _|I_ldelem _|I_ldstr _|I_switch _|I_stloc _|I_stind _
| I_starg _|I_ldloca _|I_ldloc _|I_ldind _
@@ -4098,13 +4106,13 @@ and refs_of_instr s x =
| I_brcmp _|I_rethrow|I_refanytype|I_ldlen|I_throw|I_initblk _ |I_cpblk _
| I_localloc|I_ret |I_endfilter|I_endfinally|I_arglist
| I_break
- | AI_add | AI_add_ovf | AI_add_ovf_un | AI_and | AI_div | AI_div_un | AI_ceq | AI_cgt | AI_cgt_un | AI_clt
- | AI_clt_un | AI_conv _ | AI_conv_ovf _ | AI_conv_ovf_un _ | AI_mul | AI_mul_ovf | AI_mul_ovf_un | AI_rem | AI_rem_un
- | AI_shl | AI_shr | AI_shr_un | AI_sub | AI_sub_ovf | AI_sub_ovf_un | AI_xor | AI_or | AI_neg | AI_not
- | AI_ldnull | AI_dup | AI_pop | AI_ckfinite | AI_nop | AI_ldc _
- | I_seqpoint _ | EI_ldlen_multi _ -> ()
+ | AI_add | AI_add_ovf | AI_add_ovf_un | AI_and | AI_div | AI_div_un | AI_ceq | AI_cgt | AI_cgt_un | AI_clt
+ | AI_clt_un | AI_conv _ | AI_conv_ovf _ | AI_conv_ovf_un _ | AI_mul | AI_mul_ovf | AI_mul_ovf_un | AI_rem | AI_rem_un
+ | AI_shl | AI_shr | AI_shr_un | AI_sub | AI_sub_ovf | AI_sub_ovf_un | AI_xor | AI_or | AI_neg | AI_not
+ | AI_ldnull | AI_dup | AI_pop | AI_ckfinite | AI_nop | AI_ldc _
+ | I_seqpoint _ | EI_ldlen_multi _ -> ()
-and refs_of_il_code s (c: ILCode) =
+and refs_of_il_code s (c: ILCode) =
c.Instrs |> Array.iter (refs_of_instr s)
c.Exceptions |> List.iter (fun e -> e.Clause |> (function
| ILExceptionClause.TypeCatch (ilty, _) -> refs_of_typ s ilty
@@ -4125,29 +4133,29 @@ and refs_of_mbody s x =
and refs_of_mdef s (md: ILMethodDef) =
List.iter (refs_of_param s) md.Parameters
refs_of_return s md.Return
- refs_of_mbody s md.Body.Contents
- refs_of_custom_attrs s md.CustomAttrs
- refs_of_genparams s md.GenericParams
+ refs_of_mbody s md.Body.Contents
+ refs_of_custom_attrs s md.CustomAttrs
+ refs_of_genparams s md.GenericParams
and refs_of_param s p = refs_of_typ s p.Type
-and refs_of_return s (rt:ILReturn) = refs_of_typ s rt.Type
+and refs_of_return s (rt: ILReturn) = refs_of_typ s rt.Type
-and refs_of_mdefs s x = Seq.iter (refs_of_mdef s) x
+and refs_of_mdefs s x = Seq.iter (refs_of_mdef s) x
and refs_of_event_def s (ed: ILEventDef) =
- Option.iter (refs_of_typ s) ed.EventType
+ Option.iter (refs_of_typ s) ed.EventType
refs_of_mref s ed.AddMethod
refs_of_mref s ed.RemoveMethod
Option.iter (refs_of_mref s) ed.FireMethod
List.iter (refs_of_mref s) ed.OtherMethods
refs_of_custom_attrs s ed.CustomAttrs
-and refs_of_events s (x: ILEventDefs) = List.iter (refs_of_event_def s) x.AsList
+and refs_of_events s (x: ILEventDefs) = List.iter (refs_of_event_def s) x.AsList
and refs_of_property_def s (pd: ILPropertyDef) =
- Option.iter (refs_of_mref s) pd.SetMethod
- Option.iter (refs_of_mref s) pd.GetMethod
+ Option.iter (refs_of_mref s) pd.SetMethod
+ Option.iter (refs_of_mref s) pd.GetMethod
refs_of_typ s pd.PropertyType
refs_of_tys s pd.Args
refs_of_custom_attrs s pd.CustomAttrs
@@ -4155,35 +4163,35 @@ and refs_of_property_def s (pd: ILPropertyDef) =
and refs_of_properties s (x: ILPropertyDefs) = List.iter (refs_of_property_def s) x.AsList
and refs_of_fdef s (fd: ILFieldDef) =
- refs_of_typ s fd.FieldType
- refs_of_custom_attrs s fd.CustomAttrs
+ refs_of_typ s fd.FieldType
+ refs_of_custom_attrs s fd.CustomAttrs
and refs_of_fields s fields = List.iter (refs_of_fdef s) fields
-and refs_of_method_impls s mimpls = List.iter (refs_of_method_impl s) mimpls
+and refs_of_method_impls s mimpls = List.iter (refs_of_method_impl s) mimpls
and refs_of_method_impl s m =
refs_of_ospec s m.Overrides
refs_of_mspec s m.OverrideBy
-and refs_of_tdef_kind _s _k = ()
+and refs_of_tdef_kind _s _k = ()
-and refs_of_tdef s (td : ILTypeDef) =
+and refs_of_tdef s (td : ILTypeDef) =
refs_of_types s td.NestedTypes
- refs_of_genparams s td.GenericParams
- refs_of_tys s td.Implements
+ refs_of_genparams s td.GenericParams
+ refs_of_tys s td.Implements
Option.iter (refs_of_typ s) td.Extends
- refs_of_mdefs s td.Methods
- refs_of_fields s td.Fields.AsList
+ refs_of_mdefs s td.Methods
+ refs_of_fields s td.Fields.AsList
refs_of_method_impls s td.MethodImpls.AsList
- refs_of_events s td.Events
- refs_of_tdef_kind s td
+ refs_of_events s td.Events
+ refs_of_tdef_kind s td
refs_of_custom_attrs s td.CustomAttrs
- refs_of_properties s td.Properties
+ refs_of_properties s td.Properties
and refs_of_string _s _ = ()
-and refs_of_types s (types: ILTypeDefs) = Seq.iter (refs_of_tdef s) types
+and refs_of_types s (types: ILTypeDefs) = Seq.iter (refs_of_tdef s) types
and refs_of_exported_type s (c: ILExportedTypeOrForwarder) =
refs_of_custom_attrs s c.CustomAttrs
@@ -4219,7 +4227,7 @@ let computeILRefs modul =
refs_of_modul s modul
{ AssemblyReferences = Seq.fold (fun acc x -> x::acc) [] s.refsA
- ModuleReferences = Seq.fold (fun acc x -> x::acc) [] s.refsM }
+ ModuleReferences = Seq.fold (fun acc x -> x::acc) [] s.refsM }
let tspan = System.TimeSpan(System.DateTime.UtcNow.Ticks - System.DateTime(2000, 1, 1).Ticks)
@@ -4266,7 +4274,7 @@ let compareILVersions (version1 : ILVersionInfo) (version2 : ILVersionInfo) =
let unscopeILTypeRef (x: ILTypeRef) = ILTypeRef.Create(ILScopeRef.Local, x.Enclosing, x.Name)
-let rec unscopeILTypeSpec (tspec:ILTypeSpec) =
+let rec unscopeILTypeSpec (tspec: ILTypeSpec) =
let tref = tspec.TypeRef
let tinst = tspec.GenericArgs
let tref = unscopeILTypeRef tref
@@ -4290,7 +4298,7 @@ and unscopeILTypes i =
and unscopeILCallSig csig =
mkILCallSig (csig.CallingConv, unscopeILTypes csig.ArgTypes, unscopeILType csig.ReturnType)
-let resolveILMethodRefWithRescope r (td: ILTypeDef) (mref:ILMethodRef) =
+let resolveILMethodRefWithRescope r (td: ILTypeDef) (mref: ILMethodRef) =
let args = mref.ArgTypes
let nargs = args.Length
let nm = mref.Name
@@ -4301,12 +4309,12 @@ let resolveILMethodRefWithRescope r (td: ILTypeDef) (mref:ILMethodRef) =
match
possibles |> List.filter (fun md ->
mref.CallingConv = md.CallingConv &&
- // REVIEW: this uses equality on ILType. For CMOD_OPTIONAL this is not going to be correct
- (md.Parameters, argTypes) ||> List.lengthsEqAndForall2 (fun p1 p2 -> r p1.Type = p2) &&
- // REVIEW: this uses equality on ILType. For CMOD_OPTIONAL this is not going to be correct
- r md.Return.Type = retType) with
+ // REVIEW: this uses equality on ILType. For CMOD_OPTIONAL this is not going to be correct
+ (md.Parameters, argTypes) ||> List.lengthsEqAndForall2 (fun p1 p2 -> r p1.Type = p2) &&
+ // REVIEW: this uses equality on ILType. For CMOD_OPTIONAL this is not going to be correct
+ r md.Return.Type = retType) with
| [] -> failwith ("no method named "+nm+" with appropriate argument types found in type "+td.Name)
- | [mdef] -> mdef
+ | [mdef] -> mdef
| _ -> failwith ("multiple methods named "+nm+" appear with identical argument types in type "+td.Name)
let resolveILMethodRef td mref = resolveILMethodRefWithRescope id td mref
diff --git a/src/absil/ilbinary.fs b/src/absil/ilbinary.fs
index 41297d117ef..2b22b4cbabb 100644
--- a/src/absil/ilbinary.fs
+++ b/src/absil/ilbinary.fs
@@ -508,155 +508,155 @@ let i_leave = 0xdd
let i_leave_s = 0xde
let i_stind_i = 0xdf
let i_conv_u = 0xe0
-let i_arglist = 0xfe00
-let i_ceq = 0xfe01
-let i_cgt = 0xfe02
+let i_arglist = 0xfe00
+let i_ceq = 0xfe01
+let i_cgt = 0xfe02
let i_cgt_un = 0xfe03
-let i_clt = 0xfe04
+let i_clt = 0xfe04
let i_clt_un = 0xfe05
-let i_ldftn = 0xfe06
-let i_ldvirtftn = 0xfe07
-let i_ldarg = 0xfe09
-let i_ldarga = 0xfe0a
-let i_starg = 0xfe0b
-let i_ldloc = 0xfe0c
-let i_ldloca = 0xfe0d
-let i_stloc = 0xfe0e
-let i_localloc = 0xfe0f
-let i_endfilter = 0xfe11
-let i_unaligned = 0xfe12
-let i_volatile = 0xfe13
-let i_constrained = 0xfe16
-let i_readonly = 0xfe1e
-let i_tail = 0xfe14
-let i_initobj = 0xfe15
-let i_cpblk = 0xfe17
-let i_initblk = 0xfe18
-let i_rethrow = 0xfe1a
-let i_sizeof = 0xfe1c
-let i_refanytype = 0xfe1d
-
-let i_ldelem_any = 0xa3
-let i_stelem_any = 0xa4
-let i_unbox_any = 0xa5
+let i_ldftn = 0xfe06
+let i_ldvirtftn = 0xfe07
+let i_ldarg = 0xfe09
+let i_ldarga = 0xfe0a
+let i_starg = 0xfe0b
+let i_ldloc = 0xfe0c
+let i_ldloca = 0xfe0d
+let i_stloc = 0xfe0e
+let i_localloc = 0xfe0f
+let i_endfilter = 0xfe11
+let i_unaligned = 0xfe12
+let i_volatile = 0xfe13
+let i_constrained = 0xfe16
+let i_readonly = 0xfe1e
+let i_tail = 0xfe14
+let i_initobj = 0xfe15
+let i_cpblk = 0xfe17
+let i_initblk = 0xfe18
+let i_rethrow = 0xfe1a
+let i_sizeof = 0xfe1c
+let i_refanytype = 0xfe1d
+let i_ldelem_any = 0xa3
+let i_stelem_any = 0xa4
+let i_unbox_any = 0xa5
let mk_ldc i = mkLdcInt32 i
+
let noArgInstrs =
- lazy [ i_ldc_i4_0, mk_ldc 0
- i_ldc_i4_1, mk_ldc 1
- i_ldc_i4_2, mk_ldc 2
- i_ldc_i4_3, mk_ldc 3
- i_ldc_i4_4, mk_ldc 4
- i_ldc_i4_5, mk_ldc 5
- i_ldc_i4_6, mk_ldc 6
- i_ldc_i4_7, mk_ldc 7
- i_ldc_i4_8, mk_ldc 8
- i_ldc_i4_m1, mk_ldc -1
- 0x0a, mkStloc 0us
- 0x0b, mkStloc 1us
- 0x0c, mkStloc 2us
- 0x0d, mkStloc 3us
- 0x06, mkLdloc 0us
- 0x07, mkLdloc 1us
- 0x08, mkLdloc 2us
- 0x09, mkLdloc 3us
- 0x02, mkLdarg 0us
- 0x03, mkLdarg 1us
- 0x04, mkLdarg 2us
- 0x05, mkLdarg 3us
- 0x2a, I_ret
- 0x58, AI_add
- 0xd6, AI_add_ovf
- 0xd7, AI_add_ovf_un
- 0x5f, AI_and
- 0x5b, AI_div
- 0x5c, AI_div_un
- 0xfe01, AI_ceq
- 0xfe02, AI_cgt
- 0xfe03, AI_cgt_un
- 0xfe04, AI_clt
- 0xfe05, AI_clt_un
- 0x67, AI_conv DT_I1
- 0x68, AI_conv DT_I2
- 0x69, AI_conv DT_I4
- 0x6a, AI_conv DT_I8
- 0xd3, AI_conv DT_I
- 0x6b, AI_conv DT_R4
- 0x6c, AI_conv DT_R8
- 0xd2, AI_conv DT_U1
- 0xd1, AI_conv DT_U2
- 0x6d, AI_conv DT_U4
- 0x6e, AI_conv DT_U8
- 0xe0, AI_conv DT_U
- 0x76, AI_conv DT_R
- 0xb3, AI_conv_ovf DT_I1
- 0xb5, AI_conv_ovf DT_I2
- 0xb7, AI_conv_ovf DT_I4
- 0xb9, AI_conv_ovf DT_I8
- 0xd4, AI_conv_ovf DT_I
- 0xb4, AI_conv_ovf DT_U1
- 0xb6, AI_conv_ovf DT_U2
- 0xb8, AI_conv_ovf DT_U4
- 0xba, AI_conv_ovf DT_U8
- 0xd5, AI_conv_ovf DT_U
- 0x82, AI_conv_ovf_un DT_I1
- 0x83, AI_conv_ovf_un DT_I2
- 0x84, AI_conv_ovf_un DT_I4
- 0x85, AI_conv_ovf_un DT_I8
- 0x8a, AI_conv_ovf_un DT_I
- 0x86, AI_conv_ovf_un DT_U1
- 0x87, AI_conv_ovf_un DT_U2
- 0x88, AI_conv_ovf_un DT_U4
- 0x89, AI_conv_ovf_un DT_U8
- 0x8b, AI_conv_ovf_un DT_U
- 0x9c, I_stelem DT_I1
- 0x9d, I_stelem DT_I2
- 0x9e, I_stelem DT_I4
- 0x9f, I_stelem DT_I8
- 0xa0, I_stelem DT_R4
- 0xa1, I_stelem DT_R8
- 0x9b, I_stelem DT_I
- 0xa2, I_stelem DT_REF
- 0x90, I_ldelem DT_I1
- 0x92, I_ldelem DT_I2
- 0x94, I_ldelem DT_I4
- 0x96, I_ldelem DT_I8
- 0x91, I_ldelem DT_U1
- 0x93, I_ldelem DT_U2
- 0x95, I_ldelem DT_U4
- 0x98, I_ldelem DT_R4
- 0x99, I_ldelem DT_R8
- 0x97, I_ldelem DT_I
- 0x9a, I_ldelem DT_REF
- 0x5a, AI_mul
- 0xd8, AI_mul_ovf
- 0xd9, AI_mul_ovf_un
- 0x5d, AI_rem
- 0x5e, AI_rem_un
- 0x62, AI_shl
- 0x63, AI_shr
- 0x64, AI_shr_un
- 0x59, AI_sub
- 0xda, AI_sub_ovf
- 0xdb, AI_sub_ovf_un
- 0x61, AI_xor
- 0x60, AI_or
- 0x65, AI_neg
- 0x66, AI_not
- i_ldnull, AI_ldnull
- i_dup, AI_dup
- i_pop, AI_pop
- i_ckfinite, AI_ckfinite
- i_nop, AI_nop
- i_break, I_break
- i_arglist, I_arglist
- i_endfilter, I_endfilter
+ lazy [ i_ldc_i4_0, mk_ldc 0
+ i_ldc_i4_1, mk_ldc 1
+ i_ldc_i4_2, mk_ldc 2
+ i_ldc_i4_3, mk_ldc 3
+ i_ldc_i4_4, mk_ldc 4
+ i_ldc_i4_5, mk_ldc 5
+ i_ldc_i4_6, mk_ldc 6
+ i_ldc_i4_7, mk_ldc 7
+ i_ldc_i4_8, mk_ldc 8
+ i_ldc_i4_m1, mk_ldc -1
+ 0x0a, mkStloc 0us
+ 0x0b, mkStloc 1us
+ 0x0c, mkStloc 2us
+ 0x0d, mkStloc 3us
+ 0x06, mkLdloc 0us
+ 0x07, mkLdloc 1us
+ 0x08, mkLdloc 2us
+ 0x09, mkLdloc 3us
+ 0x02, mkLdarg 0us
+ 0x03, mkLdarg 1us
+ 0x04, mkLdarg 2us
+ 0x05, mkLdarg 3us
+ 0x2a, I_ret
+ 0x58, AI_add
+ 0xd6, AI_add_ovf
+ 0xd7, AI_add_ovf_un
+ 0x5f, AI_and
+ 0x5b, AI_div
+ 0x5c, AI_div_un
+ 0xfe01, AI_ceq
+ 0xfe02, AI_cgt
+ 0xfe03, AI_cgt_un
+ 0xfe04, AI_clt
+ 0xfe05, AI_clt_un
+ 0x67, AI_conv DT_I1
+ 0x68, AI_conv DT_I2
+ 0x69, AI_conv DT_I4
+ 0x6a, AI_conv DT_I8
+ 0xd3, AI_conv DT_I
+ 0x6b, AI_conv DT_R4
+ 0x6c, AI_conv DT_R8
+ 0xd2, AI_conv DT_U1
+ 0xd1, AI_conv DT_U2
+ 0x6d, AI_conv DT_U4
+ 0x6e, AI_conv DT_U8
+ 0xe0, AI_conv DT_U
+ 0x76, AI_conv DT_R
+ 0xb3, AI_conv_ovf DT_I1
+ 0xb5, AI_conv_ovf DT_I2
+ 0xb7, AI_conv_ovf DT_I4
+ 0xb9, AI_conv_ovf DT_I8
+ 0xd4, AI_conv_ovf DT_I
+ 0xb4, AI_conv_ovf DT_U1
+ 0xb6, AI_conv_ovf DT_U2
+ 0xb8, AI_conv_ovf DT_U4
+ 0xba, AI_conv_ovf DT_U8
+ 0xd5, AI_conv_ovf DT_U
+ 0x82, AI_conv_ovf_un DT_I1
+ 0x83, AI_conv_ovf_un DT_I2
+ 0x84, AI_conv_ovf_un DT_I4
+ 0x85, AI_conv_ovf_un DT_I8
+ 0x8a, AI_conv_ovf_un DT_I
+ 0x86, AI_conv_ovf_un DT_U1
+ 0x87, AI_conv_ovf_un DT_U2
+ 0x88, AI_conv_ovf_un DT_U4
+ 0x89, AI_conv_ovf_un DT_U8
+ 0x8b, AI_conv_ovf_un DT_U
+ 0x9c, I_stelem DT_I1
+ 0x9d, I_stelem DT_I2
+ 0x9e, I_stelem DT_I4
+ 0x9f, I_stelem DT_I8
+ 0xa0, I_stelem DT_R4
+ 0xa1, I_stelem DT_R8
+ 0x9b, I_stelem DT_I
+ 0xa2, I_stelem DT_REF
+ 0x90, I_ldelem DT_I1
+ 0x92, I_ldelem DT_I2
+ 0x94, I_ldelem DT_I4
+ 0x96, I_ldelem DT_I8
+ 0x91, I_ldelem DT_U1
+ 0x93, I_ldelem DT_U2
+ 0x95, I_ldelem DT_U4
+ 0x98, I_ldelem DT_R4
+ 0x99, I_ldelem DT_R8
+ 0x97, I_ldelem DT_I
+ 0x9a, I_ldelem DT_REF
+ 0x5a, AI_mul
+ 0xd8, AI_mul_ovf
+ 0xd9, AI_mul_ovf_un
+ 0x5d, AI_rem
+ 0x5e, AI_rem_un
+ 0x62, AI_shl
+ 0x63, AI_shr
+ 0x64, AI_shr_un
+ 0x59, AI_sub
+ 0xda, AI_sub_ovf
+ 0xdb, AI_sub_ovf_un
+ 0x61, AI_xor
+ 0x60, AI_or
+ 0x65, AI_neg
+ 0x66, AI_not
+ i_ldnull, AI_ldnull
+ i_dup, AI_dup
+ i_pop, AI_pop
+ i_ckfinite, AI_ckfinite
+ i_nop, AI_nop
+ i_break, I_break
+ i_arglist, I_arglist
+ i_endfilter, I_endfilter
i_endfinally, I_endfinally
i_refanytype, I_refanytype
- i_localloc, I_localloc
- i_throw, I_throw
- i_ldlen, I_ldlen
- i_rethrow, I_rethrow ]
+ i_localloc, I_localloc
+ i_throw, I_throw
+ i_ldlen, I_ldlen
+ i_rethrow, I_rethrow ]
let isNoArgInstr i =
match i with
@@ -760,36 +760,36 @@ let isNoArgInstr i =
let ILCmpInstrMap =
lazy (
let dict = Dictionary.newWithSize 12
- dict.Add (BI_beq , i_beq )
- dict.Add (BI_bgt , i_bgt )
- dict.Add (BI_bgt_un , i_bgt_un )
- dict.Add (BI_bge , i_bge )
- dict.Add (BI_bge_un , i_bge_un )
- dict.Add (BI_ble , i_ble )
- dict.Add (BI_ble_un , i_ble_un )
- dict.Add (BI_blt , i_blt )
- dict.Add (BI_blt_un , i_blt_un )
- dict.Add (BI_bne_un , i_bne_un )
- dict.Add (BI_brfalse , i_brfalse )
- dict.Add (BI_brtrue , i_brtrue )
+ dict.Add (BI_beq, i_beq )
+ dict.Add (BI_bgt, i_bgt )
+ dict.Add (BI_bgt_un, i_bgt_un )
+ dict.Add (BI_bge, i_bge )
+ dict.Add (BI_bge_un, i_bge_un )
+ dict.Add (BI_ble, i_ble )
+ dict.Add (BI_ble_un, i_ble_un )
+ dict.Add (BI_blt, i_blt )
+ dict.Add (BI_blt_un, i_blt_un )
+ dict.Add (BI_bne_un, i_bne_un )
+ dict.Add (BI_brfalse, i_brfalse )
+ dict.Add (BI_brtrue, i_brtrue )
dict
)
let ILCmpInstrRevMap =
lazy (
let dict = Dictionary.newWithSize 12
- dict.Add ( BI_beq , i_beq_s )
- dict.Add ( BI_bgt , i_bgt_s )
- dict.Add ( BI_bgt_un , i_bgt_un_s )
- dict.Add ( BI_bge , i_bge_s )
- dict.Add ( BI_bge_un , i_bge_un_s )
- dict.Add ( BI_ble , i_ble_s )
- dict.Add ( BI_ble_un , i_ble_un_s )
- dict.Add ( BI_blt , i_blt_s )
- dict.Add ( BI_blt_un , i_blt_un_s )
- dict.Add ( BI_bne_un , i_bne_un_s )
- dict.Add ( BI_brfalse , i_brfalse_s )
- dict.Add ( BI_brtrue , i_brtrue_s )
+ dict.Add ( BI_beq, i_beq_s )
+ dict.Add ( BI_bgt, i_bgt_s )
+ dict.Add ( BI_bgt_un, i_bgt_un_s )
+ dict.Add ( BI_bge, i_bge_s )
+ dict.Add ( BI_bge_un, i_bge_un_s )
+ dict.Add ( BI_ble, i_ble_s )
+ dict.Add ( BI_ble_un, i_ble_un_s )
+ dict.Add ( BI_blt, i_blt_s )
+ dict.Add ( BI_blt_un, i_blt_un_s )
+ dict.Add ( BI_bne_un, i_bne_un_s )
+ dict.Add ( BI_brfalse, i_brfalse_s )
+ dict.Add ( BI_brtrue, i_brtrue_s )
dict
)
@@ -890,106 +890,106 @@ let vt_BYREF = 0x4000
let ILNativeTypeMap =
- lazy [ nt_CURRENCY , ILNativeType.Currency
- nt_BSTR , (* COM interop *) ILNativeType.BSTR
- nt_LPSTR , ILNativeType.LPSTR
- nt_LPWSTR , ILNativeType.LPWSTR
+ lazy [ nt_CURRENCY, ILNativeType.Currency
+ nt_BSTR, (* COM interop *) ILNativeType.BSTR
+ nt_LPSTR, ILNativeType.LPSTR
+ nt_LPWSTR, ILNativeType.LPWSTR
nt_LPTSTR, ILNativeType.LPTSTR
nt_LPUTF8STR, ILNativeType.LPUTF8STR
- nt_IUNKNOWN , (* COM interop *) ILNativeType.IUnknown
- nt_IDISPATCH , (* COM interop *) ILNativeType.IDispatch
- nt_BYVALSTR , ILNativeType.ByValStr
- nt_TBSTR , ILNativeType.TBSTR
- nt_LPSTRUCT , ILNativeType.LPSTRUCT
- nt_INTF , (* COM interop *) ILNativeType.Interface
- nt_STRUCT , ILNativeType.Struct
- nt_ERROR , (* COM interop *) ILNativeType.Error
- nt_VOID , ILNativeType.Void
- nt_BOOLEAN , ILNativeType.Bool
- nt_I1 , ILNativeType.Int8
- nt_I2 , ILNativeType.Int16
- nt_I4 , ILNativeType.Int32
+ nt_IUNKNOWN, (* COM interop *) ILNativeType.IUnknown
+ nt_IDISPATCH, (* COM interop *) ILNativeType.IDispatch
+ nt_BYVALSTR, ILNativeType.ByValStr
+ nt_TBSTR, ILNativeType.TBSTR
+ nt_LPSTRUCT, ILNativeType.LPSTRUCT
+ nt_INTF, (* COM interop *) ILNativeType.Interface
+ nt_STRUCT, ILNativeType.Struct
+ nt_ERROR, (* COM interop *) ILNativeType.Error
+ nt_VOID, ILNativeType.Void
+ nt_BOOLEAN, ILNativeType.Bool
+ nt_I1, ILNativeType.Int8
+ nt_I2, ILNativeType.Int16
+ nt_I4, ILNativeType.Int32
nt_I8, ILNativeType.Int64
- nt_R4 , ILNativeType.Single
- nt_R8 , ILNativeType.Double
- nt_U1 , ILNativeType.Byte
- nt_U2 , ILNativeType.UInt16
- nt_U4 , ILNativeType.UInt32
+ nt_R4, ILNativeType.Single
+ nt_R8, ILNativeType.Double
+ nt_U1, ILNativeType.Byte
+ nt_U2, ILNativeType.UInt16
+ nt_U4, ILNativeType.UInt32
nt_U8, ILNativeType.UInt64
- nt_INT , ILNativeType.Int
+ nt_INT, ILNativeType.Int
nt_UINT, ILNativeType.UInt
nt_ANSIBSTR, (* COM interop *) ILNativeType.ANSIBSTR
nt_VARIANTBOOL, (* COM interop *) ILNativeType.VariantBool
- nt_FUNC , ILNativeType.Method
+ nt_FUNC, ILNativeType.Method
nt_ASANY, ILNativeType.AsAny ]
let ILNativeTypeRevMap = lazy (List.map (fun (x,y) -> (y,x)) (Lazy.force ILNativeTypeMap))
let ILVariantTypeMap =
- lazy [ ILNativeVariant.Empty , vt_EMPTY
- ILNativeVariant.Null , vt_NULL
- ILNativeVariant.Variant , vt_VARIANT
- ILNativeVariant.Currency , vt_CY
- ILNativeVariant.Decimal , vt_DECIMAL
- ILNativeVariant.Date , vt_DATE
- ILNativeVariant.BSTR , vt_BSTR
- ILNativeVariant.LPSTR , vt_LPSTR
- ILNativeVariant.LPWSTR , vt_LPWSTR
- ILNativeVariant.IUnknown , vt_UNKNOWN
- ILNativeVariant.IDispatch , vt_DISPATCH
- ILNativeVariant.SafeArray , vt_SAFEARRAY
- ILNativeVariant.Error , vt_ERROR
- ILNativeVariant.HRESULT , vt_HRESULT
- ILNativeVariant.CArray , vt_CARRAY
- ILNativeVariant.UserDefined , vt_USERDEFINED
- ILNativeVariant.Record , vt_RECORD
- ILNativeVariant.FileTime , vt_FILETIME
- ILNativeVariant.Blob , vt_BLOB
- ILNativeVariant.Stream , vt_STREAM
- ILNativeVariant.Storage , vt_STORAGE
- ILNativeVariant.StreamedObject , vt_STREAMED_OBJECT
- ILNativeVariant.StoredObject , vt_STORED_OBJECT
- ILNativeVariant.BlobObject , vt_BLOB_OBJECT
- ILNativeVariant.CF , vt_CF
- ILNativeVariant.CLSID , vt_CLSID
- ILNativeVariant.Void , vt_VOID
- ILNativeVariant.Bool , vt_BOOL
- ILNativeVariant.Int8 , vt_I1
- ILNativeVariant.Int16 , vt_I2
- ILNativeVariant.Int32 , vt_I4
- ILNativeVariant.Int64 , vt_I8
- ILNativeVariant.Single , vt_R4
- ILNativeVariant.Double , vt_R8
- ILNativeVariant.UInt8 , vt_UI1
- ILNativeVariant.UInt16 , vt_UI2
- ILNativeVariant.UInt32 , vt_UI4
- ILNativeVariant.UInt64 , vt_UI8
- ILNativeVariant.PTR , vt_PTR
- ILNativeVariant.Int , vt_INT
- ILNativeVariant.UInt , vt_UINT ]
+ lazy [ ILNativeVariant.Empty, vt_EMPTY
+ ILNativeVariant.Null, vt_NULL
+ ILNativeVariant.Variant, vt_VARIANT
+ ILNativeVariant.Currency, vt_CY
+ ILNativeVariant.Decimal, vt_DECIMAL
+ ILNativeVariant.Date, vt_DATE
+ ILNativeVariant.BSTR, vt_BSTR
+ ILNativeVariant.LPSTR, vt_LPSTR
+ ILNativeVariant.LPWSTR, vt_LPWSTR
+ ILNativeVariant.IUnknown, vt_UNKNOWN
+ ILNativeVariant.IDispatch, vt_DISPATCH
+ ILNativeVariant.SafeArray, vt_SAFEARRAY
+ ILNativeVariant.Error, vt_ERROR
+ ILNativeVariant.HRESULT, vt_HRESULT
+ ILNativeVariant.CArray, vt_CARRAY
+ ILNativeVariant.UserDefined, vt_USERDEFINED
+ ILNativeVariant.Record, vt_RECORD
+ ILNativeVariant.FileTime, vt_FILETIME
+ ILNativeVariant.Blob, vt_BLOB
+ ILNativeVariant.Stream, vt_STREAM
+ ILNativeVariant.Storage, vt_STORAGE
+ ILNativeVariant.StreamedObject, vt_STREAMED_OBJECT
+ ILNativeVariant.StoredObject, vt_STORED_OBJECT
+ ILNativeVariant.BlobObject, vt_BLOB_OBJECT
+ ILNativeVariant.CF, vt_CF
+ ILNativeVariant.CLSID, vt_CLSID
+ ILNativeVariant.Void, vt_VOID
+ ILNativeVariant.Bool, vt_BOOL
+ ILNativeVariant.Int8, vt_I1
+ ILNativeVariant.Int16, vt_I2
+ ILNativeVariant.Int32, vt_I4
+ ILNativeVariant.Int64, vt_I8
+ ILNativeVariant.Single, vt_R4
+ ILNativeVariant.Double, vt_R8
+ ILNativeVariant.UInt8, vt_UI1
+ ILNativeVariant.UInt16, vt_UI2
+ ILNativeVariant.UInt32, vt_UI4
+ ILNativeVariant.UInt64, vt_UI8
+ ILNativeVariant.PTR, vt_PTR
+ ILNativeVariant.Int, vt_INT
+ ILNativeVariant.UInt, vt_UINT ]
let ILVariantTypeRevMap = lazy (List.map (fun (x,y) -> (y,x)) (Lazy.force ILVariantTypeMap))
let ILSecurityActionMap =
lazy
- [ ILSecurityAction.Request , 0x0001
- ILSecurityAction.Demand , 0x0002
- ILSecurityAction.Assert , 0x0003
- ILSecurityAction.Deny , 0x0004
- ILSecurityAction.PermitOnly , 0x0005
- ILSecurityAction.LinkCheck , 0x0006
- ILSecurityAction.InheritCheck , 0x0007
- ILSecurityAction.ReqMin , 0x0008
- ILSecurityAction.ReqOpt , 0x0009
- ILSecurityAction.ReqRefuse , 0x000a
- ILSecurityAction.PreJitGrant , 0x000b
- ILSecurityAction.PreJitDeny , 0x000c
- ILSecurityAction.NonCasDemand , 0x000d
- ILSecurityAction.NonCasLinkDemand , 0x000e
- ILSecurityAction.NonCasInheritance , 0x000f
- ILSecurityAction.LinkDemandChoice , 0x0010
- ILSecurityAction.InheritanceDemandChoice , 0x0011
- ILSecurityAction.DemandChoice , 0x0012 ]
+ [ ILSecurityAction.Request, 0x0001
+ ILSecurityAction.Demand, 0x0002
+ ILSecurityAction.Assert, 0x0003
+ ILSecurityAction.Deny, 0x0004
+ ILSecurityAction.PermitOnly, 0x0005
+ ILSecurityAction.LinkCheck, 0x0006
+ ILSecurityAction.InheritCheck, 0x0007
+ ILSecurityAction.ReqMin, 0x0008
+ ILSecurityAction.ReqOpt, 0x0009
+ ILSecurityAction.ReqRefuse, 0x000a
+ ILSecurityAction.PreJitGrant, 0x000b
+ ILSecurityAction.PreJitDeny, 0x000c
+ ILSecurityAction.NonCasDemand, 0x000d
+ ILSecurityAction.NonCasLinkDemand, 0x000e
+ ILSecurityAction.NonCasInheritance, 0x000f
+ ILSecurityAction.LinkDemandChoice, 0x0010
+ ILSecurityAction.InheritanceDemandChoice, 0x0011
+ ILSecurityAction.DemandChoice, 0x0012 ]
let ILSecurityActionRevMap = lazy (List.map (fun (x,y) -> (y,x)) (Lazy.force ILSecurityActionMap))
diff --git a/src/absil/illib.fs b/src/absil/illib.fs
index 94bf28c6a93..b05bcab5640 100644
--- a/src/absil/illib.fs
+++ b/src/absil/illib.fs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
+// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
module public FSharp.Compiler.AbstractIL.Internal.Library
#nowarn "1178" // The struct, record or union type 'internal_instr_extension' is not structurally comparable because the type
@@ -18,7 +18,7 @@ open Microsoft.FSharp.Core.ReflectionAdapters
// Logical shift right treating int32 as unsigned integer.
// Code that uses this should probably be adjusted to use unsigned integer types.
-let (>>>&) (x:int32) (n:int32) = int32 (uint32 x >>> n)
+let (>>>&) (x: int32) (n: int32) = int32 (uint32 x >>> n)
let notlazy v = Lazy<_>.CreateFromValue v
@@ -90,15 +90,15 @@ let notFound() = raise (KeyNotFoundException())
module Order =
let orderBy (p : 'T -> 'U) =
- { new IComparer<'T> with member __.Compare(x,xx) = compare (p x) (p xx) }
+ { new IComparer<'T> with member __.Compare(x, xx) = compare (p x) (p xx) }
let orderOn p (pxOrder: IComparer<'U>) =
- { new IComparer<'T> with member __.Compare(x,xx) = pxOrder.Compare (p x, p xx) }
+ { new IComparer<'T> with member __.Compare(x, xx) = pxOrder.Compare (p x, p xx) }
- let toFunction (pxOrder: IComparer<'U>) x y = pxOrder.Compare(x,y)
+ let toFunction (pxOrder: IComparer<'U>) x y = pxOrder.Compare(x, y)
//-------------------------------------------------------------------------
-// Library: arrays,lists,options,resizearrays
+// Library: arrays, lists, options, resizearrays
//-------------------------------------------------------------------------
module Array =
@@ -122,7 +122,7 @@ module Array =
let order (eltOrder: IComparer<'T>) =
{ new IComparer> with
- member __.Compare(xs,ys) =
+ member __.Compare(xs, ys) =
let c = compare xs.Length ys.Length
if c <> 0 then c else
let rec loop i =
@@ -143,7 +143,7 @@ module Array =
loop p l 0
let existsTrue (arr: bool[]) =
- let rec loop n = (n < arr.Length) && (arr.[n] || loop (n+1))
+ let rec loop n = (n < arr.Length) && (arr.[n] || loop (n+1))
loop 0
let findFirstIndexWhereTrue (arr: _[]) p =
@@ -249,10 +249,10 @@ module Option =
let mapFold f s opt =
match opt with
- | None -> None,s
+ | None -> None, s
| Some x ->
- let x',s' = f s x
- Some x',s'
+ let x2, s2 = f s x
+ Some x2, s2
let attempt (f: unit -> 'T) = try Some (f()) with _ -> None
@@ -267,7 +267,7 @@ module List =
let sortWithOrder (c: IComparer<'T>) elements = List.sortWith (Order.toFunction c) elements
let splitAfter n l =
- let rec split_after_acc n l1 l2 = if n <= 0 then List.rev l1,l2 else split_after_acc (n-1) ((List.head l2):: l1) (List.tail l2)
+ let rec split_after_acc n l1 l2 = if n <= 0 then List.rev l1, l2 else split_after_acc (n-1) ((List.head l2):: l1) (List.tail l2)
split_after_acc n [] l
let existsi f xs =
@@ -285,17 +285,17 @@ module List =
let rec findi n f l =
match l with
| [] -> None
- | h::t -> if f h then Some (h,n) else findi (n+1) f t
+ | h::t -> if f h then Some (h, n) else findi (n+1) f t
let rec drop n l =
match l with
- | [] -> []
+ | [] -> []
| _::xs -> if n=0 then l else drop (n-1) xs
let splitChoose select l =
let rec ch acc1 acc2 l =
match l with
- | [] -> List.rev acc1,List.rev acc2
+ | [] -> List.rev acc1, List.rev acc2
| x::xs ->
match select x with
| Choice1Of2 sx -> ch (sx::acc1) acc2 xs
@@ -304,8 +304,8 @@ module List =
ch [] [] l
let rec checkq l1 l2 =
- match l1,l2 with
- | h1::t1,h2::t2 -> h1 === h2 && checkq t1 t2
+ match l1, l2 with
+ | h1::t1, h2::t2 -> h1 === h2 && checkq t1 t2
| _ -> true
let mapq (f: 'T -> 'T) inp =
@@ -334,8 +334,8 @@ module List =
| [] ->
Debug.Assert(false, "empty list")
invalidArg "l" "empty list"
- | [h] -> List.rev acc,h
- | h::t -> loop (h::acc) t
+ | [h] -> List.rev acc, h
+ | h::t -> loop (h::acc) t
loop [] l
let tryRemove f inp =
@@ -343,25 +343,25 @@ module List =
match l with
| [] -> None
| h :: t -> if f h then Some (h, List.rev acc @ t) else loop (h::acc) t
- loop [] inp
+ loop [] inp
let headAndTail l =
match l with
| [] ->
Debug.Assert(false, "empty list")
failwith "List.headAndTail"
- | h::t -> h,t
+ | h::t -> h, t
let zip4 l1 l2 l3 l4 =
- List.zip l1 (List.zip3 l2 l3 l4) |> List.map (fun (x1,(x2,x3,x4)) -> (x1,x2,x3,x4))
+ List.zip l1 (List.zip3 l2 l3 l4) |> List.map (fun (x1, (x2, x3, x4)) -> (x1, x2, x3, x4))
let unzip4 l =
- let a,b,cd = List.unzip3 (List.map (fun (x,y,z,w) -> (x,y,(z,w))) l)
- let c,d = List.unzip cd
- a,b,c,d
+ let a, b, cd = List.unzip3 (List.map (fun (x, y, z, w) -> (x, y, (z, w))) l)
+ let c, d = List.unzip cd
+ a, b, c, d
let rec iter3 f l1 l2 l3 =
- match l1,l2,l3 with
+ match l1, l2, l3 with
| h1::t1, h2::t2, h3::t3 -> f h1 h2 h3; iter3 f t1 t2 t3
| [], [], [] -> ()
| _ -> failwith "iter3"
@@ -369,20 +369,21 @@ module List =
let takeUntil p l =
let rec loop acc l =
match l with
- | [] -> List.rev acc,[]
+ | [] -> List.rev acc, []
| x::xs -> if p x then List.rev acc, l else loop (x::acc) xs
loop [] l
let order (eltOrder: IComparer<'T>) =
{ new IComparer> with
- member __.Compare(xs,ys) =
+ member __.Compare(xs, ys) =
let rec loop xs ys =
- match xs,ys with
- | [],[] -> 0
- | [],_ -> -1
- | _,[] -> 1
- | x::xs,y::ys -> let cxy = eltOrder.Compare(x,y)
- if cxy=0 then loop xs ys else cxy
+ match xs, ys with
+ | [], [] -> 0
+ | [], _ -> -1
+ | _, [] -> 1
+ | x::xs, y::ys ->
+ let cxy = eltOrder.Compare(x, y)
+ if cxy=0 then loop xs ys else cxy
loop xs ys }
module FrontAndBack =
@@ -395,12 +396,12 @@ module List =
let rec assoc x l =
match l with
| [] -> indexNotFound()
- | ((h,r)::t) -> if x = h then r else assoc x t
+ | ((h, r)::t) -> if x = h then r else assoc x t
let rec memAssoc x l =
match l with
| [] -> false
- | ((h,_)::t) -> x = h || memAssoc x t
+ | ((h, _)::t) -> x = h || memAssoc x t
let rec memq x l =
match l with
@@ -443,7 +444,7 @@ module List =
let existsSquared f xss = xss |> List.exists (fun xs -> xs |> List.exists (fun x -> f x))
- let mapiFoldSquared f z xss = mapFoldSquared f z (xss |> mapiSquared (fun i j x -> (i,j,x)))
+ let mapiFoldSquared f z xss = mapFoldSquared f z (xss |> mapiSquared (fun i j x -> (i, j, x)))
module ResizeArray =
@@ -487,20 +488,12 @@ module ResizeArray =
/// in order to prevent long-term storage of those values
chunkBySize maxArrayItemCount f inp
-
-/// Because FSharp.Compiler.Service is a library that will target FSharp.Core 4.5.2 for the forseeable future,
-/// we need to stick these functions in this module rather than using the module functions for ValueOption
-/// that come after FSharp.Core 4.5.2.
module ValueOptionInternal =
let inline ofOption x = match x with Some x -> ValueSome x | None -> ValueNone
let inline bind f x = match x with ValueSome x -> f x | ValueNone -> ValueNone
- let inline isSome x = match x with ValueSome _ -> true | ValueNone -> false
-
- let inline isNone x = match x with ValueSome _ -> false | ValueNone -> true
-
type String with
member inline x.StartsWithOrdinal(value) =
x.StartsWith(value, StringComparison.Ordinal)
@@ -511,34 +504,34 @@ type String with
module String =
let make (n: int) (c: char) : string = new String(c, n)
- let get (str:string) i = str.[i]
+ let get (str: string) i = str.[i]
- let sub (s:string) (start:int) (len:int) = s.Substring(start,len)
+ let sub (s: string) (start: int) (len: int) = s.Substring(start, len)
- let contains (s:string) (c:char) = s.IndexOf(c) <> -1
+ let contains (s: string) (c: char) = s.IndexOf(c) <> -1
let order = LanguagePrimitives.FastGenericComparer
- let lowercase (s:string) =
+ let lowercase (s: string) =
s.ToLowerInvariant()
- let uppercase (s:string) =
+ let uppercase (s: string) =
s.ToUpperInvariant()
- let isUpper (s:string) =
+ let isUpper (s: string) =
s.Length >= 1 && Char.IsUpper s.[0] && not (Char.IsLower s.[0])
- let capitalize (s:string) =
+ let capitalize (s: string) =
if s.Length = 0 then s
else uppercase s.[0..0] + s.[ 1.. s.Length - 1 ]
- let uncapitalize (s:string) =
- if s.Length = 0 then s
+ let uncapitalize (s: string) =
+ if s.Length = 0 then s
else lowercase s.[0..0] + s.[ 1.. s.Length - 1 ]
- let dropPrefix (s:string) (t:string) = s.[t.Length..s.Length - 1]
+ let dropPrefix (s: string) (t: string) = s.[t.Length..s.Length - 1]
- let dropSuffix (s:string) (t:string) = s.[0..s.Length - t.Length - 1]
+ let dropSuffix (s: string) (t: string) = s.[0..s.Length - t.Length - 1]
let inline toCharArray (str: string) = str.ToCharArray()
@@ -571,7 +564,7 @@ module String =
/// Splits a string into substrings based on the strings in the array separators
let split options (separator: string []) (value: string) =
- if isNull value then null else value.Split(separator, options)
+ if isNull value then null else value.Split(separator, options)
let (|StartsWith|_|) pattern value =
if String.IsNullOrWhiteSpace value then
@@ -601,7 +594,7 @@ module String =
|]
module Dictionary =
- let inline newWithSize (size: int) = Dictionary<_,_>(size, HashIdentity.Structural)
+ let inline newWithSize (size: int) = Dictionary<_, _>(size, HashIdentity.Structural)
[]
type DictionaryExtensions() =
@@ -636,13 +629,13 @@ type ExecutionToken = interface end
/// the lifetime of stack-based calls. This is not checked, it is a discipline within the compiler code.
type CompilationThreadToken() = interface ExecutionToken
-/// Represents a place where we are stating that execution on the compilation thread is required. The
+/// Represents a place where we are stating that execution on the compilation thread is required. The
/// reason why will be documented in a comment in the code at the callsite.
let RequireCompilationThread (_ctok: CompilationThreadToken) = ()
/// Represents a place in the compiler codebase where we are passed a CompilationThreadToken unnecessarily.
/// This reprents code that may potentially not need to be executed on the compilation thread.
-let DoesNotRequireCompilerThreadTokenAndCouldPossiblyBeMadeConcurrent (_ctok: CompilationThreadToken) = ()
+let DoesNotRequireCompilerThreadTokenAndCouldPossiblyBeMadeConcurrent (_ctok: CompilationThreadToken) = ()
/// Represents a place in the compiler codebase where we assume we are executing on a compilation thread
let AssumeCompilationThreadWithoutEvidence () = Unchecked.defaultof
@@ -679,7 +672,7 @@ module ResultOrException =
let success a = Result a
- let raze (b:exn) = Exception b
+ let raze (b: exn) = Exception b
// map
let (|?>) res f =
@@ -787,20 +780,20 @@ module Cancellable =
ValueOrCancelled.Value (Choice2Of2 err))
/// Implement try/finally for a cancellable computation
- let tryFinally e compensation =
- catch e |> bind (fun res ->
+ let tryFinally e compensation =
+ catch e |> bind (fun res ->
compensation()
match res with Choice1Of2 r -> ret r | Choice2Of2 err -> raise err)
/// Implement try/with for a cancellable computation
- let tryWith e handler =
- catch e |> bind (fun res ->
+ let tryWith e handler =
+ catch e |> bind (fun res ->
match res with Choice1Of2 r -> ret r | Choice2Of2 err -> handler err)
- // Run the cancellable computation within an Async computation. This isn't actually used in the codebase, but left
+ // Run the cancellable computation within an Async computation. This isn't actually used in the codebase, but left
// here in case we need it in the future
//
- // let toAsync e =
+ // let toAsync e =
// async {
// let! ct = Async.CancellationToken
// return!
@@ -815,19 +808,19 @@ module Cancellable =
type CancellableBuilder() =
- member x.Bind(e,k) = Cancellable.bind k e
+ member x.Bind(e, k) = Cancellable.bind k e
member x.Return(v) = Cancellable.ret v
member x.ReturnFrom(v) = v
- member x.Combine(e1,e2) = e1 |> Cancellable.bind (fun () -> e2)
+ member x.Combine(e1, e2) = e1 |> Cancellable.bind (fun () -> e2)
- member x.TryWith(e,handler) = Cancellable.tryWith e handler
+ member x.TryWith(e, handler) = Cancellable.tryWith e handler
- member x.Using(resource,e) = Cancellable.tryFinally (e resource) (fun () -> (resource :> IDisposable).Dispose())
+ member x.Using(resource, e) = Cancellable.tryFinally (e resource) (fun () -> (resource :> IDisposable).Dispose())
- member x.TryFinally(e,compensation) = Cancellable.tryFinally e compensation
+ member x.TryFinally(e, compensation) = Cancellable.tryFinally e compensation
member x.Delay(f) = Cancellable.delay f
@@ -859,7 +852,7 @@ module Eventually =
| Done x -> Done (Operators.box x)
| NotYetDone (work) -> NotYetDone (fun ctok -> box (work ctok))
- let rec forceWhile ctok check e =
+ let rec forceWhile ctok check e =
match e with
| Done x -> Some(x)
| NotYetDone (work) ->
@@ -910,7 +903,7 @@ module Eventually =
| NotYetDone work -> NotYetDone (fun ctok -> bind k (work ctok))
let fold f acc seq =
- (Done acc,seq) ||> Seq.fold (fun acc x -> acc |> bind (fun acc -> f acc x))
+ (Done acc, seq) ||> Seq.fold (fun acc x -> acc |> bind (fun acc -> f acc x))
let rec catch e =
match e with
@@ -924,7 +917,7 @@ module Eventually =
let delay (f: unit -> Eventually<'T>) = NotYetDone (fun _ctok -> f())
- let tryFinally e compensation =
+ let tryFinally e compensation =
catch (e)
|> bind (fun res ->
compensation()
@@ -932,7 +925,7 @@ module Eventually =
| Result v -> Eventually.Done v
| Exception e -> raise e)
- let tryWith e handler =
+ let tryWith e handler =
catch e
|> bind (function Result v -> Done v | Exception e -> handler e)
@@ -942,17 +935,17 @@ module Eventually =
type EventuallyBuilder() =
- member x.Bind(e,k) = Eventually.bind k e
+ member x.Bind(e, k) = Eventually.bind k e
member x.Return(v) = Eventually.Done v
member x.ReturnFrom(v) = v
- member x.Combine(e1,e2) = e1 |> Eventually.bind (fun () -> e2)
+ member x.Combine(e1, e2) = e1 |> Eventually.bind (fun () -> e2)
- member x.TryWith(e,handler) = Eventually.tryWith e handler
+ member x.TryWith(e, handler) = Eventually.tryWith e handler
- member x.TryFinally(e,compensation) = Eventually.tryFinally e compensation
+ member x.TryFinally(e, compensation) = Eventually.tryFinally e compensation
member x.Delay(f) = Eventually.delay f
@@ -970,7 +963,7 @@ let _ = eventually { use x = null in return 1 }
/// Generates unique stamps
type UniqueStampGenerator<'T when 'T : equality>() =
- let encodeTab = new Dictionary<'T,int>(HashIdentity.Structural)
+ let encodeTab = new Dictionary<'T, int>(HashIdentity.Structural)
let mutable nItems = 0
let encode str =
match encodeTab.TryGetValue(str) with
@@ -981,24 +974,24 @@ type UniqueStampGenerator<'T when 'T : equality>() =
nItems <- nItems + 1
idx
- member this.Encode(str) = encode str
+ member this.Encode(str) = encode str
member this.Table = encodeTab.Keys
/// memoize tables (all entries cached, never collected)
-type MemoizationTable<'T,'U>(compute: 'T -> 'U, keyComparer: IEqualityComparer<'T>, ?canMemoize) =
+type MemoizationTable<'T, 'U>(compute: 'T -> 'U, keyComparer: IEqualityComparer<'T>, ?canMemoize) =
- let table = new Dictionary<'T,'U>(keyComparer)
+ let table = new Dictionary<'T, 'U>(keyComparer)
member t.Apply(x) =
if (match canMemoize with None -> true | Some f -> f x) then
let mutable res = Unchecked.defaultof<'U>
- let ok = table.TryGetValue(x,&res)
+ let ok = table.TryGetValue(x, &res)
if ok then res
else
lock table (fun () ->
let mutable res = Unchecked.defaultof<'U>
- let ok = table.TryGetValue(x,&res)
+ let ok = table.TryGetValue(x, &res)
if ok then res
else
let res = compute x
@@ -1009,7 +1002,7 @@ type MemoizationTable<'T,'U>(compute: 'T -> 'U, keyComparer: IEqualityComparer<'
exception UndefinedException
-type LazyWithContextFailure(exn:exn) =
+type LazyWithContextFailure(exn: exn) =
static let undefined = new LazyWithContextFailure(UndefinedException)
@@ -1021,7 +1014,7 @@ type LazyWithContextFailure(exn:exn) =
/// on forcing back to at least one sensible user location
[]
[]
-type LazyWithContext<'T,'ctxt> =
+type LazyWithContext<'T, 'ctxt> =
{ /// This field holds the result of a successful computation. It's initial value is Unchecked.defaultof
mutable value : 'T
@@ -1032,12 +1025,12 @@ type LazyWithContext<'T,'ctxt> =
/// A helper to ensure we rethrow the "original" exception
findOriginalException : exn -> exn }
- static member Create(f: ('ctxt->'T), findOriginalException) : LazyWithContext<'T,'ctxt> =
+ static member Create(f: ('ctxt->'T), findOriginalException) : LazyWithContext<'T, 'ctxt> =
{ value = Unchecked.defaultof<'T>
funcOrException = box f
findOriginalException = findOriginalException }
- static member NotLazy(x:'T) : LazyWithContext<'T,'ctxt> =
+ static member NotLazy(x:'T) : LazyWithContext<'T, 'ctxt> =
{ value = x
funcOrException = null
findOriginalException = id }
@@ -1046,7 +1039,7 @@ type LazyWithContext<'T,'ctxt> =
member x.IsForced = (match x.funcOrException with null -> true | _ -> false)
- member x.Force(ctxt:'ctxt) =
+ member x.Force(ctxt:'ctxt) =
match x.funcOrException with
| null -> x.value
| _ ->
@@ -1079,13 +1072,15 @@ type LazyWithContext<'T,'ctxt> =
/// Intern tables to save space.
module Tables =
let memoize f =
- let t = new Dictionary<_,_>(1000, HashIdentity.Structural)
+ let t = new Dictionary<_, _>(1000, HashIdentity.Structural)
fun x ->
let mutable res = Unchecked.defaultof<_>
if t.TryGetValue(x, &res) then
res
else
- res <- f x; t.[x] <- res; res
+ res <- f x
+ t.[x] <- res
+ res
/// Interface that defines methods for comparing objects using partial equality relation
type IPartialEqualityComparer<'T> =
@@ -1106,14 +1101,14 @@ module IPartialEqualityComparer =
type private WrapType<'T> = Wrap of 'T
// Like Seq.distinctBy but only filters out duplicates for some of the elements
- let partialDistinctBy (per:IPartialEqualityComparer<'T>) seq =
+ let partialDistinctBy (per: IPartialEqualityComparer<'T>) seq =
let wper =
{ new IPartialEqualityComparer> with
member __.InEqualityRelation (Wrap x) = per.InEqualityRelation (x)
member __.Equals(Wrap x, Wrap y) = per.Equals(x, y)
member __.GetHashCode (Wrap x) = per.GetHashCode(x) }
// Wrap a Wrap _ around all keys in case the key type is itself a type using null as a representation
- let dict = Dictionary,obj>(wper)
+ let dict = Dictionary, obj>(wper)
seq |> List.filter (fun v ->
let key = Wrap(v)
if (per.InEqualityRelation(v)) then
@@ -1124,11 +1119,11 @@ module IPartialEqualityComparer =
// Library: Name maps
//------------------------------------------------------------------------
-type NameMap<'T> = Map
+type NameMap<'T> = Map
type NameMultiMap<'T> = NameMap<'T list>
-type MultiMap<'T,'U when 'T : comparison> = Map<'T,'U list>
+type MultiMap<'T, 'U when 'T : comparison> = Map<'T, 'U list>
[]
module NameMap =
@@ -1137,7 +1132,7 @@ module NameMap =
let range m = List.rev (Map.foldBack (fun _ x sofar -> x :: sofar) m [])
- let foldBack f (m:NameMap<'T>) z = Map.foldBack f m z
+ let foldBack f (m: NameMap<'T>) z = Map.foldBack f m z
let forall f m = Map.foldBack (fun x y sofar -> sofar && f x y) m true
@@ -1160,8 +1155,8 @@ module NameMap =
/// Union entries by identical key, using the provided function to union sets of values
let union unionf (ms: NameMap<_> seq) =
seq { for m in ms do yield! m }
- |> Seq.groupBy (fun (KeyValue(k,_v)) -> k)
- |> Seq.map (fun (k,es) -> (k,unionf (Seq.map (fun (KeyValue(_k,v)) -> v) es)))
+ |> Seq.groupBy (fun (KeyValue(k, _v)) -> k)
+ |> Seq.map (fun (k, es) -> (k, unionf (Seq.map (fun (KeyValue(_k, v)) -> v) es)))
|> Map.ofSeq
/// For every entry in m2 find an entry in m1 and fold
@@ -1171,7 +1166,7 @@ module NameMap =
let suball2 errf p m1 m2 = subfold2 errf (fun _ x1 x2 acc -> p x1 x2 && acc) m1 m2 true
let mapFold f s (l: NameMap<'T>) =
- Map.foldBack (fun x y (l',s') -> let y',s'' = f s' x y in Map.add x y' l',s'') l (Map.empty,s)
+ Map.foldBack (fun x y (l2, sx) -> let y2, sy = f sx x y in Map.add x y2 l2, sy) l (Map.empty, s)
let foldBackRange f (l: NameMap<'T>) acc = Map.foldBack (fun _ y acc -> f y acc) l acc
@@ -1193,9 +1188,9 @@ module NameMap =
let add v x (m: NameMap<'T>) = Map.add v x m
- let isEmpty (m: NameMap<'T>) = (Map.isEmpty m)
+ let isEmpty (m: NameMap<'T>) = (Map.isEmpty m)
- let existsInRange p m = Map.foldBack (fun _ y acc -> acc || p y) m false
+ let existsInRange p m = Map.foldBack (fun _ y acc -> acc || p y) m false
let tryFindInRange p m =
Map.foldBack (fun _ y acc ->
@@ -1222,49 +1217,49 @@ module NameMultiMap =
let empty : NameMultiMap<'T> = Map.empty
- let initBy f xs : NameMultiMap<'T> = xs |> Seq.groupBy f |> Seq.map (fun (k,v) -> (k,List.ofSeq v)) |> Map.ofSeq
+ let initBy f xs : NameMultiMap<'T> = xs |> Seq.groupBy f |> Seq.map (fun (k, v) -> (k, List.ofSeq v)) |> Map.ofSeq
- let ofList (xs: (string * 'T) list) : NameMultiMap<'T> = xs |> Seq.groupBy fst |> Seq.map (fun (k,v) -> (k,List.ofSeq (Seq.map snd v))) |> Map.ofSeq
+ let ofList (xs: (string * 'T) list) : NameMultiMap<'T> = xs |> Seq.groupBy fst |> Seq.map (fun (k, v) -> (k, List.ofSeq (Seq.map snd v))) |> Map.ofSeq
[]
module MultiMap =
- let existsInRange f (m: MultiMap<_,_>) = Map.exists (fun _ l -> List.exists f l) m
+ let existsInRange f (m: MultiMap<_, _>) = Map.exists (fun _ l -> List.exists f l) m
- let find v (m: MultiMap<_,_>) = match m.TryGetValue v with true, r -> r | _ -> []
+ let find v (m: MultiMap<_, _>) = match m.TryGetValue v with true, r -> r | _ -> []
- let add v x (m: MultiMap<_,_>) = Map.add v (x :: find v m) m
+ let add v x (m: MultiMap<_, _>) = Map.add v (x :: find v m) m
- let range (m: MultiMap<_,_>) = Map.foldBack (fun _ x sofar -> x @ sofar) m []
+ let range (m: MultiMap<_, _>) = Map.foldBack (fun _ x sofar -> x @ sofar) m []
- let empty : MultiMap<_,_> = Map.empty
+ let empty : MultiMap<_, _> = Map.empty
- let initBy f xs : MultiMap<_,_> = xs |> Seq.groupBy f |> Seq.map (fun (k,v) -> (k,List.ofSeq v)) |> Map.ofSeq
+ let initBy f xs : MultiMap<_, _> = xs |> Seq.groupBy f |> Seq.map (fun (k, v) -> (k, List.ofSeq v)) |> Map.ofSeq
-type LayeredMap<'Key,'Value when 'Key : comparison> = Map<'Key,'Value>
+type LayeredMap<'Key, 'Value when 'Key : comparison> = Map<'Key, 'Value>
-type Map<'Key,'Value when 'Key : comparison> with
+type Map<'Key, 'Value when 'Key : comparison> with
- static member Empty : Map<'Key,'Value> = Map.empty
+ static member Empty : Map<'Key, 'Value> = Map.empty
- member x.Values = [ for (KeyValue(_,v)) in x -> v ]
+ member x.Values = [ for (KeyValue(_, v)) in x -> v ]
- member x.AddAndMarkAsCollapsible (kvs: _[]) = (x,kvs) ||> Array.fold (fun x (KeyValue(k,v)) -> x.Add(k,v))
+ member x.AddAndMarkAsCollapsible (kvs: _[]) = (x, kvs) ||> Array.fold (fun x (KeyValue(k, v)) -> x.Add(k, v))
member x.LinearTryModifyThenLaterFlatten (key, f: 'Value option -> 'Value) = x.Add (key, f (x.TryFind key))
- member x.MarkAsCollapsible () = x
+ member x.MarkAsCollapsible () = x
/// Immutable map collection, with explicit flattening to a backing dictionary
[]
-type LayeredMultiMap<'Key,'Value when 'Key : equality and 'Key : comparison>(contents : LayeredMap<'Key,'Value list>) =
+type LayeredMultiMap<'Key, 'Value when 'Key : equality and 'Key : comparison>(contents : LayeredMap<'Key, 'Value list>) =
- member x.Add (k,v) = LayeredMultiMap(contents.Add(k,v :: x.[k]))
+ member x.Add (k, v) = LayeredMultiMap(contents.Add(k, v :: x.[k]))
member x.Item with get k = match contents.TryGetValue k with true, l -> l | _ -> []
- member x.AddAndMarkAsCollapsible (kvs: _[]) =
- let x = (x,kvs) ||> Array.fold (fun x (KeyValue(k,v)) -> x.Add(k,v))
+ member x.AddAndMarkAsCollapsible (kvs: _[]) =
+ let x = (x, kvs) ||> Array.fold (fun x (KeyValue(k, v)) -> x.Add(k, v))
x.MarkAsCollapsible()
member x.MarkAsCollapsible() = LayeredMultiMap(contents.MarkAsCollapsible())
@@ -1275,7 +1270,7 @@ type LayeredMultiMap<'Key,'Value when 'Key : equality and 'Key : comparison>(con
member x.Values = contents.Values |> List.concat
- static member Empty : LayeredMultiMap<'Key,'Value> = LayeredMultiMap LayeredMap.Empty
+ static member Empty : LayeredMultiMap<'Key, 'Value> = LayeredMultiMap LayeredMap.Empty
[]
module Shim =
@@ -1288,27 +1283,27 @@ module Shim =
type IFileSystem =
/// A shim over File.ReadAllBytes
- abstract ReadAllBytesShim: fileName:string -> byte[]
+ abstract ReadAllBytesShim: fileName: string -> byte[]
- /// A shim over FileStream with FileMode.Open,FileAccess.Read,FileShare.ReadWrite
- abstract FileStreamReadShim: fileName:string -> Stream
+ /// A shim over FileStream with FileMode.Open, FileAccess.Read, FileShare.ReadWrite
+ abstract FileStreamReadShim: fileName: string -> Stream
- /// A shim over FileStream with FileMode.Create,FileAccess.Write,FileShare.Read
- abstract FileStreamCreateShim: fileName:string -> Stream
+ /// A shim over FileStream with FileMode.Create, FileAccess.Write, FileShare.Read
+ abstract FileStreamCreateShim: fileName: string -> Stream
- /// A shim over FileStream with FileMode.Open,FileAccess.Write,FileShare.Read
- abstract FileStreamWriteExistingShim: fileName:string -> Stream
+ /// A shim over FileStream with FileMode.Open, FileAccess.Write, FileShare.Read
+ abstract FileStreamWriteExistingShim: fileName: string -> Stream
/// Take in a filename with an absolute path, and return the same filename
/// but canonicalized with respect to extra path separators (e.g. C:\\\\foo.txt)
/// and '..' portions
- abstract GetFullPathShim: fileName:string -> string
+ abstract GetFullPathShim: fileName: string -> string
/// A shim over Path.IsPathRooted
- abstract IsPathRootedShim: path:string -> bool
+ abstract IsPathRootedShim: path: string -> bool
/// A shim over Path.IsInvalidPath
- abstract IsInvalidPathShim: filename:string -> bool
+ abstract IsInvalidPathShim: filename: string -> bool
/// A shim over Path.GetTempPath
abstract GetTempPathShim : unit -> string
@@ -1343,24 +1338,24 @@ module Shim =
member __.ReadAllBytesShim (fileName: string) = File.ReadAllBytes fileName
- member __.FileStreamReadShim (fileName: string) = new FileStream(fileName,FileMode.Open,FileAccess.Read,FileShare.ReadWrite) :> Stream
+ member __.FileStreamReadShim (fileName: string) = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite) :> Stream
- member __.FileStreamCreateShim (fileName: string) = new FileStream(fileName,FileMode.Create,FileAccess.Write,FileShare.Read ,0x1000,false) :> Stream
+ member __.FileStreamCreateShim (fileName: string) = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.Read, 0x1000, false) :> Stream
- member __.FileStreamWriteExistingShim (fileName: string) = new FileStream(fileName,FileMode.Open,FileAccess.Write,FileShare.Read ,0x1000,false) :> Stream
+ member __.FileStreamWriteExistingShim (fileName: string) = new FileStream(fileName, FileMode.Open, FileAccess.Write, FileShare.Read, 0x1000, false) :> Stream
member __.GetFullPathShim (fileName: string) = System.IO.Path.GetFullPath fileName
member __.IsPathRootedShim (path: string) = Path.IsPathRooted path
member __.IsInvalidPathShim(path: string) =
- let isInvalidPath(p:string) =
+ let isInvalidPath(p: string) =
String.IsNullOrEmpty(p) || p.IndexOfAny(Path.GetInvalidPathChars()) <> -1
- let isInvalidFilename(p:string) =
+ let isInvalidFilename(p: string) =
String.IsNullOrEmpty(p) || p.IndexOfAny(Path.GetInvalidFileNameChars()) <> -1
- let isInvalidDirectory(d:string) =
+ let isInvalidDirectory(d: string) =
d=null || d.IndexOfAny(Path.GetInvalidPathChars()) <> -1
isInvalidPath (path) ||
@@ -1370,11 +1365,11 @@ module Shim =
member __.GetTempPathShim() = Path.GetTempPath()
- member __.GetLastWriteTimeShim (fileName:string) = File.GetLastWriteTimeUtc fileName
+ member __.GetLastWriteTimeShim (fileName: string) = File.GetLastWriteTimeUtc fileName
- member __.SafeExists (fileName:string) = File.Exists fileName
+ member __.SafeExists (fileName: string) = File.Exists fileName
- member __.FileDelete (fileName:string) = File.Delete fileName
+ member __.FileDelete (fileName: string) = File.Delete fileName
member __.IsStableFileHeuristic (fileName: string) =
let directory = Path.GetDirectoryName(fileName)
diff --git a/src/absil/ilmorph.fs b/src/absil/ilmorph.fs
index 1281007041a..ffd86aa504b 100644
--- a/src/absil/ilmorph.fs
+++ b/src/absil/ilmorph.fs
@@ -113,7 +113,7 @@ let mref_ty2ty (f: ILType -> ILType) (x:ILMethodRef) =
type formal_scopeCtxt = Choice
-let mspec_ty2ty (((factualty : ILType -> ILType) , (fformalty: formal_scopeCtxt -> ILType -> ILType))) (x: ILMethodSpec) =
+let mspec_ty2ty (((factualty : ILType -> ILType), (fformalty: formal_scopeCtxt -> ILType -> ILType))) (x: ILMethodSpec) =
mkILMethSpecForMethRefInTy(mref_ty2ty (fformalty (Choice1Of2 x)) x.MethodRef,
factualty x.DeclaringType,
tys_ty2ty factualty x.GenericArgs)
diff --git a/src/absil/ilprint.fs b/src/absil/ilprint.fs
index 2e8cbc0acf1..e2ed4e9302e 100644
--- a/src/absil/ilprint.fs
+++ b/src/absil/ilprint.fs
@@ -1,15 +1,15 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
-module internal FSharp.Compiler.AbstractIL.ILAsciiWriter
+module internal FSharp.Compiler.AbstractIL.ILAsciiWriter
open Internal.Utilities
-open FSharp.Compiler.AbstractIL
-open FSharp.Compiler.AbstractIL.Internal
+open FSharp.Compiler.AbstractIL
+open FSharp.Compiler.AbstractIL.Internal
open FSharp.Compiler.AbstractIL.Internal.Library
-open FSharp.Compiler.AbstractIL.Diagnostics
-open FSharp.Compiler.AbstractIL.Extensions.ILX.Types
-open FSharp.Compiler.AbstractIL.Internal.AsciiConstants
-open FSharp.Compiler.AbstractIL.IL
+open FSharp.Compiler.AbstractIL.Diagnostics
+open FSharp.Compiler.AbstractIL.Extensions.ILX.Types
+open FSharp.Compiler.AbstractIL.Internal.AsciiConstants
+open FSharp.Compiler.AbstractIL.IL
open System.Text
open System.IO
@@ -18,56 +18,64 @@ open System.Reflection
#if DEBUG
let pretty () = true
-// --------------------------------------------------------------------
+// --------------------------------------------------------------------
// Pretty printing
// --------------------------------------------------------------------
-let tyvar_generator =
- let i = ref 0
- fun n ->
+let tyvar_generator =
+ let i = ref 0
+ fun n ->
incr i; n + string !i
-// Carry an environment because the way we print method variables
-// depends on the gparams of the current scope.
-type ppenv =
+// Carry an environment because the way we print method variables
+// depends on the gparams of the current scope.
+type ppenv =
{ ilGlobals: ILGlobals
ppenvClassFormals: int
ppenvMethodFormals: int }
-let ppenv_enter_method mgparams env =
+
+let ppenv_enter_method mgparams env =
{env with ppenvMethodFormals=mgparams}
+
let ppenv_enter_tdef gparams env =
{env with ppenvClassFormals=List.length gparams; ppenvMethodFormals=0}
+
let mk_ppenv ilg = { ilGlobals = ilg; ppenvClassFormals = 0; ppenvMethodFormals = 0 }
-let debug_ppenv = mk_ppenv
+
+let debug_ppenv = mk_ppenv
+
let ppenv_enter_modul env = { env with ppenvClassFormals=0; ppenvMethodFormals=0 }
-// --------------------------------------------------------------------
+// --------------------------------------------------------------------
// Pretty printing - output streams
-// --------------------------------------------------------------------
+// --------------------------------------------------------------------
+
+let output_string (os: TextWriter) (s:string) = os.Write s
-let output_string (os: TextWriter) (s:string) = os.Write s
let output_char (os: TextWriter) (c:char) = os.Write c
+
let output_int os (i:int) = output_string os (string i)
-let output_hex_digit os i =
+
+let output_hex_digit os i =
assert (i >= 0 && i < 16)
- if i > 9 then output_char os (char (int32 'A' + (i-10)))
+ if i > 9 then output_char os (char (int32 'A' + (i-10)))
else output_char os (char (int32 '0' + i))
let output_qstring os s =
output_char os '"'
for i = 0 to String.length s - 1 do
let c = String.get s i
- if (c >= '\000' && c <= '\031') || (c >= '\127' && c <= '\255') then
+ if (c >= '\000' && c <= '\031') || (c >= '\127' && c <= '\255') then
let c' = int32 c
output_char os '\\'
output_int os (c'/64)
output_int os ((c' % 64) / 8)
- output_int os (c' % 8)
- else if (c = '"') then
+ output_int os (c' % 8)
+ else if (c = '"') then
output_char os '\\'; output_char os '"'
- else if (c = '\\') then
+ else if (c = '\\') then
output_char os '\\'; output_char os '\\'
- else
+ else
output_char os c
done
output_char os '"'
@@ -75,24 +83,24 @@ let output_sqstring os s =
output_char os '\''
for i = 0 to String.length s - 1 do
let c = s.[i]
- if (c >= '\000' && c <= '\031') || (c >= '\127' && c <= '\255') then
+ if (c >= '\000' && c <= '\031') || (c >= '\127' && c <= '\255') then
let c' = int32 c
output_char os '\\'
output_int os (c'/64)
output_int os ((c' % 64) / 8)
- output_int os (c' % 8)
- else if (c = '\\') then
+ output_int os (c' % 8)
+ else if (c = '\\') then
output_char os '\\'; output_char os '\\'
- else if (c = '\'') then
+ else if (c = '\'') then
output_char os '\\'; output_char os '\''
- else
+ else
output_char os c
done
output_char os '\''
let output_seq sep f os (a:seq<_>) =
use e = a.GetEnumerator()
- if e.MoveNext() then
+ if e.MoveNext() then
f os e.Current
while e.MoveNext() do
output_string os sep
@@ -106,7 +114,9 @@ let output_array sep f os (a:_ []) =
f os (a.[a.Length - 1])
let output_parens f os a = output_string os "("; f os a; output_string os ")"
+
let output_angled f os a = output_string os "<"; f os a; output_string os ">"
+
let output_bracks f os a = output_string os "["; f os a; output_string os "]"
let output_id os n = output_sqstring os n
@@ -114,87 +124,98 @@ let output_id os n = output_sqstring os n
let output_label os n = output_string os n
let output_lid os lid = output_seq "." output_string os lid
-let string_of_type_name (_,n) = n
-let output_byte os i =
+let string_of_type_name (_, n) = n
+
+let output_byte os i =
output_hex_digit os (i / 16)
output_hex_digit os (i % 16)
-let output_bytes os (bytes:byte[]) =
+let output_bytes os (bytes:byte[]) =
for i = 0 to bytes.Length - 1 do
output_byte os (Bytes.get bytes i)
output_string os " "
-let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x),0)
+let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x), 0)
+
let bits_of_float (x:float) = System.BitConverter.DoubleToInt64Bits(x)
let output_u8 os (x:byte) = output_string os (string (int x))
+
let output_i8 os (x:sbyte) = output_string os (string (int x))
+
let output_u16 os (x:uint16) = output_string os (string (int x))
+
let output_i16 os (x:int16) = output_string os (string (int x))
+
let output_u32 os (x:uint32) = output_string os (string (int64 x))
-let output_i32 os (x:int32) = output_string os (string x)
+
+let output_i32 os (x:int32) = output_string os (string x)
+
let output_u64 os (x:uint64) = output_string os (string (int64 x))
-let output_i64 os (x:int64) = output_string os (string x)
+
+let output_i64 os (x:int64) = output_string os (string x)
+
let output_ieee32 os (x:float32) = output_string os "float32 ("; output_string os (string (bits_of_float32 x)); output_string os ")"
+
let output_ieee64 os (x:float) = output_string os "float64 ("; output_string os (string (bits_of_float x)); output_string os ")"
-let rec goutput_scoref _env os = function
+let rec goutput_scoref _env os = function
| ILScopeRef.Local -> ()
| ILScopeRef.Assembly aref ->
output_string os "["; output_sqstring os aref.Name; output_string os "]"
| ILScopeRef.Module mref ->
- output_string os "[.module "; output_sqstring os mref.Name; output_string os "]"
+ output_string os "[.module "; output_sqstring os mref.Name; output_string os "]"
-and goutput_type_name_ref env os (scoref,enc,n) =
+and goutput_type_name_ref env os (scoref, enc, n) =
goutput_scoref env os scoref
output_seq "/" output_sqstring os (enc@[n])
-and goutput_tref env os (x:ILTypeRef) =
- goutput_type_name_ref env os (x.Scope,x.Enclosing,x.Name)
+and goutput_tref env os (x:ILTypeRef) =
+ goutput_type_name_ref env os (x.Scope, x.Enclosing, x.Name)
and goutput_typ env os ty =
- match ty with
- | ILType.Boxed tr -> goutput_tspec env os tr
- | ILType.TypeVar tv ->
- // Special rule to print method type variables in Generic EE preferred form
- // when an environment is available to help us do this.
- let cgparams = env.ppenvClassFormals
- let mgparams = env.ppenvMethodFormals
- if int tv < cgparams then
+ match ty with
+ | ILType.Boxed tr -> goutput_tspec env os tr
+ | ILType.TypeVar tv ->
+ // Special rule to print method type variables in Generic EE preferred form
+ // when an environment is available to help us do this.
+ let cgparams = env.ppenvClassFormals
+ let mgparams = env.ppenvMethodFormals
+ if int tv < cgparams then
output_string os "!"
output_tyvar os tv
- elif int tv - cgparams < mgparams then
+ elif int tv - cgparams < mgparams then
output_string os "!!"
- output_int os (int tv - cgparams)
- else
+ output_int os (int tv - cgparams)
+ else
output_string os "!"
output_tyvar os tv
output_int os (int tv)
-
+
| ILType.Byref typ -> goutput_typ env os typ; output_string os "&"
- | ILType.Ptr typ -> goutput_typ env os typ; output_string os "*"
- | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_SByte.TypeSpec.Name -> output_string os "int8"
- | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Int16.TypeSpec.Name -> output_string os "int16"
- | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Int32.TypeSpec.Name -> output_string os "int32"
- | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Int64.TypeSpec.Name -> output_string os "int64"
- | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_IntPtr.TypeSpec.Name -> output_string os "native int"
- | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Byte.TypeSpec.Name -> output_string os "unsigned int8"
- | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UInt16.TypeSpec.Name -> output_string os "unsigned int16"
- | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UInt32.TypeSpec.Name -> output_string os "unsigned int32"
- | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UInt64.TypeSpec.Name -> output_string os "unsigned int64"
- | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UIntPtr.TypeSpec.Name -> output_string os "native unsigned int"
- | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Double.TypeSpec.Name -> output_string os "float64"
- | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Single.TypeSpec.Name -> output_string os "float32"
- | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Bool.TypeSpec.Name -> output_string os "bool"
- | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Char.TypeSpec.Name -> output_string os "char"
+ | ILType.Ptr typ -> goutput_typ env os typ; output_string os "*"
+ | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_SByte.TypeSpec.Name -> output_string os "int8"
+ | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Int16.TypeSpec.Name -> output_string os "int16"
+ | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Int32.TypeSpec.Name -> output_string os "int32"
+ | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Int64.TypeSpec.Name -> output_string os "int64"
+ | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_IntPtr.TypeSpec.Name -> output_string os "native int"
+ | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Byte.TypeSpec.Name -> output_string os "unsigned int8"
+ | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UInt16.TypeSpec.Name -> output_string os "unsigned int16"
+ | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UInt32.TypeSpec.Name -> output_string os "unsigned int32"
+ | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UInt64.TypeSpec.Name -> output_string os "unsigned int64"
+ | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UIntPtr.TypeSpec.Name -> output_string os "native unsigned int"
+ | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Double.TypeSpec.Name -> output_string os "float64"
+ | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Single.TypeSpec.Name -> output_string os "float32"
+ | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Bool.TypeSpec.Name -> output_string os "bool"
+ | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Char.TypeSpec.Name -> output_string os "char"
| ILType.Value tspec ->
output_string os "value class "
goutput_tref env os tspec.TypeRef
output_string os " "
goutput_gactuals env os tspec.GenericArgs
- | ILType.Void -> output_string os "void"
- | ILType.Array (bounds,ty) ->
+ | ILType.Void -> output_string os "void"
+ | ILType.Array (bounds, ty) ->
goutput_typ env os ty
output_string os "["
output_arr_bounds os bounds
@@ -203,11 +224,11 @@ and goutput_typ env os ty =
output_string os "method "
goutput_typ env os csig.ReturnType
output_string os " *("
- output_seq "," (goutput_typ env) os csig.ArgTypes
+ output_seq ", " (goutput_typ env) os csig.ArgTypes
output_string os ")"
| _ -> output_string os "NaT"
-
-and output_tyvar os d =
+
+and output_tyvar os d =
output_u16 os d; ()
and goutput_ldtoken_info env os = function
@@ -216,11 +237,11 @@ and goutput_ldtoken_info env os = function
| ILToken.ILField x -> output_string os "field "; goutput_fspec env os x
and goutput_typ_with_shortened_class_syntax env os = function
- ILType.Boxed tspec when tspec.GenericArgs = [] ->
+ ILType.Boxed tspec when tspec.GenericArgs = [] ->
goutput_tref env os tspec.TypeRef
| typ2 -> goutput_typ env os typ2
-and goutput_gactuals env os inst =
+and goutput_gactuals env os inst =
if not (List.isEmpty inst) then
output_string os "<"
output_seq ", " (goutput_gactual env) os inst
@@ -228,76 +249,74 @@ and goutput_gactuals env os inst =
and goutput_gactual env os ty = goutput_typ env os ty
-and goutput_tspec env os tspec =
+and goutput_tspec env os tspec =
output_string os "class "
goutput_tref env os tspec.TypeRef
output_string os " "
goutput_gactuals env os tspec.GenericArgs
-and output_arr_bounds os = function
+and output_arr_bounds os = function
| bounds when bounds = ILArrayShape.SingleDimensional -> ()
| ILArrayShape l ->
- output_seq ","
+ output_seq ", "
(fun os -> function
- | (None,None) -> output_string os ""
- | (None,Some sz) ->
+ | (None, None) -> output_string os ""
+ | (None, Some sz) ->
output_int os sz
- | (Some lower,None) ->
+ | (Some lower, None) ->
output_int os lower
output_string os " ... "
- | (Some lower,Some d) ->
+ | (Some lower, Some d) ->
output_int os lower
output_string os " ... "
output_int os d)
- os
+ os
l
-
-and goutput_permission _env os p =
- let output_security_action os x =
- output_string os
- (match x with
- | ILSecurityAction.Request -> "request"
- | ILSecurityAction.Demand -> "demand"
- | ILSecurityAction.Assert-> "assert"
- | ILSecurityAction.Deny-> "deny"
- | ILSecurityAction.PermitOnly-> "permitonly"
- | ILSecurityAction.LinkCheck-> "linkcheck"
- | ILSecurityAction.InheritCheck-> "inheritcheck"
- | ILSecurityAction.ReqMin-> "reqmin"
- | ILSecurityAction.ReqOpt-> "reqopt"
- | ILSecurityAction.ReqRefuse-> "reqrefuse"
- | ILSecurityAction.PreJitGrant-> "prejitgrant"
- | ILSecurityAction.PreJitDeny-> "prejitdeny"
- | ILSecurityAction.NonCasDemand-> "noncasdemand"
- | ILSecurityAction.NonCasLinkDemand-> "noncaslinkdemand"
- | ILSecurityAction.NonCasInheritance-> "noncasinheritance"
+
+and goutput_permission _env os p =
+ let output_security_action os x =
+ output_string os
+ (match x with
+ | ILSecurityAction.Request -> "request"
+ | ILSecurityAction.Demand -> "demand"
+ | ILSecurityAction.Assert-> "assert"
+ | ILSecurityAction.Deny-> "deny"
+ | ILSecurityAction.PermitOnly-> "permitonly"
+ | ILSecurityAction.LinkCheck-> "linkcheck"
+ | ILSecurityAction.InheritCheck-> "inheritcheck"
+ | ILSecurityAction.ReqMin-> "reqmin"
+ | ILSecurityAction.ReqOpt-> "reqopt"
+ | ILSecurityAction.ReqRefuse-> "reqrefuse"
+ | ILSecurityAction.PreJitGrant-> "prejitgrant"
+ | ILSecurityAction.PreJitDeny-> "prejitdeny"
+ | ILSecurityAction.NonCasDemand-> "noncasdemand"
+ | ILSecurityAction.NonCasLinkDemand-> "noncaslinkdemand"
+ | ILSecurityAction.NonCasInheritance-> "noncasinheritance"
| ILSecurityAction.LinkDemandChoice -> "linkdemandchoice"
| ILSecurityAction.InheritanceDemandChoice -> "inheritancedemandchoice"
- | ILSecurityAction.DemandChoice -> "demandchoice")
+ | ILSecurityAction.DemandChoice -> "demandchoice")
-
-
- match p with
- | ILSecurityDecl (sa,b) ->
+ match p with
+ | ILSecurityDecl (sa, b) ->
output_string os " .permissionset "
- output_security_action os sa
- output_string os " = ("
- output_bytes os b
- output_string os ")"
-
+ output_security_action os sa
+ output_string os " = ("
+ output_bytes os b
+ output_string os ")"
+
and goutput_security_decls env os (ps: ILSecurityDecls) = output_seq " " (goutput_permission env) os ps.AsList
-and goutput_gparam env os (gf: ILGenericParameterDef) =
+and goutput_gparam env os (gf: ILGenericParameterDef) =
output_string os (tyvar_generator gf.Name)
- output_parens (output_seq "," (goutput_typ env)) os gf.Constraints
+ output_parens (output_seq ", " (goutput_typ env)) os gf.Constraints
-and goutput_gparams env os b =
- if not (isNil b) then
- output_string os "<"; output_seq "," (goutput_gparam env) os b; output_string os ">"; ()
+and goutput_gparams env os b =
+ if not (isNil b) then
+ output_string os "<"; output_seq ", " (goutput_gparam env) os b; output_string os ">"; ()
and output_bcc os bcc =
- output_string os
- (match bcc with
+ output_string os
+ (match bcc with
| ILArgConvention.FastCall -> "fastcall "
| ILArgConvention.StdCall -> "stdcall "
| ILArgConvention.ThisCall -> "thiscall "
@@ -305,103 +324,103 @@ and output_bcc os bcc =
| ILArgConvention.Default -> " "
| ILArgConvention.VarArg -> "vararg ")
-and output_callconv os (Callconv (hasthis,cc)) =
- output_string os
- (match hasthis with
- ILThisConvention.Instance -> "instance "
+and output_callconv os (Callconv (hasthis, cc)) =
+ output_string os
+ (match hasthis with
+ ILThisConvention.Instance -> "instance "
| ILThisConvention.InstanceExplicit -> "explicit "
- | ILThisConvention.Static -> "")
+ | ILThisConvention.Static -> "")
output_bcc os cc
-and goutput_dlocref env os (dref:ILType) =
- match dref with
- | dref when
- dref.IsNominal &&
+and goutput_dlocref env os (dref:ILType) =
+ match dref with
+ | dref when
+ dref.IsNominal &&
isTypeNameForGlobalFunctions dref.TypeRef.Name &&
- dref.TypeRef.Scope = ILScopeRef.Local ->
+ dref.TypeRef.Scope = ILScopeRef.Local ->
()
- | dref when
- dref.IsNominal &&
+ | dref when
+ dref.IsNominal &&
isTypeNameForGlobalFunctions dref.TypeRef.Name ->
goutput_scoref env os dref.TypeRef.Scope
output_string os "::"
- | ty ->goutput_typ_with_shortened_class_syntax env os ty; output_string os "::"
+ | ty ->goutput_typ_with_shortened_class_syntax env os ty; output_string os "::"
and goutput_callsig env os (csig:ILCallingSignature) =
output_callconv os csig.CallingConv
output_string os " "
goutput_typ env os csig.ReturnType
- output_parens (output_seq "," (goutput_typ env)) os csig.ArgTypes
+ output_parens (output_seq ", " (goutput_typ env)) os csig.ArgTypes
and goutput_mref env os (mref:ILMethodRef) =
output_callconv os mref.CallingConv
output_string os " "
goutput_typ_with_shortened_class_syntax env os mref.ReturnType
output_string os " "
- // no quotes for ".ctor"
- let name = mref.Name
+ // no quotes for ".ctor"
+ let name = mref.Name
if name = ".ctor" || name = ".cctor" then output_string os name else output_id os name
- output_parens (output_seq "," (goutput_typ env)) os mref.ArgTypes
+ output_parens (output_seq ", " (goutput_typ env)) os mref.ArgTypes
-and goutput_mspec env os (mspec:ILMethodSpec) =
- let fenv =
+and goutput_mspec env os (mspec:ILMethodSpec) =
+ let fenv =
ppenv_enter_method mspec.GenericArity
- (ppenv_enter_tdef (mkILFormalTypars mspec.DeclaringType.GenericArgs) env)
+ (ppenv_enter_tdef (mkILFormalTypars mspec.DeclaringType.GenericArgs) env)
output_callconv os mspec.CallingConv
output_string os " "
goutput_typ fenv os mspec.FormalReturnType
output_string os " "
goutput_dlocref env os mspec.DeclaringType
output_string os " "
- let name = mspec.Name
+ let name = mspec.Name
if name = ".ctor" || name = ".cctor" then output_string os name else output_id os name
goutput_gactuals env os mspec.GenericArgs
- output_parens (output_seq "," (goutput_typ fenv)) os mspec.FormalArgTypes
+ output_parens (output_seq ", " (goutput_typ fenv)) os mspec.FormalArgTypes
and goutput_vararg_mspec env os (mspec, varargs) =
- match varargs with
+ match varargs with
| None -> goutput_mspec env os mspec
- | Some varargs' ->
- let fenv =
+ | Some varargs' ->
+ let fenv =
ppenv_enter_method mspec.GenericArity
- (ppenv_enter_tdef (mkILFormalTypars mspec.DeclaringType.GenericArgs) env)
+ (ppenv_enter_tdef (mkILFormalTypars mspec.DeclaringType.GenericArgs) env)
output_callconv os mspec.CallingConv
output_string os " "
goutput_typ fenv os mspec.FormalReturnType
output_string os " "
goutput_dlocref env os mspec.DeclaringType
- let name = mspec.Name
+ let name = mspec.Name
if name = ".ctor" || name = ".cctor" then output_string os name else output_id os name
goutput_gactuals env os mspec.GenericArgs
output_string os "("
- output_seq "," (goutput_typ fenv) os mspec.FormalArgTypes
- output_string os ",...,"
- output_seq "," (goutput_typ fenv) os varargs'
+ output_seq ", " (goutput_typ fenv) os mspec.FormalArgTypes
+ output_string os ", ..., "
+ output_seq ", " (goutput_typ fenv) os varargs'
output_string os ")"
-and goutput_vararg_sig env os (csig:ILCallingSignature,varargs:ILVarArgs) =
- match varargs with
+and goutput_vararg_sig env os (csig:ILCallingSignature, varargs:ILVarArgs) =
+ match varargs with
| None -> goutput_callsig env os csig; ()
- | Some varargs' ->
+ | Some varargs' ->
goutput_typ env os csig.ReturnType
output_string os " ("
- let argtys = csig.ArgTypes
+ let argtys = csig.ArgTypes
if argtys.Length <> 0 then
output_seq ", " (goutput_typ env) os argtys
- output_string os ",...,"
- output_seq "," (goutput_typ env) os varargs'
+ output_string os ", ..., "
+ output_seq ", " (goutput_typ env) os varargs'
output_string os ")"
and goutput_fspec env os (x:ILFieldSpec) =
- let fenv = ppenv_enter_tdef (mkILFormalTypars x.DeclaringType.GenericArgs) env
+ let fenv = ppenv_enter_tdef (mkILFormalTypars x.DeclaringType.GenericArgs) env
goutput_typ fenv os x.FormalType
output_string os " "
goutput_dlocref env os x.DeclaringType
output_id os x.Name
-
-let output_member_access os access =
- output_string os
- (match access with
+
+let output_member_access os access =
+ output_string os
+ (match access with
| ILMemberAccess.Public -> "public"
| ILMemberAccess.Private -> "private"
| ILMemberAccess.Family -> "family"
@@ -410,14 +429,14 @@ let output_member_access os access =
| ILMemberAccess.FamilyOrAssembly -> "famorassem"
| ILMemberAccess.Assembly -> "assembly")
-let output_type_access os access =
- match access with
+let output_type_access os access =
+ match access with
| ILTypeDefAccess.Public -> output_string os "public"
| ILTypeDefAccess.Private -> output_string os "private"
| ILTypeDefAccess.Nested ilMemberAccess -> output_string os "nested "; output_member_access os ilMemberAccess
-let output_encoding os e =
- match e with
+let output_encoding os e =
+ match e with
| ILDefaultPInvokeEncoding.Ansi -> output_string os " ansi "
| ILDefaultPInvokeEncoding.Auto -> output_string os " autochar "
| ILDefaultPInvokeEncoding.Unicode -> output_string os " unicode "
@@ -435,34 +454,34 @@ let output_field_init os = function
| ILFieldInit.UInt64 x-> output_string os "= uint64"; output_parens output_u64 os x
| ILFieldInit.Single x-> output_string os "= float32"; output_parens output_ieee32 os x
| ILFieldInit.Double x-> output_string os "= float64"; output_parens output_ieee64 os x
- | ILFieldInit.Null-> output_string os "= nullref"
+ | ILFieldInit.Null-> output_string os "= nullref"
let output_at os b =
Printf.fprintf os " at (* no labels for data available, data = %a *)" (output_parens output_bytes) b
let output_option f os = function None -> () | Some x -> f os x
-
-let goutput_alternative_ref env os (alt: IlxUnionAlternative) =
+
+let goutput_alternative_ref env os (alt: IlxUnionAlternative) =
output_id os alt.Name
- alt.FieldDefs |> output_parens (output_array "," (fun os fdef -> goutput_typ env os fdef.Type)) os
+ alt.FieldDefs |> output_parens (output_array ", " (fun os fdef -> goutput_typ env os fdef.Type)) os
-let goutput_curef env os (IlxUnionRef(_,tref,alts,_,_)) =
+let goutput_curef env os (IlxUnionRef(_, tref, alts, _, _)) =
output_string os " .classunion import "
goutput_tref env os tref
- output_parens (output_array "," (goutput_alternative_ref env)) os alts
-
-let goutput_cuspec env os (IlxUnionSpec(IlxUnionRef(_,tref,_,_,_),i)) =
+ output_parens (output_array ", " (goutput_alternative_ref env)) os alts
+
+let goutput_cuspec env os (IlxUnionSpec(IlxUnionRef(_, tref, _, _, _), i)) =
output_string os "class /* classunion */ "
goutput_tref env os tref
goutput_gactuals env os i
-let output_basic_type os x =
- output_string os
+let output_basic_type os x =
+ output_string os
(match x with
- | DT_I1 -> "i1"
- | DT_U1 -> "u1"
- | DT_I2 -> "i2"
- | DT_U2 -> "u2"
+ | DT_I1 -> "i1"
+ | DT_U1 -> "u1"
+ | DT_I2 -> "i2"
+ | DT_U2 -> "u2"
| DT_I4 -> "i4"
| DT_U4 -> "u4"
| DT_I8 -> "i8"
@@ -474,9 +493,9 @@ let output_basic_type os x =
| DT_U -> "u"
| DT_REF -> "ref")
-let output_custom_attr_data os data =
+let output_custom_attr_data os data =
output_string os " = "; output_parens output_bytes os data
-
+
let goutput_custom_attr env os (attr: ILAttribute) =
output_string os " .custom "
goutput_mspec env os attr.Method
@@ -488,8 +507,8 @@ let goutput_custom_attrs env os (attrs : ILAttributes) =
let goutput_fdef _tref env os (fd: ILFieldDef) =
output_string os " .field "
- match fd.Offset with Some i -> output_string os "["; output_i32 os i; output_string os "] " | None -> ()
- match fd.Marshal with Some _i -> output_string os "// marshal attribute not printed\n"; | None -> ()
+ match fd.Offset with Some i -> output_string os "["; output_i32 os i; output_string os "] " | None -> ()
+ match fd.Marshal with Some _i -> output_string os "// marshal attribute not printed\n"; | None -> ()
output_member_access os fd.Access
output_string os " "
if fd.IsStatic then output_string os " static "
@@ -505,7 +524,6 @@ let goutput_fdef _tref env os (fd: ILFieldDef) =
output_string os "\n"
goutput_custom_attrs env os fd.CustomAttrs
-
let output_alignment os = function
Aligned -> ()
| Unaligned1 -> output_string os "unaligned. 1 "
@@ -522,17 +540,17 @@ let output_after_tailcall os = function
| Tailcall -> output_string os " ret "
| _ -> ()
let rec goutput_apps env os = function
- | Apps_tyapp (actual,cs) ->
+ | Apps_tyapp (actual, cs) ->
output_angled (goutput_gactual env) os actual
output_string os " "
- output_angled (goutput_gparam env) os (mkILSimpleTypar "T")
+ output_angled (goutput_gparam env) os (mkILSimpleTypar "T")
output_string os " "
goutput_apps env os cs
- | Apps_app(ty,cs) ->
+ | Apps_app(ty, cs) ->
output_parens (goutput_typ env) os ty
output_string os " "
goutput_apps env os cs
- | Apps_done ty ->
+ | Apps_done ty ->
output_string os "--> "
goutput_typ env os ty
@@ -540,41 +558,42 @@ let rec goutput_apps env os = function
let output_short_u16 os (x:uint16) =
if int x < 256 then (output_string os ".s "; output_u16 os x)
else output_string os " "; output_u16 os x
+
let output_short_i32 os i32 =
if i32 < 256 && 0 >= i32 then (output_string os ".s "; output_i32 os i32)
else output_string os " "; output_i32 os i32
-let output_code_label os lab =
+let output_code_label os lab =
output_string os (formatCodeLabel lab)
-let goutput_local env os (l: ILLocal) =
+let goutput_local env os (l: ILLocal) =
goutput_typ env os l.Type
if l.IsPinned then output_string os " pinned"
-let goutput_param env os (l: ILParameter) =
- match l.Name with
- None -> goutput_typ env os l.Type
+let goutput_param env os (l: ILParameter) =
+ match l.Name with
+ None -> goutput_typ env os l.Type
| Some n -> goutput_typ env os l.Type; output_string os " "; output_sqstring os n
-let goutput_params env os ps =
- output_parens (output_seq "," (goutput_param env)) os ps
+let goutput_params env os ps =
+ output_parens (output_seq ", " (goutput_param env)) os ps
-let goutput_freevar env os l =
- goutput_typ env os l.fvType; output_string os " "; output_sqstring os l.fvName
+let goutput_freevar env os l =
+ goutput_typ env os l.fvType; output_string os " "; output_sqstring os l.fvName
-let goutput_freevars env os ps =
- output_parens (output_seq "," (goutput_freevar env)) os ps
+let goutput_freevars env os ps =
+ output_parens (output_seq ", " (goutput_freevar env)) os ps
-let output_source os (s:ILSourceMarker) =
- if s.Document.File <> "" then
+let output_source os (s:ILSourceMarker) =
+ if s.Document.File <> "" then
output_string os " .line "
output_int os s.Line
- if s.Column <> -1 then
+ if s.Column <> -1 then
output_string os " : "
output_int os s.Column
output_string os " /* - "
output_int os s.EndLine
- if s.Column <> -1 then
+ if s.Column <> -1 then
output_string os " : "
output_int os s.EndColumn
output_string os "*/ "
@@ -585,9 +604,9 @@ let rec goutput_instr env os inst =
match inst with
| si when isNoArgInstr si ->
output_lid os (wordsOfNoArgInstr si)
- | I_brcmp (cmp,tg1) ->
- output_string os
- (match cmp with
+ | I_brcmp (cmp, tg1) ->
+ output_string os
+ (match cmp with
| BI_beq -> "beq"
| BI_bgt -> "bgt"
| BI_bgt_un -> "bgt.un"
@@ -604,159 +623,159 @@ let rec goutput_instr env os inst =
output_code_label os tg1
| I_br tg -> output_string os "/* br "; output_code_label os tg; output_string os "*/"
| I_leave tg -> output_string os "leave "; output_code_label os tg
- | I_call (tl,mspec,varargs) ->
+ | I_call (tl, mspec, varargs) ->
output_tailness os tl
output_string os "call "
- goutput_vararg_mspec env os (mspec,varargs)
+ goutput_vararg_mspec env os (mspec, varargs)
output_after_tailcall os tl
- | I_calli (tl,mref,varargs) ->
+ | I_calli (tl, mref, varargs) ->
output_tailness os tl
output_string os "calli "
- goutput_vararg_sig env os (mref,varargs)
+ goutput_vararg_sig env os (mref, varargs)
output_after_tailcall os tl
| I_ldarg u16 -> output_string os "ldarg"; output_short_u16 os u16
| I_ldarga u16 -> output_string os "ldarga "; output_u16 os u16
- | (AI_ldc (dt, ILConst.I4 x)) ->
+ | (AI_ldc (dt, ILConst.I4 x)) ->
output_string os "ldc."; output_basic_type os dt; output_short_i32 os x
- | (AI_ldc (dt, ILConst.I8 x)) ->
+ | (AI_ldc (dt, ILConst.I8 x)) ->
output_string os "ldc."; output_basic_type os dt; output_string os " "; output_i64 os x
- | (AI_ldc (dt, ILConst.R4 x)) ->
+ | (AI_ldc (dt, ILConst.R4 x)) ->
output_string os "ldc."; output_basic_type os dt; output_string os " "; output_ieee32 os x
- | (AI_ldc (dt, ILConst.R8 x)) ->
+ | (AI_ldc (dt, ILConst.R8 x)) ->
output_string os "ldc."; output_basic_type os dt; output_string os " "; output_ieee64 os x
- | I_ldftn mspec -> output_string os "ldftn "; goutput_mspec env os mspec
+ | I_ldftn mspec -> output_string os "ldftn "; goutput_mspec env os mspec
| I_ldvirtftn mspec -> output_string os "ldvirtftn "; goutput_mspec env os mspec
- | I_ldind (al,vol,dt) ->
+ | I_ldind (al, vol, dt) ->
output_alignment os al
output_volatility os vol
output_string os "ldind."
- output_basic_type os dt
- | I_cpblk (al,vol) ->
+ output_basic_type os dt
+ | I_cpblk (al, vol) ->
output_alignment os al
output_volatility os vol
output_string os "cpblk"
- | I_initblk (al,vol) ->
+ | I_initblk (al, vol) ->
output_alignment os al
output_volatility os vol
output_string os "initblk"
| I_ldloc u16 -> output_string os "ldloc"; output_short_u16 os u16
| I_ldloca u16 -> output_string os "ldloca "; output_u16 os u16
| I_starg u16 -> output_string os "starg "; output_u16 os u16
- | I_stind (al,vol,dt) ->
+ | I_stind (al, vol, dt) ->
output_alignment os al
output_volatility os vol
output_string os "stind."
- output_basic_type os dt
+ output_basic_type os dt
| I_stloc u16 -> output_string os "stloc"; output_short_u16 os u16
- | I_switch l -> output_string os "switch "; output_parens (output_seq "," output_code_label) os l
- | I_callvirt (tl,mspec,varargs) ->
+ | I_switch l -> output_string os "switch "; output_parens (output_seq ", " output_code_label) os l
+ | I_callvirt (tl, mspec, varargs) ->
output_tailness os tl
output_string os "callvirt "
- goutput_vararg_mspec env os (mspec,varargs)
+ goutput_vararg_mspec env os (mspec, varargs)
output_after_tailcall os tl
- | I_callconstraint (tl,ty,mspec,varargs) ->
+ | I_callconstraint (tl, ty, mspec, varargs) ->
output_tailness os tl
output_string os "constraint. "
goutput_typ env os ty
output_string os " callvirt "
- goutput_vararg_mspec env os (mspec,varargs)
+ goutput_vararg_mspec env os (mspec, varargs)
output_after_tailcall os tl
| I_castclass ty -> output_string os "castclass "; goutput_typ env os ty
| I_isinst ty -> output_string os "isinst "; goutput_typ env os ty
- | I_ldfld (al,vol,fspec) ->
+ | I_ldfld (al, vol, fspec) ->
output_alignment os al
output_volatility os vol
output_string os "ldfld "
goutput_fspec env os fspec
- | I_ldflda fspec ->
- output_string os "ldflda "
+ | I_ldflda fspec ->
+ output_string os "ldflda "
goutput_fspec env os fspec
- | I_ldsfld (vol,fspec) ->
+ | I_ldsfld (vol, fspec) ->
output_volatility os vol
output_string os "ldsfld "
goutput_fspec env os fspec
- | I_ldsflda fspec ->
+ | I_ldsflda fspec ->
output_string os "ldsflda "
goutput_fspec env os fspec
- | I_stfld (al,vol,fspec) ->
+ | I_stfld (al, vol, fspec) ->
output_alignment os al
output_volatility os vol
output_string os "stfld "
goutput_fspec env os fspec
- | I_stsfld (vol,fspec) ->
+ | I_stsfld (vol, fspec) ->
output_volatility os vol
output_string os "stsfld "
goutput_fspec env os fspec
- | I_ldtoken tok -> output_string os "ldtoken "; goutput_ldtoken_info env os tok
+ | I_ldtoken tok -> output_string os "ldtoken "; goutput_ldtoken_info env os tok
| I_refanyval ty -> output_string os "refanyval "; goutput_typ env os ty
| I_refanytype -> output_string os "refanytype"
| I_mkrefany typ -> output_string os "mkrefany "; goutput_typ env os typ
- | I_ldstr s ->
+ | I_ldstr s ->
output_string os "ldstr "
output_string os s
- | I_newobj (mspec,varargs) ->
- // newobj: IL has a special rule that the CC is always implicitly "instance" and need
- // not be mentioned explicitly
+ | I_newobj (mspec, varargs) ->
+ // newobj: IL has a special rule that the CC is always implicitly "instance" and need
+ // not be mentioned explicitly
output_string os "newobj "
- goutput_vararg_mspec env os (mspec,varargs)
- | I_stelem dt -> output_string os "stelem."; output_basic_type os dt
- | I_ldelem dt -> output_string os "ldelem."; output_basic_type os dt
+ goutput_vararg_mspec env os (mspec, varargs)
+ | I_stelem dt -> output_string os "stelem."; output_basic_type os dt
+ | I_ldelem dt -> output_string os "ldelem."; output_basic_type os dt
- | I_newarr (shape,typ) ->
- if shape = ILArrayShape.SingleDimensional then
+ | I_newarr (shape, typ) ->
+ if shape = ILArrayShape.SingleDimensional then
output_string os "newarr "
goutput_typ_with_shortened_class_syntax env os typ
- else
+ else
output_string os "newobj void "
- goutput_dlocref env os (mkILArrTy(typ,shape))
+ goutput_dlocref env os (mkILArrTy(typ, shape))
output_string os ".ctor"
- let rank = shape.Rank
- output_parens (output_array "," (goutput_typ env)) os (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32)
- | I_stelem_any (shape,dt) ->
- if shape = ILArrayShape.SingleDimensional then
- output_string os "stelem.any "; goutput_typ env os dt
- else
+ let rank = shape.Rank
+ output_parens (output_array ", " (goutput_typ env)) os (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32)
+ | I_stelem_any (shape, dt) ->
+ if shape = ILArrayShape.SingleDimensional then
+ output_string os "stelem.any "; goutput_typ env os dt
+ else
output_string os "call instance void "
- goutput_dlocref env os (mkILArrTy(dt,shape))
+ goutput_dlocref env os (mkILArrTy(dt, shape))
output_string os "Set"
- let rank = shape.Rank
+ let rank = shape.Rank
let arr = Array.create (rank + 1) EcmaMscorlibILGlobals.typ_Int32
arr.[rank] <- dt
- output_parens (output_array "," (goutput_typ env)) os arr
- | I_ldelem_any (shape,tok) ->
- if shape = ILArrayShape.SingleDimensional then
- output_string os "ldelem.any "; goutput_typ env os tok
- else
+ output_parens (output_array ", " (goutput_typ env)) os arr
+ | I_ldelem_any (shape, tok) ->
+ if shape = ILArrayShape.SingleDimensional then
+ output_string os "ldelem.any "; goutput_typ env os tok
+ else
output_string os "call instance "
goutput_typ env os tok
output_string os " "
- goutput_dlocref env os (mkILArrTy(tok,shape))
+ goutput_dlocref env os (mkILArrTy(tok, shape))
output_string os "Get"
- let rank = shape.Rank
- output_parens (output_array "," (goutput_typ env)) os (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32)
- | I_ldelema (ro,_,shape,tok) ->
+ let rank = shape.Rank
+ output_parens (output_array ", " (goutput_typ env)) os (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32)
+ | I_ldelema (ro, _, shape, tok) ->
if ro = ReadonlyAddress then output_string os "readonly. "
- if shape = ILArrayShape.SingleDimensional then
- output_string os "ldelema "; goutput_typ env os tok
- else
+ if shape = ILArrayShape.SingleDimensional then
+ output_string os "ldelema "; goutput_typ env os tok
+ else
output_string os "call instance "
goutput_typ env os (ILType.Byref tok)
output_string os " "
- goutput_dlocref env os (mkILArrTy(tok,shape))
+ goutput_dlocref env os (mkILArrTy(tok, shape))
output_string os "Address"
- let rank = shape.Rank
- output_parens (output_array "," (goutput_typ env)) os (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32)
-
+ let rank = shape.Rank
+ output_parens (output_array ", " (goutput_typ env)) os (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32)
+
| I_box tok -> output_string os "box "; goutput_typ env os tok
| I_unbox tok -> output_string os "unbox "; goutput_typ env os tok
| I_unbox_any tok -> output_string os "unbox.any "; goutput_typ env os tok
| I_initobj tok -> output_string os "initobj "; goutput_typ env os tok
- | I_ldobj (al,vol,tok) ->
+ | I_ldobj (al, vol, tok) ->
output_alignment os al
output_volatility os vol
output_string os "ldobj "
goutput_typ env os tok
- | I_stobj (al,vol,tok) ->
+ | I_stobj (al, vol, tok) ->
output_alignment os al
output_volatility os vol
output_string os "stobj "
@@ -765,7 +784,7 @@ let rec goutput_instr env os inst =
| I_sizeof tok -> output_string os "sizeof "; goutput_typ env os tok
| I_seqpoint s -> output_source os s
| EI_ilzero ty -> output_string os "ilzero "; goutput_typ env os ty
- | _ ->
+ | _ ->
output_string os ""
@@ -774,32 +793,31 @@ let goutput_ilmbody env os (il: ILMethodBody) =
output_string os " .maxstack "
output_i32 os il.MaxStack
output_string os "\n"
- if il.Locals.Length <> 0 then
+ if il.Locals.Length <> 0 then
output_string os " .locals("
- output_seq ",\n " (goutput_local env) os il.Locals
+ output_seq ", \n " (goutput_local env) os il.Locals
output_string os ")\n"
-
let goutput_mbody is_entrypoint env os (md: ILMethodDef) =
if md.ImplAttributes &&& MethodImplAttributes.Native <> enum 0 then output_string os "native "
elif md.ImplAttributes &&& MethodImplAttributes.IL <> enum 0 then output_string os "cil "
else output_string os "runtime "
-
+
output_string os (if md.IsInternalCall then "internalcall " else " ")
output_string os (if md.IsManaged then "managed " else " ")
output_string os (if md.IsForwardRef then "forwardref " else " ")
- output_string os " \n{ \n"
+ output_string os " \n{ \n"
goutput_security_decls env os md.SecurityDecls
goutput_custom_attrs env os md.CustomAttrs
- match md.Body.Contents with
+ match md.Body.Contents with
| MethodBody.IL il -> goutput_ilmbody env os il
| _ -> ()
if is_entrypoint then output_string os " .entrypoint"
output_string os "\n"
output_string os "}\n"
-
+
let goutput_mdef env os (md:ILMethodDef) =
- let attrs =
+ let attrs =
if md.IsVirtual then
"virtual " +
(if md.IsFinal then "final " else "") +
@@ -811,18 +829,18 @@ let goutput_mdef env os (md:ILMethodDef) =
elif md.IsConstructor then "rtspecialname"
elif md.IsStatic then
"static " +
- (match md.Body.Contents with
- MethodBody.PInvoke (attr) ->
+ (match md.Body.Contents with
+ MethodBody.PInvoke (attr) ->
"pinvokeimpl(\"" + attr.Where.Name + "\" as \"" + attr.Name + "\"" +
- (match attr.CallingConv with
+ (match attr.CallingConv with
| PInvokeCallingConvention.None -> ""
| PInvokeCallingConvention.Cdecl -> " cdecl"
| PInvokeCallingConvention.Stdcall -> " stdcall"
- | PInvokeCallingConvention.Thiscall -> " thiscall"
+ | PInvokeCallingConvention.Thiscall -> " thiscall"
| PInvokeCallingConvention.Fastcall -> " fastcall"
| PInvokeCallingConvention.WinApi -> " winapi" ) +
- (match attr.CharEncoding with
+ (match attr.CharEncoding with
| PInvokeCharEncoding.None -> ""
| PInvokeCharEncoding.Ansi -> " ansi"
| PInvokeCharEncoding.Unicode -> " unicode"
@@ -831,12 +849,12 @@ let goutput_mdef env os (md:ILMethodDef) =
(if attr.NoMangle then " nomangle" else "") +
(if attr.LastError then " lasterr" else "") +
")"
- | _ ->
+ | _ ->
"")
- elif md.IsClassInitializer then "specialname rtspecialname static"
+ elif md.IsClassInitializer then "specialname rtspecialname static"
else ""
- let is_entrypoint = md.IsEntryPoint
- let menv = ppenv_enter_method (List.length md.GenericParams) env
+ let is_entrypoint = md.IsEntryPoint
+ let menv = ppenv_enter_method (List.length md.GenericParams) env
output_string os " .method "
if md.IsHideBySig then output_string os "hidebysig "
if md.IsReqSecObj then output_string os "reqsecobj "
@@ -850,7 +868,7 @@ let goutput_mdef env os (md:ILMethodDef) =
output_string os " "
(goutput_typ menv) os md.Return.Type
output_string os " "
- output_id os md.Name
+ output_id os md.Name
output_string os " "
(goutput_gparams env) os md.GenericParams
output_string os " "
@@ -870,19 +888,19 @@ let goutput_pdef env os (pd: ILPropertyDef) =
output_string os "\n\tsetter: "
(match pd.SetMethod with None -> () | Some mref -> goutput_mref env os mref)
-let goutput_superclass env os = function
+let goutput_superclass env os = function
None -> ()
| Some typ -> output_string os "extends "; (goutput_typ_with_shortened_class_syntax env) os typ
let goutput_superinterfaces env os imp =
if not (List.isEmpty imp) then
output_string os "implements "
- output_seq "," (goutput_typ_with_shortened_class_syntax env) os imp
+ output_seq ", " (goutput_typ_with_shortened_class_syntax env) os imp
let goutput_implements env os (imp:ILTypes) =
if not (List.isEmpty imp) then
output_string os "implements "
- output_seq "," (goutput_typ_with_shortened_class_syntax env) os imp
+ output_seq ", " (goutput_typ_with_shortened_class_syntax env) os imp
let the = function Some x -> x | None -> failwith "the"
@@ -891,28 +909,29 @@ let output_type_layout_info os info =
if info.Pack <> None then (output_string os " .pack "; output_u16 os (the info.Pack))
let splitTypeLayout = function
- | ILTypeDefLayout.Auto -> "auto",(fun _os () -> ())
- | ILTypeDefLayout.Sequential info -> "sequential", (fun os () -> output_type_layout_info os info)
- | ILTypeDefLayout.Explicit info -> "explicit", (fun os () -> output_type_layout_info os info)
+ | ILTypeDefLayout.Auto -> "auto", (fun _os () -> ())
+ | ILTypeDefLayout.Sequential info -> "sequential", (fun os () -> output_type_layout_info os info)
+ | ILTypeDefLayout.Explicit info -> "explicit", (fun os () -> output_type_layout_info os info)
-
-let goutput_fdefs tref env os (fdefs: ILFieldDefs) =
+let goutput_fdefs tref env os (fdefs: ILFieldDefs) =
List.iter (fun f -> (goutput_fdef tref env) os f; output_string os "\n" ) fdefs.AsList
-let goutput_mdefs env os (mdefs: ILMethodDefs) =
+
+let goutput_mdefs env os (mdefs: ILMethodDefs) =
Array.iter (fun f -> (goutput_mdef env) os f; output_string os "\n" ) mdefs.AsArray
-let goutput_pdefs env os (pdefs: ILPropertyDefs) =
+
+let goutput_pdefs env os (pdefs: ILPropertyDefs) =
List.iter (fun f -> (goutput_pdef env) os f; output_string os "\n" ) pdefs.AsList
let rec goutput_tdef enc env contents os (cd: ILTypeDef) =
- let env = ppenv_enter_tdef cd.GenericParams env
- let layout_attr,pp_layout_decls = splitTypeLayout cd.Layout
- if isTypeNameForGlobalFunctions cd.Name then
- if contents then
- let tref = (mkILNestedTyRef (ILScopeRef.Local,enc,cd.Name))
+ let env = ppenv_enter_tdef cd.GenericParams env
+ let layout_attr, pp_layout_decls = splitTypeLayout cd.Layout
+ if isTypeNameForGlobalFunctions cd.Name then
+ if contents then
+ let tref = (mkILNestedTyRef (ILScopeRef.Local, enc, cd.Name))
goutput_mdefs env os cd.Methods
goutput_fdefs tref env os cd.Fields
goutput_pdefs env os cd.Properties
- else
+ else
output_string os "\n"
if cd.IsInterface then output_string os ".class interface "
else output_string os ".class "
@@ -928,15 +947,15 @@ let rec goutput_tdef enc env contents os (cd: ILTypeDef) =
if cd.IsAbstract then output_string os "abstract "
if cd.IsSerializable then output_string os "serializable "
if cd.IsComInterop then output_string os "import "
- output_sqstring os cd.Name
+ output_sqstring os cd.Name
goutput_gparams env os cd.GenericParams
output_string os "\n\t"
goutput_superclass env os cd.Extends
output_string os "\n\t"
goutput_implements env os cd.Implements
output_string os "\n{\n "
- if contents then
- let tref = (mkILNestedTyRef (ILScopeRef.Local,enc,cd.Name))
+ if contents then
+ let tref = (mkILNestedTyRef (ILScopeRef.Local, enc, cd.Name))
goutput_custom_attrs env os cd.CustomAttrs
goutput_security_decls env os cd.SecurityDecls
pp_layout_decls os ()
@@ -948,18 +967,18 @@ let rec goutput_tdef enc env contents os (cd: ILTypeDef) =
and output_init_semantics os f =
if f &&& TypeAttributes.BeforeFieldInit <> enum 0 then output_string os "beforefieldinit"
-and goutput_lambdas env os lambdas =
+and goutput_lambdas env os lambdas =
match lambdas with
- | Lambdas_forall (gf,l) ->
+ | Lambdas_forall (gf, l) ->
output_angled (goutput_gparam env) os gf
output_string os " "
(goutput_lambdas env) os l
- | Lambdas_lambda (ps,l) ->
+ | Lambdas_lambda (ps, l) ->
output_parens (goutput_param env) os ps
output_string os " "
(goutput_lambdas env) os l
| Lambdas_return typ -> output_string os "--> "; (goutput_typ env) os typ
-
+
and goutput_tdefs contents enc env os (td: ILTypeDefs) =
List.iter (goutput_tdef enc env contents os) td.AsList
@@ -975,12 +994,12 @@ let output_ver os (version: ILVersionInfo) =
let output_locale os s = output_string os " .Locale "; output_qstring os s
-let output_hash os x =
- output_string os " .hash = "; output_parens output_bytes os x
-let output_publickeytoken os x =
- output_string os " .publickeytoken = "; output_parens output_bytes os x
-let output_publickey os x =
- output_string os " .publickey = "; output_parens output_bytes os x
+let output_hash os x =
+ output_string os " .hash = "; output_parens output_bytes os x
+let output_publickeytoken os x =
+ output_string os " .publickeytoken = "; output_parens output_bytes os x
+let output_publickey os x =
+ output_string os " .publickey = "; output_parens output_bytes os x
let output_publickeyinfo os = function
| PublicKey k -> output_publickey os k
@@ -1002,29 +1021,29 @@ let output_modref os (modref:ILModuleRef) =
output_sqstring os modref.Name
output_option output_hash os modref.Hash
-let goutput_resource env os r =
+let goutput_resource env os r =
output_string os " .mresource "
output_string os (match r.Access with ILResourceAccess.Public -> " public " | ILResourceAccess.Private -> " private ")
output_sqstring os r.Name
output_string os " { "
goutput_custom_attrs env os r.CustomAttrs
- match r.Location with
- | ILResourceLocation.LocalIn _
- | ILResourceLocation.LocalOut _ ->
+ match r.Location with
+ | ILResourceLocation.LocalIn _
+ | ILResourceLocation.LocalOut _ ->
output_string os " /* loc nyi */ "
- | ILResourceLocation.File (mref,off) ->
+ | ILResourceLocation.File (mref, off) ->
output_string os " .file "
output_sqstring os mref.Name
output_string os " at "
- output_i32 os off
- | ILResourceLocation.Assembly aref ->
+ output_i32 os off
+ | ILResourceLocation.Assembly aref ->
output_string os " .assembly extern "
output_sqstring os aref.Name
output_string os " }\n "
-let goutput_manifest env os m =
+let goutput_manifest env os m =
output_string os " .assembly "
- match m.AssemblyLongevity with
+ match m.AssemblyLongevity with
| ILAssemblyLongevity.Unspecified -> ()
| ILAssemblyLongevity.Library -> output_string os "library "
| ILAssemblyLongevity.PlatformAppDomain -> output_string os "platformappdomain "
@@ -1041,25 +1060,25 @@ let goutput_manifest env os m =
let output_module_fragment_aux _refs os (ilg: ILGlobals) modul =
- try
+ try
let env = mk_ppenv ilg
- let env = ppenv_enter_modul env
+ let env = ppenv_enter_modul env
goutput_tdefs false ([]) env os modul.TypeDefs
goutput_tdefs true ([]) env os modul.TypeDefs
- with e ->
+ with e ->
output_string os "*** Error during printing : "; output_string os (e.ToString()); os.Flush()
reraise()
let output_module_fragment os (ilg: ILGlobals) modul =
- let refs = computeILRefs modul
+ let refs = computeILRefs modul
output_module_fragment_aux refs os ilg modul
refs
-let output_module_refs os refs =
+let output_module_refs os refs =
List.iter (fun x -> output_assemblyRef os x; output_string os "\n") refs.AssemblyReferences
List.iter (fun x -> output_modref os x; output_string os "\n") refs.ModuleReferences
-
-let goutput_module_manifest env os modul =
+
+let goutput_module_manifest env os modul =
output_string os " .module "; output_sqstring os modul.Name
goutput_custom_attrs env os modul.CustomAttrs
output_string os " .imagebase "; output_i32 os modul.ImageBase
@@ -1071,20 +1090,20 @@ let goutput_module_manifest env os modul =
output_option (goutput_manifest env) os modul.Manifest
let output_module os (ilg: ILGlobals) modul =
- try
- let refs = computeILRefs modul
+ try
+ let refs = computeILRefs modul
let env = mk_ppenv ilg
- let env = ppenv_enter_modul env
+ let env = ppenv_enter_modul env
output_module_refs os refs
goutput_module_manifest env os modul
output_module_fragment_aux refs os ilg modul
- with e ->
+ with e ->
output_string os "*** Error during printing : "; output_string os (e.ToString()); os.Flush()
raise e
#endif
-
-
-
+
+
+
diff --git a/src/absil/ilread.fs b/src/absil/ilread.fs
index 9732e543b3d..8e1ef967ad8 100644
--- a/src/absil/ilread.fs
+++ b/src/absil/ilread.fs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
+// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
//---------------------------------------------------------------------
// The big binary reader
@@ -33,14 +33,14 @@ open System.Reflection
let checking = false
let logging = false
-let _ = if checking then dprintn "warning : ILBinaryReader.checking is on"
+let _ = if checking then dprintn "warning: ILBinaryReader.checking is on"
let noStableFileHeuristic = try (System.Environment.GetEnvironmentVariable("FSharp_NoStableFileHeuristic") <> null) with _ -> false
let alwaysMemoryMapFSC = try (System.Environment.GetEnvironmentVariable("FSharp_AlwaysMemoryMapCommandLineCompiler") <> null) with _ -> false
let stronglyHeldReaderCacheSizeDefault = 30
let stronglyHeldReaderCacheSize = try (match System.Environment.GetEnvironmentVariable("FSharp_StronglyHeldBinaryReaderCacheSize") with null -> stronglyHeldReaderCacheSizeDefault | s -> int32 s) with _ -> stronglyHeldReaderCacheSizeDefault
-let singleOfBits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x), 0)
-let doubleOfBits (x:int64) = System.BitConverter.Int64BitsToDouble(x)
+let singleOfBits (x: int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x), 0)
+let doubleOfBits (x: int64) = System.BitConverter.Int64BitsToDouble(x)
//---------------------------------------------------------------------
// Utilities.
@@ -48,9 +48,9 @@ let doubleOfBits (x:int64) = System.BitConverter.Int64BitsToDouble(x)
let align alignment n = ((n + alignment - 0x1) / alignment) * alignment
-let uncodedToken (tab:TableName) idx = ((tab.Index <<< 24) ||| idx)
+let uncodedToken (tab: TableName) idx = ((tab.Index <<< 24) ||| idx)
-let i32ToUncodedToken tok =
+let i32ToUncodedToken tok =
let idx = tok &&& 0xffffff
let tab = tok >>>& 24
(TableName.FromIndex tab, idx)
@@ -59,7 +59,7 @@ let i32ToUncodedToken tok =
[]
type TaggedIndex<'T> =
val tag: 'T
- val index : int32
+ val index: int32
new(tag, index) = { tag=tag; index=index }
let uncodedTokenToTypeDefOrRefOrSpec (tab, tok) =
@@ -77,7 +77,7 @@ let uncodedTokenToMethodDefOrRef (tab, tok) =
else failwith "bad table in uncodedTokenToMethodDefOrRef"
TaggedIndex(tag, tok)
-let (|TaggedIndex|) (x:TaggedIndex<'T>) = x.tag, x.index
+let (|TaggedIndex|) (x: TaggedIndex<'T>) = x.tag, x.index
let tokToTaggedIdx f nbits tok =
let tagmask =
if nbits = 1 then 1
@@ -91,11 +91,11 @@ let tokToTaggedIdx f nbits tok =
TaggedIndex(f tag, idx)
type Statistics =
- { mutable rawMemoryFileCount : int
- mutable memoryMapFileOpenedCount : int
- mutable memoryMapFileClosedCount : int
- mutable weakByteFileCount : int
- mutable byteFileCount : int }
+ { mutable rawMemoryFileCount: int
+ mutable memoryMapFileOpenedCount: int
+ mutable memoryMapFileClosedCount: int
+ mutable weakByteFileCount: int
+ mutable byteFileCount: int }
let stats =
{ rawMemoryFileCount = 0
@@ -107,39 +107,39 @@ let stats =
let GetStatistics() = stats
[]
-/// An abstraction over how we access the contents of .NET binaries. May be backed by managed or unmanaged memory,
-/// memory mapped file or by on-disk resources. These objects should never need explicit disposal - they must either
+/// An abstraction over how we access the contents of .NET binaries. May be backed by managed or unmanaged memory,
+/// memory mapped file or by on-disk resources. These objects should never need explicit disposal - they must either
/// not hold resources of clean up after themselves when collected.
type BinaryView() =
/// Read a byte from the file
- abstract ReadByte : addr:int -> byte
+ abstract ReadByte: addr: int -> byte
/// Read a chunk of bytes from the file
- abstract ReadBytes : addr:int -> int -> byte[]
+ abstract ReadBytes: addr: int -> int -> byte[]
/// Read an Int32 from the file
- abstract ReadInt32 : addr:int -> int
+ abstract ReadInt32: addr: int -> int
/// Read a UInt16 from the file
- abstract ReadUInt16 : addr:int -> uint16
+ abstract ReadUInt16: addr: int -> uint16
/// Read a length of a UTF8 string from the file
- abstract CountUtf8String : addr:int -> int
+ abstract CountUtf8String: addr: int -> int
/// Read a UTF8 string from the file
- abstract ReadUTF8String : addr: int -> string
+ abstract ReadUTF8String: addr: int -> string
-/// An abstraction over how we access the contents of .NET binaries. May be backed by managed or unmanaged memory,
+/// An abstraction over how we access the contents of .NET binaries. May be backed by managed or unmanaged memory,
/// memory mapped file or by on-disk resources.
type BinaryFile =
/// Return a BinaryView for temporary use which eagerly holds any necessary memory resources for the duration of its lifetime,
- /// and is faster to access byte-by-byte. The returned BinaryView should _not_ be captured in a closure that outlives the
+ /// and is faster to access byte-by-byte. The returned BinaryView should _not_ be captured in a closure that outlives the
/// desired lifetime.
- abstract GetView : unit -> BinaryView
+ abstract GetView: unit -> BinaryView
/// A view over a raw pointer to memory
-type RawMemoryView(obj: obj, start:nativeint, len: int) =
+type RawMemoryView(obj: obj, start: nativeint, len: int) =
inherit BinaryView()
override m.ReadByte i =
@@ -191,7 +191,7 @@ type RawMemoryFile(fileName: string, obj: obj, addr: nativeint, length: int) =
module MemoryMapping =
type HANDLE = nativeint
- type ADDR = nativeint
+ type ADDR = nativeint
type SIZE_T = nativeint
[]
@@ -216,29 +216,29 @@ module MemoryMapping =
[]
extern ADDR MapViewOfFile (HANDLE _hFileMappingObject,
- int _dwDesiredAccess,
- int _dwFileOffsetHigh,
- int _dwFileOffsetLow,
+ int _dwDesiredAccess,
+ int _dwFileOffsetHigh,
+ int _dwFileOffsetLow,
SIZE_T _dwNumBytesToMap)
[]
extern bool UnmapViewOfFile (ADDR _lpBaseAddress)
let INVALID_HANDLE = new IntPtr(-1)
- let MAP_READ = 0x0004
+ let MAP_READ = 0x0004
let GENERIC_READ = 0x80000000
let NULL_HANDLE = IntPtr.Zero
let FILE_SHARE_NONE = 0x0000
let FILE_SHARE_READ = 0x0001
let FILE_SHARE_WRITE = 0x0002
let FILE_SHARE_READ_WRITE = 0x0003
- let CREATE_ALWAYS = 0x0002
- let OPEN_EXISTING = 0x0003
- let OPEN_ALWAYS = 0x0004
+ let CREATE_ALWAYS = 0x0002
+ let OPEN_EXISTING = 0x0003
+ let OPEN_ALWAYS = 0x0004
/// A view over a raw pointer to memory given by a memory mapped file.
/// NOTE: we should do more checking of validity here.
-type MemoryMapView(start:nativeint) =
+type MemoryMapView(start: nativeint) =
inherit BinaryView()
override m.ReadByte i =
@@ -270,12 +270,12 @@ type MemoryMapView(start:nativeint) =
/// lock on the file is only released when the object is disposed.
/// For memory mapping we currently take one view and never release it.
[]
-type MemoryMapFile(fileName: string, view: MemoryMapView, hMap: MemoryMapping.HANDLE, hView:nativeint) =
+type MemoryMapFile(fileName: string, view: MemoryMapView, hMap: MemoryMapping.HANDLE, hView: nativeint) =
do stats.memoryMapFileOpenedCount <- stats.memoryMapFileOpenedCount + 1
let mutable closed = false
- static member Create fileName =
- let hFile = MemoryMapping.CreateFile (fileName, MemoryMapping.GENERIC_READ, MemoryMapping.FILE_SHARE_READ_WRITE, IntPtr.Zero, MemoryMapping.OPEN_EXISTING, 0, IntPtr.Zero )
+ static member Create fileName =
+ let hFile = MemoryMapping.CreateFile (fileName, MemoryMapping.GENERIC_READ, MemoryMapping.FILE_SHARE_READ_WRITE, IntPtr.Zero, MemoryMapping.OPEN_EXISTING, 0, IntPtr.Zero )
if hFile.Equals(MemoryMapping.INVALID_HANDLE) then
failwithf "CreateFile(0x%08x)" (Marshal.GetHRForLastWin32Error())
let protection = 0x00000002
@@ -306,7 +306,7 @@ type MemoryMapFile(fileName: string, view: MemoryMapView, hMap: MemoryMapping.HA
override __.GetView() = (view :> BinaryView)
/// Read file from memory blocks
-type ByteView(bytes:byte[]) =
+type ByteView(bytes: byte[]) =
inherit BinaryView()
override __.ReadByte addr = bytes.[addr]
@@ -337,7 +337,7 @@ type ByteView(bytes:byte[]) =
/// A BinaryFile backed by an array of bytes held strongly as managed memory
[]
-type ByteFile(fileName: string, bytes:byte[]) =
+type ByteFile(fileName: string, bytes: byte[]) =
let view = ByteView(bytes)
do stats.byteFileCount <- stats.byteFileCount + 1
member __.FileName = fileName
@@ -345,7 +345,7 @@ type ByteFile(fileName: string, bytes:byte[]) =
override bf.GetView() = view :> BinaryView
/// Same as ByteFile but holds the bytes weakly. The bytes will be re-read from the backing file when a view is requested.
-/// This is the default implementation used by F# Compiler Services when accessing "stable" binaries. It is not used
+/// This is the default implementation used by F# Compiler Services when accessing "stable" binaries. It is not used
/// by Visual Studio, where tryGetMetadataSnapshot provides a RawMemoryFile backed by Roslyn data.
[]
type WeakByteFile(fileName: string, chunk: (int * int) option) =
@@ -384,10 +384,10 @@ type WeakByteFile(fileName: string, chunk: (int * int) option) =
(ByteView(strongBytes) :> BinaryView)
-let seekReadByte (mdv:BinaryView) addr = mdv.ReadByte addr
-let seekReadBytes (mdv:BinaryView) addr len = mdv.ReadBytes addr len
-let seekReadInt32 (mdv:BinaryView) addr = mdv.ReadInt32 addr
-let seekReadUInt16 (mdv:BinaryView) addr = mdv.ReadUInt16 addr
+let seekReadByte (mdv: BinaryView) addr = mdv.ReadByte addr
+let seekReadBytes (mdv: BinaryView) addr len = mdv.ReadBytes addr len
+let seekReadInt32 (mdv: BinaryView) addr = mdv.ReadInt32 addr
+let seekReadUInt16 (mdv: BinaryView) addr = mdv.ReadUInt16 addr
let seekReadByteAsInt32 mdv addr = int32 (seekReadByte mdv addr)
@@ -442,32 +442,32 @@ let seekReadUserString mdv addr =
let bytes = seekReadBytes mdv addr (len - 1)
Encoding.Unicode.GetString(bytes, 0, bytes.Length)
-let seekReadGuid mdv addr = seekReadBytes mdv addr 0x10
+let seekReadGuid mdv addr = seekReadBytes mdv addr 0x10
-let seekReadUncodedToken mdv addr =
+let seekReadUncodedToken mdv addr =
i32ToUncodedToken (seekReadInt32 mdv addr)
//---------------------------------------------------------------------
-// Primitives to help read signatures. These do not use the file cursor
+// Primitives to help read signatures. These do not use the file cursor
//---------------------------------------------------------------------
-let sigptrCheck (bytes:byte[]) sigptr =
+let sigptrCheck (bytes: byte[]) sigptr =
if checking && sigptr >= bytes.Length then failwith "read past end of sig. "
// All this code should be moved to use a mutable index into the signature
//
-//type SigPtr(bytes:byte[], sigptr:int) =
+//type SigPtr(bytes: byte[], sigptr: int) =
// let mutable curr = sigptr
// member x.GetByte() = let res = bytes.[curr] in curr <- curr + 1; res
-let sigptrGetByte (bytes:byte[]) sigptr =
+let sigptrGetByte (bytes: byte[]) sigptr =
sigptrCheck bytes sigptr
bytes.[sigptr], sigptr + 1
let sigptrGetBool bytes sigptr =
let b0, sigptr = sigptrGetByte bytes sigptr
- (b0 = 0x01uy) , sigptr
+ (b0 = 0x01uy), sigptr
let sigptrGetSByte bytes sigptr =
let i, sigptr = sigptrGetByte bytes sigptr
@@ -524,20 +524,20 @@ let sigptrGetZInt32 bytes sigptr =
let b1, sigptr = sigptrGetByte bytes sigptr
let b2, sigptr = sigptrGetByte bytes sigptr
let b3, sigptr = sigptrGetByte bytes sigptr
- (int b0 <<< 24) ||| (int b1 <<< 16) ||| (int b2 <<< 8) ||| int b3, sigptr
+ (int b0 <<< 24) ||| (int b1 <<< 16) ||| (int b2 <<< 8) ||| int b3, sigptr
-let rec sigptrFoldAcc f n (bytes:byte[]) (sigptr:int) i acc =
+let rec sigptrFoldAcc f n (bytes: byte[]) (sigptr: int) i acc =
if i < n then
let x, sp = f bytes sigptr
sigptrFoldAcc f n bytes sp (i+1) (x::acc)
else
List.rev acc, sigptr
-let sigptrFold f n (bytes:byte[]) (sigptr:int) =
+let sigptrFold f n (bytes: byte[]) (sigptr: int) =
sigptrFoldAcc f n bytes sigptr 0 []
-let sigptrGetBytes n (bytes:byte[]) sigptr =
+let sigptrGetBytes n (bytes: byte[]) sigptr =
if checking && sigptr + n >= bytes.Length then
dprintn "read past end of sig. in sigptrGetString"
Bytes.zeroCreate 0, sigptr
@@ -618,8 +618,8 @@ type ILInstrDecoder =
| I_r8_instr of (ILInstrPrefixesRegister -> double -> ILInstr)
| I_field_instr of (ILInstrPrefixesRegister -> ILFieldSpec -> ILInstr)
| I_method_instr of (ILInstrPrefixesRegister -> ILMethodSpec * ILVarArgs -> ILInstr)
- | I_unconditional_i32_instr of (ILInstrPrefixesRegister -> ILCodeLabel -> ILInstr)
- | I_unconditional_i8_instr of (ILInstrPrefixesRegister -> ILCodeLabel -> ILInstr)
+ | I_unconditional_i32_instr of (ILInstrPrefixesRegister -> ILCodeLabel -> ILInstr)
+ | I_unconditional_i8_instr of (ILInstrPrefixesRegister -> ILCodeLabel -> ILInstr)
| I_conditional_i32_instr of (ILInstrPrefixesRegister -> ILCodeLabel -> ILInstr)
| I_conditional_i8_instr of (ILInstrPrefixesRegister -> ILCodeLabel -> ILInstr)
| I_string_instr of (ILInstrPrefixesRegister -> string -> ILInstr)
@@ -633,19 +633,19 @@ let mkStind dt = volatileOrUnalignedPrefix (fun (x, y) -> I_stind(x, y, dt))
let mkLdind dt = volatileOrUnalignedPrefix (fun (x, y) -> I_ldind(x, y, dt))
let instrs () =
- [ i_ldarg_s, I_u16_u8_instr (noPrefixes mkLdarg)
- i_starg_s, I_u16_u8_instr (noPrefixes I_starg)
+ [ i_ldarg_s, I_u16_u8_instr (noPrefixes mkLdarg)
+ i_starg_s, I_u16_u8_instr (noPrefixes I_starg)
i_ldarga_s, I_u16_u8_instr (noPrefixes I_ldarga)
- i_stloc_s, I_u16_u8_instr (noPrefixes mkStloc)
- i_ldloc_s, I_u16_u8_instr (noPrefixes mkLdloc)
+ i_stloc_s, I_u16_u8_instr (noPrefixes mkStloc)
+ i_ldloc_s, I_u16_u8_instr (noPrefixes mkLdloc)
i_ldloca_s, I_u16_u8_instr (noPrefixes I_ldloca)
- i_ldarg, I_u16_u16_instr (noPrefixes mkLdarg)
- i_starg, I_u16_u16_instr (noPrefixes I_starg)
- i_ldarga, I_u16_u16_instr (noPrefixes I_ldarga)
- i_stloc, I_u16_u16_instr (noPrefixes mkStloc)
- i_ldloc, I_u16_u16_instr (noPrefixes mkLdloc)
- i_ldloca, I_u16_u16_instr (noPrefixes I_ldloca)
- i_stind_i, I_none_instr (mkStind DT_I)
+ i_ldarg, I_u16_u16_instr (noPrefixes mkLdarg)
+ i_starg, I_u16_u16_instr (noPrefixes I_starg)
+ i_ldarga, I_u16_u16_instr (noPrefixes I_ldarga)
+ i_stloc, I_u16_u16_instr (noPrefixes mkStloc)
+ i_ldloc, I_u16_u16_instr (noPrefixes mkLdloc)
+ i_ldloca, I_u16_u16_instr (noPrefixes I_ldloca)
+ i_stind_i, I_none_instr (mkStind DT_I)
i_stind_i1, I_none_instr (mkStind DT_I1)
i_stind_i2, I_none_instr (mkStind DT_I2)
i_stind_i4, I_none_instr (mkStind DT_I4)
@@ -653,7 +653,7 @@ let instrs () =
i_stind_r4, I_none_instr (mkStind DT_R4)
i_stind_r8, I_none_instr (mkStind DT_R8)
i_stind_ref, I_none_instr (mkStind DT_REF)
- i_ldind_i, I_none_instr (mkLdind DT_I)
+ i_ldind_i, I_none_instr (mkLdind DT_I)
i_ldind_i1, I_none_instr (mkLdind DT_I1)
i_ldind_i2, I_none_instr (mkLdind DT_I2)
i_ldind_i4, I_none_instr (mkLdind DT_I4)
@@ -672,7 +672,7 @@ let instrs () =
i_ldc_r4, I_r4_instr (noPrefixes (fun x -> (AI_ldc (DT_R4, ILConst.R4 x))))
i_ldc_r8, I_r8_instr (noPrefixes (fun x -> (AI_ldc (DT_R8, ILConst.R8 x))))
i_ldfld, I_field_instr (volatileOrUnalignedPrefix(fun (x, y) fspec -> I_ldfld(x, y, fspec)))
- i_stfld, I_field_instr (volatileOrUnalignedPrefix(fun (x, y) fspec -> I_stfld(x, y, fspec)))
+ i_stfld, I_field_instr (volatileOrUnalignedPrefix(fun (x, y) fspec -> I_stfld(x, y, fspec)))
i_ldsfld, I_field_instr (volatilePrefix (fun x fspec -> I_ldsfld (x, fspec)))
i_stsfld, I_field_instr (volatilePrefix (fun x fspec -> I_stsfld (x, fspec)))
i_ldflda, I_field_instr (noPrefixes I_ldflda)
@@ -741,7 +741,7 @@ let fillInstrs () =
let addInstr (i, f) =
if i > 0xff then
assert (i >>>& 8 = 0xfe)
- let i = (i &&& 0xff)
+ let i = (i &&& 0xff)
match twoByteInstrTable.[i] with
| I_invalid_instr -> ()
| _ -> dprintn ("warning: duplicate decode entries for "+string i)
@@ -773,7 +773,7 @@ let rec getTwoByteInstr i =
type ImageChunk = { size: int32; addr: int32 }
let chunk sz next = ({addr=next; size=sz}, next + sz)
-let nochunk next = ({addr= 0x0;size= 0x0; } , next)
+let nochunk next = ({addr= 0x0;size= 0x0; }, next)
type RowElementKind =
| UShort
@@ -800,73 +800,73 @@ type RowElementKind =
type RowKind = RowKind of RowElementKind list
-let kindAssemblyRef = RowKind [ UShort; UShort; UShort; UShort; ULong; Blob; SString; SString; Blob; ]
-let kindModuleRef = RowKind [ SString ]
-let kindFileRef = RowKind [ ULong; SString; Blob ]
-let kindTypeRef = RowKind [ ResolutionScope; SString; SString ]
-let kindTypeSpec = RowKind [ Blob ]
-let kindTypeDef = RowKind [ ULong; SString; SString; TypeDefOrRefOrSpec; SimpleIndex TableNames.Field; SimpleIndex TableNames.Method ]
-let kindPropertyMap = RowKind [ SimpleIndex TableNames.TypeDef; SimpleIndex TableNames.Property ]
-let kindEventMap = RowKind [ SimpleIndex TableNames.TypeDef; SimpleIndex TableNames.Event ]
-let kindInterfaceImpl = RowKind [ SimpleIndex TableNames.TypeDef; TypeDefOrRefOrSpec ]
-let kindNested = RowKind [ SimpleIndex TableNames.TypeDef; SimpleIndex TableNames.TypeDef ]
-let kindCustomAttribute = RowKind [ HasCustomAttribute; CustomAttributeType; Blob ]
-let kindDeclSecurity = RowKind [ UShort; HasDeclSecurity; Blob ]
-let kindMemberRef = RowKind [ MemberRefParent; SString; Blob ]
-let kindStandAloneSig = RowKind [ Blob ]
-let kindFieldDef = RowKind [ UShort; SString; Blob ]
-let kindFieldRVA = RowKind [ Data; SimpleIndex TableNames.Field ]
-let kindFieldMarshal = RowKind [ HasFieldMarshal; Blob ]
-let kindConstant = RowKind [ UShort;HasConstant; Blob ]
-let kindFieldLayout = RowKind [ ULong; SimpleIndex TableNames.Field ]
-let kindParam = RowKind [ UShort; UShort; SString ]
-let kindMethodDef = RowKind [ ULong; UShort; UShort; SString; Blob; SimpleIndex TableNames.Param ]
-let kindMethodImpl = RowKind [ SimpleIndex TableNames.TypeDef; MethodDefOrRef; MethodDefOrRef ]
-let kindImplMap = RowKind [ UShort; MemberForwarded; SString; SimpleIndex TableNames.ModuleRef ]
-let kindMethodSemantics = RowKind [ UShort; SimpleIndex TableNames.Method; HasSemantics ]
-let kindProperty = RowKind [ UShort; SString; Blob ]
-let kindEvent = RowKind [ UShort; SString; TypeDefOrRefOrSpec ]
-let kindManifestResource = RowKind [ ULong; ULong; SString; Implementation ]
-let kindClassLayout = RowKind [ UShort; ULong; SimpleIndex TableNames.TypeDef ]
-let kindExportedType = RowKind [ ULong; ULong; SString; SString; Implementation ]
-let kindAssembly = RowKind [ ULong; UShort; UShort; UShort; UShort; ULong; Blob; SString; SString ]
-let kindGenericParam_v1_1 = RowKind [ UShort; UShort; TypeOrMethodDef; SString; TypeDefOrRefOrSpec ]
-let kindGenericParam_v2_0 = RowKind [ UShort; UShort; TypeOrMethodDef; SString ]
-let kindMethodSpec = RowKind [ MethodDefOrRef; Blob ]
+let kindAssemblyRef = RowKind [ UShort; UShort; UShort; UShort; ULong; Blob; SString; SString; Blob; ]
+let kindModuleRef = RowKind [ SString ]
+let kindFileRef = RowKind [ ULong; SString; Blob ]
+let kindTypeRef = RowKind [ ResolutionScope; SString; SString ]
+let kindTypeSpec = RowKind [ Blob ]
+let kindTypeDef = RowKind [ ULong; SString; SString; TypeDefOrRefOrSpec; SimpleIndex TableNames.Field; SimpleIndex TableNames.Method ]
+let kindPropertyMap = RowKind [ SimpleIndex TableNames.TypeDef; SimpleIndex TableNames.Property ]
+let kindEventMap = RowKind [ SimpleIndex TableNames.TypeDef; SimpleIndex TableNames.Event ]
+let kindInterfaceImpl = RowKind [ SimpleIndex TableNames.TypeDef; TypeDefOrRefOrSpec ]
+let kindNested = RowKind [ SimpleIndex TableNames.TypeDef; SimpleIndex TableNames.TypeDef ]
+let kindCustomAttribute = RowKind [ HasCustomAttribute; CustomAttributeType; Blob ]
+let kindDeclSecurity = RowKind [ UShort; HasDeclSecurity; Blob ]
+let kindMemberRef = RowKind [ MemberRefParent; SString; Blob ]
+let kindStandAloneSig = RowKind [ Blob ]
+let kindFieldDef = RowKind [ UShort; SString; Blob ]
+let kindFieldRVA = RowKind [ Data; SimpleIndex TableNames.Field ]
+let kindFieldMarshal = RowKind [ HasFieldMarshal; Blob ]
+let kindConstant = RowKind [ UShort;HasConstant; Blob ]
+let kindFieldLayout = RowKind [ ULong; SimpleIndex TableNames.Field ]
+let kindParam = RowKind [ UShort; UShort; SString ]
+let kindMethodDef = RowKind [ ULong; UShort; UShort; SString; Blob; SimpleIndex TableNames.Param ]
+let kindMethodImpl = RowKind [ SimpleIndex TableNames.TypeDef; MethodDefOrRef; MethodDefOrRef ]
+let kindImplMap = RowKind [ UShort; MemberForwarded; SString; SimpleIndex TableNames.ModuleRef ]
+let kindMethodSemantics = RowKind [ UShort; SimpleIndex TableNames.Method; HasSemantics ]
+let kindProperty = RowKind [ UShort; SString; Blob ]
+let kindEvent = RowKind [ UShort; SString; TypeDefOrRefOrSpec ]
+let kindManifestResource = RowKind [ ULong; ULong; SString; Implementation ]
+let kindClassLayout = RowKind [ UShort; ULong; SimpleIndex TableNames.TypeDef ]
+let kindExportedType = RowKind [ ULong; ULong; SString; SString; Implementation ]
+let kindAssembly = RowKind [ ULong; UShort; UShort; UShort; UShort; ULong; Blob; SString; SString ]
+let kindGenericParam_v1_1 = RowKind [ UShort; UShort; TypeOrMethodDef; SString; TypeDefOrRefOrSpec ]
+let kindGenericParam_v2_0 = RowKind [ UShort; UShort; TypeOrMethodDef; SString ]
+let kindMethodSpec = RowKind [ MethodDefOrRef; Blob ]
let kindGenericParamConstraint = RowKind [ SimpleIndex TableNames.GenericParam; TypeDefOrRefOrSpec ]
-let kindModule = RowKind [ UShort; SString; GGuid; GGuid; GGuid ]
-let kindIllegal = RowKind [ ]
+let kindModule = RowKind [ UShort; SString; GGuid; GGuid; GGuid ]
+let kindIllegal = RowKind [ ]
//---------------------------------------------------------------------
-// Used for binary searches of sorted tables. Each function that reads
+// Used for binary searches of sorted tables. Each function that reads
// a table row returns a tuple that contains the elements of the row.
-// One of these elements may be a key for a sorted table. These
+// One of these elements may be a key for a sorted table. These
// keys can be compared using the functions below depending on the
// kind of element in that column.
//---------------------------------------------------------------------
-let hcCompare (TaggedIndex((t1: HasConstantTag), (idx1:int))) (TaggedIndex((t2: HasConstantTag), idx2)) =
+let hcCompare (TaggedIndex((t1: HasConstantTag), (idx1: int))) (TaggedIndex((t2: HasConstantTag), idx2)) =
if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag
-let hsCompare (TaggedIndex((t1:HasSemanticsTag), (idx1:int))) (TaggedIndex((t2:HasSemanticsTag), idx2)) =
+let hsCompare (TaggedIndex((t1: HasSemanticsTag), (idx1: int))) (TaggedIndex((t2: HasSemanticsTag), idx2)) =
if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag
-let hcaCompare (TaggedIndex((t1:HasCustomAttributeTag), (idx1:int))) (TaggedIndex((t2:HasCustomAttributeTag), idx2)) =
+let hcaCompare (TaggedIndex((t1: HasCustomAttributeTag), (idx1: int))) (TaggedIndex((t2: HasCustomAttributeTag), idx2)) =
if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag
-let mfCompare (TaggedIndex((t1:MemberForwardedTag), (idx1:int))) (TaggedIndex((t2:MemberForwardedTag), idx2)) =
+let mfCompare (TaggedIndex((t1: MemberForwardedTag), (idx1: int))) (TaggedIndex((t2: MemberForwardedTag), idx2)) =
if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag
-let hdsCompare (TaggedIndex((t1:HasDeclSecurityTag), (idx1:int))) (TaggedIndex((t2:HasDeclSecurityTag), idx2)) =
+let hdsCompare (TaggedIndex((t1: HasDeclSecurityTag), (idx1: int))) (TaggedIndex((t2: HasDeclSecurityTag), idx2)) =
if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag
-let hfmCompare (TaggedIndex((t1:HasFieldMarshalTag), idx1)) (TaggedIndex((t2:HasFieldMarshalTag), idx2)) =
+let hfmCompare (TaggedIndex((t1: HasFieldMarshalTag), idx1)) (TaggedIndex((t2: HasFieldMarshalTag), idx2)) =
if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag
-let tomdCompare (TaggedIndex((t1:TypeOrMethodDefTag), idx1)) (TaggedIndex((t2:TypeOrMethodDefTag), idx2)) =
+let tomdCompare (TaggedIndex((t1: TypeOrMethodDefTag), idx1)) (TaggedIndex((t2: TypeOrMethodDefTag), idx2)) =
if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag
-let simpleIndexCompare (idx1:int) (idx2:int) =
+let simpleIndexCompare (idx1: int) (idx2: int) =
compare idx1 idx2
//---------------------------------------------------------------------
@@ -879,8 +879,8 @@ type BlobAsMethodSigIdx = BlobAsMethodSigIdx of int * int32
type BlobAsFieldSigIdx = BlobAsFieldSigIdx of int * int32
type BlobAsPropSigIdx = BlobAsPropSigIdx of int * int32
type BlobAsLocalSigIdx = BlobAsLocalSigIdx of int * int32
-type MemberRefAsMspecIdx = MemberRefAsMspecIdx of int * int
-type MethodSpecAsMspecIdx = MethodSpecAsMspecIdx of int * int
+type MemberRefAsMspecIdx = MemberRefAsMspecIdx of int * int
+type MethodSpecAsMspecIdx = MethodSpecAsMspecIdx of int * int
type MemberRefAsFspecIdx = MemberRefAsFspecIdx of int * int
type CustomAttrIdx = CustomAttrIdx of CustomAttributeTypeTag * int * int32
type GenericParamsIdx = GenericParamsIdx of int * TypeOrMethodDefTag * int
@@ -889,17 +889,17 @@ type GenericParamsIdx = GenericParamsIdx of int * TypeOrMethodDefTag * int
// Polymorphic caches for row and heap readers
//---------------------------------------------------------------------
-let mkCacheInt32 lowMem _inbase _nm _sz =
+let mkCacheInt32 lowMem _inbase _nm _sz =
if lowMem then (fun f x -> f x) else
let cache = ref null
let count = ref 0
#if STATISTICS
- addReport (fun oc -> if !count <> 0 then oc.WriteLine ((_inbase + string !count + " "+ _nm + " cache hits") : string))
+ addReport (fun oc -> if !count <> 0 then oc.WriteLine ((_inbase + string !count + " "+ _nm + " cache hits"): string))
#endif
- fun f (idx:int32) ->
+ fun f (idx: int32) ->
let cache =
match !cache with
- | null -> cache := new Dictionary(11)
+ | null -> cache := new Dictionary(11)
| _ -> ()
!cache
let mutable res = Unchecked.defaultof<_>
@@ -912,17 +912,17 @@ let mkCacheInt32 lowMem _inbase _nm _sz =
cache.[idx] <- res
res
-let mkCacheGeneric lowMem _inbase _nm _sz =
+let mkCacheGeneric lowMem _inbase _nm _sz =
if lowMem then (fun f x -> f x) else
let cache = ref null
let count = ref 0
#if STATISTICS
- addReport (fun oc -> if !count <> 0 then oc.WriteLine ((_inbase + string !count + " " + _nm + " cache hits") : string))
+ addReport (fun oc -> if !count <> 0 then oc.WriteLine ((_inbase + string !count + " " + _nm + " cache hits"): string))
#endif
fun f (idx :'T) ->
let cache =
match !cache with
- | null -> cache := new Dictionary<_, _>(11 (* sz:int *) )
+ | null -> cache := new Dictionary<_, _>(11 (* sz: int *) )
| _ -> ()
!cache
match cache.TryGetValue(idx) with
@@ -940,7 +940,7 @@ let mkCacheGeneric lowMem _inbase _nm _sz =
let seekFindRow numRows rowChooser =
let mutable i = 1
- while (i <= numRows && not (rowChooser i)) do
+ while (i <= numRows && not (rowChooser i)) do
i <- i + 1
if i > numRows then dprintn "warning: seekFindRow: row not found"
i
@@ -953,7 +953,7 @@ let seekReadIndexedRows (numRows, rowReader, keyFunc, keyComparer, binaryChop, r
begin
let mutable fin = false
while not fin do
- if high - low <= 1 then
+ if high - low <= 1 then
fin <- true
else
let mid = (low + high) / 2
@@ -1054,19 +1054,19 @@ type PEReader =
#endif
entryPointToken: TableName * int
pefile: BinaryFile
- textSegmentPhysicalLoc : int32
- textSegmentPhysicalSize : int32
- dataSegmentPhysicalLoc : int32
- dataSegmentPhysicalSize : int32
- anyV2P : (string * int32) -> int32
+ textSegmentPhysicalLoc: int32
+ textSegmentPhysicalSize: int32
+ dataSegmentPhysicalLoc: int32
+ dataSegmentPhysicalSize: int32
+ anyV2P: (string * int32) -> int32
metadataAddr: int32
- sectionHeaders : (int32 * int32 * int32) list
- nativeResourcesAddr:int32
- nativeResourcesSize:int32
- resourcesAddr:int32
- strongnameAddr:int32
- vtableFixupsAddr:int32
- noFileOnDisk:bool
+ sectionHeaders: (int32 * int32 * int32) list
+ nativeResourcesAddr: int32
+ nativeResourcesSize: int32
+ resourcesAddr: int32
+ strongnameAddr: int32
+ vtableFixupsAddr: int32
+ noFileOnDisk: bool
}
[]
@@ -1077,7 +1077,7 @@ type ILMetadataReader =
pectxtCaptured: PEReader option // only set when reading full PE including code etc. for static linking
entryPointToken: TableName * int
dataEndPoints: Lazy
- fileName:string
+ fileName: string
getNumRows: TableName -> int
userStringsStreamPhysicalLoc: int32
stringsStreamPhysicalLoc: int32
@@ -1087,47 +1087,47 @@ type ILMetadataReader =
memoizeString: string -> string
readStringHeap: (int32 -> string)
readBlobHeap: (int32 -> byte[])
- guidsStreamPhysicalLoc : int32
- rowAddr : (TableName -> int -> int32)
- tableBigness : bool array
- rsBigness : bool
- tdorBigness : bool
- tomdBigness : bool
- hcBigness : bool
- hcaBigness : bool
- hfmBigness : bool
- hdsBigness : bool
- mrpBigness : bool
- hsBigness : bool
- mdorBigness : bool
- mfBigness : bool
- iBigness : bool
- catBigness : bool
+ guidsStreamPhysicalLoc: int32
+ rowAddr: (TableName -> int -> int32)
+ tableBigness: bool []
+ rsBigness: bool
+ tdorBigness: bool
+ tomdBigness: bool
+ hcBigness: bool
+ hcaBigness: bool
+ hfmBigness: bool
+ hdsBigness: bool
+ mrpBigness: bool
+ hsBigness: bool
+ mdorBigness: bool
+ mfBigness: bool
+ iBigness: bool
+ catBigness: bool
stringsBigness: bool
guidsBigness: bool
blobsBigness: bool
- seekReadNestedRow : int -> int * int
- seekReadConstantRow : int -> uint16 * TaggedIndex * int32
- seekReadMethodSemanticsRow : int -> int32 * int * TaggedIndex
- seekReadTypeDefRow : int -> int32 * int32 * int32 * TaggedIndex * int * int
- seekReadAssemblyRef : int -> ILAssemblyRef
- seekReadMethodSpecAsMethodData : MethodSpecAsMspecIdx -> VarArgMethodData
- seekReadMemberRefAsMethodData : MemberRefAsMspecIdx -> VarArgMethodData
- seekReadMemberRefAsFieldSpec : MemberRefAsFspecIdx -> ILFieldSpec
- seekReadCustomAttr : CustomAttrIdx -> ILAttribute
- seekReadTypeRef : int ->ILTypeRef
- seekReadTypeRefAsType : TypeRefAsTypIdx -> ILType
- readBlobHeapAsPropertySig : BlobAsPropSigIdx -> ILThisConvention * ILType * ILTypes
- readBlobHeapAsFieldSig : BlobAsFieldSigIdx -> ILType
- readBlobHeapAsMethodSig : BlobAsMethodSigIdx -> bool * int32 * ILCallingConv * ILType * ILTypes * ILVarArgs
- readBlobHeapAsLocalsSig : BlobAsLocalSigIdx -> ILLocal list
- seekReadTypeDefAsType : TypeDefAsTypIdx -> ILType
- seekReadMethodDefAsMethodData : int -> MethodData
- seekReadGenericParams : GenericParamsIdx -> ILGenericParameterDef list
- seekReadFieldDefAsFieldSpec : int -> ILFieldSpec
- customAttrsReader_Module : ILAttributesStored
- customAttrsReader_Assembly : ILAttributesStored
- customAttrsReader_TypeDef : ILAttributesStored
+ seekReadNestedRow: int -> int * int
+ seekReadConstantRow: int -> uint16 * TaggedIndex * int32
+ seekReadMethodSemanticsRow: int -> int32 * int * TaggedIndex
+ seekReadTypeDefRow: int -> int32 * int32 * int32 * TaggedIndex * int * int
+ seekReadAssemblyRef: int -> ILAssemblyRef
+ seekReadMethodSpecAsMethodData: MethodSpecAsMspecIdx -> VarArgMethodData
+ seekReadMemberRefAsMethodData: MemberRefAsMspecIdx -> VarArgMethodData
+ seekReadMemberRefAsFieldSpec: MemberRefAsFspecIdx -> ILFieldSpec
+ seekReadCustomAttr: CustomAttrIdx -> ILAttribute
+ seekReadTypeRef: int ->ILTypeRef
+ seekReadTypeRefAsType: TypeRefAsTypIdx -> ILType
+ readBlobHeapAsPropertySig: BlobAsPropSigIdx -> ILThisConvention * ILType * ILTypes
+ readBlobHeapAsFieldSig: BlobAsFieldSigIdx -> ILType
+ readBlobHeapAsMethodSig: BlobAsMethodSigIdx -> bool * int32 * ILCallingConv * ILType * ILTypes * ILVarArgs
+ readBlobHeapAsLocalsSig: BlobAsLocalSigIdx -> ILLocal list
+ seekReadTypeDefAsType: TypeDefAsTypIdx -> ILType
+ seekReadMethodDefAsMethodData: int -> MethodData
+ seekReadGenericParams: GenericParamsIdx -> ILGenericParameterDef list
+ seekReadFieldDefAsFieldSpec: int -> ILFieldSpec
+ customAttrsReader_Module: ILAttributesStored
+ customAttrsReader_Assembly: ILAttributesStored
+ customAttrsReader_TypeDef: ILAttributesStored
customAttrsReader_GenericParam: ILAttributesStored
customAttrsReader_FieldDef: ILAttributesStored
customAttrsReader_MethodDef: ILAttributesStored
@@ -1136,10 +1136,10 @@ type ILMetadataReader =
customAttrsReader_Property: ILAttributesStored
customAttrsReader_ManifestResource: ILAttributesStored
customAttrsReader_ExportedType: ILAttributesStored
- securityDeclsReader_TypeDef : ILSecurityDeclsStored
- securityDeclsReader_MethodDef : ILSecurityDeclsStored
- securityDeclsReader_Assembly : ILSecurityDeclsStored
- typeDefReader : ILTypeDefStored }
+ securityDeclsReader_TypeDef: ILSecurityDeclsStored
+ securityDeclsReader_MethodDef: ILSecurityDeclsStored
+ securityDeclsReader_Assembly: ILSecurityDeclsStored
+ typeDefReader: ILTypeDefStored }
let seekReadUInt16Adv mdv (addr: byref) =
@@ -1165,22 +1165,22 @@ let seekReadTaggedIdx f nbits big mdv (addr: byref) =
let seekReadIdx big mdv (addr: byref) =
if big then seekReadInt32Adv mdv &addr else seekReadUInt16AsInt32Adv mdv &addr
-let seekReadUntaggedIdx (tab:TableName) (ctxt: ILMetadataReader) mdv (addr: byref) =
+let seekReadUntaggedIdx (tab: TableName) (ctxt: ILMetadataReader) mdv (addr: byref) =
seekReadIdx ctxt.tableBigness.[tab.Index] mdv &addr
-let seekReadResolutionScopeIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkResolutionScopeTag 2 ctxt.rsBigness mdv &addr
-let seekReadTypeDefOrRefOrSpecIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkTypeDefOrRefOrSpecTag 2 ctxt.tdorBigness mdv &addr
-let seekReadTypeOrMethodDefIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkTypeOrMethodDefTag 1 ctxt.tomdBigness mdv &addr
-let seekReadHasConstantIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasConstantTag 2 ctxt.hcBigness mdv &addr
-let seekReadHasCustomAttributeIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasCustomAttributeTag 5 ctxt.hcaBigness mdv &addr
-let seekReadHasFieldMarshalIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasFieldMarshalTag 1 ctxt.hfmBigness mdv &addr
-let seekReadHasDeclSecurityIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasDeclSecurityTag 2 ctxt.hdsBigness mdv &addr
-let seekReadMemberRefParentIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMemberRefParentTag 3 ctxt.mrpBigness mdv &addr
-let seekReadHasSemanticsIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasSemanticsTag 1 ctxt.hsBigness mdv &addr
-let seekReadMethodDefOrRefIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMethodDefOrRefTag 1 ctxt.mdorBigness mdv &addr
-let seekReadMemberForwardedIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMemberForwardedTag 1 ctxt.mfBigness mdv &addr
-let seekReadImplementationIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkImplementationTag 2 ctxt.iBigness mdv &addr
+let seekReadResolutionScopeIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkResolutionScopeTag 2 ctxt.rsBigness mdv &addr
+let seekReadTypeDefOrRefOrSpecIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkTypeDefOrRefOrSpecTag 2 ctxt.tdorBigness mdv &addr
+let seekReadTypeOrMethodDefIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkTypeOrMethodDefTag 1 ctxt.tomdBigness mdv &addr
+let seekReadHasConstantIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasConstantTag 2 ctxt.hcBigness mdv &addr
+let seekReadHasCustomAttributeIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasCustomAttributeTag 5 ctxt.hcaBigness mdv &addr
+let seekReadHasFieldMarshalIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasFieldMarshalTag 1 ctxt.hfmBigness mdv &addr
+let seekReadHasDeclSecurityIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasDeclSecurityTag 2 ctxt.hdsBigness mdv &addr
+let seekReadMemberRefParentIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMemberRefParentTag 3 ctxt.mrpBigness mdv &addr
+let seekReadHasSemanticsIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasSemanticsTag 1 ctxt.hsBigness mdv &addr
+let seekReadMethodDefOrRefIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMethodDefOrRefTag 1 ctxt.mdorBigness mdv &addr
+let seekReadMemberForwardedIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMemberForwardedTag 1 ctxt.mfBigness mdv &addr
+let seekReadImplementationIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkImplementationTag 2 ctxt.iBigness mdv &addr
let seekReadCustomAttributeTypeIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkILCustomAttributeTypeTag 3 ctxt.catBigness mdv &addr
let seekReadStringIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadIdx ctxt.stringsBigness mdv &addr
let seekReadGuidIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadIdx ctxt.guidsBigness mdv &addr
@@ -1205,9 +1205,9 @@ let seekReadTypeRefRow (ctxt: ILMetadataReader) mdv idx =
(scopeIdx, nameIdx, namespaceIdx)
/// Read Table ILTypeDef.
-let seekReadTypeDefRow (ctxt: ILMetadataReader) idx = ctxt.seekReadTypeDefRow idx
+let seekReadTypeDefRow (ctxt: ILMetadataReader) idx = ctxt.seekReadTypeDefRow idx
let seekReadTypeDefRowUncached ctxtH idx =
- let (ctxt : ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
let mutable addr = ctxt.rowAddr TableNames.TypeDef idx
let flags = seekReadInt32Adv mdv &addr
@@ -1219,7 +1219,7 @@ let seekReadTypeDefRowUncached ctxtH idx =
(flags, nameIdx, namespaceIdx, extendsIdx, fieldsIdx, methodsIdx)
/// Read Table Field.
-let seekReadFieldRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadFieldRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.Field idx
let flags = seekReadUInt16AsInt32Adv mdv &addr
let nameIdx = seekReadStringIdx ctxt mdv &addr
@@ -1227,7 +1227,7 @@ let seekReadFieldRow (ctxt: ILMetadataReader) mdv idx =
(flags, nameIdx, typeIdx)
/// Read Table Method.
-let seekReadMethodRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadMethodRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.Method idx
let codeRVA = seekReadInt32Adv mdv &addr
let implflags = seekReadUInt16AsInt32Adv mdv &addr
@@ -1238,22 +1238,22 @@ let seekReadMethodRow (ctxt: ILMetadataReader) mdv idx =
(codeRVA, implflags, flags, nameIdx, typeIdx, paramIdx)
/// Read Table Param.
-let seekReadParamRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadParamRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.Param idx
let flags = seekReadUInt16AsInt32Adv mdv &addr
- let seq = seekReadUInt16AsInt32Adv mdv &addr
+ let seq = seekReadUInt16AsInt32Adv mdv &addr
let nameIdx = seekReadStringIdx ctxt mdv &addr
(flags, seq, nameIdx)
/// Read Table InterfaceImpl.
-let seekReadInterfaceImplRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadInterfaceImplRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.InterfaceImpl idx
let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr
let intfIdx = seekReadTypeDefOrRefOrSpecIdx ctxt mdv &addr
(tidx, intfIdx)
/// Read Table MemberRef.
-let seekReadMemberRefRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadMemberRefRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.MemberRef idx
let mrpIdx = seekReadMemberRefParentIdx ctxt mdv &addr
let nameIdx = seekReadStringIdx ctxt mdv &addr
@@ -1261,9 +1261,9 @@ let seekReadMemberRefRow (ctxt: ILMetadataReader) mdv idx =
(mrpIdx, nameIdx, typeIdx)
/// Read Table Constant.
-let seekReadConstantRow (ctxt: ILMetadataReader) idx = ctxt.seekReadConstantRow idx
+let seekReadConstantRow (ctxt: ILMetadataReader) idx = ctxt.seekReadConstantRow idx
let seekReadConstantRowUncached ctxtH idx =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
let mutable addr = ctxt.rowAddr TableNames.Constant idx
let kind = seekReadUInt16Adv mdv &addr
@@ -1272,7 +1272,7 @@ let seekReadConstantRowUncached ctxtH idx =
(kind, parentIdx, valIdx)
/// Read Table CustomAttribute.
-let seekReadCustomAttributeRow (ctxt: ILMetadataReader) idx =
+let seekReadCustomAttributeRow (ctxt: ILMetadataReader) idx =
let mdv = ctxt.mdfile.GetView()
let mutable addr = ctxt.rowAddr TableNames.CustomAttribute idx
let parentIdx = seekReadHasCustomAttributeIdx ctxt mdv &addr
@@ -1281,14 +1281,14 @@ let seekReadCustomAttributeRow (ctxt: ILMetadataReader) idx =
(parentIdx, typeIdx, valIdx)
/// Read Table FieldMarshal.
-let seekReadFieldMarshalRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadFieldMarshalRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.FieldMarshal idx
let parentIdx = seekReadHasFieldMarshalIdx ctxt mdv &addr
let typeIdx = seekReadBlobIdx ctxt mdv &addr
(parentIdx, typeIdx)
/// Read Table Permission.
-let seekReadPermissionRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadPermissionRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.Permission idx
let action = seekReadUInt16Adv mdv &addr
let parentIdx = seekReadHasDeclSecurityIdx ctxt mdv &addr
@@ -1296,7 +1296,7 @@ let seekReadPermissionRow (ctxt: ILMetadataReader) mdv idx =
(action, parentIdx, typeIdx)
/// Read Table ClassLayout.
-let seekReadClassLayoutRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadClassLayoutRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.ClassLayout idx
let pack = seekReadUInt16Adv mdv &addr
let size = seekReadInt32Adv mdv &addr
@@ -1304,27 +1304,27 @@ let seekReadClassLayoutRow (ctxt: ILMetadataReader) mdv idx =
(pack, size, tidx)
/// Read Table FieldLayout.
-let seekReadFieldLayoutRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadFieldLayoutRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.FieldLayout idx
let offset = seekReadInt32Adv mdv &addr
let fidx = seekReadUntaggedIdx TableNames.Field ctxt mdv &addr
(offset, fidx)
//// Read Table StandAloneSig.
-let seekReadStandAloneSigRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadStandAloneSigRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.StandAloneSig idx
let sigIdx = seekReadBlobIdx ctxt mdv &addr
sigIdx
/// Read Table EventMap.
-let seekReadEventMapRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadEventMapRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.EventMap idx
let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr
let eventsIdx = seekReadUntaggedIdx TableNames.Event ctxt mdv &addr
(tidx, eventsIdx)
/// Read Table Event.
-let seekReadEventRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadEventRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.Event idx
let flags = seekReadUInt16AsInt32Adv mdv &addr
let nameIdx = seekReadStringIdx ctxt mdv &addr
@@ -1332,14 +1332,14 @@ let seekReadEventRow (ctxt: ILMetadataReader) mdv idx =
(flags, nameIdx, typIdx)
/// Read Table PropertyMap.
-let seekReadPropertyMapRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadPropertyMapRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.PropertyMap idx
let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr
let propsIdx = seekReadUntaggedIdx TableNames.Property ctxt mdv &addr
(tidx, propsIdx)
/// Read Table Property.
-let seekReadPropertyRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadPropertyRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.Property idx
let flags = seekReadUInt16AsInt32Adv mdv &addr
let nameIdx = seekReadStringIdx ctxt mdv &addr
@@ -1347,9 +1347,9 @@ let seekReadPropertyRow (ctxt: ILMetadataReader) mdv idx =
(flags, nameIdx, typIdx)
/// Read Table MethodSemantics.
-let seekReadMethodSemanticsRow (ctxt: ILMetadataReader) idx = ctxt.seekReadMethodSemanticsRow idx
+let seekReadMethodSemanticsRow (ctxt: ILMetadataReader) idx = ctxt.seekReadMethodSemanticsRow idx
let seekReadMethodSemanticsRowUncached ctxtH idx =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
let mutable addr = ctxt.rowAddr TableNames.MethodSemantics idx
let flags = seekReadUInt16AsInt32Adv mdv &addr
@@ -1358,7 +1358,7 @@ let seekReadMethodSemanticsRowUncached ctxtH idx =
(flags, midx, assocIdx)
/// Read Table MethodImpl.
-let seekReadMethodImplRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadMethodImplRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.MethodImpl idx
let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr
let mbodyIdx = seekReadMethodDefOrRefIdx ctxt mdv &addr
@@ -1366,19 +1366,19 @@ let seekReadMethodImplRow (ctxt: ILMetadataReader) mdv idx =
(tidx, mbodyIdx, mdeclIdx)
/// Read Table ILModuleRef.
-let seekReadModuleRefRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadModuleRefRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.ModuleRef idx
let nameIdx = seekReadStringIdx ctxt mdv &addr
nameIdx
/// Read Table ILTypeSpec.
-let seekReadTypeSpecRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadTypeSpecRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.TypeSpec idx
let blobIdx = seekReadBlobIdx ctxt mdv &addr
blobIdx
/// Read Table ImplMap.
-let seekReadImplMapRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadImplMapRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.ImplMap idx
let flags = seekReadUInt16AsInt32Adv mdv &addr
let forwrdedIdx = seekReadMemberForwardedIdx ctxt mdv &addr
@@ -1387,14 +1387,14 @@ let seekReadImplMapRow (ctxt: ILMetadataReader) mdv idx =
(flags, forwrdedIdx, nameIdx, scopeIdx)
/// Read Table FieldRVA.
-let seekReadFieldRVARow (ctxt: ILMetadataReader) mdv idx =
+let seekReadFieldRVARow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.FieldRVA idx
let rva = seekReadInt32Adv mdv &addr
let fidx = seekReadUntaggedIdx TableNames.Field ctxt mdv &addr
(rva, fidx)
/// Read Table Assembly.
-let seekReadAssemblyRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadAssemblyRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.Assembly idx
let hash = seekReadInt32Adv mdv &addr
let v1 = seekReadUInt16Adv mdv &addr
@@ -1408,7 +1408,7 @@ let seekReadAssemblyRow (ctxt: ILMetadataReader) mdv idx =
(hash, v1, v2, v3, v4, flags, publicKeyIdx, nameIdx, localeIdx)
/// Read Table ILAssemblyRef.
-let seekReadAssemblyRefRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadAssemblyRefRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.AssemblyRef idx
let v1 = seekReadUInt16Adv mdv &addr
let v2 = seekReadUInt16Adv mdv &addr
@@ -1422,7 +1422,7 @@ let seekReadAssemblyRefRow (ctxt: ILMetadataReader) mdv idx =
(v1, v2, v3, v4, flags, publicKeyOrTokenIdx, nameIdx, localeIdx, hashValueIdx)
/// Read Table File.
-let seekReadFileRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadFileRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.File idx
let flags = seekReadInt32Adv mdv &addr
let nameIdx = seekReadStringIdx ctxt mdv &addr
@@ -1430,7 +1430,7 @@ let seekReadFileRow (ctxt: ILMetadataReader) mdv idx =
(flags, nameIdx, hashValueIdx)
/// Read Table ILExportedTypeOrForwarder.
-let seekReadExportedTypeRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadExportedTypeRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.ExportedType idx
let flags = seekReadInt32Adv mdv &addr
let tok = seekReadInt32Adv mdv &addr
@@ -1440,7 +1440,7 @@ let seekReadExportedTypeRow (ctxt: ILMetadataReader) mdv idx =
(flags, tok, nameIdx, namespaceIdx, implIdx)
/// Read Table ManifestResource.
-let seekReadManifestResourceRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadManifestResourceRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.ManifestResource idx
let offset = seekReadInt32Adv mdv &addr
let flags = seekReadInt32Adv mdv &addr
@@ -1449,9 +1449,9 @@ let seekReadManifestResourceRow (ctxt: ILMetadataReader) mdv idx =
(offset, flags, nameIdx, implIdx)
/// Read Table Nested.
-let seekReadNestedRow (ctxt: ILMetadataReader) idx = ctxt.seekReadNestedRow idx
+let seekReadNestedRow (ctxt: ILMetadataReader) idx = ctxt.seekReadNestedRow idx
let seekReadNestedRowUncached ctxtH idx =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
let mutable addr = ctxt.rowAddr TableNames.Nested idx
let nestedIdx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr
@@ -1459,7 +1459,7 @@ let seekReadNestedRowUncached ctxtH idx =
(nestedIdx, enclIdx)
/// Read Table GenericParam.
-let seekReadGenericParamRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadGenericParamRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.GenericParam idx
let seq = seekReadUInt16Adv mdv &addr
let flags = seekReadUInt16Adv mdv &addr
@@ -1468,14 +1468,14 @@ let seekReadGenericParamRow (ctxt: ILMetadataReader) mdv idx =
(idx, seq, flags, ownerIdx, nameIdx)
// Read Table GenericParamConstraint.
-let seekReadGenericParamConstraintRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadGenericParamConstraintRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.GenericParamConstraint idx
let pidx = seekReadUntaggedIdx TableNames.GenericParam ctxt mdv &addr
let constraintIdx = seekReadTypeDefOrRefOrSpecIdx ctxt mdv &addr
(pidx, constraintIdx)
/// Read Table ILMethodSpec.
-let seekReadMethodSpecRow (ctxt: ILMetadataReader) mdv idx =
+let seekReadMethodSpecRow (ctxt: ILMetadataReader) mdv idx =
let mutable addr = ctxt.rowAddr TableNames.MethodSpec idx
let mdorIdx = seekReadMethodDefOrRefIdx ctxt mdv &addr
let instIdx = seekReadBlobIdx ctxt mdv &addr
@@ -1483,44 +1483,44 @@ let seekReadMethodSpecRow (ctxt: ILMetadataReader) mdv idx =
let readUserStringHeapUncached ctxtH idx =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
seekReadUserString mdv (ctxt.userStringsStreamPhysicalLoc + idx)
-let readUserStringHeap (ctxt: ILMetadataReader) idx = ctxt.readUserStringHeap idx
+let readUserStringHeap (ctxt: ILMetadataReader) idx = ctxt.readUserStringHeap idx
let readStringHeapUncached ctxtH idx =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
seekReadUTF8String mdv (ctxt.stringsStreamPhysicalLoc + idx)
-let readStringHeap (ctxt: ILMetadataReader) idx = ctxt.readStringHeap idx
+let readStringHeap (ctxt: ILMetadataReader) idx = ctxt.readStringHeap idx
-let readStringHeapOption (ctxt: ILMetadataReader) idx = if idx = 0 then None else Some (readStringHeap ctxt idx)
+let readStringHeapOption (ctxt: ILMetadataReader) idx = if idx = 0 then None else Some (readStringHeap ctxt idx)
let emptyByteArray: byte[] = [||]
let readBlobHeapUncached ctxtH idx =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
// valid index lies in range [1..streamSize)
// NOTE: idx cannot be 0 - Blob\String heap has first empty element that mdv one byte 0
if idx <= 0 || idx >= ctxt.blobsStreamSize then emptyByteArray
else seekReadBlob mdv (ctxt.blobsStreamPhysicalLoc + idx)
-let readBlobHeap (ctxt: ILMetadataReader) idx = ctxt.readBlobHeap idx
+let readBlobHeap (ctxt: ILMetadataReader) idx = ctxt.readBlobHeap idx
let readBlobHeapOption ctxt idx = if idx = 0 then None else Some (readBlobHeap ctxt idx)
//let readGuidHeap ctxt idx = seekReadGuid ctxt.mdv (ctxt.guidsStreamPhysicalLoc + idx)
// read a single value out of a blob heap using the given function
-let readBlobHeapAsBool ctxt vidx = fst (sigptrGetBool (readBlobHeap ctxt vidx) 0)
-let readBlobHeapAsSByte ctxt vidx = fst (sigptrGetSByte (readBlobHeap ctxt vidx) 0)
-let readBlobHeapAsInt16 ctxt vidx = fst (sigptrGetInt16 (readBlobHeap ctxt vidx) 0)
-let readBlobHeapAsInt32 ctxt vidx = fst (sigptrGetInt32 (readBlobHeap ctxt vidx) 0)
-let readBlobHeapAsInt64 ctxt vidx = fst (sigptrGetInt64 (readBlobHeap ctxt vidx) 0)
-let readBlobHeapAsByte ctxt vidx = fst (sigptrGetByte (readBlobHeap ctxt vidx) 0)
+let readBlobHeapAsBool ctxt vidx = fst (sigptrGetBool (readBlobHeap ctxt vidx) 0)
+let readBlobHeapAsSByte ctxt vidx = fst (sigptrGetSByte (readBlobHeap ctxt vidx) 0)
+let readBlobHeapAsInt16 ctxt vidx = fst (sigptrGetInt16 (readBlobHeap ctxt vidx) 0)
+let readBlobHeapAsInt32 ctxt vidx = fst (sigptrGetInt32 (readBlobHeap ctxt vidx) 0)
+let readBlobHeapAsInt64 ctxt vidx = fst (sigptrGetInt64 (readBlobHeap ctxt vidx) 0)
+let readBlobHeapAsByte ctxt vidx = fst (sigptrGetByte (readBlobHeap ctxt vidx) 0)
let readBlobHeapAsUInt16 ctxt vidx = fst (sigptrGetUInt16 (readBlobHeap ctxt vidx) 0)
let readBlobHeapAsUInt32 ctxt vidx = fst (sigptrGetUInt32 (readBlobHeap ctxt vidx) 0)
let readBlobHeapAsUInt64 ctxt vidx = fst (sigptrGetUInt64 (readBlobHeap ctxt vidx) 0)
@@ -1529,8 +1529,8 @@ let readBlobHeapAsDouble ctxt vidx = fst (sigptrGetDouble (readBlobHeap ctxt vid
//-----------------------------------------------------------------------
// Some binaries have raw data embedded their text sections, e.g. mscorlib, for
-// field inits. And there is no information that definitively tells us the extent of
-// the text section that may be interesting data. But we certainly don't want to duplicate
+// field inits. And there is no information that definitively tells us the extent of
+// the text section that may be interesting data. But we certainly don't want to duplicate
// the entire text section as data!
//
// So, we assume:
@@ -1548,7 +1548,7 @@ let readBlobHeapAsDouble ctxt vidx = fst (sigptrGetDouble (readBlobHeap ctxt vid
// For example the assembly came from a type provider
// In this case we eagerly read the native resources into memory
let readNativeResources (pectxt: PEReader) =
- [ if pectxt.nativeResourcesSize <> 0x0 && pectxt.nativeResourcesAddr <> 0x0 then
+ [ if pectxt.nativeResourcesSize <> 0x0 && pectxt.nativeResourcesAddr <> 0x0 then
let start = pectxt.anyV2P (pectxt.fileName + ": native resources", pectxt.nativeResourcesAddr)
if pectxt.noFileOnDisk then
#if !FX_NO_LINKEDRESOURCES
@@ -1565,7 +1565,7 @@ let readNativeResources (pectxt: PEReader) =
let getDataEndPointsDelayed (pectxt: PEReader) ctxtH =
lazy
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
let dataStartPoints =
let res = ref []
@@ -1624,7 +1624,7 @@ let rvaToData (ctxt: ILMetadataReader) (pectxt: PEReader) nm rva =
// Read the AbsIL structure (lazily) by reading off the relevant rows.
// ----------------------------------------------------------------------
-let isSorted (ctxt: ILMetadataReader) (tab:TableName) = ((ctxt.sorted &&& (int64 1 <<< tab.Index)) <> int64 0x0)
+let isSorted (ctxt: ILMetadataReader) (tab: TableName) = ((ctxt.sorted &&& (int64 1 <<< tab.Index)) <> int64 0x0)
// Note, pectxtEager and pevEager must not be captured by the results of this function
let rec seekReadModule (ctxt: ILMetadataReader) (pectxtEager: PEReader) pevEager peinfo ilMetadataVersion idx =
@@ -1688,9 +1688,9 @@ and seekReadAssemblyManifest (ctxt: ILMetadataReader) pectxt idx =
JitTracking = 0 <> (flags &&& 0x8000)
IgnoreSymbolStoreSequencePoints = 0 <> (flags &&& 0x2000) }
-and seekReadAssemblyRef (ctxt: ILMetadataReader) idx = ctxt.seekReadAssemblyRef idx
+and seekReadAssemblyRef (ctxt: ILMetadataReader) idx = ctxt.seekReadAssemblyRef idx
and seekReadAssemblyRefUncached ctxtH idx =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
let (v1, v2, v3, v4, flags, publicKeyOrTokenIdx, nameIdx, localeIdx, hashValueIdx) = seekReadAssemblyRefRow ctxt mdv idx
let nm = readStringHeap ctxt nameIdx
@@ -1707,15 +1707,15 @@ and seekReadAssemblyRefUncached ctxtH idx =
version = Some (ILVersionInfo (v1, v2, v3, v4)),
locale = readStringHeapOption ctxt localeIdx)
-and seekReadModuleRef (ctxt: ILMetadataReader) mdv idx =
+and seekReadModuleRef (ctxt: ILMetadataReader) mdv idx =
let (nameIdx) = seekReadModuleRefRow ctxt mdv idx
- ILModuleRef.Create(name = readStringHeap ctxt nameIdx, hasMetadata=true, hash=None)
+ ILModuleRef.Create(name = readStringHeap ctxt nameIdx, hasMetadata=true, hash=None)
-and seekReadFile (ctxt: ILMetadataReader) mdv idx =
+and seekReadFile (ctxt: ILMetadataReader) mdv idx =
let (flags, nameIdx, hashValueIdx) = seekReadFileRow ctxt mdv idx
- ILModuleRef.Create(name = readStringHeap ctxt nameIdx, hasMetadata= ((flags &&& 0x0001) = 0x0), hash= readBlobHeapOption ctxt hashValueIdx)
+ ILModuleRef.Create(name = readStringHeap ctxt nameIdx, hasMetadata= ((flags &&& 0x0001) = 0x0), hash= readBlobHeapOption ctxt hashValueIdx)
-and seekReadClassLayout (ctxt: ILMetadataReader) mdv idx =
+and seekReadClassLayout (ctxt: ILMetadataReader) mdv idx =
match seekReadOptionalIndexedRow (ctxt.getNumRows TableNames.ClassLayout, seekReadClassLayoutRow ctxt mdv, (fun (_, _, tidx) -> tidx), simpleIndexCompare idx, isSorted ctxt TableNames.ClassLayout, (fun (pack, size, _) -> pack, size)) with
| None -> { Size = None; Pack = None }
| Some (pack, size) -> { Size = Some size; Pack = Some pack }
@@ -1731,15 +1731,15 @@ and typeAccessOfFlags flags =
elif f = 0x00000005 then ILTypeDefAccess.Nested ILMemberAccess.Assembly
else ILTypeDefAccess.Private
-and typeLayoutOfFlags (ctxt: ILMetadataReader) mdv flags tidx =
+and typeLayoutOfFlags (ctxt: ILMetadataReader) mdv flags tidx =
let f = (flags &&& 0x00000018)
if f = 0x00000008 then ILTypeDefLayout.Sequential (seekReadClassLayout ctxt mdv tidx)
- elif f = 0x00000010 then ILTypeDefLayout.Explicit (seekReadClassLayout ctxt mdv tidx)
+ elif f = 0x00000010 then ILTypeDefLayout.Explicit (seekReadClassLayout ctxt mdv tidx)
else ILTypeDefLayout.Auto
and isTopTypeDef flags =
- (typeAccessOfFlags flags = ILTypeDefAccess.Private) ||
- typeAccessOfFlags flags = ILTypeDefAccess.Public
+ (typeAccessOfFlags flags = ILTypeDefAccess.Private) ||
+ typeAccessOfFlags flags = ILTypeDefAccess.Public
and seekIsTopTypeDefOfIdx ctxt idx =
let (flags, _, _, _, _, _) = seekReadTypeDefRow ctxt idx
@@ -1759,7 +1759,7 @@ and readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx) =
| None -> name
| Some ns -> ctxt.memoizeString (ns+"."+name)
-and seekReadTypeDefRowExtents (ctxt: ILMetadataReader) _info (idx:int) =
+and seekReadTypeDefRowExtents (ctxt: ILMetadataReader) _info (idx: int) =
if idx >= ctxt.getNumRows TableNames.TypeDef then
ctxt.getNumRows TableNames.Field + 1,
ctxt.getNumRows TableNames.Method + 1
@@ -1767,11 +1767,11 @@ and seekReadTypeDefRowExtents (ctxt: ILMetadataReader) _info (idx:int) =
let (_, _, _, _, fieldsIdx, methodsIdx) = seekReadTypeDefRow ctxt (idx + 1)
fieldsIdx, methodsIdx
-and seekReadTypeDefRowWithExtents ctxt (idx:int) =
+and seekReadTypeDefRowWithExtents ctxt (idx: int) =
let info= seekReadTypeDefRow ctxt idx
info, seekReadTypeDefRowExtents ctxt info idx
-and seekReadPreTypeDef ctxt toponly (idx:int) =
+and seekReadPreTypeDef ctxt toponly (idx: int) =
let (flags, nameIdx, namespaceIdx, _, _, _) = seekReadTypeDefRow ctxt idx
if toponly && not (isTopTypeDef flags) then None
else
@@ -1779,7 +1779,7 @@ and seekReadPreTypeDef ctxt toponly (idx:int) =
// Return the ILPreTypeDef
Some (mkILPreTypeDefRead (ns, n, idx, ctxt.typeDefReader))
-and typeDefReader ctxtH : ILTypeDefStored =
+and typeDefReader ctxtH: ILTypeDefStored =
mkILTypeDefReader
(fun idx ->
let (ctxt: ILMetadataReader) = getHole ctxtH
@@ -1798,12 +1798,12 @@ and typeDefReader ctxtH : ILTypeDefStored =
let mdefs = seekReadMethods ctxt numtypars methodsIdx endMethodsIdx
let fdefs = seekReadFields ctxt (numtypars, hasLayout) fieldsIdx endFieldsIdx
let nested = seekReadNestedTypeDefs ctxt idx
- let impls = seekReadInterfaceImpls ctxt mdv numtypars idx
+ let impls = seekReadInterfaceImpls ctxt mdv numtypars idx
let mimpls = seekReadMethodImpls ctxt numtypars idx
- let props = seekReadProperties ctxt numtypars idx
+ let props = seekReadProperties ctxt numtypars idx
let events = seekReadEvents ctxt numtypars idx
ILTypeDef(name=nm,
- genericParams=typars ,
+ genericParams=typars,
attributes= enum(flags),
layout = layout,
nestedTypes= nested,
@@ -1819,13 +1819,13 @@ and typeDefReader ctxtH : ILTypeDefStored =
metadataIndex=idx)
)
-and seekReadTopTypeDefs (ctxt: ILMetadataReader) =
+and seekReadTopTypeDefs (ctxt: ILMetadataReader) =
[| for i = 1 to ctxt.getNumRows TableNames.TypeDef do
- match seekReadPreTypeDef ctxt true i with
+ match seekReadPreTypeDef ctxt true i with
| None -> ()
| Some td -> yield td |]
-and seekReadNestedTypeDefs (ctxt: ILMetadataReader) tidx =
+and seekReadNestedTypeDefs (ctxt: ILMetadataReader) tidx =
mkILTypeDefsComputed (fun () ->
let nestedIdxs = seekReadIndexedRows (ctxt.getNumRows TableNames.Nested, seekReadNestedRow ctxt, snd, simpleIndexCompare tidx, false, fst)
[| for i in nestedIdxs do
@@ -1833,7 +1833,7 @@ and seekReadNestedTypeDefs (ctxt: ILMetadataReader) tidx =
| None -> ()
| Some td -> yield td |])
-and seekReadInterfaceImpls (ctxt: ILMetadataReader) mdv numtypars tidx =
+and seekReadInterfaceImpls (ctxt: ILMetadataReader) mdv numtypars tidx =
seekReadIndexedRows (ctxt.getNumRows TableNames.InterfaceImpl,
seekReadInterfaceImplRow ctxt mdv,
fst,
@@ -1841,11 +1841,11 @@ and seekReadInterfaceImpls (ctxt: ILMetadataReader) mdv numtypars tidx =
isSorted ctxt TableNames.InterfaceImpl,
(snd >> seekReadTypeDefOrRef ctxt numtypars AsObject (*ok*) List.empty))
-and seekReadGenericParams ctxt numtypars (a, b) : ILGenericParameterDefs =
+and seekReadGenericParams ctxt numtypars (a, b): ILGenericParameterDefs =
ctxt.seekReadGenericParams (GenericParamsIdx(numtypars, a, b))
and seekReadGenericParamsUncached ctxtH (GenericParamsIdx(numtypars, a, b)) =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
let pars =
seekReadIndexedRows
@@ -1872,23 +1872,23 @@ and seekReadGenericParamsUncached ctxtH (GenericParamsIdx(numtypars, a, b)) =
HasDefaultConstructorConstraint=(flags &&& 0x0010) <> 0 }))
pars |> List.sortBy fst |> List.map snd
-and seekReadGenericParamConstraints (ctxt: ILMetadataReader) mdv numtypars gpidx =
+and seekReadGenericParamConstraints (ctxt: ILMetadataReader) mdv numtypars gpidx =
seekReadIndexedRows
(ctxt.getNumRows TableNames.GenericParamConstraint,
seekReadGenericParamConstraintRow ctxt mdv,
fst,
simpleIndexCompare gpidx,
isSorted ctxt TableNames.GenericParamConstraint,
- (snd >> seekReadTypeDefOrRef ctxt numtypars AsObject (*ok*) List.empty))
+ (snd >> seekReadTypeDefOrRef ctxt numtypars AsObject (*ok*) List.empty))
-and seekReadTypeDefAsType (ctxt: ILMetadataReader) boxity (ginst:ILTypes) idx =
+and seekReadTypeDefAsType (ctxt: ILMetadataReader) boxity (ginst: ILTypes) idx =
ctxt.seekReadTypeDefAsType (TypeDefAsTypIdx (boxity, ginst, idx))
and seekReadTypeDefAsTypeUncached ctxtH (TypeDefAsTypIdx (boxity, ginst, idx)) =
let ctxt = getHole ctxtH
mkILTy boxity (ILTypeSpec.Create(seekReadTypeDefAsTypeRef ctxt idx, ginst))
-and seekReadTypeDefAsTypeRef (ctxt: ILMetadataReader) idx =
+and seekReadTypeDefAsTypeRef (ctxt: ILMetadataReader) idx =
let enc =
if seekIsTopTypeDefOfIdx ctxt idx then []
else
@@ -1899,21 +1899,21 @@ and seekReadTypeDefAsTypeRef (ctxt: ILMetadataReader) idx =
let nm = readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx)
ILTypeRef.Create(scope=ILScopeRef.Local, enclosing=enc, name = nm )
-and seekReadTypeRef (ctxt: ILMetadataReader) idx = ctxt.seekReadTypeRef idx
+and seekReadTypeRef (ctxt: ILMetadataReader) idx = ctxt.seekReadTypeRef idx
and seekReadTypeRefUncached ctxtH idx =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
let scopeIdx, nameIdx, namespaceIdx = seekReadTypeRefRow ctxt mdv idx
let scope, enc = seekReadTypeRefScope ctxt mdv scopeIdx
let nm = readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx)
ILTypeRef.Create(scope=scope, enclosing=enc, name = nm)
-and seekReadTypeRefAsType (ctxt: ILMetadataReader) boxity ginst idx = ctxt.seekReadTypeRefAsType (TypeRefAsTypIdx (boxity, ginst, idx))
+and seekReadTypeRefAsType (ctxt: ILMetadataReader) boxity ginst idx = ctxt.seekReadTypeRefAsType (TypeRefAsTypIdx (boxity, ginst, idx))
and seekReadTypeRefAsTypeUncached ctxtH (TypeRefAsTypIdx (boxity, ginst, idx)) =
let ctxt = getHole ctxtH
mkILTy boxity (ILTypeSpec.Create(seekReadTypeRef ctxt idx, ginst))
-and seekReadTypeDefOrRef (ctxt: ILMetadataReader) numtypars boxity (ginst:ILTypes) (TaggedIndex(tag, idx) ) =
+and seekReadTypeDefOrRef (ctxt: ILMetadataReader) numtypars boxity (ginst: ILTypes) (TaggedIndex(tag, idx) ) =
let mdv = ctxt.mdfile.GetView()
match tag with
| tag when tag = tdor_TypeDef -> seekReadTypeDefAsType ctxt boxity ginst idx
@@ -1923,7 +1923,7 @@ and seekReadTypeDefOrRef (ctxt: ILMetadataReader) numtypars boxity (ginst:ILTyp
readBlobHeapAsType ctxt numtypars (seekReadTypeSpecRow ctxt mdv idx)
| _ -> failwith "seekReadTypeDefOrRef ctxt"
-and seekReadTypeDefOrRefAsTypeRef (ctxt: ILMetadataReader) (TaggedIndex(tag, idx) ) =
+and seekReadTypeDefOrRefAsTypeRef (ctxt: ILMetadataReader) (TaggedIndex(tag, idx) ) =
match tag with
| tag when tag = tdor_TypeDef -> seekReadTypeDefAsTypeRef ctxt idx
| tag when tag = tdor_TypeRef -> seekReadTypeRef ctxt idx
@@ -1932,7 +1932,7 @@ and seekReadTypeDefOrRefAsTypeRef (ctxt: ILMetadataReader) (TaggedIndex(tag, id
ctxt.ilg.typ_Object.TypeRef
| _ -> failwith "seekReadTypeDefOrRefAsTypeRef_readTypeDefOrRefOrSpec"
-and seekReadMethodRefParent (ctxt: ILMetadataReader) mdv numtypars (TaggedIndex(tag, idx)) =
+and seekReadMethodRefParent (ctxt: ILMetadataReader) mdv numtypars (TaggedIndex(tag, idx)) =
match tag with
| tag when tag = mrp_TypeRef -> seekReadTypeRefAsType ctxt AsObject (* not ok - no way to tell if a member ref parent is a value type or not *) List.empty idx
| tag when tag = mrp_ModuleRef -> mkILTypeForGlobalFunctions (ILScopeRef.Module (seekReadModuleRef ctxt mdv idx))
@@ -1943,7 +1943,7 @@ and seekReadMethodRefParent (ctxt: ILMetadataReader) mdv numtypars (TaggedIndex
| tag when tag = mrp_TypeSpec -> readBlobHeapAsType ctxt numtypars (seekReadTypeSpecRow ctxt mdv idx)
| _ -> failwith "seekReadMethodRefParent"
-and seekReadMethodDefOrRef (ctxt: ILMetadataReader) numtypars (TaggedIndex(tag, idx)) =
+and seekReadMethodDefOrRef (ctxt: ILMetadataReader) numtypars (TaggedIndex(tag, idx)) =
match tag with
| tag when tag = mdor_MethodDef ->
let (MethodData(enclTy, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData ctxt idx
@@ -1952,12 +1952,12 @@ and seekReadMethodDefOrRef (ctxt: ILMetadataReader) numtypars (TaggedIndex(tag,
seekReadMemberRefAsMethodData ctxt numtypars idx
| _ -> failwith "seekReadMethodDefOrRef"
-and seekReadMethodDefOrRefNoVarargs (ctxt: ILMetadataReader) numtypars x =
- let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) = seekReadMethodDefOrRef ctxt numtypars x
+and seekReadMethodDefOrRefNoVarargs (ctxt: ILMetadataReader) numtypars x =
+ let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) = seekReadMethodDefOrRef ctxt numtypars x
if varargs <> None then dprintf "ignoring sentinel and varargs in ILMethodDef token signature"
MethodData(enclTy, cc, nm, argtys, retty, minst)
-and seekReadCustomAttrType (ctxt: ILMetadataReader) (TaggedIndex(tag, idx) ) =
+and seekReadCustomAttrType (ctxt: ILMetadataReader) (TaggedIndex(tag, idx) ) =
match tag with
| tag when tag = cat_MethodDef ->
let (MethodData(enclTy, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData ctxt idx
@@ -1967,7 +1967,7 @@ and seekReadCustomAttrType (ctxt: ILMetadataReader) (TaggedIndex(tag, idx) ) =
mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst)
| _ -> failwith "seekReadCustomAttrType ctxt"
-and seekReadImplAsScopeRef (ctxt: ILMetadataReader) mdv (TaggedIndex(tag, idx) ) =
+and seekReadImplAsScopeRef (ctxt: ILMetadataReader) mdv (TaggedIndex(tag, idx) ) =
if idx = 0 then ILScopeRef.Local
else
match tag with
@@ -1976,7 +1976,7 @@ and seekReadImplAsScopeRef (ctxt: ILMetadataReader) mdv (TaggedIndex(tag, idx)
| tag when tag = i_ExportedType -> failwith "seekReadImplAsScopeRef"
| _ -> failwith "seekReadImplAsScopeRef"
-and seekReadTypeRefScope (ctxt: ILMetadataReader) mdv (TaggedIndex(tag, idx) ) =
+and seekReadTypeRefScope (ctxt: ILMetadataReader) mdv (TaggedIndex(tag, idx) ) =
match tag with
| tag when tag = rs_Module -> ILScopeRef.Local, []
| tag when tag = rs_ModuleRef -> ILScopeRef.Module (seekReadModuleRef ctxt mdv idx), []
@@ -1986,11 +1986,11 @@ and seekReadTypeRefScope (ctxt: ILMetadataReader) mdv (TaggedIndex(tag, idx) )
tref.Scope, (tref.Enclosing@[tref.Name])
| _ -> failwith "seekReadTypeRefScope"
-and seekReadOptionalTypeDefOrRef (ctxt: ILMetadataReader) numtypars boxity idx =
+and seekReadOptionalTypeDefOrRef (ctxt: ILMetadataReader) numtypars boxity idx =
if idx = TaggedIndex(tdor_TypeDef, 0) then None
else Some (seekReadTypeDefOrRef ctxt numtypars boxity List.empty idx)
-and seekReadField ctxt mdv (numtypars, hasLayout) (idx:int) =
+and seekReadField ctxt mdv (numtypars, hasLayout) (idx: int) =
let (flags, nameIdx, typeIdx) = seekReadFieldRow ctxt mdv idx
let nm = readStringHeap ctxt nameIdx
let isStatic = (flags &&& 0x0010) <> 0
@@ -2023,14 +2023,14 @@ and seekReadField ctxt mdv (numtypars, hasLayout) (idx:int) =
customAttrsStored=ctxt.customAttrsReader_FieldDef,
metadataIndex = idx)
-and seekReadFields (ctxt: ILMetadataReader) (numtypars, hasLayout) fidx1 fidx2 =
+and seekReadFields (ctxt: ILMetadataReader) (numtypars, hasLayout) fidx1 fidx2 =
mkILFieldsLazy
(lazy
let mdv = ctxt.mdfile.GetView()
[ for i = fidx1 to fidx2 - 1 do
yield seekReadField ctxt mdv (numtypars, hasLayout) i ])
-and seekReadMethods (ctxt: ILMetadataReader) numtypars midx1 midx2 =
+and seekReadMethods (ctxt: ILMetadataReader) numtypars midx1 midx2 =
mkILMethodsComputed (fun () ->
let mdv = ctxt.mdfile.GetView()
[| for i = midx1 to midx2 - 1 do
@@ -2043,9 +2043,9 @@ and sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr =
else (* Type Ref *)
TaggedIndex(tdor_TypeRef, (n >>>& 2)), sigptr
-and sigptrGetTy (ctxt: ILMetadataReader) numtypars bytes sigptr =
+and sigptrGetTy (ctxt: ILMetadataReader) numtypars bytes sigptr =
let b0, sigptr = sigptrGetByte bytes sigptr
- if b0 = et_OBJECT then ctxt.ilg.typ_Object , sigptr
+ if b0 = et_OBJECT then ctxt.ilg.typ_Object, sigptr
elif b0 = et_STRING then ctxt.ilg.typ_String, sigptr
elif b0 = et_I1 then ctxt.ilg.typ_SByte, sigptr
elif b0 = et_I2 then ctxt.ilg.typ_Int16, sigptr
@@ -2099,8 +2099,8 @@ and sigptrGetTy (ctxt: ILMetadataReader) numtypars bytes sigptr =
let lobounds, sigptr = sigptrFold sigptrGetZInt32 numLoBounded bytes sigptr
let shape =
let dim i =
- (if i < numLoBounded then Some (List.item i lobounds) else None),
- (if i < numSized then Some (List.item i sizes) else None)
+ (if i < numLoBounded then Some (List.item i lobounds) else None),
+ (if i < numSized then Some (List.item i sizes) else None)
ILArrayShape (List.init rank dim)
mkILArrTy (ty, shape), sigptr
@@ -2108,7 +2108,7 @@ and sigptrGetTy (ctxt: ILMetadataReader) numtypars bytes sigptr =
elif b0 = et_TYPEDBYREF then
let t = mkILNonGenericValueTy(mkILTyRef(ctxt.ilg.primaryAssemblyScopeRef, "System.TypedReference"))
t, sigptr
- elif b0 = et_CMOD_REQD || b0 = et_CMOD_OPT then
+ elif b0 = et_CMOD_REQD || b0 = et_CMOD_OPT then
let tdorIdx, sigptr = sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr
let ty, sigptr = sigptrGetTy ctxt numtypars bytes sigptr
ILType.Modified((b0 = et_CMOD_REQD), seekReadTypeDefOrRefAsTypeRef ctxt tdorIdx, ty), sigptr
@@ -2119,18 +2119,19 @@ and sigptrGetTy (ctxt: ILMetadataReader) numtypars bytes sigptr =
let numparams, sigptr = sigptrGetZInt32 bytes sigptr
let retty, sigptr = sigptrGetTy ctxt numtypars bytes sigptr
let argtys, sigptr = sigptrFold (sigptrGetTy ctxt numtypars) ( numparams) bytes sigptr
- ILType.FunctionPointer
- { CallingConv=cc
- ArgTypes = argtys
- ReturnType=retty }
- , sigptr
+ let typ =
+ ILType.FunctionPointer
+ { CallingConv=cc
+ ArgTypes = argtys
+ ReturnType=retty }
+ typ, sigptr
elif b0 = et_SENTINEL then failwith "varargs NYI"
- else ILType.Void , sigptr
+ else ILType.Void, sigptr
-and sigptrGetVarArgTys (ctxt: ILMetadataReader) n numtypars bytes sigptr =
+and sigptrGetVarArgTys (ctxt: ILMetadataReader) n numtypars bytes sigptr =
sigptrFold (sigptrGetTy ctxt numtypars) n bytes sigptr
-and sigptrGetArgTys (ctxt: ILMetadataReader) n numtypars bytes sigptr acc =
+and sigptrGetArgTys (ctxt: ILMetadataReader) n numtypars bytes sigptr acc =
if n <= 0 then (List.rev acc, None), sigptr
else
let b0, sigptr2 = sigptrGetByte bytes sigptr
@@ -2141,7 +2142,7 @@ and sigptrGetArgTys (ctxt: ILMetadataReader) n numtypars bytes sigptr acc =
let x, sigptr = sigptrGetTy ctxt numtypars bytes sigptr
sigptrGetArgTys ctxt (n-1) numtypars bytes sigptr (x::acc)
-and sigptrGetLocal (ctxt: ILMetadataReader) numtypars bytes sigptr =
+and sigptrGetLocal (ctxt: ILMetadataReader) numtypars bytes sigptr =
let pinned, sigptr =
let b0, sigptr' = sigptrGetByte bytes sigptr
if b0 = et_PINNED then
@@ -2149,14 +2150,14 @@ and sigptrGetLocal (ctxt: ILMetadataReader) numtypars bytes sigptr =
else
false, sigptr
let ty, sigptr = sigptrGetTy ctxt numtypars bytes sigptr
- let loc : ILLocal = { IsPinned = pinned; Type = ty; DebugInfo = None }
+ let loc: ILLocal = { IsPinned = pinned; Type = ty; DebugInfo = None }
loc, sigptr
-and readBlobHeapAsMethodSig (ctxt: ILMetadataReader) numtypars blobIdx =
+and readBlobHeapAsMethodSig (ctxt: ILMetadataReader) numtypars blobIdx =
ctxt.readBlobHeapAsMethodSig (BlobAsMethodSigIdx (numtypars, blobIdx))
and readBlobHeapAsMethodSigUncached ctxtH (BlobAsMethodSigIdx (numtypars, blobIdx)) =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let bytes = readBlobHeap ctxt blobIdx
let sigptr = 0
let ccByte, sigptr = sigptrGetByte bytes sigptr
@@ -2172,7 +2173,7 @@ and readBlobHeapAsType ctxt numtypars blobIdx =
let ty, _sigptr = sigptrGetTy ctxt numtypars bytes 0
ty
-and readBlobHeapAsFieldSig ctxt numtypars blobIdx =
+and readBlobHeapAsFieldSig ctxt numtypars blobIdx =
ctxt.readBlobHeapAsFieldSig (BlobAsFieldSigIdx (numtypars, blobIdx))
and readBlobHeapAsFieldSigUncached ctxtH (BlobAsFieldSigIdx (numtypars, blobIdx)) =
@@ -2185,10 +2186,10 @@ and readBlobHeapAsFieldSigUncached ctxtH (BlobAsFieldSigIdx (numtypars, blobIdx)
retty
-and readBlobHeapAsPropertySig (ctxt: ILMetadataReader) numtypars blobIdx =
+and readBlobHeapAsPropertySig (ctxt: ILMetadataReader) numtypars blobIdx =
ctxt.readBlobHeapAsPropertySig (BlobAsPropSigIdx (numtypars, blobIdx))
-and readBlobHeapAsPropertySigUncached ctxtH (BlobAsPropSigIdx (numtypars, blobIdx)) =
+and readBlobHeapAsPropertySigUncached ctxtH (BlobAsPropSigIdx (numtypars, blobIdx)) =
let ctxt = getHole ctxtH
let bytes = readBlobHeap ctxt blobIdx
let sigptr = 0
@@ -2201,7 +2202,7 @@ and readBlobHeapAsPropertySigUncached ctxtH (BlobAsPropSigIdx (numtypars, blobId
let argtys, _sigptr = sigptrFold (sigptrGetTy ctxt numtypars) ( numparams) bytes sigptr
hasthis, retty, argtys
-and readBlobHeapAsLocalsSig (ctxt: ILMetadataReader) numtypars blobIdx =
+and readBlobHeapAsLocalsSig (ctxt: ILMetadataReader) numtypars blobIdx =
ctxt.readBlobHeapAsLocalsSig (BlobAsLocalSigIdx (numtypars, blobIdx))
and readBlobHeapAsLocalsSigUncached ctxtH (BlobAsLocalSigIdx (numtypars, blobIdx)) =
@@ -2223,30 +2224,30 @@ and byteAsHasThis b =
and byteAsCallConv b =
let cc =
let ccMaxked = b &&& 0x0Fuy
- if ccMaxked = e_IMAGE_CEE_CS_CALLCONV_FASTCALL then ILArgConvention.FastCall
+ if ccMaxked = e_IMAGE_CEE_CS_CALLCONV_FASTCALL then ILArgConvention.FastCall
elif ccMaxked = e_IMAGE_CEE_CS_CALLCONV_STDCALL then ILArgConvention.StdCall
elif ccMaxked = e_IMAGE_CEE_CS_CALLCONV_THISCALL then ILArgConvention.ThisCall
elif ccMaxked = e_IMAGE_CEE_CS_CALLCONV_CDECL then ILArgConvention.CDecl
elif ccMaxked = e_IMAGE_CEE_CS_CALLCONV_VARARG then ILArgConvention.VarArg
- else ILArgConvention.Default
+ else ILArgConvention.Default
let generic = (b &&& e_IMAGE_CEE_CS_CALLCONV_GENERIC) <> 0x0uy
generic, Callconv (byteAsHasThis b, cc)
-and seekReadMemberRefAsMethodData ctxt numtypars idx : VarArgMethodData =
+and seekReadMemberRefAsMethodData ctxt numtypars idx: VarArgMethodData =
ctxt.seekReadMemberRefAsMethodData (MemberRefAsMspecIdx (numtypars, idx))
and seekReadMemberRefAsMethodDataUncached ctxtH (MemberRefAsMspecIdx (numtypars, idx)) =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
let (mrpIdx, nameIdx, typeIdx) = seekReadMemberRefRow ctxt mdv idx
let nm = readStringHeap ctxt nameIdx
let enclTy = seekReadMethodRefParent ctxt mdv numtypars mrpIdx
let _generic, genarity, cc, retty, argtys, varargs = readBlobHeapAsMethodSig ctxt enclTy.GenericArgs.Length typeIdx
- let minst = List.init genarity (fun n -> mkILTyvarTy (uint16 (numtypars+n)))
+ let minst = List.init genarity (fun n -> mkILTyvarTy (uint16 (numtypars+n)))
(VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst))
-and seekReadMemberRefAsMethDataNoVarArgs ctxt numtypars idx : MethodData =
- let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) = seekReadMemberRefAsMethodData ctxt numtypars idx
+and seekReadMemberRefAsMethDataNoVarArgs ctxt numtypars idx: MethodData =
+ let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) = seekReadMemberRefAsMethodData ctxt numtypars idx
if Option.isSome varargs then dprintf "ignoring sentinel and varargs in ILMethodDef token signature"
(MethodData(enclTy, cc, nm, argtys, retty, minst))
@@ -2254,7 +2255,7 @@ and seekReadMethodSpecAsMethodData (ctxt: ILMetadataReader) numtypars idx =
ctxt.seekReadMethodSpecAsMethodData (MethodSpecAsMspecIdx (numtypars, idx))
and seekReadMethodSpecAsMethodDataUncached ctxtH (MethodSpecAsMspecIdx (numtypars, idx)) =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
let (mdorIdx, instIdx) = seekReadMethodSpecRow ctxt mdv idx
let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, _)) = seekReadMethodDefOrRef ctxt numtypars mdorIdx
@@ -2268,11 +2269,11 @@ and seekReadMethodSpecAsMethodDataUncached ctxtH (MethodSpecAsMspecIdx (numtypar
argtys
VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)
-and seekReadMemberRefAsFieldSpec (ctxt: ILMetadataReader) numtypars idx =
+and seekReadMemberRefAsFieldSpec (ctxt: ILMetadataReader) numtypars idx =
ctxt.seekReadMemberRefAsFieldSpec (MemberRefAsFspecIdx (numtypars, idx))
and seekReadMemberRefAsFieldSpecUncached ctxtH (MemberRefAsFspecIdx (numtypars, idx)) =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
let (mrpIdx, nameIdx, typeIdx) = seekReadMemberRefRow ctxt mdv idx
let nm = readStringHeap ctxt nameIdx
@@ -2282,7 +2283,7 @@ and seekReadMemberRefAsFieldSpecUncached ctxtH (MemberRefAsFspecIdx (numtypars,
// One extremely annoying aspect of the MD format is that given a
// ILMethodDef token it is non-trivial to find which ILTypeDef it belongs
-// to. So we do a binary chop through the ILTypeDef table
+// to. So we do a binary chop through the ILTypeDef table
// looking for which ILTypeDef has the ILMethodDef within its range.
// Although the ILTypeDef table is not "sorted", it is effectively sorted by
// method-range and field-range start/finish indexes
@@ -2290,7 +2291,7 @@ and seekReadMethodDefAsMethodData ctxt idx =
ctxt.seekReadMethodDefAsMethodData idx
and seekReadMethodDefAsMethodDataUncached ctxtH idx =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
// Look for the method def parent.
let tidx =
@@ -2298,7 +2299,7 @@ and seekReadMethodDefAsMethodDataUncached ctxtH idx =
(fun i -> i, seekReadTypeDefRowWithExtents ctxt i),
(fun r -> r),
(fun (_, ((_, _, _, _, _, methodsIdx),
- (_, endMethodsIdx))) ->
+ (_, endMethodsIdx))) ->
if endMethodsIdx <= idx then 1
elif methodsIdx <= idx && idx < endMethodsIdx then 0
else -1),
@@ -2326,11 +2327,11 @@ and seekReadMethodDefAsMethodDataUncached ctxtH idx =
MethodData(enclTy, cc, nm, argtys, retty, minst)
-and seekReadFieldDefAsFieldSpec (ctxt: ILMetadataReader) idx =
+and seekReadFieldDefAsFieldSpec (ctxt: ILMetadataReader) idx =
ctxt.seekReadFieldDefAsFieldSpec idx
and seekReadFieldDefAsFieldSpecUncached ctxtH idx =
- let (ctxt: ILMetadataReader) = getHole ctxtH
+ let (ctxt: ILMetadataReader) = getHole ctxtH
let mdv = ctxt.mdfile.GetView()
let (_flags, nameIdx, typeIdx) = seekReadFieldRow ctxt mdv idx
let nm = readStringHeap ctxt nameIdx
@@ -2339,7 +2340,7 @@ and seekReadFieldDefAsFieldSpecUncached ctxtH idx =
seekReadIndexedRow (ctxt.getNumRows TableNames.TypeDef,
(fun i -> i, seekReadTypeDefRowWithExtents ctxt i),
(fun r -> r),
- (fun (_, ((_, _, _, _, fieldsIdx, _), (endFieldsIdx, _))) ->
+ (fun (_, ((_, _, _, _, fieldsIdx, _), (endFieldsIdx, _))) ->
if endFieldsIdx <= idx then 1
elif fieldsIdx <= idx && idx < endFieldsIdx then 0
else -1),
@@ -2356,7 +2357,7 @@ and seekReadFieldDefAsFieldSpecUncached ctxtH idx =
// Put it together.
mkILFieldSpecInTy(enclTy, nm, retty)
-and seekReadMethod (ctxt: ILMetadataReader) mdv numtypars (idx:int) =
+and seekReadMethod (ctxt: ILMetadataReader) mdv numtypars (idx: int) =
let (codeRVA, implflags, flags, nameIdx, typeIdx, paramIdx) = seekReadMethodRow ctxt mdv idx
let nm = readStringHeap ctxt nameIdx
let abstr = (flags &&& 0x0400) <> 0x0
@@ -2408,14 +2409,14 @@ and seekReadMethod (ctxt: ILMetadataReader) mdv numtypars (idx:int) =
metadataIndex=idx)
-and seekReadParams (ctxt: ILMetadataReader) mdv (retty, argtys) pidx1 pidx2 =
+and seekReadParams (ctxt: ILMetadataReader) mdv (retty, argtys) pidx1 pidx2 =
let retRes = ref (mkILReturn retty)
let paramsRes = argtys |> List.toArray |> Array.map mkILParamAnon
for i = pidx1 to pidx2 - 1 do
seekReadParamExtras ctxt mdv (retRes, paramsRes) i
!retRes, List.ofArray paramsRes
-and seekReadParamExtras (ctxt: ILMetadataReader) mdv (retRes, paramsRes) (idx:int) =
+and seekReadParamExtras (ctxt: ILMetadataReader) mdv (retRes, paramsRes) (idx: int) =
let (flags, seq, nameIdx) = seekReadParamRow ctxt mdv idx
let inOutMasked = (flags &&& 0x00FF)
let hasMarshal = (flags &&& 0x2000) <> 0x0
@@ -2439,7 +2440,7 @@ and seekReadParamExtras (ctxt: ILMetadataReader) mdv (retRes, paramsRes) (idx:i
CustomAttrsStored = ctxt.customAttrsReader_ParamDef
MetadataIndex = idx }
-and seekReadMethodImpls (ctxt: ILMetadataReader) numtypars tidx =
+and seekReadMethodImpls (ctxt: ILMetadataReader) numtypars tidx =
mkILMethodImplsLazy
(lazy
let mdv = ctxt.mdfile.GetView()
@@ -2453,9 +2454,9 @@ and seekReadMethodImpls (ctxt: ILMetadataReader) numtypars tidx =
let mspec = mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst)
OverridesSpec(mspec.MethodRef, mspec.DeclaringType) }))
-and seekReadMultipleMethodSemantics (ctxt: ILMetadataReader) (flags, id) =
+and seekReadMultipleMethodSemantics (ctxt: ILMetadataReader) (flags, id) =
seekReadIndexedRows
- (ctxt.getNumRows TableNames.MethodSemantics ,
+ (ctxt.getNumRows TableNames.MethodSemantics,
seekReadMethodSemanticsRow ctxt,
(fun (_flags, _, c) -> c),
hsCompare id,
@@ -2491,7 +2492,7 @@ and seekReadEvent ctxt mdv numtypars idx =
metadataIndex = idx )
(* REVIEW: can substantially reduce numbers of EventMap and PropertyMap reads by first checking if the whole table mdv sorted according to ILTypeDef tokens and then doing a binary chop *)
-and seekReadEvents (ctxt: ILMetadataReader) numtypars tidx =
+and seekReadEvents (ctxt: ILMetadataReader) numtypars tidx =
mkILEventsLazy
(lazy
let mdv = ctxt.mdfile.GetView()
@@ -2520,7 +2521,7 @@ and seekReadProperty ctxt mdv numtypars idx =
| Some mref -> mref.CallingConv.ThisConv
| None ->
match setter with
- | Some mref -> mref.CallingConv .ThisConv
+ | Some mref -> mref.CallingConv .ThisConv
| None -> cc
ILPropertyDef(name=readStringHeap ctxt nameIdx,
@@ -2534,7 +2535,7 @@ and seekReadProperty ctxt mdv numtypars idx =
customAttrsStored=ctxt.customAttrsReader_Property,
metadataIndex = idx )
-and seekReadProperties (ctxt: ILMetadataReader) numtypars tidx =
+and seekReadProperties (ctxt: ILMetadataReader) numtypars tidx =
mkILPropertiesLazy
(lazy
let mdv = ctxt.mdfile.GetView()
@@ -2551,7 +2552,7 @@ and seekReadProperties (ctxt: ILMetadataReader) numtypars tidx =
yield seekReadProperty ctxt mdv numtypars i ])
-and customAttrsReader ctxtH tag : ILAttributesStored =
+and customAttrsReader ctxtH tag: ILAttributesStored =
mkILCustomAttrsReader
(fun idx ->
let (ctxt: ILMetadataReader) = getHole ctxtH
@@ -2592,7 +2593,7 @@ and seekReadSecurityDecl ctxt (act, ty) =
ILSecurityDecl ((if List.memAssoc (int act) (Lazy.force ILSecurityActionRevMap) then List.assoc (int act) (Lazy.force ILSecurityActionRevMap) else failwith "unknown security action"),
readBlobHeap ctxt ty)
-and seekReadConstant (ctxt: ILMetadataReader) idx =
+and seekReadConstant (ctxt: ILMetadataReader) idx =
let kind, vidx = seekReadIndexedRow (ctxt.getNumRows TableNames.Constant,
seekReadConstantRow ctxt,
(fun (_, key, _) -> key),
@@ -2614,10 +2615,10 @@ and seekReadConstant (ctxt: ILMetadataReader) idx =
| x when x = uint16 et_U8 -> ILFieldInit.UInt64 (readBlobHeapAsUInt64 ctxt vidx)
| x when x = uint16 et_R4 -> ILFieldInit.Single (readBlobHeapAsSingle ctxt vidx)
| x when x = uint16 et_R8 -> ILFieldInit.Double (readBlobHeapAsDouble ctxt vidx)
- | x when x = uint16 et_CLASS || x = uint16 et_OBJECT -> ILFieldInit.Null
+ | x when x = uint16 et_CLASS || x = uint16 et_OBJECT -> ILFieldInit.Null
| _ -> ILFieldInit.Null
-and seekReadImplMap (ctxt: ILMetadataReader) nm midx =
+and seekReadImplMap (ctxt: ILMetadataReader) nm midx =
mkMethBodyLazyAux
(lazy
let mdv = ctxt.mdfile.GetView()
@@ -2671,7 +2672,7 @@ and seekReadImplMap (ctxt: ILMetadataReader) nm midx =
| Some nm2 -> nm2)
Where = seekReadModuleRef ctxt mdv scopeIdx })
-and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start seqpoints =
+and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz: int) start seqpoints =
let labelsOfRawOffsets = new Dictionary<_, _>(sz/2)
let ilOffsetsOfLabels = new Dictionary<_, _>(sz/2)
let tryRawToLabel rawOffset =
@@ -2717,7 +2718,7 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s
// Insert any sequence points into the instruction sequence
while
(match !seqPointsRemaining with
- | (i, _tag) :: _rest when i <= !curr -> true
+ | (i, _tag) :: _rest when i <= !curr -> true
| _ -> false)
do
// Emitting one sequence point
@@ -2725,7 +2726,7 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s
seqPointsRemaining := List.tail !seqPointsRemaining
ibuf.Add (I_seqpoint tag)
- // Read the prefixes. Leave lastb and lastb2 holding the instruction byte(s)
+ // Read the prefixes. Leave lastb and lastb2 holding the instruction byte(s)
begin
prefixes.al <- Aligned
prefixes.tl <- Normalcall
@@ -2748,7 +2749,7 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s
if unal = 0x1 then Unaligned1
elif unal = 0x2 then Unaligned2
elif unal = 0x4 then Unaligned4
- else (dprintn "bad alignment for unaligned"; Aligned)
+ else (dprintn "bad alignment for unaligned"; Aligned)
elif !b = (i_volatile &&& 0xff) then prefixes.vol <- Volatile
elif !b = (i_readonly &&& 0xff) then prefixes.ro <- ReadonlyAddress
elif !b = (i_constrained &&& 0xff) then
@@ -2814,7 +2815,7 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s
let (tab, idx) = seekReadUncodedToken pev (start + (!curr))
curr := !curr + 4
- let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) =
+ let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) =
if tab = TableNames.Method then
seekReadMethodDefOrRef ctxt numtypars (TaggedIndex(mdor_MethodDef, idx))
elif tab = TableNames.MemberRef then
@@ -2826,9 +2827,9 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s
| ILType.Array (shape, ty) ->
match nm with
| "Get" -> I_ldelem_any(shape, ty)
- | "Set" -> I_stelem_any(shape, ty)
- | "Address" -> I_ldelema(prefixes.ro, false, shape, ty)
- | ".ctor" -> I_newarr(shape, ty)
+ | "Set" -> I_stelem_any(shape, ty)
+ | "Address" -> I_ldelema(prefixes.ro, false, shape, ty)
+ | ".ctor" -> I_newarr(shape, ty)
| _ -> failwith "bad method on array type"
| _ ->
let mspec = mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst)
@@ -2845,7 +2846,7 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s
f prefixes (readUserStringHeap ctxt (idx))
| I_conditional_i32_instr f ->
- let offsDest = (seekReadInt32 pev (start + (!curr)))
+ let offsDest = (seekReadInt32 pev (start + (!curr)))
curr := !curr + 4
let dest = !curr + offsDest
f prefixes (rawToLabel dest)
@@ -2855,7 +2856,7 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s
let dest = !curr + offsDest
f prefixes (rawToLabel dest)
| I_unconditional_i32_instr f ->
- let offsDest = (seekReadInt32 pev (start + (!curr)))
+ let offsDest = (seekReadInt32 pev (start + (!curr)))
curr := !curr + 4
let dest = !curr + offsDest
f prefixes (rawToLabel dest)
@@ -2872,12 +2873,12 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s
curr := !curr + 4
(* REVIEW: this incorrectly labels all MemberRef tokens as ILMethod's: we should go look at the MemberRef sig to determine if it is a field or method *)
let token_info =
- if tab = TableNames.Method || tab = TableNames.MemberRef (* REVIEW:generics or tab = TableNames.MethodSpec *) then
+ if tab = TableNames.Method || tab = TableNames.MemberRef (* REVIEW: generics or tab = TableNames.MethodSpec *) then
let (MethodData(enclTy, cc, nm, argtys, retty, minst)) = seekReadMethodDefOrRefNoVarargs ctxt numtypars (uncodedTokenToMethodDefOrRef (tab, idx))
ILToken.ILMethod (mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst))
elif tab = TableNames.Field then
ILToken.ILField (seekReadFieldDefAsFieldSpec ctxt idx)
- elif tab = TableNames.TypeDef || tab = TableNames.TypeRef || tab = TableNames.TypeSpec then
+ elif tab = TableNames.TypeDef || tab = TableNames.TypeRef || tab = TableNames.TypeSpec then
ILToken.ILType (seekReadTypeDefOrRef ctxt numtypars AsObject [] (uncodedTokenToTypeDefOrRefOrSpec (tab, idx)))
else failwith "bad token for ldtoken"
f prefixes token_info
@@ -2889,11 +2890,11 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s
if generic then failwith "bad image: a generic method signature is begin used at a calli instruction"
f prefixes (mkILCallSig (cc, argtys, retty), varargs)
| I_switch_instr f ->
- let n = (seekReadInt32 pev (start + (!curr)))
+ let n = (seekReadInt32 pev (start + (!curr)))
curr := !curr + 4
let offsets =
List.init n (fun _ ->
- let i = (seekReadInt32 pev (start + (!curr)))
+ let i = (seekReadInt32 pev (start + (!curr)))
curr := !curr + 4
i)
let dests = List.map (fun offs -> rawToLabel (!curr + offs)) offsets
@@ -2906,16 +2907,16 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s
let lab2pc = ilOffsetsOfLabels
// Some offsets used in debug info refer to the end of an instruction, rather than the
- // start of the subsequent instruction. But all labels refer to instruction starts,
- // apart from a final label which refers to the end of the method. This function finds
+ // start of the subsequent instruction. But all labels refer to instruction starts,
+ // apart from a final label which refers to the end of the method. This function finds
// the start of the next instruction referred to by the raw offset.
let raw2nextLab rawOffset =
let isInstrStart x =
match tryRawToLabel x with
| None -> false
| Some lab -> ilOffsetsOfLabels.ContainsKey lab
- if isInstrStart rawOffset then rawToLabel rawOffset
- elif isInstrStart (rawOffset+1) then rawToLabel (rawOffset+1)
+ if isInstrStart rawOffset then rawToLabel rawOffset
+ elif isInstrStart (rawOffset+1) then rawToLabel (rawOffset+1)
else failwith ("the bytecode raw offset "+string rawOffset+" did not refer either to the start or end of an instruction")
let instrs = ibuf.ToArray()
instrs, rawToLabel, lab2pc, raw2nextLab
@@ -2946,12 +2947,12 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int
let pdbm = pdbReaderGetMethod pdbr (uncodedToken TableNames.Method idx)
let sps = pdbMethodGetSequencePoints pdbm
- (*dprintf "#sps for 0x%x = %d\n" (uncodedToken TableNames.Method idx) (Array.length sps) *)
- (* let roota, rootb = pdbScopeGetOffsets rootScope in *)
+ (*dprintf "#sps for 0x%x = %d\n" (uncodedToken TableNames.Method idx) (Array.length sps) *)
+ (* let roota, rootb = pdbScopeGetOffsets rootScope in *)
let seqpoints =
let arr =
sps |> Array.map (fun sp ->
- (* It is VERY annoying to have to call GetURL for the document for each sequence point. This appears to be a short coming of the PDB reader API. They should return an index into the array of documents for the reader *)
+ (* It is VERY annoying to have to call GetURL for the document for each sequence point. This appears to be a short coming of the PDB reader API. They should return an index into the array of documents for the reader *)
let sourcedoc = get_doc (pdbDocumentGetURL sp.pdbSeqPointDocument)
let source =
ILSourceMarker.Create(document = sourcedoc,
@@ -2966,28 +2967,28 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int
Array.toList arr
let rec scopes scp =
let a, b = pdbScopeGetOffsets scp
- let lvs = pdbScopeGetLocals scp
+ let lvs = pdbScopeGetLocals scp
let ilvs =
lvs
|> Array.toList
|> List.filter (fun l ->
let k, _idx = pdbVariableGetAddressAttributes l
k = 1 (* ADDR_IL_OFFSET *))
- let ilinfos : ILLocalDebugMapping list =
+ let ilinfos: ILLocalDebugMapping list =
ilvs |> List.map (fun ilv ->
let _k, idx = pdbVariableGetAddressAttributes ilv
let n = pdbVariableGetName ilv
- { LocalIndex= idx
+ { LocalIndex= idx
LocalName=n})
let thisOne =
(fun raw2nextLab ->
{ Range= (raw2nextLab a, raw2nextLab b)
- DebugMappings = ilinfos } : ILLocalDebugInfo )
+ DebugMappings = ilinfos }: ILLocalDebugInfo )
let others = List.foldBack (scopes >> (@)) (Array.toList (pdbScopeGetChildren scp)) []
thisOne :: others
- let localPdbInfos = [] (* scopes fail for mscorlib scopes rootScope *)
- // REVIEW: look through sps to get ranges? Use GetRanges?? Change AbsIL??
+ let localPdbInfos = [] (* scopes fail for mscorlib scopes rootScope *)
+ // REVIEW: look through sps to get ranges? Use GetRanges?? Change AbsIL??
(localPdbInfos, None, seqpoints)
with e ->
// "* Warning: PDB info for method "+nm+" could not be read and will be ignored: "+e.Message
@@ -2999,7 +3000,7 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int
let b = seekReadByte pev baseRVA
if (b &&& e_CorILMethod_FormatMask) = e_CorILMethod_TinyFormat then
let codeBase = baseRVA + 1
- let codeSize = (int32 b >>>& 2)
+ let codeSize = (int32 b >>>& 2)
// tiny format for "+nm+", code size = " + string codeSize)
let instrs, _, lab2pc, raw2nextLab = seekReadTopCode ctxt pev mdv numtypars codeSize codeBase seqpoints
(* Convert the linear code format to the nested code format *)
@@ -3048,9 +3049,9 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int
let clauses =
if (sectionFlag &&& e_CorILMethod_Sect_EHTable) <> 0x0uy then
// WORKAROUND: The ECMA spec says this should be
- // let numClauses = ((bigSize - 4) / 24) in
+ // let numClauses = ((bigSize - 4) / 24) in
// but the CCI IL generator generates multiples of 24
- let numClauses = (bigSize / 24)
+ let numClauses = (bigSize / 24)
List.init numClauses (fun i ->
let clauseBase = sectionBase + 4 + (i * 24)
@@ -3068,9 +3069,9 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int
let clauses =
if (sectionFlag &&& e_CorILMethod_Sect_EHTable) <> 0x0uy then
// WORKAROUND: The ECMA spec says this should be
- // let numClauses = ((smallSize - 4) / 12) in
+ // let numClauses = ((smallSize - 4) / 12) in
// but the C# compiler (or some IL generator) generates multiples of 12
- let numClauses = (smallSize / 12)
+ let numClauses = (smallSize / 12)
// dprintn (nm+" has " + string numClauses + " tiny seh clauses")
List.init numClauses (fun i ->
let clauseBase = sectionBase + 4 + (i * 12)
@@ -3112,12 +3113,12 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int
ILExceptionClause.Finally(handlerStart, handlerFinish)
end
- let key = (tryStart, tryFinish)
+ let key = (tryStart, tryFinish)
match sehMap.TryGetValue(key) with
| true, prev -> sehMap.[key] <- prev @ [clause]
| _ -> sehMap.[key] <- [clause])
clauses
- ([], sehMap) ||> Seq.fold (fun acc (KeyValue(key, bs)) -> [ for b in bs -> {Range=key; Clause=b} : ILExceptionSpec ] @ acc)
+ ([], sehMap) ||> Seq.fold (fun acc (KeyValue(key, bs)) -> [ for b in bs -> {Range=key; Clause=b}: ILExceptionSpec ] @ acc)
seh := sehClauses
moreSections := (sectionFlag &&& e_CorILMethod_Sect_MoreSects) <> 0x0uy
nextSectionBase := sectionBase + sectionSize
@@ -3141,7 +3142,7 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int
if logging then failwith "unknown format"
MethodBody.Abstract)
-and int32AsILVariantType (ctxt: ILMetadataReader) (n:int32) =
+and int32AsILVariantType (ctxt: ILMetadataReader) (n: int32) =
if List.memAssoc n (Lazy.force ILVariantTypeRevMap) then
List.assoc n (Lazy.force ILVariantTypeRevMap)
elif (n &&& vt_ARRAY) <> 0x0 then ILNativeVariant.Array (int32AsILVariantType ctxt (n &&& (~~~ vt_ARRAY)))
@@ -3162,24 +3163,24 @@ and sigptrGetILNativeType ctxt bytes sigptr =
List.assoc ntbyte (Lazy.force ILNativeTypeMap), sigptr
elif ntbyte = 0x0uy then ILNativeType.Empty, sigptr
elif ntbyte = nt_CUSTOMMARSHALER then
- // reading native type blob (CM1) , sigptr= "+string sigptr+ ", bytes.Length = "+string bytes.Length)
+ // reading native type blob (CM1), sigptr= "+string sigptr+ ", bytes.Length = "+string bytes.Length)
let guidLen, sigptr = sigptrGetZInt32 bytes sigptr
- // reading native type blob (CM2) , sigptr= "+string sigptr+", guidLen = "+string ( guidLen))
+ // reading native type blob (CM2), sigptr= "+string sigptr+", guidLen = "+string ( guidLen))
let guid, sigptr = sigptrGetBytes ( guidLen) bytes sigptr
- // reading native type blob (CM3) , sigptr= "+string sigptr)
+ // reading native type blob (CM3), sigptr= "+string sigptr)
let nativeTypeNameLen, sigptr = sigptrGetZInt32 bytes sigptr
- // reading native type blob (CM4) , sigptr= "+string sigptr+", nativeTypeNameLen = "+string ( nativeTypeNameLen))
+ // reading native type blob (CM4), sigptr= "+string sigptr+", nativeTypeNameLen = "+string ( nativeTypeNameLen))
let nativeTypeName, sigptr = sigptrGetString ( nativeTypeNameLen) bytes sigptr
- // reading native type blob (CM4) , sigptr= "+string sigptr+", nativeTypeName = "+nativeTypeName)
- // reading native type blob (CM5) , sigptr= "+string sigptr)
+ // reading native type blob (CM4), sigptr= "+string sigptr+", nativeTypeName = "+nativeTypeName)
+ // reading native type blob (CM5), sigptr= "+string sigptr)
let custMarshallerNameLen, sigptr = sigptrGetZInt32 bytes sigptr
- // reading native type blob (CM6) , sigptr= "+string sigptr+", custMarshallerNameLen = "+string ( custMarshallerNameLen))
+ // reading native type blob (CM6), sigptr= "+string sigptr+", custMarshallerNameLen = "+string ( custMarshallerNameLen))
let custMarshallerName, sigptr = sigptrGetString ( custMarshallerNameLen) bytes sigptr
- // reading native type blob (CM7) , sigptr= "+string sigptr+", custMarshallerName = "+custMarshallerName)
+ // reading native type blob (CM7), sigptr= "+string sigptr+", custMarshallerName = "+custMarshallerName)
let cookieStringLen, sigptr = sigptrGetZInt32 bytes sigptr
- // reading native type blob (CM8) , sigptr= "+string sigptr+", cookieStringLen = "+string ( cookieStringLen))
+ // reading native type blob (CM8), sigptr= "+string sigptr+", cookieStringLen = "+string ( cookieStringLen))
let cookieString, sigptr = sigptrGetBytes ( cookieStringLen) bytes sigptr
- // reading native type blob (CM9) , sigptr= "+string sigptr)
+ // reading native type blob (CM9), sigptr= "+string sigptr)
ILNativeType.Custom (guid, nativeTypeName, custMarshallerName, cookieString), sigptr
elif ntbyte = nt_FIXEDSYSSTRING then
let i, sigptr = sigptrGetZInt32 bytes sigptr
@@ -3253,7 +3254,7 @@ and seekReadManifestResources (ctxt: ILMetadataReader) (mdv: BinaryView) (pectxt
MetadataIndex = i }
yield r ]
-and seekReadNestedExportedTypes ctxt (exported: _ array) (nested: Lazy<_ array>) parentIdx =
+and seekReadNestedExportedTypes ctxt (exported: _ []) (nested: Lazy<_ []>) parentIdx =
mkILNestedExportedTypesLazy
(lazy
nested.Force().[parentIdx-1]
@@ -3265,10 +3266,10 @@ and seekReadNestedExportedTypes ctxt (exported: _ array) (nested: Lazy<_ array>)
| _ -> failwith "non-nested access for a nested type described as being in an auxiliary module")
Nested = seekReadNestedExportedTypes ctxt exported nested i
CustomAttrsStored = ctxt.customAttrsReader_ExportedType
- MetadataIndex = i }
+ MetadataIndex = i }
))
-and seekReadTopExportedTypes (ctxt: ILMetadataReader) =
+and seekReadTopExportedTypes (ctxt: ILMetadataReader) =
mkILExportedTypesLazy
(lazy
let mdv = ctxt.mdfile.GetView()
@@ -3310,7 +3311,7 @@ let getPdbReader pdbDirPath fileName =
let pdbdocs = pdbReaderGetDocuments pdbr
let tab = new Dictionary<_, _>(Array.length pdbdocs)
- pdbdocs |> Array.iter (fun pdbdoc ->
+ pdbdocs |> Array.iter (fun pdbdoc ->
let url = pdbDocumentGetURL pdbdoc
tab.[url] <-
ILSourceDocument.Create(language=Some (pdbDocumentGetLanguage pdbdoc),
@@ -3366,13 +3367,13 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p
let findStream name =
match tryFindStream name with
| None -> (0x0, 0x0)
- | Some positions -> positions
+ | Some positions -> positions
let (tablesStreamPhysLoc, _tablesStreamSize) =
match tryFindStream [| 0x23; 0x7e |] (* #~ *) with
| Some res -> res
| None ->
- match tryFindStream [| 0x23; 0x2d |] (* #-: at least one DLL I've seen uses this! *) with
+ match tryFindStream [| 0x23; 0x2d |] (* #-: at least one DLL I've seen uses this! *) with
| Some res -> res
| None ->
let firstStreamOffset = seekReadInt32 mdv (streamHeadersStart + 0)
@@ -3385,70 +3386,70 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p
let (blobsStreamPhysicalLoc, blobsStreamSize) = findStream [| 0x23; 0x42; 0x6c; 0x6f; 0x62; |] (* #Blob *)
let tableKinds =
- [|kindModule (* Table 0 *)
- kindTypeRef (* Table 1 *)
- kindTypeDef (* Table 2 *)
- kindIllegal (* kindFieldPtr *) (* Table 3 *)
- kindFieldDef (* Table 4 *)
- kindIllegal (* kindMethodPtr *) (* Table 5 *)
- kindMethodDef (* Table 6 *)
- kindIllegal (* kindParamPtr *) (* Table 7 *)
- kindParam (* Table 8 *)
- kindInterfaceImpl (* Table 9 *)
- kindMemberRef (* Table 10 *)
- kindConstant (* Table 11 *)
- kindCustomAttribute (* Table 12 *)
- kindFieldMarshal (* Table 13 *)
- kindDeclSecurity (* Table 14 *)
- kindClassLayout (* Table 15 *)
- kindFieldLayout (* Table 16 *)
- kindStandAloneSig (* Table 17 *)
- kindEventMap (* Table 18 *)
- kindIllegal (* kindEventPtr *) (* Table 19 *)
- kindEvent (* Table 20 *)
- kindPropertyMap (* Table 21 *)
- kindIllegal (* kindPropertyPtr *) (* Table 22 *)
- kindProperty (* Table 23 *)
- kindMethodSemantics (* Table 24 *)
- kindMethodImpl (* Table 25 *)
- kindModuleRef (* Table 26 *)
- kindTypeSpec (* Table 27 *)
- kindImplMap (* Table 28 *)
- kindFieldRVA (* Table 29 *)
- kindIllegal (* kindENCLog *) (* Table 30 *)
- kindIllegal (* kindENCMap *) (* Table 31 *)
- kindAssembly (* Table 32 *)
- kindIllegal (* kindAssemblyProcessor *) (* Table 33 *)
- kindIllegal (* kindAssemblyOS *) (* Table 34 *)
- kindAssemblyRef (* Table 35 *)
+ [|kindModule (* Table 0 *)
+ kindTypeRef (* Table 1 *)
+ kindTypeDef (* Table 2 *)
+ kindIllegal (* kindFieldPtr *) (* Table 3 *)
+ kindFieldDef (* Table 4 *)
+ kindIllegal (* kindMethodPtr *) (* Table 5 *)
+ kindMethodDef (* Table 6 *)
+ kindIllegal (* kindParamPtr *) (* Table 7 *)
+ kindParam (* Table 8 *)
+ kindInterfaceImpl (* Table 9 *)
+ kindMemberRef (* Table 10 *)
+ kindConstant (* Table 11 *)
+ kindCustomAttribute (* Table 12 *)
+ kindFieldMarshal (* Table 13 *)
+ kindDeclSecurity (* Table 14 *)
+ kindClassLayout (* Table 15 *)
+ kindFieldLayout (* Table 16 *)
+ kindStandAloneSig (* Table 17 *)
+ kindEventMap (* Table 18 *)
+ kindIllegal (* kindEventPtr *) (* Table 19 *)
+ kindEvent (* Table 20 *)
+ kindPropertyMap (* Table 21 *)
+ kindIllegal (* kindPropertyPtr *) (* Table 22 *)
+ kindProperty (* Table 23 *)
+ kindMethodSemantics (* Table 24 *)
+ kindMethodImpl (* Table 25 *)
+ kindModuleRef (* Table 26 *)
+ kindTypeSpec (* Table 27 *)
+ kindImplMap (* Table 28 *)
+ kindFieldRVA (* Table 29 *)
+ kindIllegal (* kindENCLog *) (* Table 30 *)
+ kindIllegal (* kindENCMap *) (* Table 31 *)
+ kindAssembly (* Table 32 *)
+ kindIllegal (* kindAssemblyProcessor *) (* Table 33 *)
+ kindIllegal (* kindAssemblyOS *) (* Table 34 *)
+ kindAssemblyRef (* Table 35 *)
kindIllegal (* kindAssemblyRefProcessor *) (* Table 36 *)
- kindIllegal (* kindAssemblyRefOS *) (* Table 37 *)
- kindFileRef (* Table 38 *)
- kindExportedType (* Table 39 *)
- kindManifestResource (* Table 40 *)
- kindNested (* Table 41 *)
- kindGenericParam_v2_0 (* Table 42 *)
- kindMethodSpec (* Table 43 *)
- kindGenericParamConstraint (* Table 44 *)
- kindIllegal (* Table 45 *)
- kindIllegal (* Table 46 *)
- kindIllegal (* Table 47 *)
- kindIllegal (* Table 48 *)
- kindIllegal (* Table 49 *)
- kindIllegal (* Table 50 *)
- kindIllegal (* Table 51 *)
- kindIllegal (* Table 52 *)
- kindIllegal (* Table 53 *)
- kindIllegal (* Table 54 *)
- kindIllegal (* Table 55 *)
- kindIllegal (* Table 56 *)
- kindIllegal (* Table 57 *)
- kindIllegal (* Table 58 *)
- kindIllegal (* Table 59 *)
- kindIllegal (* Table 60 *)
- kindIllegal (* Table 61 *)
- kindIllegal (* Table 62 *)
- kindIllegal (* Table 63 *)
+ kindIllegal (* kindAssemblyRefOS *) (* Table 37 *)
+ kindFileRef (* Table 38 *)
+ kindExportedType (* Table 39 *)
+ kindManifestResource (* Table 40 *)
+ kindNested (* Table 41 *)
+ kindGenericParam_v2_0 (* Table 42 *)
+ kindMethodSpec (* Table 43 *)
+ kindGenericParamConstraint (* Table 44 *)
+ kindIllegal (* Table 45 *)
+ kindIllegal (* Table 46 *)
+ kindIllegal (* Table 47 *)
+ kindIllegal (* Table 48 *)
+ kindIllegal (* Table 49 *)
+ kindIllegal (* Table 50 *)
+ kindIllegal (* Table 51 *)
+ kindIllegal (* Table 52 *)
+ kindIllegal (* Table 53 *)
+ kindIllegal (* Table 54 *)
+ kindIllegal (* Table 55 *)
+ kindIllegal (* Table 56 *)
+ kindIllegal (* Table 57 *)
+ kindIllegal (* Table 58 *)
+ kindIllegal (* Table 59 *)
+ kindIllegal (* Table 60 *)
+ kindIllegal (* Table 61 *)
+ kindIllegal (* Table 62 *)
+ kindIllegal (* Table 63 *)
|]
let heapSizes = seekReadByteAsInt32 mdv (tablesStreamPhysLoc + 6)
@@ -3459,13 +3460,13 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p
let numRows = Array.create 64 0
let prevNumRowIdx = ref (tablesStreamPhysLoc + 24)
for i = 0 to 63 do
- if (valid &&& (int64 1 <<< i)) <> int64 0 then
+ if (valid &&& (int64 1 <<< i)) <> int64 0 then
present := i :: !present
- numRows.[i] <- (seekReadInt32 mdv !prevNumRowIdx)
+ numRows.[i] <- (seekReadInt32 mdv !prevNumRowIdx)
prevNumRowIdx := !prevNumRowIdx + 4
List.rev !present, numRows, !prevNumRowIdx
- let getNumRows (tab:TableName) = tableRowCount.[tab.Index]
+ let getNumRows (tab: TableName) = tableRowCount.[tab.Index]
let numTables = tablesPresent.Length
let stringsBigness = (heapSizes &&& 1) <> 0
let guidsBigness = (heapSizes &&& 2) <> 0
@@ -3498,7 +3499,7 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p
let hcaBigness =
codedBigness 5 TableNames.Method ||
codedBigness 5 TableNames.Field ||
- codedBigness 5 TableNames.TypeRef ||
+ codedBigness 5 TableNames.TypeRef ||
codedBigness 5 TableNames.TypeDef ||
codedBigness 5 TableNames.Param ||
codedBigness 5 TableNames.InterfaceImpl ||
@@ -3559,7 +3560,7 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p
let rsBigness =
codedBigness 2 TableNames.Module ||
codedBigness 2 TableNames.ModuleRef ||
- codedBigness 2 TableNames.AssemblyRef ||
+ codedBigness 2 TableNames.AssemblyRef ||
codedBigness 2 TableNames.TypeRef
let rowKindSize (RowKind kinds) =
@@ -3570,20 +3571,20 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p
| Byte -> 1
| Data -> 4
| GGuid -> (if guidsBigness then 4 else 2)
- | Blob -> (if blobsBigness then 4 else 2)
- | SString -> (if stringsBigness then 4 else 2)
+ | Blob -> (if blobsBigness then 4 else 2)
+ | SString -> (if stringsBigness then 4 else 2)
| SimpleIndex tab -> (if tableBigness.[tab.Index] then 4 else 2)
| TypeDefOrRefOrSpec -> (if tdorBigness then 4 else 2)
| TypeOrMethodDef -> (if tomdBigness then 4 else 2)
- | HasConstant -> (if hcBigness then 4 else 2)
+ | HasConstant -> (if hcBigness then 4 else 2)
| HasCustomAttribute -> (if hcaBigness then 4 else 2)
- | HasFieldMarshal -> (if hfmBigness then 4 else 2)
- | HasDeclSecurity -> (if hdsBigness then 4 else 2)
- | MemberRefParent -> (if mrpBigness then 4 else 2)
- | HasSemantics -> (if hsBigness then 4 else 2)
+ | HasFieldMarshal -> (if hfmBigness then 4 else 2)
+ | HasDeclSecurity -> (if hdsBigness then 4 else 2)
+ | MemberRefParent -> (if mrpBigness then 4 else 2)
+ | HasSemantics -> (if hsBigness then 4 else 2)
| MethodDefOrRef -> (if mdorBigness then 4 else 2)
| MemberForwarded -> (if mfBigness then 4 else 2)
- | Implementation -> (if iBigness then 4 else 2)
+ | Implementation -> (if iBigness then 4 else 2)
| CustomAttributeType -> (if catBigness then 4 else 2)
| ResolutionScope -> (if rsBigness then 4 else 2))
@@ -3599,40 +3600,40 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p
let inbase = Filename.fileNameOfPath fileName + ": "
- // All the caches. The sizes are guesstimates for the rough sharing-density of the assembly
- let cacheAssemblyRef = mkCacheInt32 reduceMemoryUsage inbase "ILAssemblyRef" (getNumRows TableNames.AssemblyRef)
- let cacheMethodSpecAsMethodData = mkCacheGeneric reduceMemoryUsage inbase "MethodSpecAsMethodData" (getNumRows TableNames.MethodSpec / 20 + 1)
- let cacheMemberRefAsMemberData = mkCacheGeneric reduceMemoryUsage inbase "MemberRefAsMemberData" (getNumRows TableNames.MemberRef / 20 + 1)
- let cacheCustomAttr = mkCacheGeneric reduceMemoryUsage inbase "CustomAttr" (getNumRows TableNames.CustomAttribute / 50 + 1)
- let cacheTypeRef = mkCacheInt32 reduceMemoryUsage inbase "ILTypeRef" (getNumRows TableNames.TypeRef / 20 + 1)
- let cacheTypeRefAsType = mkCacheGeneric reduceMemoryUsage inbase "TypeRefAsType" (getNumRows TableNames.TypeRef / 20 + 1)
- let cacheBlobHeapAsPropertySig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsPropertySig" (getNumRows TableNames.Property / 20 + 1)
- let cacheBlobHeapAsFieldSig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsFieldSig" (getNumRows TableNames.Field / 20 + 1)
- let cacheBlobHeapAsMethodSig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsMethodSig" (getNumRows TableNames.Method / 20 + 1)
- let cacheTypeDefAsType = mkCacheGeneric reduceMemoryUsage inbase "TypeDefAsType" (getNumRows TableNames.TypeDef / 20 + 1)
- let cacheMethodDefAsMethodData = mkCacheInt32 reduceMemoryUsage inbase "MethodDefAsMethodData" (getNumRows TableNames.Method / 20 + 1)
- let cacheGenericParams = mkCacheGeneric reduceMemoryUsage inbase "GenericParams" (getNumRows TableNames.GenericParam / 20 + 1)
- let cacheFieldDefAsFieldSpec = mkCacheInt32 reduceMemoryUsage inbase "FieldDefAsFieldSpec" (getNumRows TableNames.Field / 20 + 1)
- let cacheUserStringHeap = mkCacheInt32 reduceMemoryUsage inbase "UserStringHeap" ( userStringsStreamSize / 20 + 1)
+ // All the caches. The sizes are guesstimates for the rough sharing-density of the assembly
+ let cacheAssemblyRef = mkCacheInt32 reduceMemoryUsage inbase "ILAssemblyRef" (getNumRows TableNames.AssemblyRef)
+ let cacheMethodSpecAsMethodData = mkCacheGeneric reduceMemoryUsage inbase "MethodSpecAsMethodData" (getNumRows TableNames.MethodSpec / 20 + 1)
+ let cacheMemberRefAsMemberData = mkCacheGeneric reduceMemoryUsage inbase "MemberRefAsMemberData" (getNumRows TableNames.MemberRef / 20 + 1)
+ let cacheCustomAttr = mkCacheGeneric reduceMemoryUsage inbase "CustomAttr" (getNumRows TableNames.CustomAttribute / 50 + 1)
+ let cacheTypeRef = mkCacheInt32 reduceMemoryUsage inbase "ILTypeRef" (getNumRows TableNames.TypeRef / 20 + 1)
+ let cacheTypeRefAsType = mkCacheGeneric reduceMemoryUsage inbase "TypeRefAsType" (getNumRows TableNames.TypeRef / 20 + 1)
+ let cacheBlobHeapAsPropertySig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsPropertySig" (getNumRows TableNames.Property / 20 + 1)
+ let cacheBlobHeapAsFieldSig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsFieldSig" (getNumRows TableNames.Field / 20 + 1)
+ let cacheBlobHeapAsMethodSig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsMethodSig" (getNumRows TableNames.Method / 20 + 1)
+ let cacheTypeDefAsType = mkCacheGeneric reduceMemoryUsage inbase "TypeDefAsType" (getNumRows TableNames.TypeDef / 20 + 1)
+ let cacheMethodDefAsMethodData = mkCacheInt32 reduceMemoryUsage inbase "MethodDefAsMethodData" (getNumRows TableNames.Method / 20 + 1)
+ let cacheGenericParams = mkCacheGeneric reduceMemoryUsage inbase "GenericParams" (getNumRows TableNames.GenericParam / 20 + 1)
+ let cacheFieldDefAsFieldSpec = mkCacheInt32 reduceMemoryUsage inbase "FieldDefAsFieldSpec" (getNumRows TableNames.Field / 20 + 1)
+ let cacheUserStringHeap = mkCacheInt32 reduceMemoryUsage inbase "UserStringHeap" ( userStringsStreamSize / 20 + 1)
// nb. Lots and lots of cache hits on this cache, hence never optimize cache away
- let cacheStringHeap = mkCacheInt32 false inbase "string heap" ( stringsStreamSize / 50 + 1)
- let cacheBlobHeap = mkCacheInt32 reduceMemoryUsage inbase "blob heap" ( blobsStreamSize / 50 + 1)
+ let cacheStringHeap = mkCacheInt32 false inbase "string heap" ( stringsStreamSize / 50 + 1)
+ let cacheBlobHeap = mkCacheInt32 reduceMemoryUsage inbase "blob heap" ( blobsStreamSize / 50 + 1)
// These tables are not required to enforce sharing fo the final data
// structure, but are very useful as searching these tables gives rise to many reads
// in standard applications.
- let cacheNestedRow = mkCacheInt32 reduceMemoryUsage inbase "Nested Table Rows" (getNumRows TableNames.Nested / 20 + 1)
- let cacheConstantRow = mkCacheInt32 reduceMemoryUsage inbase "Constant Rows" (getNumRows TableNames.Constant / 20 + 1)
+ let cacheNestedRow = mkCacheInt32 reduceMemoryUsage inbase "Nested Table Rows" (getNumRows TableNames.Nested / 20 + 1)
+ let cacheConstantRow = mkCacheInt32 reduceMemoryUsage inbase "Constant Rows" (getNumRows TableNames.Constant / 20 + 1)
let cacheMethodSemanticsRow = mkCacheInt32 reduceMemoryUsage inbase "MethodSemantics Rows" (getNumRows TableNames.MethodSemantics / 20 + 1)
- let cacheTypeDefRow = mkCacheInt32 reduceMemoryUsage inbase "ILTypeDef Rows" (getNumRows TableNames.TypeDef / 20 + 1)
+ let cacheTypeDefRow = mkCacheInt32 reduceMemoryUsage inbase "ILTypeDef Rows" (getNumRows TableNames.TypeDef / 20 + 1)
- let rowAddr (tab:TableName) idx = tablePhysLocations.[tab.Index] + (idx - 1) * tableRowSizes.[tab.Index]
+ let rowAddr (tab: TableName) idx = tablePhysLocations.[tab.Index] + (idx - 1) * tableRowSizes.[tab.Index]
// Build the reader context
// Use an initialization hole
let ctxtH = ref None
- let ctxt : ILMetadataReader =
+ let ctxt: ILMetadataReader =
{ ilg=ilGlobals
sorted=sorted
getNumRows=getNumRows
@@ -3641,33 +3642,33 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p
pectxtCaptured=pectxtCaptured
entryPointToken=pectxtEager.entryPointToken
fileName=fileName
- userStringsStreamPhysicalLoc = userStringsStreamPhysicalLoc
- stringsStreamPhysicalLoc = stringsStreamPhysicalLoc
- blobsStreamPhysicalLoc = blobsStreamPhysicalLoc
- blobsStreamSize = blobsStreamSize
- memoizeString = Tables.memoize id
- readUserStringHeap = cacheUserStringHeap (readUserStringHeapUncached ctxtH)
- readStringHeap = cacheStringHeap (readStringHeapUncached ctxtH)
- readBlobHeap = cacheBlobHeap (readBlobHeapUncached ctxtH)
- seekReadNestedRow = cacheNestedRow (seekReadNestedRowUncached ctxtH)
- seekReadConstantRow = cacheConstantRow (seekReadConstantRowUncached ctxtH)
- seekReadMethodSemanticsRow = cacheMethodSemanticsRow (seekReadMethodSemanticsRowUncached ctxtH)
- seekReadTypeDefRow = cacheTypeDefRow (seekReadTypeDefRowUncached ctxtH)
- seekReadAssemblyRef = cacheAssemblyRef (seekReadAssemblyRefUncached ctxtH)
- seekReadMethodSpecAsMethodData = cacheMethodSpecAsMethodData (seekReadMethodSpecAsMethodDataUncached ctxtH)
- seekReadMemberRefAsMethodData = cacheMemberRefAsMemberData (seekReadMemberRefAsMethodDataUncached ctxtH)
- seekReadMemberRefAsFieldSpec = seekReadMemberRefAsFieldSpecUncached ctxtH
- seekReadCustomAttr = cacheCustomAttr (seekReadCustomAttrUncached ctxtH)
- seekReadTypeRef = cacheTypeRef (seekReadTypeRefUncached ctxtH)
- readBlobHeapAsPropertySig = cacheBlobHeapAsPropertySig (readBlobHeapAsPropertySigUncached ctxtH)
- readBlobHeapAsFieldSig = cacheBlobHeapAsFieldSig (readBlobHeapAsFieldSigUncached ctxtH)
- readBlobHeapAsMethodSig = cacheBlobHeapAsMethodSig (readBlobHeapAsMethodSigUncached ctxtH)
- readBlobHeapAsLocalsSig = readBlobHeapAsLocalsSigUncached ctxtH
- seekReadTypeDefAsType = cacheTypeDefAsType (seekReadTypeDefAsTypeUncached ctxtH)
- seekReadTypeRefAsType = cacheTypeRefAsType (seekReadTypeRefAsTypeUncached ctxtH)
- seekReadMethodDefAsMethodData = cacheMethodDefAsMethodData (seekReadMethodDefAsMethodDataUncached ctxtH)
- seekReadGenericParams = cacheGenericParams (seekReadGenericParamsUncached ctxtH)
- seekReadFieldDefAsFieldSpec = cacheFieldDefAsFieldSpec (seekReadFieldDefAsFieldSpecUncached ctxtH)
+ userStringsStreamPhysicalLoc = userStringsStreamPhysicalLoc
+ stringsStreamPhysicalLoc = stringsStreamPhysicalLoc
+ blobsStreamPhysicalLoc = blobsStreamPhysicalLoc
+ blobsStreamSize = blobsStreamSize
+ memoizeString = Tables.memoize id
+ readUserStringHeap = cacheUserStringHeap (readUserStringHeapUncached ctxtH)
+ readStringHeap = cacheStringHeap (readStringHeapUncached ctxtH)
+ readBlobHeap = cacheBlobHeap (readBlobHeapUncached ctxtH)
+ seekReadNestedRow = cacheNestedRow (seekReadNestedRowUncached ctxtH)
+ seekReadConstantRow = cacheConstantRow (seekReadConstantRowUncached ctxtH)
+ seekReadMethodSemanticsRow = cacheMethodSemanticsRow (seekReadMethodSemanticsRowUncached ctxtH)
+ seekReadTypeDefRow = cacheTypeDefRow (seekReadTypeDefRowUncached ctxtH)
+ seekReadAssemblyRef = cacheAssemblyRef (seekReadAssemblyRefUncached ctxtH)
+ seekReadMethodSpecAsMethodData = cacheMethodSpecAsMethodData (seekReadMethodSpecAsMethodDataUncached ctxtH)
+ seekReadMemberRefAsMethodData = cacheMemberRefAsMemberData (seekReadMemberRefAsMethodDataUncached ctxtH)
+ seekReadMemberRefAsFieldSpec = seekReadMemberRefAsFieldSpecUncached ctxtH
+ seekReadCustomAttr = cacheCustomAttr (seekReadCustomAttrUncached ctxtH)
+ seekReadTypeRef = cacheTypeRef (seekReadTypeRefUncached ctxtH)
+ readBlobHeapAsPropertySig = cacheBlobHeapAsPropertySig (readBlobHeapAsPropertySigUncached ctxtH)
+ readBlobHeapAsFieldSig = cacheBlobHeapAsFieldSig (readBlobHeapAsFieldSigUncached ctxtH)
+ readBlobHeapAsMethodSig = cacheBlobHeapAsMethodSig (readBlobHeapAsMethodSigUncached ctxtH)
+ readBlobHeapAsLocalsSig = readBlobHeapAsLocalsSigUncached ctxtH
+ seekReadTypeDefAsType = cacheTypeDefAsType (seekReadTypeDefAsTypeUncached ctxtH)
+ seekReadTypeRefAsType = cacheTypeRefAsType (seekReadTypeRefAsTypeUncached ctxtH)
+ seekReadMethodDefAsMethodData = cacheMethodDefAsMethodData (seekReadMethodDefAsMethodDataUncached ctxtH)
+ seekReadGenericParams = cacheGenericParams (seekReadGenericParamsUncached ctxtH)
+ seekReadFieldDefAsFieldSpec = cacheFieldDefAsFieldSpec (seekReadFieldDefAsFieldSpecUncached ctxtH)
customAttrsReader_Module = customAttrsReader ctxtH hca_Module
customAttrsReader_Assembly = customAttrsReader ctxtH hca_Assembly
customAttrsReader_TypeDef = customAttrsReader ctxtH hca_TypeDef
@@ -3723,17 +3724,17 @@ let openPEFileReader (fileName, pefile: BinaryFile, pdbDirPath, noFileOnDisk) =
let peFileHeaderPhysLoc = peSignaturePhysLoc + 0x04
let peOptionalHeaderPhysLoc = peFileHeaderPhysLoc + 0x14
let peSignature = seekReadInt32 pev (peSignaturePhysLoc + 0)
- if peSignature <> 0x4550 then failwithf "not a PE file - bad magic PE number 0x%08x, is = %A" peSignature pev
+ if peSignature <> 0x4550 then failwithf "not a PE file - bad magic PE number 0x%08x, is = %A" peSignature pev
(* PE SIGNATURE *)
let machine = seekReadUInt16AsInt32 pev (peFileHeaderPhysLoc + 0)
let numSections = seekReadUInt16AsInt32 pev (peFileHeaderPhysLoc + 2)
let optHeaderSize = seekReadUInt16AsInt32 pev (peFileHeaderPhysLoc + 16)
- if optHeaderSize <> 0xe0 &&
+ if optHeaderSize <> 0xe0 &&
optHeaderSize <> 0xf0 then failwith "not a PE file - bad optional header size"
let x64adjust = optHeaderSize - 0xe0
- let only64 = (optHeaderSize = 0xf0) (* May want to read in the optional header Magic number and check that as well... *)
+ let only64 = (optHeaderSize = 0xf0) (* May want to read in the optional header Magic number and check that as well... *)
let platform = match machine with | 0x8664 -> Some(AMD64) | 0x200 -> Some(IA64) | _ -> Some(X86)
let sectionHeadersStartPhysLoc = peOptionalHeaderPhysLoc + optHeaderSize
@@ -3741,30 +3742,30 @@ let openPEFileReader (fileName, pefile: BinaryFile, pdbDirPath, noFileOnDisk) =
let isDll = (flags &&& 0x2000) <> 0x0
(* OPTIONAL PE HEADER *)
- let _textPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 4) (* Size of the code (text) section, or the sum of all code sections if there are multiple sections. *)
+ let _textPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 4) (* Size of the code (text) section, or the sum of all code sections if there are multiple sections. *)
(* x86: 000000a0 *)
- let _initdataPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 8) (* Size of the initialized data section, or the sum of all such sections if there are multiple data sections. *)
+ let _initdataPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 8) (* Size of the initialized data section, or the sum of all such sections if there are multiple data sections. *)
let _uninitdataPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 12) (* Size of the uninitialized data section, or the sum of all such sections if there are multiple data sections. *)
- let _entrypointAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 16) (* RVA of entry point , needs to point to bytes 0xFF 0x25 followed by the RVA+!0x4000000 in a section marked execute/read for EXEs or 0 for DLLs e.g. 0x0000b57e *)
- let _textAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 20) (* e.g. 0x0002000 *)
+ let _entrypointAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 16) (* RVA of entry point, needs to point to bytes 0xFF 0x25 followed by the RVA+!0x4000000 in a section marked execute/read for EXEs or 0 for DLLs e.g. 0x0000b57e *)
+ let _textAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 20) (* e.g. 0x0002000 *)
(* x86: 000000b0 *)
- let dataSegmentAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 24) (* e.g. 0x0000c000 *)
- (* REVIEW: For now, we'll use the DWORD at offset 24 for x64. This currently ok since fsc doesn't support true 64-bit image bases,
+ let dataSegmentAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 24) (* e.g. 0x0000c000 *)
+ (* REVIEW: For now, we'll use the DWORD at offset 24 for x64. This currently ok since fsc doesn't support true 64-bit image bases,
but we'll have to fix this up when such support is added. *)
let imageBaseReal = if only64 then dataSegmentAddr else seekReadInt32 pev (peOptionalHeaderPhysLoc + 28) // Image Base Always 0x400000 (see Section 23.1).
- let alignVirt = seekReadInt32 pev (peOptionalHeaderPhysLoc + 32) // Section Alignment Always 0x2000 (see Section 23.1).
- let alignPhys = seekReadInt32 pev (peOptionalHeaderPhysLoc + 36) // File Alignment Either 0x200 or 0x1000.
+ let alignVirt = seekReadInt32 pev (peOptionalHeaderPhysLoc + 32) // Section Alignment Always 0x2000 (see Section 23.1).
+ let alignPhys = seekReadInt32 pev (peOptionalHeaderPhysLoc + 36) // File Alignment Either 0x200 or 0x1000.
(* x86: 000000c0 *)
- let _osMajor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 40) // OS Major Always 4 (see Section 23.1).
- let _osMinor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 42) // OS Minor Always 0 (see Section 23.1).
- let _userMajor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 44) // User Major Always 0 (see Section 23.1).
- let _userMinor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 46) // User Minor Always 0 (see Section 23.1).
+ let _osMajor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 40) // OS Major Always 4 (see Section 23.1).
+ let _osMinor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 42) // OS Minor Always 0 (see Section 23.1).
+ let _userMajor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 44) // User Major Always 0 (see Section 23.1).
+ let _userMinor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 46) // User Minor Always 0 (see Section 23.1).
let subsysMajor = seekReadUInt16AsInt32 pev (peOptionalHeaderPhysLoc + 48) // SubSys Major Always 4 (see Section 23.1).
let subsysMinor = seekReadUInt16AsInt32 pev (peOptionalHeaderPhysLoc + 50) // SubSys Minor Always 0 (see Section 23.1).
(* x86: 000000d0 *)
- let _imageEndAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 56) // Image Size: Size, in bytes, of image, including all headers and padding
+ let _imageEndAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 56) // Image Size: Size, in bytes, of image, including all headers and padding
let _headerPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 60) // Header Size Combined size of MS-DOS Header, PE Header, PE Optional Header and padding
- let subsys = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 68) // SubSystem Subsystem required to run this image.
+ let subsys = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 68) // SubSystem Subsystem required to run this image.
let useHighEnthropyVA =
let n = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 70)
let highEnthropyVA = 0x20us
@@ -3773,29 +3774,29 @@ let openPEFileReader (fileName, pefile: BinaryFile, pdbDirPath, noFileOnDisk) =
(* x86: 000000e0 *)
(* WARNING: THESE ARE 64 bit ON x64/ia64 *)
- (* REVIEW: If we ever decide that we need these values for x64, we'll have to read them in as 64bit and fix up the rest of the offsets.
+ (* REVIEW: If we ever decide that we need these values for x64, we'll have to read them in as 64bit and fix up the rest of the offsets.
Then again, it should suffice to just use the defaults, and still not bother... *)
- (* let stackReserve = seekReadInt32 is (peOptionalHeaderPhysLoc + 72) in *) (* Stack Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *)
- (* let stackCommit = seekReadInt32 is (peOptionalHeaderPhysLoc + 76) in *) (* Stack Commit Size Always 0x1000 (4Kb) (see Section 23.1). *)
- (* let heapReserve = seekReadInt32 is (peOptionalHeaderPhysLoc + 80) in *) (* Heap Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *)
- (* let heapCommit = seekReadInt32 is (peOptionalHeaderPhysLoc + 84) in *) (* Heap Commit Size Always 0x1000 (4Kb) (see Section 23.1). *)
+ (* let stackReserve = seekReadInt32 is (peOptionalHeaderPhysLoc + 72) in *) (* Stack Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *)
+ (* let stackCommit = seekReadInt32 is (peOptionalHeaderPhysLoc + 76) in *) (* Stack Commit Size Always 0x1000 (4Kb) (see Section 23.1). *)
+ (* let heapReserve = seekReadInt32 is (peOptionalHeaderPhysLoc + 80) in *) (* Heap Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *)
+ (* let heapCommit = seekReadInt32 is (peOptionalHeaderPhysLoc + 84) in *) (* Heap Commit Size Always 0x1000 (4Kb) (see Section 23.1). *)
(* x86: 000000f0, x64: 00000100 *)
- let _numDataDirectories = seekReadInt32 pev (peOptionalHeaderPhysLoc + 92 + x64adjust) (* Number of Data Directories: Always 0x10 (see Section 23.1). *)
+ let _numDataDirectories = seekReadInt32 pev (peOptionalHeaderPhysLoc + 92 + x64adjust) (* Number of Data Directories: Always 0x10 (see Section 23.1). *)
(* 00000100 - these addresses are for x86 - for the x64 location, add x64adjust (0x10) *)
- let _importTableAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 104 + x64adjust) (* Import Table RVA of Import Table, (see clause 24.3.1). e.g. 0000b530 *)
- let _importTableSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 108 + x64adjust) (* Size of Import Table, (see clause 24.3.1). *)
+ let _importTableAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 104 + x64adjust) (* Import Table RVA of Import Table, (see clause 24.3.1). e.g. 0000b530 *)
+ let _importTableSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 108 + x64adjust) (* Size of Import Table, (see clause 24.3.1). *)
let nativeResourcesAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 112 + x64adjust)
let nativeResourcesSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 116 + x64adjust)
(* 00000110 *)
(* 00000120 *)
- (* let base_relocTableNames.addr = seekReadInt32 is (peOptionalHeaderPhysLoc + 136)
- let base_relocTableNames.size = seekReadInt32 is (peOptionalHeaderPhysLoc + 140) in *)
+ (* let base_relocTableNames.addr = seekReadInt32 is (peOptionalHeaderPhysLoc + 136)
+ let base_relocTableNames.size = seekReadInt32 is (peOptionalHeaderPhysLoc + 140) in *)
(* 00000130 *)
(* 00000140 *)
(* 00000150 *)
- let _importAddrTableAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 192 + x64adjust) (* RVA of Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *)
- let _importAddrTableSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 196 + x64adjust) (* Size of Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *)
+ let _importAddrTableAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 192 + x64adjust) (* RVA of Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *)
+ let _importAddrTableSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 196 + x64adjust) (* Size of Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *)
(* 00000160 *)
let cliHeaderAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 208 + x64adjust)
let _cliHeaderSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 212 + x64adjust)
@@ -3824,7 +3825,7 @@ let openPEFileReader (fileName, pefile: BinaryFile, pdbDirPath, noFileOnDisk) =
let textHeaderStart = findSectionHeader cliHeaderAddr
let dataHeaderStart = findSectionHeader dataSegmentAddr
- (* let relocHeaderStart = findSectionHeader base_relocTableNames.addr in *)
+ (* let relocHeaderStart = findSectionHeader base_relocTableNames.addr in *)
let _textSize = if textHeaderStart = 0x0 then 0x0 else seekReadInt32 pev (textHeaderStart + 8)
let _textAddr = if textHeaderStart = 0x0 then 0x0 else seekReadInt32 pev (textHeaderStart + 12)
@@ -3852,21 +3853,21 @@ let openPEFileReader (fileName, pefile: BinaryFile, pdbDirPath, noFileOnDisk) =
let _majorRuntimeVersion = seekReadUInt16 pev (cliHeaderPhysLoc + 4)
let _minorRuntimeVersion = seekReadUInt16 pev (cliHeaderPhysLoc + 6)
- let metadataAddr = seekReadInt32 pev (cliHeaderPhysLoc + 8)
- let metadataSize = seekReadInt32 pev (cliHeaderPhysLoc + 12)
- let cliFlags = seekReadInt32 pev (cliHeaderPhysLoc + 16)
+ let metadataAddr = seekReadInt32 pev (cliHeaderPhysLoc + 8)
+ let metadataSize = seekReadInt32 pev (cliHeaderPhysLoc + 12)
+ let cliFlags = seekReadInt32 pev (cliHeaderPhysLoc + 16)
- let ilOnly = (cliFlags &&& 0x01) <> 0x00
- let only32 = (cliFlags &&& 0x02) <> 0x00
- let is32bitpreferred = (cliFlags &&& 0x00020003) <> 0x00
- let _strongnameSigned = (cliFlags &&& 0x08) <> 0x00
- let _trackdebugdata = (cliFlags &&& 0x010000) <> 0x00
+ let ilOnly = (cliFlags &&& 0x01) <> 0x00
+ let only32 = (cliFlags &&& 0x02) <> 0x00
+ let is32bitpreferred = (cliFlags &&& 0x00020003) <> 0x00
+ let _strongnameSigned = (cliFlags &&& 0x08) <> 0x00
+ let _trackdebugdata = (cliFlags &&& 0x010000) <> 0x00
let entryPointToken = seekReadUncodedToken pev (cliHeaderPhysLoc + 20)
- let resourcesAddr = seekReadInt32 pev (cliHeaderPhysLoc + 24)
- let resourcesSize = seekReadInt32 pev (cliHeaderPhysLoc + 28)
- let strongnameAddr = seekReadInt32 pev (cliHeaderPhysLoc + 32)
- let _strongnameSize = seekReadInt32 pev (cliHeaderPhysLoc + 36)
+ let resourcesAddr = seekReadInt32 pev (cliHeaderPhysLoc + 24)
+ let resourcesSize = seekReadInt32 pev (cliHeaderPhysLoc + 28)
+ let strongnameAddr = seekReadInt32 pev (cliHeaderPhysLoc + 32)
+ let _strongnameSize = seekReadInt32 pev (cliHeaderPhysLoc + 36)
let vtableFixupsAddr = seekReadInt32 pev (cliHeaderPhysLoc + 40)
let _vtableFixupsSize = seekReadInt32 pev (cliHeaderPhysLoc + 44)
@@ -3890,7 +3891,7 @@ let openPEFileReader (fileName, pefile: BinaryFile, pdbDirPath, noFileOnDisk) =
getPdbReader pdbDirPath fileName
#endif
- let pectxt : PEReader =
+ let pectxt: PEReader =
{ pdb=pdb
textSegmentPhysicalLoc=textSegmentPhysicalLoc
textSegmentPhysicalSize=textSegmentPhysicalSize
@@ -3948,11 +3949,11 @@ type ILReaderOptions =
type ILModuleReader =
- abstract ILModuleDef : ILModuleDef
- abstract ILAssemblyRefs : ILAssemblyRef list
+ abstract ILModuleDef: ILModuleDef
+ abstract ILAssemblyRefs: ILAssemblyRef list
/// ILModuleReader objects only need to be explicitly disposed if memory mapping is used, i.e. reduceMemoryUsage = false
- inherit System.IDisposable
+ inherit System.IDisposable
[]
@@ -4043,7 +4044,7 @@ let OpenILModuleReader fileName opts =
let mdfileOpt =
match opts.tryGetMetadataSnapshot (fullPath, writeStamp) with
| Some (obj, start, len) -> Some (RawMemoryFile(fullPath, obj, start, len) :> BinaryFile)
- | None -> None
+ | None -> None
// For metadata-only, always use a temporary, short-lived PE file reader, preferably over a memory mapped file.
// Then use the metadata blob as the long-lived memory resource.
@@ -4080,7 +4081,7 @@ let OpenILModuleReader fileName opts =
// whole binary for the command-line compiler: address space is rarely an issue.
//
// We do however care about avoiding locks on files that prevent their deletion during a
- // multi-proc build. So use memory mapping, but only for stable files. Other files
+ // multi-proc build. So use memory mapping, but only for stable files. Other files
// still use an in-memory ByteFile
let _disposer, pefile =
if alwaysMemoryMapFSC || stableFileHeuristicApplies fullPath then
@@ -4093,7 +4094,7 @@ let OpenILModuleReader fileName opts =
let ilModule, ilAssemblyRefs, pdb = openPE (fullPath, pefile, opts.pdbDirPath, reduceMemoryUsage, opts.ilGlobals, false)
let ilModuleReader = new ILModuleReaderImpl(ilModule, ilAssemblyRefs, (fun () -> ClosePdbReader pdb))
- // Readers with PDB reader disposal logic don't go in the cache. Note the PDB reader is only used in static linking.
+ // Readers with PDB reader disposal logic don't go in the cache. Note the PDB reader is only used in static linking.
if keyOk && opts.pdbDirPath.IsNone then
ilModuleReaderCacheLock.AcquireLock (fun ltok -> ilModuleReaderCache.Put(ltok, key, ilModuleReader))
diff --git a/src/absil/ilreflect.fs b/src/absil/ilreflect.fs
index f97f6fca425..8c4b895fdb8 100644
--- a/src/absil/ilreflect.fs
+++ b/src/absil/ilreflect.fs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
+// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
//----------------------------------------------------------------------------
// Write Abstract IL structures at runtime using Reflection.Emit
@@ -53,16 +53,16 @@ type System.Reflection.Emit.AssemblyBuilder with
#endif
modB
- member asmB.SetCustomAttributeAndLog(cinfo, bytes) =
+ member asmB.SetCustomAttributeAndLog(cinfo, bytes) =
if logRefEmitCalls then printfn "assemblyBuilder%d.SetCustomAttribute(%A, %A)" (abs <| hash asmB) cinfo bytes
wrapCustomAttr asmB.SetCustomAttribute (cinfo, bytes)
#if !FX_RESHAPED_REFEMIT
- member asmB.AddResourceFileAndLog(nm1, nm2, attrs) =
+ member asmB.AddResourceFileAndLog(nm1, nm2, attrs) =
if logRefEmitCalls then printfn "assemblyBuilder%d.AddResourceFile(%A, %A, enum %d)" (abs <| hash asmB) nm1 nm2 (LanguagePrimitives.EnumToValue attrs)
asmB.AddResourceFile(nm1, nm2, attrs)
#endif
- member asmB.SetCustomAttributeAndLog(cab) =
+ member asmB.SetCustomAttributeAndLog(cab) =
if logRefEmitCalls then printfn "assemblyBuilder%d.SetCustomAttribute(%A)" (abs <| hash asmB) cab
asmB.SetCustomAttribute(cab)
@@ -75,7 +75,7 @@ type System.Reflection.Emit.ModuleBuilder with
#if !FX_RESHAPED_REFEMIT
member modB.DefineDocumentAndLog(file, lang, vendor, doctype) =
let symDoc = modB.DefineDocument(file, lang, vendor, doctype)
- if logRefEmitCalls then printfn "let docWriter%d = moduleBuilder%d.DefineDocument(@%A, System.Guid(\"%A\"), System.Guid(\"%A\"), System.Guid(\"%A\"))" (abs <| hash symDoc) (abs <| hash modB) file lang vendor doctype
+ if logRefEmitCalls then printfn "let docWriter%d = moduleBuilder%d.DefineDocument(@%A, System.Guid(\"%A\"), System.Guid(\"%A\"), System.Guid(\"%A\"))" (abs <| hash symDoc) (abs <| hash modB) file lang vendor doctype
symDoc
#endif
member modB.GetTypeAndLog(nameInModule, flag1, flag2) =
@@ -92,7 +92,7 @@ type System.Reflection.Emit.ModuleBuilder with
if logRefEmitCalls then printfn "moduleBuilder%d.DefineManifestResource(%A, %A, enum %d)" (abs <| hash modB) name stream (LanguagePrimitives.EnumToValue attrs)
modB.DefineManifestResource(name, stream, attrs)
#endif
- member modB.SetCustomAttributeAndLog(cinfo, bytes) =
+ member modB.SetCustomAttributeAndLog(cinfo, bytes) =
if logRefEmitCalls then printfn "moduleBuilder%d.SetCustomAttribute(%A, %A)" (abs <| hash modB) cinfo bytes
wrapCustomAttr modB.SetCustomAttribute (cinfo, bytes)
@@ -133,7 +133,7 @@ type System.Reflection.Emit.MethodBuilder with
if logRefEmitCalls then printfn "let ilg%d = methodBuilder%d.GetILGenerator()" (abs <| hash ilG) (abs <| hash methB)
ilG
- member methB.SetCustomAttributeAndLog(cinfo, bytes) =
+ member methB.SetCustomAttributeAndLog(cinfo, bytes) =
if logRefEmitCalls then printfn "methodBuilder%d.SetCustomAttribute(%A, %A)" (abs <| hash methB) cinfo bytes
wrapCustomAttr methB.SetCustomAttribute (cinfo, bytes)
@@ -164,20 +164,20 @@ type System.Reflection.Emit.TypeBuilder with
if logRefEmitCalls then printfn "let constructorBuilder%d = typeBuilder%d.DefineConstructor(enum %d, CallingConventions.%A, %A)" (abs <| hash consB) (abs <| hash typB) (LanguagePrimitives.EnumToValue attrs) cconv parms
consB
- member typB.DefineFieldAndLog(nm, ty:System.Type, attrs) =
+ member typB.DefineFieldAndLog(nm, ty: System.Type, attrs) =
let fieldB = typB.DefineField(nm, ty, attrs)
if logRefEmitCalls then printfn "let fieldBuilder%d = typeBuilder%d.DefineField(\"%s\", typeof<%s>, enum %d)" (abs <| hash fieldB) (abs <| hash typB) nm ty.FullName (LanguagePrimitives.EnumToValue attrs)
fieldB
- member typB.DefinePropertyAndLog(nm, attrs, ty:System.Type, args) =
+ member typB.DefinePropertyAndLog(nm, attrs, ty: System.Type, args) =
if logRefEmitCalls then printfn "typeBuilder%d.DefineProperty(\"%A\", enum %d, typeof<%s>, %A)" (abs <| hash typB) nm (LanguagePrimitives.EnumToValue attrs) ty.FullName args
typB.DefineProperty(nm, attrs, ty, args)
- member typB.DefineEventAndLog(nm, attrs, ty:System.Type) =
+ member typB.DefineEventAndLog(nm, attrs, ty: System.Type) =
if logRefEmitCalls then printfn "typeBuilder%d.DefineEvent(\"%A\", enum %d, typeof<%A>)" (abs <| hash typB) nm (LanguagePrimitives.EnumToValue attrs) ty.FullName
typB.DefineEvent(nm, attrs, ty)
- member typB.SetParentAndLog(ty:System.Type) =
+ member typB.SetParentAndLog(ty: System.Type) =
if logRefEmitCalls then printfn "typeBuilder%d.SetParent(typeof<%s>)" (abs <| hash typB) ty.FullName
typB.SetParent(ty)
@@ -204,10 +204,10 @@ type System.Reflection.Emit.TypeBuilder with
type System.Reflection.Emit.OpCode with
- member opcode.RefEmitName = (string (System.Char.ToUpper(opcode.Name.[0])) + opcode.Name.[1..]).Replace(".", "_").Replace("_i4", "_I4")
+ member opcode.RefEmitName = (string (System.Char.ToUpper(opcode.Name.[0])) + opcode.Name.[1..]).Replace(".", "_").Replace("_i4", "_I4")
type System.Reflection.Emit.ILGenerator with
- member ilG.DeclareLocalAndLog(ty:System.Type, isPinned) =
+ member ilG.DeclareLocalAndLog(ty: System.Type, isPinned) =
if logRefEmitCalls then printfn "ilg%d.DeclareLocal(typeof<%s>, %b)" (abs <| hash ilG) ty.FullName isPinned
ilG.DeclareLocal(ty, isPinned)
@@ -233,7 +233,7 @@ type System.Reflection.Emit.ILGenerator with
ilG.BeginFinallyBlock()
member ilG.BeginCatchBlockAndLog(ty) =
- if logRefEmitCalls then printfn "ilg%d.BeginCatchBlock(%A)" (abs <| hash ilG) ty
+ if logRefEmitCalls then printfn "ilg%d.BeginCatchBlock(%A)" (abs <| hash ilG) ty
ilG.BeginCatchBlock(ty)
member ilG.BeginExceptFilterBlockAndLog() =
@@ -249,31 +249,31 @@ type System.Reflection.Emit.ILGenerator with
if logRefEmitCalls then printfn "let label%d_%d = ilg%d.DefineLabel()" (abs <| hash ilG) (abs <| hash lab) (abs <| hash ilG)
lab
- member x.EmitAndLog (op:OpCode) =
+ member x.EmitAndLog (op: OpCode) =
if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s)" (abs <| hash x) op.RefEmitName
x.Emit(op)
- member x.EmitAndLog (op:OpCode, v:Label) =
+ member x.EmitAndLog (op: OpCode, v: Label) =
if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, label%d_%d)" (abs <| hash x) op.RefEmitName (abs <| hash x) (abs <| hash v)
x.Emit(op, v)
- member x.EmitAndLog (op:OpCode, v:int16) =
+ member x.EmitAndLog (op: OpCode, v: int16) =
if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, int16 %d)" (abs <| hash x) op.RefEmitName v
x.Emit(op, v)
- member x.EmitAndLog (op:OpCode, v:int32) =
+ member x.EmitAndLog (op: OpCode, v: int32) =
if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, %d)" (abs <| hash x) op.RefEmitName v
x.Emit(op, v)
- member x.EmitAndLog (op:OpCode, v:MethodInfo) =
+ member x.EmitAndLog (op: OpCode, v: MethodInfo) =
if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, methodBuilder%d) // method %s" (abs <| hash x) op.RefEmitName (abs <| hash v) v.Name
x.Emit(op, v)
- member x.EmitAndLog (op:OpCode, v:string) =
+ member x.EmitAndLog (op: OpCode, v: string) =
if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, \"@%s\")" (abs <| hash x) op.RefEmitName v
x.Emit(op, v)
- member x.EmitAndLog (op:OpCode, v:Type) =
+ member x.EmitAndLog (op: OpCode, v: Type) =
if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, typeof<%s>)" (abs <| hash x) op.RefEmitName v.FullName
x.Emit(op, v)
- member x.EmitAndLog (op:OpCode, v:FieldInfo) =
+ member x.EmitAndLog (op: OpCode, v: FieldInfo) =
if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, fieldBuilder%d) // field %s" (abs <| hash x) op.RefEmitName (abs <| hash v) v.Name
x.Emit(op, v)
- member x.EmitAndLog (op:OpCode, v:ConstructorInfo) =
+ member x.EmitAndLog (op: OpCode, v: ConstructorInfo) =
if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, constructor_%s)" (abs <| hash x) op.RefEmitName v.DeclaringType.Name
x.Emit(op, v)
@@ -282,18 +282,18 @@ type System.Reflection.Emit.ILGenerator with
// misc
//----------------------------------------------------------------------------
-let inline flagsIf b x = if b then x else enum 0
+let inline flagsIf b x = if b then x else enum 0
module Zmap =
let force x m str = match Zmap.tryFind x m with Some y -> y | None -> failwithf "Zmap.force: %s: x = %+A" str x
-let equalTypes (s:Type) (t:Type) = s.Equals(t)
+let equalTypes (s: Type) (t: Type) = s.Equals(t)
let equalTypeLists ss tt = List.lengthsEqAndForall2 equalTypes ss tt
let equalTypeArrays ss tt = Array.lengthsEqAndForall2 equalTypes ss tt
-let getGenericArgumentsOfType (typT : Type) =
- if typT.IsGenericType then typT.GetGenericArguments() else [| |]
-let getGenericArgumentsOfMethod (methI : MethodInfo) =
+let getGenericArgumentsOfType (typT: Type) =
+ if typT.IsGenericType then typT.GetGenericArguments() else [| |]
+let getGenericArgumentsOfMethod (methI: MethodInfo) =
if methI.IsGenericMethod then methI.GetGenericArguments() else [| |]
let getTypeConstructor (ty: Type) =
@@ -303,12 +303,12 @@ let getTypeConstructor (ty: Type) =
// convAssemblyRef
//----------------------------------------------------------------------------
-let convAssemblyRef (aref:ILAssemblyRef) =
+let convAssemblyRef (aref: ILAssemblyRef) =
let asmName = new System.Reflection.AssemblyName()
- asmName.Name <- aref.Name
+ asmName.Name <- aref.Name
(match aref.PublicKey with
| None -> ()
- | Some (PublicKey bytes) -> asmName.SetPublicKey(bytes)
+ | Some (PublicKey bytes) -> asmName.SetPublicKey(bytes)
| Some (PublicKeyToken bytes) -> asmName.SetPublicKeyToken(bytes))
let setVersion (version: ILVersionInfo) =
asmName.Version <- System.Version (int32 version.Major, int32 version.Minor, int32 version.Build, int32 version.Revision)
@@ -323,7 +323,7 @@ let convAssemblyRef (aref:ILAssemblyRef) =
/// The global environment.
type cenv =
{ ilg: ILGlobals
- tryFindSysILTypeRef : string -> ILTypeRef option
+ tryFindSysILTypeRef: string -> ILTypeRef option
generatePdb: bool
resolveAssemblyRef: (ILAssemblyRef -> Choice option) }
@@ -334,7 +334,7 @@ type cenv =
// [] , name -> name
// [ns] , name -> ns+name
// [ns;typeA;typeB], name -> ns+typeA+typeB+name
-let convTypeRefAux (cenv:cenv) (tref:ILTypeRef) =
+let convTypeRefAux (cenv: cenv) (tref: ILTypeRef) =
let qualifiedName = (String.concat "+" (tref.Enclosing @ [ tref.Name ])).Replace(",", @"\,")
match tref.Scope with
| ILScopeRef.Assembly asmref ->
@@ -345,7 +345,7 @@ let convTypeRefAux (cenv:cenv) (tref:ILTypeRef) =
| Some (Choice2Of2 assembly) ->
assembly
| None ->
- let asmName = convAssemblyRef asmref
+ let asmName = convAssemblyRef asmref
FileSystem.AssemblyLoad(asmName)
let typT = assembly.GetType(qualifiedName)
match typT with
@@ -364,40 +364,40 @@ let convTypeRefAux (cenv:cenv) (tref:ILTypeRef) =
/// and could be placed as hash tables in the global environment.
[]
type emEnv =
- { emTypMap : Zmap
- emConsMap : Zmap
- emMethMap : Zmap
- emFieldMap : Zmap
- emPropMap : Zmap
- emLocals : LocalBuilder[]
- emLabels : Zmap
- emTyvars : Type[] list; // stack
- emEntryPts : (TypeBuilder * string) list
- delayedFieldInits : (unit -> unit) list}
+ { emTypMap: Zmap
+ emConsMap: Zmap
+ emMethMap: Zmap
+ emFieldMap: Zmap
+ emPropMap: Zmap
+ emLocals: LocalBuilder[]
+ emLabels: Zmap
+ emTyvars: Type[] list; // stack
+ emEntryPts: (TypeBuilder * string) list
+ delayedFieldInits: (unit -> unit) list}
-let orderILTypeRef = ComparisonIdentity.Structural
-let orderILMethodRef = ComparisonIdentity.Structural
-let orderILFieldRef = ComparisonIdentity.Structural
-let orderILPropertyRef = ComparisonIdentity.Structural
+let orderILTypeRef = ComparisonIdentity.Structural
+let orderILMethodRef = ComparisonIdentity.Structural
+let orderILFieldRef = ComparisonIdentity.Structural
+let orderILPropertyRef = ComparisonIdentity.Structural
let emEnv0 =
- { emTypMap = Zmap.empty orderILTypeRef
- emConsMap = Zmap.empty orderILMethodRef
- emMethMap = Zmap.empty orderILMethodRef
+ { emTypMap = Zmap.empty orderILTypeRef
+ emConsMap = Zmap.empty orderILMethodRef
+ emMethMap = Zmap.empty orderILMethodRef
emFieldMap = Zmap.empty orderILFieldRef
emPropMap = Zmap.empty orderILPropertyRef
- emLocals = [| |]
- emLabels = Zmap.empty codeLabelOrder
- emTyvars = []
+ emLocals = [| |]
+ emLabels = Zmap.empty codeLabelOrder
+ emTyvars = []
emEntryPts = []
delayedFieldInits = [] }
-let envBindTypeRef emEnv (tref:ILTypeRef) (typT, typB, typeDef) =
+let envBindTypeRef emEnv (tref: ILTypeRef) (typT, typB, typeDef) =
match typT with
| null -> failwithf "binding null type in envBindTypeRef: %s\n" tref.Name
| _ -> {emEnv with emTypMap = Zmap.add tref (typT, typB, typeDef, None) emEnv.emTypMap}
-let envUpdateCreatedTypeRef emEnv (tref:ILTypeRef) =
+let envUpdateCreatedTypeRef emEnv (tref: ILTypeRef) =
// The tref's TypeBuilder has been created, so we have a Type proper.
// Update the tables to include this created type (the typT held prior to this is (i think) actually (TypeBuilder :> Type).
// The (TypeBuilder :> Type) does not implement all the methods that a Type proper does.
@@ -423,26 +423,26 @@ let envUpdateCreatedTypeRef emEnv (tref:ILTypeRef) =
#endif
emEnv
-let convTypeRef cenv emEnv preferCreated (tref:ILTypeRef) =
+let convTypeRef cenv emEnv preferCreated (tref: ILTypeRef) =
let res =
match Zmap.tryFind tref emEnv.emTypMap with
| Some (_typT, _typB, _typeDef, Some createdTy) when preferCreated -> createdTy
- | Some (typT, _typB, _typeDef, _) -> typT
- | None -> convTypeRefAux cenv tref
+ | Some (typT, _typB, _typeDef, _) -> typT
+ | None -> convTypeRefAux cenv tref
match res with
| null -> error(Error(FSComp.SR.itemNotFoundDuringDynamicCodeGen ("type", tref.QualifiedName, tref.Scope.QualifiedName), range0))
| _ -> res
-let envBindConsRef emEnv (mref:ILMethodRef) consB =
+let envBindConsRef emEnv (mref: ILMethodRef) consB =
{emEnv with emConsMap = Zmap.add mref consB emEnv.emConsMap}
-let envGetConsB emEnv (mref:ILMethodRef) =
+let envGetConsB emEnv (mref: ILMethodRef) =
Zmap.force mref emEnv.emConsMap "envGetConsB: failed"
-let envBindMethodRef emEnv (mref:ILMethodRef) methB =
+let envBindMethodRef emEnv (mref: ILMethodRef) methB =
{emEnv with emMethMap = Zmap.add mref methB emEnv.emMethMap}
-let envGetMethB emEnv (mref:ILMethodRef) =
+let envGetMethB emEnv (mref: ILMethodRef) =
Zmap.force mref emEnv.emMethMap "envGetMethB: failed"
let envBindFieldRef emEnv fref fieldB =
@@ -451,23 +451,23 @@ let envBindFieldRef emEnv fref fieldB =
let envGetFieldB emEnv fref =
Zmap.force fref emEnv.emFieldMap "- envGetMethB: failed"
-let envBindPropRef emEnv (pref:ILPropertyRef) propB =
+let envBindPropRef emEnv (pref: ILPropertyRef) propB =
{emEnv with emPropMap = Zmap.add pref propB emEnv.emPropMap}
let envGetPropB emEnv pref =
Zmap.force pref emEnv.emPropMap "- envGetPropB: failed"
-let envGetTypB emEnv (tref:ILTypeRef) =
+let envGetTypB emEnv (tref: ILTypeRef) =
Zmap.force tref emEnv.emTypMap "envGetTypB: failed"
|> (fun (_typT, typB, _typeDef, _createdTypOpt) -> typB)
-let envGetTypeDef emEnv (tref:ILTypeRef) =
+let envGetTypeDef emEnv (tref: ILTypeRef) =
Zmap.force tref emEnv.emTypMap "envGetTypeDef: failed"
|> (fun (_typT, _typB, typeDef, _createdTypOpt) -> typeDef)
let envSetLocals emEnv locs = assert (emEnv.emLocals.Length = 0); // check "locals" is not yet set (scopes once only)
{emEnv with emLocals = locs}
-let envGetLocal emEnv i = emEnv.emLocals.[i] // implicit bounds checking
+let envGetLocal emEnv i = emEnv.emLocals.[i] // implicit bounds checking
let envSetLabel emEnv name lab =
assert (not (Zmap.mem name emEnv.emLabels))
@@ -476,11 +476,11 @@ let envSetLabel emEnv name lab =
let envGetLabel emEnv name =
Zmap.find name emEnv.emLabels
-let envPushTyvars emEnv tys = {emEnv with emTyvars = tys :: emEnv.emTyvars}
-let envPopTyvars emEnv = {emEnv with emTyvars = List.tail emEnv.emTyvars}
-let envGetTyvar emEnv u16 =
+let envPushTyvars emEnv tys = {emEnv with emTyvars = tys :: emEnv.emTyvars}
+let envPopTyvars emEnv = {emEnv with emTyvars = List.tail emEnv.emTyvars}
+let envGetTyvar emEnv u16 =
match emEnv.emTyvars with
- | [] -> failwith "envGetTyvar: not scope of type vars"
+ | [] -> failwith "envGetTyvar: not scope of type vars"
| tvs::_ ->
let i = int32 u16
if i<0 || i>= Array.length tvs then
@@ -490,23 +490,29 @@ let envGetTyvar emEnv u16 =
let isEmittedTypeRef emEnv tref = Zmap.mem tref emEnv.emTypMap
-let envAddEntryPt emEnv mref = {emEnv with emEntryPts = mref::emEnv.emEntryPts}
-let envPopEntryPts emEnv = {emEnv with emEntryPts = []}, emEnv.emEntryPts
+let envAddEntryPt emEnv mref = {emEnv with emEntryPts = mref::emEnv.emEntryPts}
+let envPopEntryPts emEnv = {emEnv with emEntryPts = []}, emEnv.emEntryPts
//----------------------------------------------------------------------------
// convCallConv
//----------------------------------------------------------------------------
let convCallConv (Callconv (hasThis, basic)) =
- let ccA = match hasThis with ILThisConvention.Static -> CallingConventions.Standard
- | ILThisConvention.InstanceExplicit -> CallingConventions.ExplicitThis
- | ILThisConvention.Instance -> CallingConventions.HasThis
- let ccB = match basic with ILArgConvention.Default -> enum 0
- | ILArgConvention.CDecl -> enum 0
- | ILArgConvention.StdCall -> enum 0
- | ILArgConvention.ThisCall -> enum 0 // XXX: check all these
- | ILArgConvention.FastCall -> enum 0
- | ILArgConvention.VarArg -> CallingConventions.VarArgs
+ let ccA =
+ match hasThis with
+ | ILThisConvention.Static -> CallingConventions.Standard
+ | ILThisConvention.InstanceExplicit -> CallingConventions.ExplicitThis
+ | ILThisConvention.Instance -> CallingConventions.HasThis
+
+ let ccB =
+ match basic with
+ | ILArgConvention.Default -> enum 0
+ | ILArgConvention.CDecl -> enum 0
+ | ILArgConvention.StdCall -> enum 0
+ | ILArgConvention.ThisCall -> enum 0 // XXX: check all these
+ | ILArgConvention.FastCall -> enum 0
+ | ILArgConvention.VarArg -> CallingConventions.VarArgs
+
ccA ||| ccB
@@ -514,25 +520,25 @@ let convCallConv (Callconv (hasThis, basic)) =
// convType
//----------------------------------------------------------------------------
-let rec convTypeSpec cenv emEnv preferCreated (tspec:ILTypeSpec) =
- let typT = convTypeRef cenv emEnv preferCreated tspec.TypeRef
+let rec convTypeSpec cenv emEnv preferCreated (tspec: ILTypeSpec) =
+ let typT = convTypeRef cenv emEnv preferCreated tspec.TypeRef
let tyargs = List.map (convTypeAux cenv emEnv preferCreated) tspec.GenericArgs
let res =
match isNil tyargs, typT.IsGenericType with
- | _ , true -> typT.MakeGenericType(List.toArray tyargs)
+ | _, true -> typT.MakeGenericType(List.toArray tyargs)
| true, false -> typT
- | _ , false -> null
+ | _, false -> null
match res with
| null -> error(Error(FSComp.SR.itemNotFoundDuringDynamicCodeGen ("type", tspec.TypeRef.QualifiedName, tspec.Scope.QualifiedName), range0))
| _ -> res
and convTypeAux cenv emEnv preferCreated ty =
match ty with
- | ILType.Void -> Type.GetType("System.Void")
+ | ILType.Void -> Type.GetType("System.Void")
| ILType.Array (shape, eltType) ->
let baseT = convTypeAux cenv emEnv preferCreated eltType
let nDims = shape.Rank
- // MakeArrayType() returns "eltType[]"
+ // MakeArrayType() returns "eltType[]"
// MakeArrayType(1) returns "eltType[*]"
// MakeArrayType(2) returns "eltType[, ]"
// MakeArrayType(3) returns "eltType[, , ]"
@@ -540,17 +546,17 @@ and convTypeAux cenv emEnv preferCreated ty =
if nDims=1
then baseT.MakeArrayType()
else baseT.MakeArrayType shape.Rank
- | ILType.Value tspec -> convTypeSpec cenv emEnv preferCreated tspec
- | ILType.Boxed tspec -> convTypeSpec cenv emEnv preferCreated tspec
- | ILType.Ptr eltType ->
+ | ILType.Value tspec -> convTypeSpec cenv emEnv preferCreated tspec
+ | ILType.Boxed tspec -> convTypeSpec cenv emEnv preferCreated tspec
+ | ILType.Ptr eltType ->
let baseT = convTypeAux cenv emEnv preferCreated eltType
baseT.MakePointerType()
- | ILType.Byref eltType ->
+ | ILType.Byref eltType ->
let baseT = convTypeAux cenv emEnv preferCreated eltType
baseT.MakeByRefType()
- | ILType.TypeVar tv -> envGetTyvar emEnv tv
+ | ILType.TypeVar tv -> envGetTyvar emEnv tv
// Consider completing the following cases:
- | ILType.Modified (_, _, modifiedTy) ->
+ | ILType.Modified (_, _, modifiedTy) ->
// Note, "modreq" are not being emitted. This is
convTypeAux cenv emEnv preferCreated modifiedTy
@@ -582,9 +588,9 @@ let convTypeOrTypeDef cenv emEnv ty =
| ILType.Boxed tspec when tspec.GenericArgs.IsEmpty -> convTypeRef cenv emEnv false tspec.TypeRef
| _ -> convType cenv emEnv ty
-let convTypes cenv emEnv (tys:ILTypes) = List.map (convType cenv emEnv) tys
+let convTypes cenv emEnv (tys: ILTypes) = List.map (convType cenv emEnv) tys
-let convTypesToArray cenv emEnv (tys:ILTypes) = convTypes cenv emEnv tys |> List.toArray
+let convTypesToArray cenv emEnv (tys: ILTypes) = convTypes cenv emEnv tys |> List.toArray
/// Uses the .CreateType() for emitted type if available.
let convCreatedType cenv emEnv ty = convTypeAux cenv emEnv true ty
@@ -592,7 +598,7 @@ let convCreatedTypeRef cenv emEnv ty = convTypeRef cenv emEnv true ty
let rec convParamModifiersOfType cenv emEnv (pty: ILType) =
[| match pty with
- | ILType.Modified (modreq, ty, modifiedTy) ->
+ | ILType.Modified (modreq, ty, modifiedTy) ->
yield (modreq, convTypeRef cenv emEnv false ty)
yield! convParamModifiersOfType cenv emEnv modifiedTy
| _ -> () |]
@@ -616,27 +622,27 @@ let convReturnModifiers cenv emEnv (p: ILReturn) =
let convFieldInit x =
match x with
- | ILFieldInit.String s -> box s
- | ILFieldInit.Bool bool -> box bool
- | ILFieldInit.Char u16 -> box (char (int u16))
- | ILFieldInit.Int8 i8 -> box i8
- | ILFieldInit.Int16 i16 -> box i16
- | ILFieldInit.Int32 i32 -> box i32
- | ILFieldInit.Int64 i64 -> box i64
- | ILFieldInit.UInt8 u8 -> box u8
- | ILFieldInit.UInt16 u16 -> box u16
- | ILFieldInit.UInt32 u32 -> box u32
- | ILFieldInit.UInt64 u64 -> box u64
+ | ILFieldInit.String s -> box s
+ | ILFieldInit.Bool bool -> box bool
+ | ILFieldInit.Char u16 -> box (char (int u16))
+ | ILFieldInit.Int8 i8 -> box i8
+ | ILFieldInit.Int16 i16 -> box i16
+ | ILFieldInit.Int32 i32 -> box i32
+ | ILFieldInit.Int64 i64 -> box i64
+ | ILFieldInit.UInt8 u8 -> box u8
+ | ILFieldInit.UInt16 u16 -> box u16
+ | ILFieldInit.UInt32 u32 -> box u32
+ | ILFieldInit.UInt64 u64 -> box u64
| ILFieldInit.Single ieee32 -> box ieee32
| ILFieldInit.Double ieee64 -> box ieee64
- | ILFieldInit.Null -> (null :> Object)
+ | ILFieldInit.Null -> (null :> Object)
//----------------------------------------------------------------------------
// Some types require hard work...
//----------------------------------------------------------------------------
// This is gross. TypeBuilderInstantiation should really be a public type, since we
-// have to use alternative means for various Method/Field/Constructor lookups. However since
+// have to use alternative means for various Method/Field/Constructor lookups. However since
// it isn't we resort to this technique...
let TypeBuilderInstantiationT =
let ty =
@@ -653,7 +659,7 @@ let TypeBuilderInstantiationT =
assert (not (isNull ty))
ty
-let typeIsNotQueryable (ty : Type) =
+let typeIsNotQueryable (ty: Type) =
#if FX_RESHAPED_REFLECTION
let ty = ty.GetTypeInfo()
#endif
@@ -662,13 +668,13 @@ let typeIsNotQueryable (ty : Type) =
// convFieldSpec
//----------------------------------------------------------------------------
-let queryableTypeGetField _emEnv (parentT:Type) (fref: ILFieldRef) =
+let queryableTypeGetField _emEnv (parentT: Type) (fref: ILFieldRef) =
let res = parentT.GetField(fref.Name, BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.Instance ||| BindingFlags.Static )
match res with
| null -> error(Error(FSComp.SR.itemNotFoundInTypeDuringDynamicCodeGen ("field", fref.Name, fref.DeclaringTypeRef.FullName, fref.DeclaringTypeRef.Scope.QualifiedName), range0))
| _ -> res
-let nonQueryableTypeGetField (parentTI:Type) (fieldInfo : FieldInfo) : FieldInfo =
+let nonQueryableTypeGetField (parentTI: Type) (fieldInfo: FieldInfo) : FieldInfo =
let res =
if parentTI.IsGenericType then TypeBuilder.GetField(parentTI, fieldInfo)
else fieldInfo
@@ -689,7 +695,7 @@ let convFieldSpec cenv emEnv fspec =
// Prior type.
if typeIsNotQueryable parentTI then
let parentT = getTypeConstructor parentTI
- let fieldInfo = queryableTypeGetField emEnv parentT fref
+ let fieldInfo = queryableTypeGetField emEnv parentT fref
nonQueryableTypeGetField parentTI fieldInfo
else
queryableTypeGetField emEnv parentTI fspec.FieldRef
@@ -697,7 +703,7 @@ let convFieldSpec cenv emEnv fspec =
//----------------------------------------------------------------------------
// convMethodRef
//----------------------------------------------------------------------------
-let queryableTypeGetMethodBySearch cenv emEnv parentT (mref:ILMethodRef) =
+let queryableTypeGetMethodBySearch cenv emEnv parentT (mref: ILMethodRef) =
assert(not (typeIsNotQueryable(parentT)))
let cconv = (if mref.CallingConv.IsStatic then BindingFlags.Static else BindingFlags.Instance)
let methInfos = parentT.GetMethods(cconv ||| BindingFlags.Public ||| BindingFlags.NonPublic) |> Array.toList
@@ -721,7 +727,7 @@ let queryableTypeGetMethodBySearch cenv emEnv parentT (mref:ILMethodRef) =
elif
// both are generic
p.IsGenericType && a.IsGenericType
- // non obvious due to contravariance: Action where T : IFoo accepts Action (for FooImpl : IFoo)
+ // non obvious due to contravariance: Action where T: IFoo accepts Action (for FooImpl: IFoo)
&& p.GetGenericTypeDefinition().IsAssignableFrom(a.GetGenericTypeDefinition())
then true
else false
@@ -730,7 +736,7 @@ let queryableTypeGetMethodBySearch cenv emEnv parentT (mref:ILMethodRef) =
if Array.length args <> Array.length ps then false
else Array.forall2 satisfiesParameter args ps
- let select (methInfo:MethodInfo) =
+ let select (methInfo: MethodInfo) =
(* mref implied Types *)
let mtyargTIs = getGenericArgumentsOfMethod methInfo
@@ -754,29 +760,29 @@ let queryableTypeGetMethodBySearch cenv emEnv parentT (mref:ILMethodRef) =
let argTs, resT =
let emEnv = envPushTyvars emEnv (Array.append tyargTs mtyargTIs)
let argTs = convTypes cenv emEnv mref.ArgTypes
- let resT = convType cenv emEnv mref.ReturnType
+ let resT = convType cenv emEnv mref.ReturnType
argTs, resT
- let haveResT = methInfo.ReturnType
+ let haveResT = methInfo.ReturnType
(* check for match *)
if argTs.Length <> methodParameters.Length then false (* method argument length mismatch *) else
let res = equalTypes resT haveResT && equalTypeLists argTs (haveArgTs |> Array.toList)
res
match List.tryFind select methInfos with
- | None ->
+ | None ->
let methNames = methInfos |> List.map (fun m -> m.Name) |> List.distinct
failwithf "convMethodRef: could not bind to method '%A' of type '%s'" (System.String.Join(", ", methNames)) parentT.AssemblyQualifiedName
| Some methInfo -> methInfo (* return MethodInfo for (generic) type's (generic) method *)
-let queryableTypeGetMethod cenv emEnv parentT (mref:ILMethodRef) =
+let queryableTypeGetMethod cenv emEnv parentT (mref: ILMethodRef) =
assert(not (typeIsNotQueryable(parentT)))
if mref.GenericArity = 0 then
let tyargTs = getGenericArgumentsOfType parentT
let argTs, resT =
let emEnv = envPushTyvars emEnv tyargTs
let argTs = convTypesToArray cenv emEnv mref.ArgTypes
- let resT = convType cenv emEnv mref.ReturnType
+ let resT = convType cenv emEnv mref.ReturnType
argTs, resT
let stat = mref.CallingConv.IsStatic
let cconv = (if stat then BindingFlags.Static else BindingFlags.Instance)
@@ -786,9 +792,9 @@ let queryableTypeGetMethod cenv emEnv parentT (mref:ILMethodRef) =
null,
argTs,
#if FX_RESHAPED_REFLECTION
- (null:obj[]))
+ (null: obj[]))
#else
- (null:ParameterModifier[]))
+ (null: ParameterModifier[]))
#endif
// This can fail if there is an ambiguity w.r.t. return type
with _ -> null
@@ -799,13 +805,13 @@ let queryableTypeGetMethod cenv emEnv parentT (mref:ILMethodRef) =
else
queryableTypeGetMethodBySearch cenv emEnv parentT mref
-let nonQueryableTypeGetMethod (parentTI:Type) (methInfo : MethodInfo) : MethodInfo =
+let nonQueryableTypeGetMethod (parentTI: Type) (methInfo: MethodInfo) : MethodInfo =
if (parentTI.IsGenericType &&
not (equalTypes parentTI (getTypeConstructor parentTI)))
then TypeBuilder.GetMethod(parentTI, methInfo )
else methInfo
-let convMethodRef cenv emEnv (parentTI:Type) (mref:ILMethodRef) =
+let convMethodRef cenv emEnv (parentTI: Type) (mref: ILMethodRef) =
let parent = mref.DeclaringTypeRef
let res =
if isEmittedTypeRef emEnv parent then
@@ -829,14 +835,14 @@ let convMethodRef cenv emEnv (parentTI:Type) (mref:ILMethodRef) =
// convMethodSpec
//----------------------------------------------------------------------------
-let convMethodSpec cenv emEnv (mspec:ILMethodSpec) =
- let typT = convType cenv emEnv mspec.DeclaringType (* (instanced) parent Type *)
- let methInfo = convMethodRef cenv emEnv typT mspec.MethodRef (* (generic) method of (generic) parent *)
+let convMethodSpec cenv emEnv (mspec: ILMethodSpec) =
+ let typT = convType cenv emEnv mspec.DeclaringType (* (instanced) parent Type *)
+ let methInfo = convMethodRef cenv emEnv typT mspec.MethodRef (* (generic) method of (generic) parent *)
let methInfo =
if isNil mspec.GenericArgs then
methInfo // non generic
else
- let minstTs = convTypesToArray cenv emEnv mspec.GenericArgs
+ let minstTs = convTypesToArray cenv emEnv mspec.GenericArgs
let methInfo = methInfo.MakeGenericMethod minstTs // instantiate method
methInfo
methInfo
@@ -845,9 +851,9 @@ let convMethodSpec cenv emEnv (mspec:ILMethodSpec) =
// - QueryableTypeGetConstructors: get a constructor on a non-TypeBuilder type
//----------------------------------------------------------------------------
-let queryableTypeGetConstructor cenv emEnv (parentT:Type) (mref:ILMethodRef) =
- let tyargTs = getGenericArgumentsOfType parentT
- let reqArgTs =
+let queryableTypeGetConstructor cenv emEnv (parentT: Type) (mref: ILMethodRef) =
+ let tyargTs = getGenericArgumentsOfType parentT
+ let reqArgTs =
let emEnv = envPushTyvars emEnv tyargTs
convTypesToArray cenv emEnv mref.ArgTypes
let res = parentT.GetConstructor(BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.Instance, null, reqArgTs, null)
@@ -856,15 +862,15 @@ let queryableTypeGetConstructor cenv emEnv (parentT:Type) (mref:ILMethodRef) =
| _ -> res
-let nonQueryableTypeGetConstructor (parentTI:Type) (consInfo : ConstructorInfo) : ConstructorInfo =
+let nonQueryableTypeGetConstructor (parentTI: Type) (consInfo: ConstructorInfo) : ConstructorInfo =
if parentTI.IsGenericType then TypeBuilder.GetConstructor(parentTI, consInfo) else consInfo
//----------------------------------------------------------------------------
// convConstructorSpec (like convMethodSpec)
//----------------------------------------------------------------------------
-let convConstructorSpec cenv emEnv (mspec:ILMethodSpec) =
- let mref = mspec.MethodRef
+let convConstructorSpec cenv emEnv (mspec: ILMethodSpec) =
+ let mref = mspec.MethodRef
let parentTI = convType cenv emEnv mspec.DeclaringType
let res =
if isEmittedTypeRef emEnv mref.DeclaringTypeRef then
@@ -873,7 +879,7 @@ let convConstructorSpec cenv emEnv (mspec:ILMethodSpec) =
else
// Prior type.
if typeIsNotQueryable parentTI then
- let parentT = getTypeConstructor parentTI
+ let parentT = getTypeConstructor parentTI
let ctorG = queryableTypeGetConstructor cenv emEnv parentT mref
nonQueryableTypeGetConstructor parentTI ctorG
else
@@ -886,7 +892,7 @@ let convConstructorSpec cenv emEnv (mspec:ILMethodSpec) =
// emitLabelMark
//----------------------------------------------------------------------------
-let emitLabelMark emEnv (ilG:ILGenerator) (label:ILCodeLabel) =
+let emitLabelMark emEnv (ilG: ILGenerator) (label: ILCodeLabel) =
let lab = envGetLabel emEnv label
ilG.MarkLabelAndLog(lab)
@@ -895,55 +901,55 @@ let emitLabelMark emEnv (ilG:ILGenerator) (label:ILCodeLabel) =
//----------------------------------------------------------------------------
///Emit comparison instructions.
-let emitInstrCompare emEnv (ilG:ILGenerator) comp targ =
+let emitInstrCompare emEnv (ilG: ILGenerator) comp targ =
match comp with
- | BI_beq -> ilG.EmitAndLog(OpCodes.Beq, envGetLabel emEnv targ)
- | BI_bge -> ilG.EmitAndLog(OpCodes.Bge , envGetLabel emEnv targ)
- | BI_bge_un -> ilG.EmitAndLog(OpCodes.Bge_Un , envGetLabel emEnv targ)
- | BI_bgt -> ilG.EmitAndLog(OpCodes.Bgt , envGetLabel emEnv targ)
- | BI_bgt_un -> ilG.EmitAndLog(OpCodes.Bgt_Un , envGetLabel emEnv targ)
- | BI_ble -> ilG.EmitAndLog(OpCodes.Ble , envGetLabel emEnv targ)
- | BI_ble_un -> ilG.EmitAndLog(OpCodes.Ble_Un , envGetLabel emEnv targ)
- | BI_blt -> ilG.EmitAndLog(OpCodes.Blt , envGetLabel emEnv targ)
- | BI_blt_un -> ilG.EmitAndLog(OpCodes.Blt_Un , envGetLabel emEnv targ)
- | BI_bne_un -> ilG.EmitAndLog(OpCodes.Bne_Un , envGetLabel emEnv targ)
+ | BI_beq -> ilG.EmitAndLog(OpCodes.Beq, envGetLabel emEnv targ)
+ | BI_bge -> ilG.EmitAndLog(OpCodes.Bge, envGetLabel emEnv targ)
+ | BI_bge_un -> ilG.EmitAndLog(OpCodes.Bge_Un, envGetLabel emEnv targ)
+ | BI_bgt -> ilG.EmitAndLog(OpCodes.Bgt, envGetLabel emEnv targ)
+ | BI_bgt_un -> ilG.EmitAndLog(OpCodes.Bgt_Un, envGetLabel emEnv targ)
+ | BI_ble -> ilG.EmitAndLog(OpCodes.Ble, envGetLabel emEnv targ)
+ | BI_ble_un -> ilG.EmitAndLog(OpCodes.Ble_Un, envGetLabel emEnv targ)
+ | BI_blt -> ilG.EmitAndLog(OpCodes.Blt, envGetLabel emEnv targ)
+ | BI_blt_un -> ilG.EmitAndLog(OpCodes.Blt_Un, envGetLabel emEnv targ)
+ | BI_bne_un -> ilG.EmitAndLog(OpCodes.Bne_Un, envGetLabel emEnv targ)
| BI_brfalse -> ilG.EmitAndLog(OpCodes.Brfalse, envGetLabel emEnv targ)
- | BI_brtrue -> ilG.EmitAndLog(OpCodes.Brtrue , envGetLabel emEnv targ)
+ | BI_brtrue -> ilG.EmitAndLog(OpCodes.Brtrue, envGetLabel emEnv targ)
/// Emit the volatile. prefix
-let emitInstrVolatile (ilG:ILGenerator) = function
- | Volatile -> ilG.EmitAndLog(OpCodes.Volatile)
+let emitInstrVolatile (ilG: ILGenerator) = function
+ | Volatile -> ilG.EmitAndLog(OpCodes.Volatile)
| Nonvolatile -> ()
/// Emit the align. prefix
-let emitInstrAlign (ilG:ILGenerator) = function
- | Aligned -> ()
+let emitInstrAlign (ilG: ILGenerator) = function
+ | Aligned -> ()
| Unaligned1 -> ilG.Emit(OpCodes.Unaligned, 1L) // note: doc says use "long" overload!
| Unaligned2 -> ilG.Emit(OpCodes.Unaligned, 2L)
| Unaligned4 -> ilG.Emit(OpCodes.Unaligned, 3L)
/// Emit the tail. prefix if necessary
-let emitInstrTail (ilG:ILGenerator) tail emitTheCall =
+let emitInstrTail (ilG: ILGenerator) tail emitTheCall =
match tail with
- | Tailcall -> ilG.EmitAndLog(OpCodes.Tailcall); emitTheCall(); ilG.EmitAndLog(OpCodes.Ret)
+ | Tailcall -> ilG.EmitAndLog(OpCodes.Tailcall); emitTheCall(); ilG.EmitAndLog(OpCodes.Ret)
| Normalcall -> emitTheCall()
-let emitInstrNewobj cenv emEnv (ilG:ILGenerator) mspec varargs =
+let emitInstrNewobj cenv emEnv (ilG: ILGenerator) mspec varargs =
match varargs with
- | None -> ilG.EmitAndLog(OpCodes.Newobj, convConstructorSpec cenv emEnv mspec)
+ | None -> ilG.EmitAndLog(OpCodes.Newobj, convConstructorSpec cenv emEnv mspec)
| Some _varargTys -> failwith "emit: pending new varargs" // XXX - gap
-let emitSilverlightCheck (ilG:ILGenerator) =
+let emitSilverlightCheck (ilG: ILGenerator) =
ignore ilG
()
-let emitInstrCall cenv emEnv (ilG:ILGenerator) opCall tail (mspec:ILMethodSpec) varargs =
+let emitInstrCall cenv emEnv (ilG: ILGenerator) opCall tail (mspec: ILMethodSpec) varargs =
emitInstrTail ilG tail (fun () ->
if mspec.MethodRef.Name = ".ctor" || mspec.MethodRef.Name = ".cctor" then
let cinfo = convConstructorSpec cenv emEnv mspec
match varargs with
- | None -> ilG.EmitAndLog (opCall, cinfo)
+ | None -> ilG.EmitAndLog (opCall, cinfo)
| Some _varargTys -> failwith "emitInstrCall: .ctor and varargs"
else
let minfo = convMethodSpec cenv emEnv mspec
@@ -952,7 +958,7 @@ let emitInstrCall cenv emEnv (ilG:ILGenerator) opCall tail (mspec:ILMethodSpec)
| Some varargTys -> ilG.EmitCall (opCall, minfo, convTypesToArray cenv emEnv varargTys)
)
-let getGenericMethodDefinition q (ty:Type) =
+let getGenericMethodDefinition q (ty: Type) =
let gminfo =
match q with
| Quotations.Patterns.Call(_, minfo, _) -> minfo.GetGenericMethodDefinition()
@@ -971,151 +977,151 @@ let setArrayMethInfo n ty =
| 2 -> getGenericMethodDefinition <@@ LanguagePrimitives.IntrinsicFunctions.SetArray2D null 0 0 0 @@> ty
| 3 -> getGenericMethodDefinition <@@ LanguagePrimitives.IntrinsicFunctions.SetArray3D null 0 0 0 0 @@> ty
| 4 -> getGenericMethodDefinition <@@ LanguagePrimitives.IntrinsicFunctions.SetArray4D null 0 0 0 0 0 @@> ty
- | _ -> invalidArg "n" "not expecting array dimension > 4"
+ | _ -> invalidArg "n" "not expecting array dimension > 4"
//----------------------------------------------------------------------------
// emitInstr cenv
//----------------------------------------------------------------------------
-let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr =
+let rec emitInstr cenv (modB: ModuleBuilder) emEnv (ilG: ILGenerator) instr =
match instr with
- | AI_add -> ilG.EmitAndLog(OpCodes.Add)
- | AI_add_ovf -> ilG.EmitAndLog(OpCodes.Add_Ovf)
- | AI_add_ovf_un -> ilG.EmitAndLog(OpCodes.Add_Ovf_Un)
- | AI_and -> ilG.EmitAndLog(OpCodes.And)
- | AI_div -> ilG.EmitAndLog(OpCodes.Div)
- | AI_div_un -> ilG.EmitAndLog(OpCodes.Div_Un)
- | AI_ceq -> ilG.EmitAndLog(OpCodes.Ceq)
- | AI_cgt -> ilG.EmitAndLog(OpCodes.Cgt)
- | AI_cgt_un -> ilG.EmitAndLog(OpCodes.Cgt_Un)
- | AI_clt -> ilG.EmitAndLog(OpCodes.Clt)
- | AI_clt_un -> ilG.EmitAndLog(OpCodes.Clt_Un)
+ | AI_add -> ilG.EmitAndLog(OpCodes.Add)
+ | AI_add_ovf -> ilG.EmitAndLog(OpCodes.Add_Ovf)
+ | AI_add_ovf_un -> ilG.EmitAndLog(OpCodes.Add_Ovf_Un)
+ | AI_and -> ilG.EmitAndLog(OpCodes.And)
+ | AI_div -> ilG.EmitAndLog(OpCodes.Div)
+ | AI_div_un -> ilG.EmitAndLog(OpCodes.Div_Un)
+ | AI_ceq -> ilG.EmitAndLog(OpCodes.Ceq)
+ | AI_cgt -> ilG.EmitAndLog(OpCodes.Cgt)
+ | AI_cgt_un -> ilG.EmitAndLog(OpCodes.Cgt_Un)
+ | AI_clt -> ilG.EmitAndLog(OpCodes.Clt)
+ | AI_clt_un -> ilG.EmitAndLog(OpCodes.Clt_Un)
// conversion
- | AI_conv dt ->
+ | AI_conv dt ->
match dt with
- | DT_I -> ilG.EmitAndLog(OpCodes.Conv_I)
- | DT_I1 -> ilG.EmitAndLog(OpCodes.Conv_I1)
- | DT_I2 -> ilG.EmitAndLog(OpCodes.Conv_I2)
- | DT_I4 -> ilG.EmitAndLog(OpCodes.Conv_I4)
- | DT_I8 -> ilG.EmitAndLog(OpCodes.Conv_I8)
- | DT_U -> ilG.EmitAndLog(OpCodes.Conv_U)
- | DT_U1 -> ilG.EmitAndLog(OpCodes.Conv_U1)
- | DT_U2 -> ilG.EmitAndLog(OpCodes.Conv_U2)
- | DT_U4 -> ilG.EmitAndLog(OpCodes.Conv_U4)
- | DT_U8 -> ilG.EmitAndLog(OpCodes.Conv_U8)
- | DT_R -> ilG.EmitAndLog(OpCodes.Conv_R_Un)
- | DT_R4 -> ilG.EmitAndLog(OpCodes.Conv_R4)
- | DT_R8 -> ilG.EmitAndLog(OpCodes.Conv_R8)
+ | DT_I -> ilG.EmitAndLog(OpCodes.Conv_I)
+ | DT_I1 -> ilG.EmitAndLog(OpCodes.Conv_I1)
+ | DT_I2 -> ilG.EmitAndLog(OpCodes.Conv_I2)
+ | DT_I4 -> ilG.EmitAndLog(OpCodes.Conv_I4)
+ | DT_I8 -> ilG.EmitAndLog(OpCodes.Conv_I8)
+ | DT_U -> ilG.EmitAndLog(OpCodes.Conv_U)
+ | DT_U1 -> ilG.EmitAndLog(OpCodes.Conv_U1)
+ | DT_U2 -> ilG.EmitAndLog(OpCodes.Conv_U2)
+ | DT_U4 -> ilG.EmitAndLog(OpCodes.Conv_U4)
+ | DT_U8 -> ilG.EmitAndLog(OpCodes.Conv_U8)
+ | DT_R -> ilG.EmitAndLog(OpCodes.Conv_R_Un)
+ | DT_R4 -> ilG.EmitAndLog(OpCodes.Conv_R4)
+ | DT_R8 -> ilG.EmitAndLog(OpCodes.Conv_R8)
| DT_REF -> failwith "AI_conv DT_REF?" // XXX - check
// conversion - ovf checks
- | AI_conv_ovf dt ->
+ | AI_conv_ovf dt ->
match dt with
- | DT_I -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I)
- | DT_I1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I1)
- | DT_I2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I2)
- | DT_I4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I4)
- | DT_I8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I8)
- | DT_U -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U)
- | DT_U1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U1)
- | DT_U2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U2)
- | DT_U4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U4)
- | DT_U8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U8)
- | DT_R -> failwith "AI_conv_ovf DT_R?" // XXX - check
- | DT_R4 -> failwith "AI_conv_ovf DT_R4?" // XXX - check
- | DT_R8 -> failwith "AI_conv_ovf DT_R8?" // XXX - check
+ | DT_I -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I)
+ | DT_I1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I1)
+ | DT_I2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I2)
+ | DT_I4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I4)
+ | DT_I8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I8)
+ | DT_U -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U)
+ | DT_U1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U1)
+ | DT_U2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U2)
+ | DT_U4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U4)
+ | DT_U8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U8)
+ | DT_R -> failwith "AI_conv_ovf DT_R?" // XXX - check
+ | DT_R4 -> failwith "AI_conv_ovf DT_R4?" // XXX - check
+ | DT_R8 -> failwith "AI_conv_ovf DT_R8?" // XXX - check
| DT_REF -> failwith "AI_conv_ovf DT_REF?" // XXX - check
// conversion - ovf checks and unsigned
- | AI_conv_ovf_un dt ->
+ | AI_conv_ovf_un dt ->
match dt with
- | DT_I -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I_Un)
- | DT_I1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I1_Un)
- | DT_I2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I2_Un)
- | DT_I4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I4_Un)
- | DT_I8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I8_Un)
- | DT_U -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U_Un)
- | DT_U1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U1_Un)
- | DT_U2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U2_Un)
- | DT_U4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U4_Un)
- | DT_U8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U8_Un)
- | DT_R -> failwith "AI_conv_ovf_un DT_R?" // XXX - check
- | DT_R4 -> failwith "AI_conv_ovf_un DT_R4?" // XXX - check
- | DT_R8 -> failwith "AI_conv_ovf_un DT_R8?" // XXX - check
+ | DT_I -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I_Un)
+ | DT_I1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I1_Un)
+ | DT_I2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I2_Un)
+ | DT_I4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I4_Un)
+ | DT_I8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I8_Un)
+ | DT_U -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U_Un)
+ | DT_U1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U1_Un)
+ | DT_U2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U2_Un)
+ | DT_U4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U4_Un)
+ | DT_U8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U8_Un)
+ | DT_R -> failwith "AI_conv_ovf_un DT_R?" // XXX - check
+ | DT_R4 -> failwith "AI_conv_ovf_un DT_R4?" // XXX - check
+ | DT_R8 -> failwith "AI_conv_ovf_un DT_R8?" // XXX - check
| DT_REF -> failwith "AI_conv_ovf_un DT_REF?" // XXX - check
- | AI_mul -> ilG.EmitAndLog(OpCodes.Mul)
- | AI_mul_ovf -> ilG.EmitAndLog(OpCodes.Mul_Ovf)
- | AI_mul_ovf_un -> ilG.EmitAndLog(OpCodes.Mul_Ovf_Un)
- | AI_rem -> ilG.EmitAndLog(OpCodes.Rem)
- | AI_rem_un -> ilG.EmitAndLog(OpCodes.Rem_Un)
- | AI_shl -> ilG.EmitAndLog(OpCodes.Shl)
- | AI_shr -> ilG.EmitAndLog(OpCodes.Shr)
- | AI_shr_un -> ilG.EmitAndLog(OpCodes.Shr_Un)
- | AI_sub -> ilG.EmitAndLog(OpCodes.Sub)
- | AI_sub_ovf -> ilG.EmitAndLog(OpCodes.Sub_Ovf)
- | AI_sub_ovf_un -> ilG.EmitAndLog(OpCodes.Sub_Ovf_Un)
- | AI_xor -> ilG.EmitAndLog(OpCodes.Xor)
- | AI_or -> ilG.EmitAndLog(OpCodes.Or)
- | AI_neg -> ilG.EmitAndLog(OpCodes.Neg)
- | AI_not -> ilG.EmitAndLog(OpCodes.Not)
- | AI_ldnull -> ilG.EmitAndLog(OpCodes.Ldnull)
- | AI_dup -> ilG.EmitAndLog(OpCodes.Dup)
- | AI_pop -> ilG.EmitAndLog(OpCodes.Pop)
- | AI_ckfinite -> ilG.EmitAndLog(OpCodes.Ckfinite)
- | AI_nop -> ilG.EmitAndLog(OpCodes.Nop)
- | AI_ldc (DT_I4, ILConst.I4 i32) -> ilG.EmitAndLog(OpCodes.Ldc_I4, i32)
- | AI_ldc (DT_I8, ILConst.I8 i64) -> ilG.Emit(OpCodes.Ldc_I8, i64)
- | AI_ldc (DT_R4, ILConst.R4 r32) -> ilG.Emit(OpCodes.Ldc_R4, r32)
- | AI_ldc (DT_R8, ILConst.R8 r64) -> ilG.Emit(OpCodes.Ldc_R8, r64)
- | AI_ldc (_ , _ ) -> failwith "emitInstrI_arith (AI_ldc (ty, const)) iltyped"
- | I_ldarg u16 -> ilG.EmitAndLog(OpCodes.Ldarg , int16 u16)
- | I_ldarga u16 -> ilG.EmitAndLog(OpCodes.Ldarga, int16 u16)
- | I_ldind (align, vol, dt) ->
+ | AI_mul -> ilG.EmitAndLog(OpCodes.Mul)
+ | AI_mul_ovf -> ilG.EmitAndLog(OpCodes.Mul_Ovf)
+ | AI_mul_ovf_un -> ilG.EmitAndLog(OpCodes.Mul_Ovf_Un)
+ | AI_rem -> ilG.EmitAndLog(OpCodes.Rem)
+ | AI_rem_un -> ilG.EmitAndLog(OpCodes.Rem_Un)
+ | AI_shl -> ilG.EmitAndLog(OpCodes.Shl)
+ | AI_shr -> ilG.EmitAndLog(OpCodes.Shr)
+ | AI_shr_un -> ilG.EmitAndLog(OpCodes.Shr_Un)
+ | AI_sub -> ilG.EmitAndLog(OpCodes.Sub)
+ | AI_sub_ovf -> ilG.EmitAndLog(OpCodes.Sub_Ovf)
+ | AI_sub_ovf_un -> ilG.EmitAndLog(OpCodes.Sub_Ovf_Un)
+ | AI_xor -> ilG.EmitAndLog(OpCodes.Xor)
+ | AI_or -> ilG.EmitAndLog(OpCodes.Or)
+ | AI_neg -> ilG.EmitAndLog(OpCodes.Neg)
+ | AI_not -> ilG.EmitAndLog(OpCodes.Not)
+ | AI_ldnull -> ilG.EmitAndLog(OpCodes.Ldnull)
+ | AI_dup -> ilG.EmitAndLog(OpCodes.Dup)
+ | AI_pop -> ilG.EmitAndLog(OpCodes.Pop)
+ | AI_ckfinite -> ilG.EmitAndLog(OpCodes.Ckfinite)
+ | AI_nop -> ilG.EmitAndLog(OpCodes.Nop)
+ | AI_ldc (DT_I4, ILConst.I4 i32) -> ilG.EmitAndLog(OpCodes.Ldc_I4, i32)
+ | AI_ldc (DT_I8, ILConst.I8 i64) -> ilG.Emit(OpCodes.Ldc_I8, i64)
+ | AI_ldc (DT_R4, ILConst.R4 r32) -> ilG.Emit(OpCodes.Ldc_R4, r32)
+ | AI_ldc (DT_R8, ILConst.R8 r64) -> ilG.Emit(OpCodes.Ldc_R8, r64)
+ | AI_ldc (_, _ ) -> failwith "emitInstrI_arith (AI_ldc (ty, const)) iltyped"
+ | I_ldarg u16 -> ilG.EmitAndLog(OpCodes.Ldarg, int16 u16)
+ | I_ldarga u16 -> ilG.EmitAndLog(OpCodes.Ldarga, int16 u16)
+ | I_ldind (align, vol, dt) ->
emitInstrAlign ilG align
emitInstrVolatile ilG vol
match dt with
- | DT_I -> ilG.EmitAndLog(OpCodes.Ldind_I)
- | DT_I1 -> ilG.EmitAndLog(OpCodes.Ldind_I1)
- | DT_I2 -> ilG.EmitAndLog(OpCodes.Ldind_I2)
- | DT_I4 -> ilG.EmitAndLog(OpCodes.Ldind_I4)
- | DT_I8 -> ilG.EmitAndLog(OpCodes.Ldind_I8)
- | DT_R -> failwith "emitInstr cenv: ldind R"
- | DT_R4 -> ilG.EmitAndLog(OpCodes.Ldind_R4)
- | DT_R8 -> ilG.EmitAndLog(OpCodes.Ldind_R8)
- | DT_U -> failwith "emitInstr cenv: ldind U"
- | DT_U1 -> ilG.EmitAndLog(OpCodes.Ldind_U1)
- | DT_U2 -> ilG.EmitAndLog(OpCodes.Ldind_U2)
- | DT_U4 -> ilG.EmitAndLog(OpCodes.Ldind_U4)
- | DT_U8 -> failwith "emitInstr cenv: ldind U8"
+ | DT_I -> ilG.EmitAndLog(OpCodes.Ldind_I)
+ | DT_I1 -> ilG.EmitAndLog(OpCodes.Ldind_I1)
+ | DT_I2 -> ilG.EmitAndLog(OpCodes.Ldind_I2)
+ | DT_I4 -> ilG.EmitAndLog(OpCodes.Ldind_I4)
+ | DT_I8 -> ilG.EmitAndLog(OpCodes.Ldind_I8)
+ | DT_R -> failwith "emitInstr cenv: ldind R"
+ | DT_R4 -> ilG.EmitAndLog(OpCodes.Ldind_R4)
+ | DT_R8 -> ilG.EmitAndLog(OpCodes.Ldind_R8)
+ | DT_U -> failwith "emitInstr cenv: ldind U"
+ | DT_U1 -> ilG.EmitAndLog(OpCodes.Ldind_U1)
+ | DT_U2 -> ilG.EmitAndLog(OpCodes.Ldind_U2)
+ | DT_U4 -> ilG.EmitAndLog(OpCodes.Ldind_U4)
+ | DT_U8 -> failwith "emitInstr cenv: ldind U8"
| DT_REF -> ilG.EmitAndLog(OpCodes.Ldind_Ref)
- | I_ldloc u16 -> ilG.EmitAndLog(OpCodes.Ldloc , int16 u16)
+ | I_ldloc u16 -> ilG.EmitAndLog(OpCodes.Ldloc, int16 u16)
| I_ldloca u16 -> ilG.EmitAndLog(OpCodes.Ldloca, int16 u16)
- | I_starg u16 -> ilG.EmitAndLog(OpCodes.Starg , int16 u16)
- | I_stind (align, vol, dt) ->
+ | I_starg u16 -> ilG.EmitAndLog(OpCodes.Starg, int16 u16)
+ | I_stind (align, vol, dt) ->
emitInstrAlign ilG align
emitInstrVolatile ilG vol
match dt with
- | DT_I -> ilG.EmitAndLog(OpCodes.Stind_I)
- | DT_I1 -> ilG.EmitAndLog(OpCodes.Stind_I1)
- | DT_I2 -> ilG.EmitAndLog(OpCodes.Stind_I2)
- | DT_I4 -> ilG.EmitAndLog(OpCodes.Stind_I4)
- | DT_I8 -> ilG.EmitAndLog(OpCodes.Stind_I8)
- | DT_R -> failwith "emitInstr cenv: stind R"
- | DT_R4 -> ilG.EmitAndLog(OpCodes.Stind_R4)
- | DT_R8 -> ilG.EmitAndLog(OpCodes.Stind_R8)
- | DT_U -> ilG.EmitAndLog(OpCodes.Stind_I) // NOTE: unsigned -> int conversion
- | DT_U1 -> ilG.EmitAndLog(OpCodes.Stind_I1) // NOTE: follows code ilwrite.fs
- | DT_U2 -> ilG.EmitAndLog(OpCodes.Stind_I2) // NOTE: is it ok?
- | DT_U4 -> ilG.EmitAndLog(OpCodes.Stind_I4) // NOTE: it is generated by bytearray tests
- | DT_U8 -> ilG.EmitAndLog(OpCodes.Stind_I8) // NOTE: unsigned -> int conversion
+ | DT_I -> ilG.EmitAndLog(OpCodes.Stind_I)
+ | DT_I1 -> ilG.EmitAndLog(OpCodes.Stind_I1)
+ | DT_I2 -> ilG.EmitAndLog(OpCodes.Stind_I2)
+ | DT_I4 -> ilG.EmitAndLog(OpCodes.Stind_I4)
+ | DT_I8 -> ilG.EmitAndLog(OpCodes.Stind_I8)
+ | DT_R -> failwith "emitInstr cenv: stind R"
+ | DT_R4 -> ilG.EmitAndLog(OpCodes.Stind_R4)
+ | DT_R8 -> ilG.EmitAndLog(OpCodes.Stind_R8)
+ | DT_U -> ilG.EmitAndLog(OpCodes.Stind_I) // NOTE: unsigned -> int conversion
+ | DT_U1 -> ilG.EmitAndLog(OpCodes.Stind_I1) // NOTE: follows code ilwrite.fs
+ | DT_U2 -> ilG.EmitAndLog(OpCodes.Stind_I2) // NOTE: is it ok?
+ | DT_U4 -> ilG.EmitAndLog(OpCodes.Stind_I4) // NOTE: it is generated by bytearray tests
+ | DT_U8 -> ilG.EmitAndLog(OpCodes.Stind_I8) // NOTE: unsigned -> int conversion
| DT_REF -> ilG.EmitAndLog(OpCodes.Stind_Ref)
- | I_stloc u16 -> ilG.EmitAndLog(OpCodes.Stloc, int16 u16)
- | I_br targ -> ilG.EmitAndLog(OpCodes.Br, envGetLabel emEnv targ)
+ | I_stloc u16 -> ilG.EmitAndLog(OpCodes.Stloc, int16 u16)
+ | I_br targ -> ilG.EmitAndLog(OpCodes.Br, envGetLabel emEnv targ)
| I_jmp mspec -> ilG.EmitAndLog(OpCodes.Jmp, convMethodSpec cenv emEnv mspec)
| I_brcmp (comp, targ) -> emitInstrCompare emEnv ilG comp targ
| I_switch labels -> ilG.Emit(OpCodes.Switch, Array.ofList (List.map (envGetLabel emEnv) labels))
| I_ret -> ilG.EmitAndLog(OpCodes.Ret)
- | I_call (tail, mspec, varargs) ->
+ | I_call (tail, mspec, varargs) ->
emitSilverlightCheck ilG
emitInstrCall cenv emEnv ilG OpCodes.Call tail mspec varargs
@@ -1127,7 +1133,7 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr =
ilG.Emit(OpCodes.Constrained, convType cenv emEnv ty)
emitInstrCall cenv emEnv ilG OpCodes.Callvirt tail mspec varargs
- | I_calli (tail, callsig, None) ->
+ | I_calli (tail, callsig, None) ->
emitInstrTail ilG tail (fun () ->
ilG.EmitCalli(OpCodes.Calli,
convCallConv callsig.CallingConv,
@@ -1149,49 +1155,49 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr =
| I_newobj (mspec, varargs) ->
emitInstrNewobj cenv emEnv ilG mspec varargs
- | I_throw -> ilG.EmitAndLog(OpCodes.Throw)
- | I_endfinally -> ilG.EmitAndLog(OpCodes.Endfinally)
- | I_endfilter -> ilG.EmitAndLog(OpCodes.Endfilter)
- | I_leave label -> ilG.EmitAndLog(OpCodes.Leave, envGetLabel emEnv label)
- | I_ldsfld (vol, fspec) -> emitInstrVolatile ilG vol; ilG.EmitAndLog(OpCodes.Ldsfld , convFieldSpec cenv emEnv fspec)
- | I_ldfld (align, vol, fspec) -> emitInstrAlign ilG align; emitInstrVolatile ilG vol; ilG.EmitAndLog(OpCodes.Ldfld , convFieldSpec cenv emEnv fspec)
- | I_ldsflda fspec -> ilG.EmitAndLog(OpCodes.Ldsflda, convFieldSpec cenv emEnv fspec)
- | I_ldflda fspec -> ilG.EmitAndLog(OpCodes.Ldflda , convFieldSpec cenv emEnv fspec)
+ | I_throw -> ilG.EmitAndLog(OpCodes.Throw)
+ | I_endfinally -> ilG.EmitAndLog(OpCodes.Endfinally)
+ | I_endfilter -> ilG.EmitAndLog(OpCodes.Endfilter)
+ | I_leave label -> ilG.EmitAndLog(OpCodes.Leave, envGetLabel emEnv label)
+ | I_ldsfld (vol, fspec) -> emitInstrVolatile ilG vol; ilG.EmitAndLog(OpCodes.Ldsfld, convFieldSpec cenv emEnv fspec)
+ | I_ldfld (align, vol, fspec) -> emitInstrAlign ilG align; emitInstrVolatile ilG vol; ilG.EmitAndLog(OpCodes.Ldfld, convFieldSpec cenv emEnv fspec)
+ | I_ldsflda fspec -> ilG.EmitAndLog(OpCodes.Ldsflda, convFieldSpec cenv emEnv fspec)
+ | I_ldflda fspec -> ilG.EmitAndLog(OpCodes.Ldflda, convFieldSpec cenv emEnv fspec)
- | I_stsfld (vol, fspec) ->
+ | I_stsfld (vol, fspec) ->
emitInstrVolatile ilG vol
ilG.EmitAndLog(OpCodes.Stsfld, convFieldSpec cenv emEnv fspec)
- | I_stfld (align, vol, fspec) ->
+ | I_stfld (align, vol, fspec) ->
emitInstrAlign ilG align
emitInstrVolatile ilG vol
ilG.EmitAndLog(OpCodes.Stfld, convFieldSpec cenv emEnv fspec)
- | I_ldstr s -> ilG.EmitAndLog(OpCodes.Ldstr, s)
- | I_isinst ty -> ilG.EmitAndLog(OpCodes.Isinst, convType cenv emEnv ty)
- | I_castclass ty -> ilG.EmitAndLog(OpCodes.Castclass, convType cenv emEnv ty)
- | I_ldtoken (ILToken.ILType ty) -> ilG.EmitAndLog(OpCodes.Ldtoken, convTypeOrTypeDef cenv emEnv ty)
+ | I_ldstr s -> ilG.EmitAndLog(OpCodes.Ldstr, s)
+ | I_isinst ty -> ilG.EmitAndLog(OpCodes.Isinst, convType cenv emEnv ty)
+ | I_castclass ty -> ilG.EmitAndLog(OpCodes.Castclass, convType cenv emEnv ty)
+ | I_ldtoken (ILToken.ILType ty) -> ilG.EmitAndLog(OpCodes.Ldtoken, convTypeOrTypeDef cenv emEnv ty)
| I_ldtoken (ILToken.ILMethod mspec) -> ilG.EmitAndLog(OpCodes.Ldtoken, convMethodSpec cenv emEnv mspec)
- | I_ldtoken (ILToken.ILField fspec) -> ilG.EmitAndLog(OpCodes.Ldtoken, convFieldSpec cenv emEnv fspec)
- | I_ldvirtftn mspec -> ilG.EmitAndLog(OpCodes.Ldvirtftn, convMethodSpec cenv emEnv mspec)
+ | I_ldtoken (ILToken.ILField fspec) -> ilG.EmitAndLog(OpCodes.Ldtoken, convFieldSpec cenv emEnv fspec)
+ | I_ldvirtftn mspec -> ilG.EmitAndLog(OpCodes.Ldvirtftn, convMethodSpec cenv emEnv mspec)
// Value type instructions
- | I_cpobj ty -> ilG.EmitAndLog(OpCodes.Cpobj , convType cenv emEnv ty)
- | I_initobj ty -> ilG.EmitAndLog(OpCodes.Initobj , convType cenv emEnv ty)
+ | I_cpobj ty -> ilG.EmitAndLog(OpCodes.Cpobj, convType cenv emEnv ty)
+ | I_initobj ty -> ilG.EmitAndLog(OpCodes.Initobj, convType cenv emEnv ty)
| I_ldobj (align, vol, ty) ->
emitInstrAlign ilG align
emitInstrVolatile ilG vol
- ilG.EmitAndLog(OpCodes.Ldobj , convType cenv emEnv ty)
+ ilG.EmitAndLog(OpCodes.Ldobj, convType cenv emEnv ty)
| I_stobj (align, vol, ty) ->
emitInstrAlign ilG align
emitInstrVolatile ilG vol
- ilG.EmitAndLog(OpCodes.Stobj , convType cenv emEnv ty)
+ ilG.EmitAndLog(OpCodes.Stobj, convType cenv emEnv ty)
- | I_box ty -> ilG.EmitAndLog(OpCodes.Box , convType cenv emEnv ty)
- | I_unbox ty -> ilG.EmitAndLog(OpCodes.Unbox , convType cenv emEnv ty)
- | I_unbox_any ty -> ilG.EmitAndLog(OpCodes.Unbox_Any, convType cenv emEnv ty)
- | I_sizeof ty -> ilG.EmitAndLog(OpCodes.Sizeof , convType cenv emEnv ty)
+ | I_box ty -> ilG.EmitAndLog(OpCodes.Box, convType cenv emEnv ty)
+ | I_unbox ty -> ilG.EmitAndLog(OpCodes.Unbox, convType cenv emEnv ty)
+ | I_unbox_any ty -> ilG.EmitAndLog(OpCodes.Unbox_Any, convType cenv emEnv ty)
+ | I_sizeof ty -> ilG.EmitAndLog(OpCodes.Sizeof, convType cenv emEnv ty)
// Generalized array instructions.
// In AbsIL these instructions include
@@ -1205,55 +1211,55 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr =
// generalized instruction with the corresponding ILArrayShape
// argument. This is done to simplify the IL and make it more uniform.
// The IL writer then reverses this when emitting the binary.
- | I_ldelem dt ->
+ | I_ldelem dt ->
match dt with
- | DT_I -> ilG.EmitAndLog(OpCodes.Ldelem_I)
- | DT_I1 -> ilG.EmitAndLog(OpCodes.Ldelem_I1)
- | DT_I2 -> ilG.EmitAndLog(OpCodes.Ldelem_I2)
- | DT_I4 -> ilG.EmitAndLog(OpCodes.Ldelem_I4)
- | DT_I8 -> ilG.EmitAndLog(OpCodes.Ldelem_I8)
- | DT_R -> failwith "emitInstr cenv: ldelem R"
- | DT_R4 -> ilG.EmitAndLog(OpCodes.Ldelem_R4)
- | DT_R8 -> ilG.EmitAndLog(OpCodes.Ldelem_R8)
- | DT_U -> failwith "emitInstr cenv: ldelem U"
- | DT_U1 -> ilG.EmitAndLog(OpCodes.Ldelem_U1)
- | DT_U2 -> ilG.EmitAndLog(OpCodes.Ldelem_U2)
- | DT_U4 -> ilG.EmitAndLog(OpCodes.Ldelem_U4)
- | DT_U8 -> failwith "emitInstr cenv: ldelem U8"
+ | DT_I -> ilG.EmitAndLog(OpCodes.Ldelem_I)
+ | DT_I1 -> ilG.EmitAndLog(OpCodes.Ldelem_I1)
+ | DT_I2 -> ilG.EmitAndLog(OpCodes.Ldelem_I2)
+ | DT_I4 -> ilG.EmitAndLog(OpCodes.Ldelem_I4)
+ | DT_I8 -> ilG.EmitAndLog(OpCodes.Ldelem_I8)
+ | DT_R -> failwith "emitInstr cenv: ldelem R"
+ | DT_R4 -> ilG.EmitAndLog(OpCodes.Ldelem_R4)
+ | DT_R8 -> ilG.EmitAndLog(OpCodes.Ldelem_R8)
+ | DT_U -> failwith "emitInstr cenv: ldelem U"
+ | DT_U1 -> ilG.EmitAndLog(OpCodes.Ldelem_U1)
+ | DT_U2 -> ilG.EmitAndLog(OpCodes.Ldelem_U2)
+ | DT_U4 -> ilG.EmitAndLog(OpCodes.Ldelem_U4)
+ | DT_U8 -> failwith "emitInstr cenv: ldelem U8"
| DT_REF -> ilG.EmitAndLog(OpCodes.Ldelem_Ref)
| I_stelem dt ->
match dt with
- | DT_I -> ilG.EmitAndLog(OpCodes.Stelem_I)
- | DT_I1 -> ilG.EmitAndLog(OpCodes.Stelem_I1)
- | DT_I2 -> ilG.EmitAndLog(OpCodes.Stelem_I2)
- | DT_I4 -> ilG.EmitAndLog(OpCodes.Stelem_I4)
- | DT_I8 -> ilG.EmitAndLog(OpCodes.Stelem_I8)
- | DT_R -> failwith "emitInstr cenv: stelem R"
- | DT_R4 -> ilG.EmitAndLog(OpCodes.Stelem_R4)
- | DT_R8 -> ilG.EmitAndLog(OpCodes.Stelem_R8)
- | DT_U -> failwith "emitInstr cenv: stelem U"
- | DT_U1 -> failwith "emitInstr cenv: stelem U1"
- | DT_U2 -> failwith "emitInstr cenv: stelem U2"
- | DT_U4 -> failwith "emitInstr cenv: stelem U4"
- | DT_U8 -> failwith "emitInstr cenv: stelem U8"
+ | DT_I -> ilG.EmitAndLog(OpCodes.Stelem_I)
+ | DT_I1 -> ilG.EmitAndLog(OpCodes.Stelem_I1)
+ | DT_I2 -> ilG.EmitAndLog(OpCodes.Stelem_I2)
+ | DT_I4 -> ilG.EmitAndLog(OpCodes.Stelem_I4)
+ | DT_I8 -> ilG.EmitAndLog(OpCodes.Stelem_I8)
+ | DT_R -> failwith "emitInstr cenv: stelem R"
+ | DT_R4 -> ilG.EmitAndLog(OpCodes.Stelem_R4)
+ | DT_R8 -> ilG.EmitAndLog(OpCodes.Stelem_R8)
+ | DT_U -> failwith "emitInstr cenv: stelem U"
+ | DT_U1 -> failwith "emitInstr cenv: stelem U1"
+ | DT_U2 -> failwith "emitInstr cenv: stelem U2"
+ | DT_U4 -> failwith "emitInstr cenv: stelem U4"
+ | DT_U8 -> failwith "emitInstr cenv: stelem U8"
| DT_REF -> ilG.EmitAndLog(OpCodes.Stelem_Ref)
- | I_ldelema (ro, _isNativePtr, shape, ty) ->
+ | I_ldelema (ro, _isNativePtr, shape, ty) ->
if (ro = ReadonlyAddress) then ilG.EmitAndLog(OpCodes.Readonly)
if (shape = ILArrayShape.SingleDimensional)
- then ilG.EmitAndLog(OpCodes.Ldelema, convType cenv emEnv ty)
+ then ilG.EmitAndLog(OpCodes.Ldelema, convType cenv emEnv ty)
else
- let aty = convType cenv emEnv (ILType.Array(shape, ty))
+ let aty = convType cenv emEnv (ILType.Array(shape, ty))
let ety = aty.GetElementType()
let rty = ety.MakeByRefType()
let meth = modB.GetArrayMethodAndLog(aty, "Address", System.Reflection.CallingConventions.HasThis, rty, Array.create shape.Rank (typeof) )
ilG.EmitAndLog(OpCodes.Call, meth)
- | I_ldelem_any (shape, ty) ->
- if (shape = ILArrayShape.SingleDimensional) then ilG.EmitAndLog(OpCodes.Ldelem, convType cenv emEnv ty)
+ | I_ldelem_any (shape, ty) ->
+ if (shape = ILArrayShape.SingleDimensional) then ilG.EmitAndLog(OpCodes.Ldelem, convType cenv emEnv ty)
else
- let aty = convType cenv emEnv (ILType.Array(shape, ty))
+ let aty = convType cenv emEnv (ILType.Array(shape, ty))
let ety = aty.GetElementType()
let meth =
#if ENABLE_MONO_SUPPORT
@@ -1265,10 +1271,10 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr =
modB.GetArrayMethodAndLog(aty, "Get", System.Reflection.CallingConventions.HasThis, ety, Array.create shape.Rank (typeof) )
ilG.EmitAndLog(OpCodes.Call, meth)
- | I_stelem_any (shape, ty) ->
- if (shape = ILArrayShape.SingleDimensional) then ilG.EmitAndLog(OpCodes.Stelem, convType cenv emEnv ty)
+ | I_stelem_any (shape, ty) ->
+ if (shape = ILArrayShape.SingleDimensional) then ilG.EmitAndLog(OpCodes.Stelem, convType cenv emEnv ty)
else
- let aty = convType cenv emEnv (ILType.Array(shape, ty))
+ let aty = convType cenv emEnv (ILType.Array(shape, ty))
let ety = aty.GetElementType()
let meth =
#if ENABLE_MONO_SUPPORT
@@ -1277,42 +1283,42 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr =
setArrayMethInfo shape.Rank ety
else
#endif
- modB.GetArrayMethodAndLog(aty, "Set", System.Reflection.CallingConventions.HasThis, (null:Type), Array.append (Array.create shape.Rank (typeof)) (Array.ofList [ ety ]))
+ modB.GetArrayMethodAndLog(aty, "Set", System.Reflection.CallingConventions.HasThis, (null: Type), Array.append (Array.create shape.Rank (typeof)) (Array.ofList [ ety ]))
ilG.EmitAndLog(OpCodes.Call, meth)
- | I_newarr (shape, ty) ->
+ | I_newarr (shape, ty) ->
if (shape = ILArrayShape.SingleDimensional)
- then ilG.EmitAndLog(OpCodes.Newarr, convType cenv emEnv ty)
+ then ilG.EmitAndLog(OpCodes.Newarr, convType cenv emEnv ty)
else
- let aty = convType cenv emEnv (ILType.Array(shape, ty))
- let meth = modB.GetArrayMethodAndLog(aty, ".ctor", System.Reflection.CallingConventions.HasThis, (null:Type), Array.create shape.Rank (typeof))
+ let aty = convType cenv emEnv (ILType.Array(shape, ty))
+ let meth = modB.GetArrayMethodAndLog(aty, ".ctor", System.Reflection.CallingConventions.HasThis, (null: Type), Array.create shape.Rank (typeof))
ilG.EmitAndLog(OpCodes.Newobj, meth)
- | I_ldlen -> ilG.EmitAndLog(OpCodes.Ldlen)
- | I_mkrefany ty -> ilG.EmitAndLog(OpCodes.Mkrefany, convType cenv emEnv ty)
- | I_refanytype -> ilG.EmitAndLog(OpCodes.Refanytype)
- | I_refanyval ty -> ilG.EmitAndLog(OpCodes.Refanyval, convType cenv emEnv ty)
- | I_rethrow -> ilG.EmitAndLog(OpCodes.Rethrow)
- | I_break -> ilG.EmitAndLog(OpCodes.Break)
- | I_seqpoint src ->
+ | I_ldlen -> ilG.EmitAndLog(OpCodes.Ldlen)
+ | I_mkrefany ty -> ilG.EmitAndLog(OpCodes.Mkrefany, convType cenv emEnv ty)
+ | I_refanytype -> ilG.EmitAndLog(OpCodes.Refanytype)
+ | I_refanyval ty -> ilG.EmitAndLog(OpCodes.Refanyval, convType cenv emEnv ty)
+ | I_rethrow -> ilG.EmitAndLog(OpCodes.Rethrow)
+ | I_break -> ilG.EmitAndLog(OpCodes.Break)
+ | I_seqpoint src ->
#if FX_RESHAPED_REFEMIT
ignore src
()
#else
if cenv.generatePdb && not (src.Document.File.EndsWithOrdinal("stdin")) then
- let guid x = match x with None -> Guid.Empty | Some g -> Guid(g:byte[]) in
+ let guid x = match x with None -> Guid.Empty | Some g -> Guid(g: byte[]) in
let symDoc = modB.DefineDocumentAndLog(src.Document.File, guid src.Document.Language, guid src.Document.Vendor, guid src.Document.DocumentType)
ilG.MarkSequencePointAndLog(symDoc, src.Line, src.Column, src.EndLine, src.EndColumn)
#endif
- | I_arglist -> ilG.EmitAndLog(OpCodes.Arglist)
- | I_localloc -> ilG.EmitAndLog(OpCodes.Localloc)
+ | I_arglist -> ilG.EmitAndLog(OpCodes.Arglist)
+ | I_localloc -> ilG.EmitAndLog(OpCodes.Localloc)
| I_cpblk (align, vol) ->
emitInstrAlign ilG align
emitInstrVolatile ilG vol
ilG.EmitAndLog(OpCodes.Cpblk)
- | I_initblk (align, vol) ->
+ | I_initblk (align, vol) ->
emitInstrAlign ilG align
emitInstrVolatile ilG vol
ilG.EmitAndLog(OpCodes.Initblk)
@@ -1324,10 +1330,10 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr =
| i -> failwithf "the IL instruction %s cannot be emitted" (i.ToString())
-let emitCode cenv modB emEnv (ilG:ILGenerator) (code: ILCode) =
+let emitCode cenv modB emEnv (ilG: ILGenerator) (code: ILCode) =
// Pre-define the labels pending determining their actual marks
let pc2lab = Dictionary()
- let emEnv =
+ let emEnv =
(emEnv, code.Labels) ||> Seq.fold (fun emEnv (KeyValue(label, pc)) ->
let lab = ilG.DefineLabelAndLog()
pc2lab.[pc] <-
@@ -1366,7 +1372,7 @@ let emitCode cenv modB emEnv (ilG:ILGenerator) (code: ILCode) =
add endHandler ilG.EndExceptionBlockAndLog
| ILExceptionClause.TypeCatch(ty, (startHandler, endHandler)) ->
- add startHandler (fun () -> ilG.BeginCatchBlockAndLog (convType cenv emEnv ty))
+ add startHandler (fun () -> ilG.BeginCatchBlockAndLog (convType cenv emEnv ty))
add endHandler ilG.EndExceptionBlockAndLog
// Emit the instructions
@@ -1391,8 +1397,8 @@ let emitCode cenv modB emEnv (ilG:ILGenerator) (code: ILCode) =
| i -> emitInstr cenv modB emEnv ilG i
-let emitLocal cenv emEnv (ilG : ILGenerator) (local: ILLocal) =
- let ty = convType cenv emEnv local.Type
+let emitLocal cenv emEnv (ilG: ILGenerator) (local: ILLocal) =
+ let ty = convType cenv emEnv local.Type
let locBuilder = ilG.DeclareLocalAndLog(ty, local.IsPinned)
#if !FX_NO_PDB_WRITER
match local.DebugInfo with
@@ -1401,7 +1407,7 @@ let emitLocal cenv emEnv (ilG : ILGenerator) (local: ILLocal) =
#endif
locBuilder
-let emitILMethodBody cenv modB emEnv (ilG:ILGenerator) (ilmbody: ILMethodBody) =
+let emitILMethodBody cenv modB emEnv (ilG: ILGenerator) (ilmbody: ILMethodBody) =
let localBs = Array.map (emitLocal cenv emEnv ilG) (List.toArray ilmbody.Locals)
let emEnv = envSetLocals emEnv localBs
emitCode cenv modB emEnv ilG ilmbody.Code
@@ -1409,11 +1415,11 @@ let emitILMethodBody cenv modB emEnv (ilG:ILGenerator) (ilmbody: ILMethodBody) =
let emitMethodBody cenv modB emEnv ilG _name (mbody: ILLazyMethodBody) =
match mbody.Contents with
- | MethodBody.IL ilmbody -> emitILMethodBody cenv modB emEnv (ilG()) ilmbody
- | MethodBody.PInvoke _pinvoke -> ()
- | MethodBody.Abstract -> ()
- | MethodBody.Native -> failwith "emitMethodBody: native"
- | MethodBody.NotAvailable -> failwith "emitMethodBody: metadata only"
+ | MethodBody.IL ilmbody -> emitILMethodBody cenv modB emEnv (ilG()) ilmbody
+ | MethodBody.PInvoke _pinvoke -> ()
+ | MethodBody.Abstract -> ()
+ | MethodBody.Native -> failwith "emitMethodBody: native"
+ | MethodBody.NotAvailable -> failwith "emitMethodBody: metadata only"
let convCustomAttr cenv emEnv (cattr: ILAttribute) =
let methInfo =
@@ -1423,37 +1429,37 @@ let convCustomAttr cenv emEnv (cattr: ILAttribute) =
let data = getCustomAttrData cenv.ilg cattr
(methInfo, data)
-let emitCustomAttr cenv emEnv add cattr = add (convCustomAttr cenv emEnv cattr)
-let emitCustomAttrs cenv emEnv add (cattrs : ILAttributes) = Array.iter (emitCustomAttr cenv emEnv add) cattrs.AsArray
+let emitCustomAttr cenv emEnv add cattr = add (convCustomAttr cenv emEnv cattr)
+let emitCustomAttrs cenv emEnv add (cattrs: ILAttributes) = Array.iter (emitCustomAttr cenv emEnv add) cattrs.AsArray
//----------------------------------------------------------------------------
// buildGenParams
//----------------------------------------------------------------------------
-let buildGenParamsPass1 _emEnv defineGenericParameters (gps : ILGenericParameterDefs) =
+let buildGenParamsPass1 _emEnv defineGenericParameters (gps: ILGenericParameterDefs) =
match gps with
| [] -> ()
| gps ->
let gpsNames = gps |> List.map (fun gp -> gp.Name)
- defineGenericParameters (Array.ofList gpsNames) |> ignore
+ defineGenericParameters (Array.ofList gpsNames) |> ignore
-let buildGenParamsPass1b cenv emEnv (genArgs : Type array) (gps : ILGenericParameterDefs) =
+let buildGenParamsPass1b cenv emEnv (genArgs: Type array) (gps: ILGenericParameterDefs) =
#if FX_RESHAPED_REFLECTION
- let genpBs = genArgs |> Array.map (fun x -> (x.GetTypeInfo() :?> GenericTypeParameterBuilder))
+ let genpBs = genArgs |> Array.map (fun x -> (x.GetTypeInfo() :?> GenericTypeParameterBuilder))
#else
- let genpBs = genArgs |> Array.map (fun x -> (x :?> GenericTypeParameterBuilder))
+ let genpBs = genArgs |> Array.map (fun x -> (x :?> GenericTypeParameterBuilder))
#endif
- gps |> List.iteri (fun i (gp:ILGenericParameterDef) ->
+ gps |> List.iteri (fun i (gp: ILGenericParameterDef) ->
let gpB = genpBs.[i]
// the Constraints are either the parent (base) type or interfaces.
let constraintTs = convTypes cenv emEnv gp.Constraints
- let interfaceTs, baseTs = List.partition (fun (ty:System.Type) -> ty.IsInterface) constraintTs
+ let interfaceTs, baseTs = List.partition (fun (ty: System.Type) -> ty.IsInterface) constraintTs
// set base type constraint
(match baseTs with
- [ ] -> () // Q: should a baseType be set? It is in some samples. Should this be a failure case?
+ [ ] -> () // Q: should a baseType be set? It is in some samples. Should this be a failure case?
| [ baseT ] -> gpB.SetBaseTypeConstraint(baseT)
- | _ -> failwith "buildGenParam: multiple base types"
+ | _ -> failwith "buildGenParam: multiple base types"
)
// set interface constraints (interfaces that instances of gp must meet)
gpB.SetInterfaceConstraints(Array.ofList interfaceTs)
@@ -1462,13 +1468,13 @@ let buildGenParamsPass1b cenv emEnv (genArgs : Type array) (gps : ILGenericParam
let flags = GenericParameterAttributes.None
let flags =
match gp.Variance with
- | NonVariant -> flags
- | CoVariant -> flags ||| GenericParameterAttributes.Covariant
+ | NonVariant -> flags
+ | CoVariant -> flags ||| GenericParameterAttributes.Covariant
| ContraVariant -> flags ||| GenericParameterAttributes.Contravariant
- let flags = if gp.HasReferenceTypeConstraint then flags ||| GenericParameterAttributes.ReferenceTypeConstraint else flags
+ let flags = if gp.HasReferenceTypeConstraint then flags ||| GenericParameterAttributes.ReferenceTypeConstraint else flags
let flags = if gp.HasNotNullableValueTypeConstraint then flags ||| GenericParameterAttributes.NotNullableValueTypeConstraint else flags
- let flags = if gp.HasDefaultConstructorConstraint then flags ||| GenericParameterAttributes.DefaultConstructorConstraint else flags
+ let flags = if gp.HasDefaultConstructorConstraint then flags ||| GenericParameterAttributes.DefaultConstructorConstraint else flags
gpB.SetGenericParameterAttributes(flags)
)
@@ -1476,17 +1482,17 @@ let buildGenParamsPass1b cenv emEnv (genArgs : Type array) (gps : ILGenericParam
// emitParameter
//----------------------------------------------------------------------------
-let emitParameter cenv emEnv (defineParameter : int * ParameterAttributes * string -> ParameterBuilder) i (param: ILParameter) =
+let emitParameter cenv emEnv (defineParameter: int * ParameterAttributes * string -> ParameterBuilder) i (param: ILParameter) =
// -Type: ty
// -Default: ILFieldInit option
// -Marshal: NativeType option; (* Marshalling map for parameters. COM Interop only. *)
- let attrs = flagsIf param.IsIn ParameterAttributes.In |||
- flagsIf param.IsOut ParameterAttributes.Out |||
+ let attrs = flagsIf param.IsIn ParameterAttributes.In |||
+ flagsIf param.IsOut ParameterAttributes.Out |||
flagsIf param.IsOptional ParameterAttributes.Optional
let name =
match param.Name with
| Some name -> name
- | None -> "X" + string(i+1)
+ | None -> "X" + string(i+1)
let parB = defineParameter(i, attrs, name)
emitCustomAttrs cenv emEnv (wrapCustomAttr parB.SetCustomAttribute) param.CustomAttrs
@@ -1495,7 +1501,7 @@ let emitParameter cenv emEnv (defineParameter : int * ParameterAttributes * stri
// buildMethodPass2
//----------------------------------------------------------------------------
-let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef) =
+let rec buildMethodPass2 cenv tref (typB: TypeBuilder) emEnv (mdef: ILMethodDef) =
let attrs = mdef.Attributes
let implflags = mdef.ImplAttributes
let cconv = convCallConv mdef.CallingConv
@@ -1507,9 +1513,9 @@ let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef)
emEnv
match mdef.Body.Contents with
#if !FX_RESHAPED_REFEMIT
- | MethodBody.PInvoke p ->
+ | MethodBody.PInvoke p ->
let argtys = convTypesToArray cenv emEnv mdef.ParameterTypes
- let rty = convType cenv emEnv mdef.Return.Type
+ let rty = convType cenv emEnv mdef.Return.Type
let pcc =
match p.CallingConv with
@@ -1541,7 +1547,7 @@ let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef)
let consB = typB.DefineConstructorAndLog(attrs, cconv, convTypesToArray cenv emEnv mdef.ParameterTypes)
consB.SetImplementationFlagsAndLog(implflags)
envBindConsRef emEnv mref consB
- | _name ->
+ | _name ->
// The return/argument types may involve the generic parameters
let methB = typB.DefineMethodAndLog(mdef.Name, attrs, cconv)
@@ -1560,7 +1566,7 @@ let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef)
|> Array.unzip
let returnTypeRequiredCustomModifiers, returnTypeOptionalCustomModifiers = mdef.Return |> convReturnModifiers cenv emEnv
- let returnType = convType cenv emEnv mdef.Return.Type
+ let returnType = convType cenv emEnv mdef.Return.Type
methB.SetSignatureAndLog(returnType, returnTypeRequiredCustomModifiers, returnTypeOptionalCustomModifiers, parameterTypes, parameterTypeRequiredCustomModifiers,parameterTypeOptionalCustomModifiers)
@@ -1573,11 +1579,11 @@ let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef)
// buildMethodPass3 cenv
//----------------------------------------------------------------------------
-let rec buildMethodPass3 cenv tref modB (typB:TypeBuilder) emEnv (mdef : ILMethodDef) =
- let mref = mkRefToILMethod (tref, mdef)
+let rec buildMethodPass3 cenv tref modB (typB: TypeBuilder) emEnv (mdef: ILMethodDef) =
+ let mref = mkRefToILMethod (tref, mdef)
let isPInvoke =
match mdef.Body.Contents with
- | MethodBody.PInvoke _p -> true
+ | MethodBody.PInvoke _p -> true
| _ -> false
match mdef.Name with
| ".cctor" | ".ctor" ->
@@ -1615,10 +1621,10 @@ let rec buildMethodPass3 cenv tref modB (typB:TypeBuilder) emEnv (mdef : ILMetho
// buildFieldPass2
//----------------------------------------------------------------------------
-let buildFieldPass2 cenv tref (typB:TypeBuilder) emEnv (fdef : ILFieldDef) =
+let buildFieldPass2 cenv tref (typB: TypeBuilder) emEnv (fdef: ILFieldDef) =
let attrs = fdef.Attributes
- let fieldT = convType cenv emEnv fdef.FieldType
+ let fieldT = convType cenv emEnv fdef.FieldType
let fieldB =
match fdef.Data with
| Some d -> typB.DefineInitializedData(fdef.Name, d, attrs)
@@ -1642,13 +1648,13 @@ let buildFieldPass2 cenv tref (typB:TypeBuilder) emEnv (fdef : ILFieldDef) =
// => here we cannot detect if underlying type is already set so as a conservative solution we delay initialization of fields
// to the end of pass2 (types and members are already created but method bodies are yet not emitted)
{ emEnv with delayedFieldInits = (fun() -> fieldB.SetConstant(convFieldInit initial))::emEnv.delayedFieldInits }
- fdef.Offset |> Option.iter (fun offset -> fieldB.SetOffset(offset))
+ fdef.Offset |> Option.iter (fun offset -> fieldB.SetOffset(offset))
// custom attributes: done on pass 3 as they may reference attribute constructors generated on
// pass 2.
let fref = mkILFieldRef (tref, fdef.Name, fdef.FieldType)
envBindFieldRef emEnv fref fieldB
-let buildFieldPass3 cenv tref (_typB:TypeBuilder) emEnv (fdef : ILFieldDef) =
+let buildFieldPass3 cenv tref (_typB: TypeBuilder) emEnv (fdef: ILFieldDef) =
let fref = mkILFieldRef (tref, fdef.Name, fdef.FieldType)
let fieldB = envGetFieldB emEnv fref
emitCustomAttrs cenv emEnv (wrapCustomAttr fieldB.SetCustomAttribute) fdef.CustomAttrs
@@ -1657,11 +1663,11 @@ let buildFieldPass3 cenv tref (_typB:TypeBuilder) emEnv (fdef : ILFieldDef) =
// buildPropertyPass2, 3
//----------------------------------------------------------------------------
-let buildPropertyPass2 cenv tref (typB:TypeBuilder) emEnv (prop : ILPropertyDef) =
+let buildPropertyPass2 cenv tref (typB: TypeBuilder) emEnv (prop: ILPropertyDef) =
let attrs = flagsIf prop.IsRTSpecialName PropertyAttributes.RTSpecialName |||
- flagsIf prop.IsSpecialName PropertyAttributes.SpecialName
+ flagsIf prop.IsSpecialName PropertyAttributes.SpecialName
- let propB = typB.DefinePropertyAndLog(prop.Name, attrs, convType cenv emEnv prop.PropertyType, convTypesToArray cenv emEnv prop.Args)
+ let propB = typB.DefinePropertyAndLog(prop.Name, attrs, convType cenv emEnv prop.PropertyType, convTypesToArray cenv emEnv prop.Args)
prop.SetMethod |> Option.iter (fun mref -> propB.SetSetMethod(envGetMethB emEnv mref))
prop.GetMethod |> Option.iter (fun mref -> propB.SetGetMethod(envGetMethB emEnv mref))
@@ -1671,7 +1677,7 @@ let buildPropertyPass2 cenv tref (typB:TypeBuilder) emEnv (prop : ILPropertyDef)
let pref = ILPropertyRef.Create (tref, prop.Name)
envBindPropRef emEnv pref propB
-let buildPropertyPass3 cenv tref (_typB:TypeBuilder) emEnv (prop : ILPropertyDef) =
+let buildPropertyPass3 cenv tref (_typB: TypeBuilder) emEnv (prop: ILPropertyDef) =
let pref = ILPropertyRef.Create (tref, prop.Name)
let propB = envGetPropB emEnv pref
emitCustomAttrs cenv emEnv (wrapCustomAttr propB.SetCustomAttribute) prop.CustomAttrs
@@ -1681,11 +1687,11 @@ let buildPropertyPass3 cenv tref (_typB:TypeBuilder) emEnv (prop : ILPropertyDef
//----------------------------------------------------------------------------
-let buildEventPass3 cenv (typB:TypeBuilder) emEnv (eventDef : ILEventDef) =
+let buildEventPass3 cenv (typB: TypeBuilder) emEnv (eventDef: ILEventDef) =
let attrs = flagsIf eventDef.IsSpecialName EventAttributes.SpecialName |||
flagsIf eventDef.IsRTSpecialName EventAttributes.RTSpecialName
assert eventDef.EventType.IsSome
- let eventB = typB.DefineEventAndLog(eventDef.Name, attrs, convType cenv emEnv eventDef.EventType.Value)
+ let eventB = typB.DefineEventAndLog(eventDef.Name, attrs, convType cenv emEnv eventDef.EventType.Value)
eventDef.AddMethod |> (fun mref -> eventB.SetAddOnMethod(envGetMethB emEnv mref))
eventDef.RemoveMethod |> (fun mref -> eventB.SetRemoveOnMethod(envGetMethB emEnv mref))
@@ -1697,10 +1703,10 @@ let buildEventPass3 cenv (typB:TypeBuilder) emEnv (eventDef : ILEventDef) =
// buildMethodImplsPass3
//----------------------------------------------------------------------------
-let buildMethodImplsPass3 cenv _tref (typB:TypeBuilder) emEnv (mimpl : IL.ILMethodImplDef) =
+let buildMethodImplsPass3 cenv _tref (typB: TypeBuilder) emEnv (mimpl: IL.ILMethodImplDef) =
let bodyMethInfo = convMethodRef cenv emEnv (typB.AsType()) mimpl.OverrideBy.MethodRef // doc: must be MethodBuilder
let (OverridesSpec (mref, dtyp)) = mimpl.Overrides
- let declMethTI = convType cenv emEnv dtyp
+ let declMethTI = convType cenv emEnv dtyp
let declMethInfo = convMethodRef cenv emEnv declMethTI mref
typB.DefineMethodOverride(bodyMethInfo, declMethInfo)
emEnv
@@ -1712,31 +1718,31 @@ let buildMethodImplsPass3 cenv _tref (typB:TypeBuilder) emEnv (mimpl : IL.ILMeth
let typeAttrbutesOfTypeDefKind x =
match x with
// required for a TypeBuilder
- | ILTypeDefKind.Class -> TypeAttributes.Class
- | ILTypeDefKind.ValueType -> TypeAttributes.Class
- | ILTypeDefKind.Interface -> TypeAttributes.Interface
- | ILTypeDefKind.Enum -> TypeAttributes.Class
- | ILTypeDefKind.Delegate -> TypeAttributes.Class
+ | ILTypeDefKind.Class -> TypeAttributes.Class
+ | ILTypeDefKind.ValueType -> TypeAttributes.Class
+ | ILTypeDefKind.Interface -> TypeAttributes.Interface
+ | ILTypeDefKind.Enum -> TypeAttributes.Class
+ | ILTypeDefKind.Delegate -> TypeAttributes.Class
let typeAttrbutesOfTypeAccess x =
match x with
- | ILTypeDefAccess.Public -> TypeAttributes.Public
- | ILTypeDefAccess.Private -> TypeAttributes.NotPublic
- | ILTypeDefAccess.Nested macc ->
+ | ILTypeDefAccess.Public -> TypeAttributes.Public
+ | ILTypeDefAccess.Private -> TypeAttributes.NotPublic
+ | ILTypeDefAccess.Nested macc ->
match macc with
- | ILMemberAccess.Assembly -> TypeAttributes.NestedAssembly
- | ILMemberAccess.CompilerControlled -> failwith "Nested compiler controled."
- | ILMemberAccess.FamilyAndAssembly -> TypeAttributes.NestedFamANDAssem
- | ILMemberAccess.FamilyOrAssembly -> TypeAttributes.NestedFamORAssem
- | ILMemberAccess.Family -> TypeAttributes.NestedFamily
- | ILMemberAccess.Private -> TypeAttributes.NestedPrivate
- | ILMemberAccess.Public -> TypeAttributes.NestedPublic
+ | ILMemberAccess.Assembly -> TypeAttributes.NestedAssembly
+ | ILMemberAccess.CompilerControlled -> failwith "Nested compiler controled."
+ | ILMemberAccess.FamilyAndAssembly -> TypeAttributes.NestedFamANDAssem
+ | ILMemberAccess.FamilyOrAssembly -> TypeAttributes.NestedFamORAssem
+ | ILMemberAccess.Family -> TypeAttributes.NestedFamily
+ | ILMemberAccess.Private -> TypeAttributes.NestedPrivate
+ | ILMemberAccess.Public -> TypeAttributes.NestedPublic
let typeAttributesOfTypeEncoding x =
match x with
- | ILDefaultPInvokeEncoding.Ansi -> TypeAttributes.AnsiClass
+ | ILDefaultPInvokeEncoding.Ansi -> TypeAttributes.AnsiClass
| ILDefaultPInvokeEncoding.Auto -> TypeAttributes.AutoClass
- | ILDefaultPInvokeEncoding.Unicode -> TypeAttributes.UnicodeClass
+ | ILDefaultPInvokeEncoding.Unicode -> TypeAttributes.UnicodeClass
let typeAttributesOfTypeLayout cenv emEnv x =
@@ -1750,12 +1756,12 @@ let typeAttributesOfTypeLayout cenv emEnv x =
(tref1,
[mkILNonGenericValueTy tref2 ],
[ ILAttribElem.Int32 x ],
- (p.Pack |> Option.toList |> List.map (fun x -> ("Pack", cenv.ilg.typ_Int32, false, ILAttribElem.Int32 (int32 x)))) @
+ (p.Pack |> Option.toList |> List.map (fun x -> ("Pack", cenv.ilg.typ_Int32, false, ILAttribElem.Int32 (int32 x)))) @
(p.Size |> Option.toList |> List.map (fun x -> ("Size", cenv.ilg.typ_Int32, false, ILAttribElem.Int32 x))))))
| _ -> None
match x with
- | ILTypeDefLayout.Auto -> None
- | ILTypeDefLayout.Explicit p -> (attr 0x02 p)
+ | ILTypeDefLayout.Auto -> None
+ | ILTypeDefLayout.Explicit p -> (attr 0x02 p)
| ILTypeDefLayout.Sequential p -> (attr 0x00 p)
@@ -1763,7 +1769,7 @@ let typeAttributesOfTypeLayout cenv emEnv x =
// buildTypeDefPass1 cenv
//----------------------------------------------------------------------------
-let rec buildTypeDefPass1 cenv emEnv (modB:ModuleBuilder) rootTypeBuilder nesting (tdef : ILTypeDef) =
+let rec buildTypeDefPass1 cenv emEnv (modB: ModuleBuilder) rootTypeBuilder nesting (tdef: ILTypeDef) =
// -IsComInterop: bool; (* Class or interface generated for COM interop *)
// -SecurityDecls: Permissions
// -InitSemantics: ILTypeInit
@@ -1773,7 +1779,7 @@ let rec buildTypeDefPass1 cenv emEnv (modB:ModuleBuilder) rootTypeBuilder nestin
let attrsType = tdef.Attributes
// TypeBuilder from TypeAttributes.
- let typB : TypeBuilder = rootTypeBuilder (tdef.Name, attrsType)
+ let typB: TypeBuilder = rootTypeBuilder (tdef.Name, attrsType)
cattrsLayout |> Option.iter typB.SetCustomAttributeAndLog
buildGenParamsPass1 emEnv typB.DefineGenericParametersAndLog tdef.GenericParams
@@ -1792,21 +1798,21 @@ let rec buildTypeDefPass1 cenv emEnv (modB:ModuleBuilder) rootTypeBuilder nestin
let emEnv = List.fold buildNestedType emEnv tdef.NestedTypes.AsList
emEnv
-and buildTypeTypeDef cenv emEnv modB (typB : TypeBuilder) nesting tdef =
+and buildTypeTypeDef cenv emEnv modB (typB: TypeBuilder) nesting tdef =
buildTypeDefPass1 cenv emEnv modB typB.DefineNestedTypeAndLog nesting tdef
//----------------------------------------------------------------------------
// buildTypeDefPass1b
//----------------------------------------------------------------------------
-let rec buildTypeDefPass1b cenv nesting emEnv (tdef : ILTypeDef) =
+let rec buildTypeDefPass1b cenv nesting emEnv (tdef: ILTypeDef) =
let tref = mkRefForNestedILTypeDef ILScopeRef.Local (nesting, tdef)
- let typB = envGetTypB emEnv tref
+ let typB = envGetTypB emEnv tref
let genArgs = getGenericArgumentsOfType (typB.AsType())
let emEnv = envPushTyvars emEnv genArgs
// Parent may reference types being defined, so has to come after it's Pass1 creation
- tdef.Extends |> Option.iter (fun ty -> typB.SetParentAndLog(convType cenv emEnv ty))
- // build constraints on ILGenericParameterDefs. Constraints may reference types being defined,
+ tdef.Extends |> Option.iter (fun ty -> typB.SetParentAndLog(convType cenv emEnv ty))
+ // build constraints on ILGenericParameterDefs. Constraints may reference types being defined,
// so have to come after all types are created
buildGenParamsPass1b cenv emEnv genArgs tdef.GenericParams
let emEnv = envPopTyvars emEnv
@@ -1817,16 +1823,16 @@ let rec buildTypeDefPass1b cenv nesting emEnv (tdef : ILTypeDef) =
// buildTypeDefPass2
//----------------------------------------------------------------------------
-let rec buildTypeDefPass2 cenv nesting emEnv (tdef : ILTypeDef) =
+let rec buildTypeDefPass2 cenv nesting emEnv (tdef: ILTypeDef) =
let tref = mkRefForNestedILTypeDef ILScopeRef.Local (nesting, tdef)
- let typB = envGetTypB emEnv tref
+ let typB = envGetTypB emEnv tref
let emEnv = envPushTyvars emEnv (getGenericArgumentsOfType (typB.AsType()))
// add interface impls
tdef.Implements |> convTypes cenv emEnv |> List.iter (fun implT -> typB.AddInterfaceImplementationAndLog(implT))
// add methods, properties
- let emEnv = Array.fold (buildMethodPass2 cenv tref typB) emEnv tdef.Methods.AsArray
- let emEnv = List.fold (buildFieldPass2 cenv tref typB) emEnv tdef.Fields.AsList
- let emEnv = List.fold (buildPropertyPass2 cenv tref typB) emEnv tdef.Properties.AsList
+ let emEnv = Array.fold (buildMethodPass2 cenv tref typB) emEnv tdef.Methods.AsArray
+ let emEnv = List.fold (buildFieldPass2 cenv tref typB) emEnv tdef.Fields.AsList
+ let emEnv = List.fold (buildPropertyPass2 cenv tref typB) emEnv tdef.Properties.AsList
let emEnv = envPopTyvars emEnv
// nested types
let nesting = nesting @ [tdef]
@@ -1837,7 +1843,7 @@ let rec buildTypeDefPass2 cenv nesting emEnv (tdef : ILTypeDef) =
// buildTypeDefPass3 cenv
//----------------------------------------------------------------------------
-let rec buildTypeDefPass3 cenv nesting modB emEnv (tdef : ILTypeDef) =
+let rec buildTypeDefPass3 cenv nesting modB emEnv (tdef: ILTypeDef) =
let tref = mkRefForNestedILTypeDef ILScopeRef.Local (nesting, tdef)
let typB = envGetTypB emEnv tref
let emEnv = envPushTyvars emEnv (getGenericArgumentsOfType (typB.AsType()))
@@ -1861,9 +1867,9 @@ let rec buildTypeDefPass3 cenv nesting modB emEnv (tdef : ILTypeDef) =
// The code in this phase is fragile.
//
// THe background is that System.Reflection.Emit implementations can be finnickity about the
-// order that CreateType calls are made when types refer to each other. Some of these restrictions
+// order that CreateType calls are made when types refer to each other. Some of these restrictions
// are not well documented, or are related to historical bugs where the F# emit code worked around the
-// underlying problems. Ideally the SRE implementation would just "work this out as it goes along" but
+// underlying problems. Ideally the SRE implementation would just "work this out as it goes along" but
// unfortunately that's not been the case.
//
// Here are some known cases:
@@ -1888,13 +1894,13 @@ let rec buildTypeDefPass3 cenv nesting modB emEnv (tdef : ILTypeDef) =
//
//
// There is also a case where generic parameter constraints were being checked before
-// a generic method was called. This forced the loading of the types involved in the
+// a generic method was called. This forced the loading of the types involved in the
// constraints very early.
//
//----------------------------------------------------------------------------
-let getEnclosingTypeRefs (tref:ILTypeRef) =
+let getEnclosingTypeRefs (tref: ILTypeRef) =
match tref.Enclosing with
| [] -> []
| h :: t -> List.scan (fun tr nm -> mkILTyRefInTyRef (tr, nm)) (mkILTyRef(tref.Scope, h)) t
@@ -1906,7 +1912,7 @@ type CollectTypes = ValueTypesOnly | All
let rec getTypeRefsInType (allTypes: CollectTypes) ty acc =
match ty with
| ILType.Void
- | ILType.TypeVar _ -> acc
+ | ILType.TypeVar _ -> acc
| ILType.Ptr eltType | ILType.Byref eltType ->
getTypeRefsInType allTypes eltType acc
| ILType.Array (_, eltType) ->
@@ -1922,13 +1928,13 @@ let rec getTypeRefsInType (allTypes: CollectTypes) ty acc =
| CollectTypes.ValueTypesOnly -> acc
| CollectTypes.All -> tspec.TypeRef :: List.foldBack (getTypeRefsInType allTypes) tspec.GenericArgs acc
| ILType.FunctionPointer _callsig -> failwith "getTypeRefsInType: fptr"
- | ILType.Modified _ -> failwith "getTypeRefsInType: modified"
+ | ILType.Modified _ -> failwith "getTypeRefsInType: modified"
let verbose2 = false
-let createTypeRef (visited : Dictionary<_, _>, created : Dictionary<_, _>) emEnv tref =
+let createTypeRef (visited: Dictionary<_, _>, created: Dictionary<_, _>) emEnv tref =
- let rec traverseTypeDef (tref:ILTypeRef) (tdef:ILTypeDef) =
+ let rec traverseTypeDef (tref: ILTypeRef) (tdef: ILTypeDef) =
if verbose2 then dprintf "buildTypeDefPass4: Creating Enclosing Types of %s\n" tdef.Name
for enc in getEnclosingTypeRefs tref do
traverseTypeRef enc
@@ -1986,11 +1992,11 @@ let createTypeRef (visited : Dictionary<_, _>, created : Dictionary<_, _>) emEnv
let typeName = r.Name
let typeRef = ILTypeRef.Create(ILScopeRef.Local, nestingToProbe, typeName)
match emEnv.emTypMap.TryFind typeRef with
- | Some(_, tb, _, _) ->
+ | Some(_, tb, _, _) ->
if not (tb.IsCreated()) then
tb.CreateTypeAndLog() |> ignore
tb.Assembly
- | None -> null
+ | None -> null
)
// For some reason, the handler is installed while running 'traverseTypeDef' but not while defining the type
// itself.
@@ -2001,15 +2007,15 @@ let createTypeRef (visited : Dictionary<_, _>, created : Dictionary<_, _>) emEnv
System.AppDomain.CurrentDomain.remove_TypeResolve typeCreationHandler
#endif
// At this point, we've done everything we can to prepare the type for loading by eagerly forcing the
- // load of other types. Everything else is up to the implementation of System.Reflection.Emit.
+ // load of other types. Everything else is up to the implementation of System.Reflection.Emit.
if not (created.ContainsKey(tref)) then
created.[tref] <- true
if verbose2 then dprintf "- creating type %s\n" typB.FullName
- typB.CreateTypeAndLog() |> ignore
+ typB.CreateTypeAndLog() |> ignore
traverseTypeRef tref
-let rec buildTypeDefPass4 (visited, created) nesting emEnv (tdef : ILTypeDef) =
+let rec buildTypeDefPass4 (visited, created) nesting emEnv (tdef: ILTypeDef) =
if verbose2 then dprintf "buildTypeDefPass4 %s\n" tdef.Name
let tref = mkRefForNestedILTypeDef ILScopeRef.Local (nesting, tdef)
createTypeRef (visited, created) emEnv tref
@@ -2023,19 +2029,19 @@ let rec buildTypeDefPass4 (visited, created) nesting emEnv (tdef : ILTypeDef) =
// buildModuleType
//----------------------------------------------------------------------------
-let buildModuleTypePass1 cenv (modB:ModuleBuilder) emEnv (tdef:ILTypeDef) =
+let buildModuleTypePass1 cenv (modB: ModuleBuilder) emEnv (tdef: ILTypeDef) =
buildTypeDefPass1 cenv emEnv modB modB.DefineTypeAndLog [] tdef
-let buildModuleTypePass1b cenv emEnv tdef = buildTypeDefPass1b cenv [] emEnv tdef
-let buildModuleTypePass2 cenv emEnv tdef = buildTypeDefPass2 cenv [] emEnv tdef
+let buildModuleTypePass1b cenv emEnv tdef = buildTypeDefPass1b cenv [] emEnv tdef
+let buildModuleTypePass2 cenv emEnv tdef = buildTypeDefPass2 cenv [] emEnv tdef
let buildModuleTypePass3 cenv modB emEnv tdef = buildTypeDefPass3 cenv [] modB emEnv tdef
-let buildModuleTypePass4 visited emEnv tdef = buildTypeDefPass4 visited [] emEnv tdef
+let buildModuleTypePass4 visited emEnv tdef = buildTypeDefPass4 visited [] emEnv tdef
//----------------------------------------------------------------------------
// buildModuleFragment - only the types the fragment get written
//----------------------------------------------------------------------------
-let buildModuleFragment cenv emEnv (asmB : AssemblyBuilder) (modB : ModuleBuilder) (m: ILModuleDef) =
+let buildModuleFragment cenv emEnv (asmB: AssemblyBuilder) (modB: ModuleBuilder) (m: ILModuleDef) =
let tdefs = m.TypeDefs.AsList
let emEnv = (emEnv, tdefs) ||> List.fold (buildModuleTypePass1 cenv modB)
@@ -2050,7 +2056,7 @@ let buildModuleFragment cenv emEnv (asmB : AssemblyBuilder) (modB : ModuleBuilde
let emEnv = (emEnv, tdefs) ||> List.fold (buildModuleTypePass3 cenv modB)
let visited = new Dictionary<_, _>(10)
let created = new Dictionary<_, _>(10)
- tdefs |> List.iter (buildModuleTypePass4 (visited, created) emEnv)
+ tdefs |> List.iter (buildModuleTypePass4 (visited, created) emEnv)
let emEnv = Seq.fold envUpdateCreatedTypeRef emEnv created.Keys // update typT with the created typT
emitCustomAttrs cenv emEnv modB.SetCustomAttributeAndLog m.CustomAttrs
#if FX_RESHAPED_REFEMIT
@@ -2074,11 +2080,11 @@ let buildModuleFragment cenv emEnv (asmB : AssemblyBuilder) (modB : ModuleBuilde
//----------------------------------------------------------------------------
// test hook
//----------------------------------------------------------------------------
-let defineDynamicAssemblyAndLog(asmName, flags, asmDir:string) =
+let defineDynamicAssemblyAndLog(asmName, flags, asmDir: string) =
#if FX_NO_APP_DOMAINS
let asmB = AssemblyBuilder.DefineDynamicAssembly(asmName, flags)
#else
- let currentDom = System.AppDomain.CurrentDomain
+ let currentDom = System.AppDomain.CurrentDomain
let asmB = currentDom.DefineDynamicAssembly(asmName, flags, asmDir)
#endif
if logRefEmitCalls then
@@ -2090,7 +2096,7 @@ let defineDynamicAssemblyAndLog(asmName, flags, asmDir:string) =
let mkDynamicAssemblyAndModule (assemblyName, optimize, debugInfo, collectible) =
let filename = assemblyName + ".dll"
- let asmDir = "."
+ let asmDir = "."
let asmName = new AssemblyName()
asmName.Name <- assemblyName
let asmAccess =
@@ -2104,13 +2110,13 @@ let mkDynamicAssemblyAndModule (assemblyName, optimize, debugInfo, collectible)
if not optimize then
let daType = typeof
let daCtor = daType.GetConstructor [| typeof |]
- let daBuilder = new CustomAttributeBuilder(daCtor, [| System.Diagnostics.DebuggableAttribute.DebuggingModes.DisableOptimizations ||| System.Diagnostics.DebuggableAttribute.DebuggingModes.Default |])
+ let daBuilder = new CustomAttributeBuilder(daCtor, [| System.Diagnostics.DebuggableAttribute.DebuggingModes.DisableOptimizations ||| System.Diagnostics.DebuggableAttribute.DebuggingModes.Default |])
asmB.SetCustomAttributeAndLog(daBuilder)
let modB = asmB.DefineDynamicModuleAndLog(assemblyName, filename, debugInfo)
asmB, modB
-let emitModuleFragment (ilg, emEnv, asmB : AssemblyBuilder, modB : ModuleBuilder, modul : IL.ILModuleDef, debugInfo : bool, resolveAssemblyRef, tryFindSysILTypeRef) =
+let emitModuleFragment (ilg, emEnv, asmB: AssemblyBuilder, modB: ModuleBuilder, modul: IL.ILModuleDef, debugInfo: bool, resolveAssemblyRef, tryFindSysILTypeRef) =
let cenv = { ilg = ilg ; generatePdb = debugInfo; resolveAssemblyRef=resolveAssemblyRef; tryFindSysILTypeRef=tryFindSysILTypeRef }
let emEnv = buildModuleFragment cenv emEnv asmB modB modul
@@ -2120,7 +2126,7 @@ let emitModuleFragment (ilg, emEnv, asmB : AssemblyBuilder, modB : ModuleBuilder
// REVIEW: remainder of manifest
emitCustomAttrs cenv emEnv asmB.SetCustomAttributeAndLog mani.CustomAttrs
// invoke entry point methods
- let execEntryPtFun ((typB : TypeBuilder), methodName) () =
+ let execEntryPtFun ((typB: TypeBuilder), methodName) () =
try
ignore (typB.InvokeMemberAndLog(methodName, BindingFlags.InvokeMethod ||| BindingFlags.Public ||| BindingFlags.Static, [| |]))
None
@@ -2141,13 +2147,13 @@ let emitModuleFragment (ilg, emEnv, asmB : AssemblyBuilder, modB : ModuleBuilder
// However, casting TypeBuilder to Type is not the same as getting Type proper.
// The builder version does not implement all methods on the parent.
//
-// The emEnv stores (typT:Type) for each tref.
+// The emEnv stores (typT: Type) for each tref.
// Once the emitted type is created this typT is updated to ensure it is the Type proper.
// So Type lookup will return the proper Type not TypeBuilder.
-let LookupTypeRef cenv emEnv tref = convCreatedTypeRef cenv emEnv tref
-let LookupType cenv emEnv ty = convCreatedType cenv emEnv ty
+let LookupTypeRef cenv emEnv tref = convCreatedTypeRef cenv emEnv tref
+let LookupType cenv emEnv ty = convCreatedType cenv emEnv ty
// Lookups of ILFieldRef and MethodRef may require a similar non-Builder-fixup post Type-creation.
-let LookupFieldRef emEnv fref = Zmap.tryFind fref emEnv.emFieldMap |> Option.map (fun fieldBuilder -> fieldBuilder :> FieldInfo)
-let LookupMethodRef emEnv mref = Zmap.tryFind mref emEnv.emMethMap |> Option.map (fun methodBuilder -> methodBuilder :> MethodInfo)
+let LookupFieldRef emEnv fref = Zmap.tryFind fref emEnv.emFieldMap |> Option.map (fun fieldBuilder -> fieldBuilder :> FieldInfo)
+let LookupMethodRef emEnv mref = Zmap.tryFind mref emEnv.emMethMap |> Option.map (fun methodBuilder -> methodBuilder :> MethodInfo)
diff --git a/src/absil/ilsupp.fs b/src/absil/ilsupp.fs
index 4f4837238cc..5f9932662d8 100644
--- a/src/absil/ilsupp.fs
+++ b/src/absil/ilsupp.fs
@@ -45,20 +45,20 @@ let MAX_PATH = 260
let E_FAIL = 0x80004005
-let bytesToWord ((b0 : byte) , (b1 : byte)) =
+let bytesToWord ((b0: byte), (b1: byte)) =
(int16)b0 ||| ((int16)b1 <<< 8)
-let bytesToDWord ((b0 : byte) , (b1 : byte) , (b2 : byte) , (b3 : byte)) =
+let bytesToDWord ((b0: byte), (b1: byte), (b2: byte), (b3: byte)) =
(int)b0 ||| ((int)b1 <<< 8) ||| ((int)b2 <<< 16) ||| ((int)b3 <<< 24)
-let bytesToQWord ((b0 : byte) , (b1 : byte) , (b2 : byte) , (b3 : byte) , (b4 : byte) , (b5 : byte) , (b6 : byte) , (b7 : byte)) =
+let bytesToQWord ((b0: byte), (b1: byte), (b2: byte), (b3: byte), (b4: byte), (b5: byte), (b6: byte), (b7: byte)) =
(int64)b0 ||| ((int64)b1 <<< 8) ||| ((int64)b2 <<< 16) ||| ((int64)b3 <<< 24) ||| ((int64)b4 <<< 32) ||| ((int64)b5 <<< 40) ||| ((int64)b6 <<< 48) ||| ((int64)b7 <<< 56)
let dwToBytes n = [| (byte)(n &&& 0xff) ; (byte)((n >>> 8) &&& 0xff) ; (byte)((n >>> 16) &&& 0xff) ; (byte)((n >>> 24) &&& 0xff) |], 4
-let wToBytes (n : int16) = [| (byte)(n &&& 0xffs) ; (byte)((n >>> 8) &&& 0xffs) |], 2
+let wToBytes (n: int16) = [| (byte)(n &&& 0xffs) ; (byte)((n >>> 8) &&& 0xffs) |], 2
#if !FX_NO_LINKEDRESOURCES
// REVIEW: factor these classes under one hierarchy, use reflection for creation from buffer and toBytes()
// Though, everything I'd like to unify is static - metaclasses?
-type IMAGE_FILE_HEADER (m:int16, secs:int16, tds:int32, ptst:int32, nos:int32, soh:int16, c:int16) =
+type IMAGE_FILE_HEADER (m: int16, secs: int16, tds: int32, ptst: int32, nos: int32, soh: int16, c: int16) =
let mutable machine = m
let mutable numberOfSections = secs
let mutable timeDateStamp = tds
@@ -109,7 +109,7 @@ type IMAGE_FILE_HEADER (m:int16, secs:int16, tds:int32, ptst:int32, nos:int32, s
buf.EmitUInt16 ((uint16)characteristics)
buf.Close()
-let bytesToIFH (buffer : byte[]) (offset : int) =
+let bytesToIFH (buffer: byte[]) (offset: int) =
if (buffer.Length - offset) < IMAGE_FILE_HEADER.Width then
invalidArg "buffer" "buffer too small to fit an IMAGE_FILE_HEADER"
IMAGE_FILE_HEADER( bytesToWord(buffer.[offset], buffer.[offset+1]), // Machine
@@ -120,7 +120,7 @@ let bytesToIFH (buffer : byte[]) (offset : int) =
bytesToWord(buffer.[offset+16], buffer.[offset+17]), // SizeOfOptionalHeader
bytesToWord(buffer.[offset+18], buffer.[offset+19])) // Characteristics
-type IMAGE_SECTION_HEADER(n:int64, ai:int32, va:int32, srd:int32, prd:int32, pr:int32, pln:int32, nr:int16, nl:int16, c:int32) =
+type IMAGE_SECTION_HEADER(n: int64, ai: int32, va: int32, srd: int32, prd: int32, pr: int32, pln: int32, nr: int16, nl: int16, c: int32) =
let mutable name = n
let mutable addressInfo = ai // PhysicalAddress / VirtualSize
let mutable virtualAddress = va
@@ -194,7 +194,7 @@ type IMAGE_SECTION_HEADER(n:int64, ai:int32, va:int32, srd:int32, prd:int32, pr:
buf.Close()
-let bytesToISH (buffer : byte[]) (offset : int) =
+let bytesToISH (buffer: byte[]) (offset: int) =
if (buffer.Length - offset) < IMAGE_SECTION_HEADER.Width then
invalidArg "buffer" "buffer too small to fit an IMAGE_SECTION_HEADER"
IMAGE_SECTION_HEADER(bytesToQWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3], buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7]), // Name
@@ -208,7 +208,7 @@ let bytesToISH (buffer : byte[]) (offset : int) =
bytesToWord(buffer.[offset+34], buffer.[offset+35]), // NumberOfLineNumbers
bytesToDWord(buffer.[offset+36], buffer.[offset+37], buffer.[offset+38], buffer.[offset+39])) // Characteristics
-type IMAGE_SYMBOL(n:int64, v:int32, sn:int16, t:int16, sc:byte, nas:byte) =
+type IMAGE_SYMBOL(n: int64, v: int32, sn: int16, t: int16, sc: byte, nas: byte) =
let mutable name = n
let mutable value = v
let mutable sectionNumber = sn
@@ -253,7 +253,7 @@ type IMAGE_SYMBOL(n:int64, v:int32, sn:int16, t:int16, sc:byte, nas:byte) =
buf.EmitByte numberOfAuxSymbols
buf.Close()
-let bytesToIS (buffer : byte[]) (offset : int) =
+let bytesToIS (buffer: byte[]) (offset: int) =
if (buffer.Length - offset) < IMAGE_SYMBOL.Width then
invalidArg "buffer" "buffer too small to fit an IMAGE_SYMBOL"
IMAGE_SYMBOL( bytesToQWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3], buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7]), // Name
@@ -263,7 +263,7 @@ let bytesToIS (buffer : byte[]) (offset : int) =
buffer.[offset+16], // StorageClass
buffer.[offset+17]) // NumberOfAuxSymbols
-type IMAGE_RELOCATION(va:int32, sti:int32, t:int16) =
+type IMAGE_RELOCATION(va: int32, sti: int32, t: int16) =
let mutable virtualAddress = va // Also RelocCount
let mutable symbolTableIndex = sti
let mutable ty = t // type
@@ -294,14 +294,14 @@ type IMAGE_RELOCATION(va:int32, sti:int32, t:int16) =
buf.EmitUInt16 ((uint16)ty)
buf.Close()
-let bytesToIR (buffer : byte[]) (offset : int) =
+let bytesToIR (buffer: byte[]) (offset: int) =
if (buffer.Length - offset) < IMAGE_RELOCATION.Width then
invalidArg "buffer" "buffer too small to fit an IMAGE_RELOCATION"
IMAGE_RELOCATION( bytesToDWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3]),
bytesToDWord(buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7]),
bytesToWord(buffer.[offset+8], buffer.[offset+9]))
-type IMAGE_RESOURCE_DIRECTORY(c:int32, tds:int32, mjv:int16, mnv:int16, nne:int16, nie:int16) =
+type IMAGE_RESOURCE_DIRECTORY(c: int32, tds: int32, mjv: int16, mnv: int16, nne: int16, nie: int16) =
let mutable characteristics = c
let mutable timeDateStamp = tds
let mutable majorVersion = mjv
@@ -345,7 +345,7 @@ type IMAGE_RESOURCE_DIRECTORY(c:int32, tds:int32, mjv:int16, mnv:int16, nne:int1
buf.EmitUInt16 ((uint16)numberOfIdEntries)
buf.Close()
-let bytesToIRD (buffer:byte[]) (offset:int) =
+let bytesToIRD (buffer: byte[]) (offset: int) =
if (buffer.Length - offset) < IMAGE_RESOURCE_DIRECTORY.Width then
invalidArg "buffer" "buffer too small to fit an IMAGE_RESOURCE_DIRECTORY"
IMAGE_RESOURCE_DIRECTORY( bytesToDWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3]), // Characteristics
@@ -355,7 +355,7 @@ let bytesToIRD (buffer:byte[]) (offset:int) =
bytesToWord(buffer.[offset+12], buffer.[offset+13]), // NumberOfNamedEntries
bytesToWord(buffer.[offset+14], buffer.[offset+15])) // NumberOfIdEntries
-type IMAGE_RESOURCE_DIRECTORY_ENTRY(n:int32, o:int32) =
+type IMAGE_RESOURCE_DIRECTORY_ENTRY(n: int32, o: int32) =
let mutable name = n
let mutable offset = o
@@ -381,13 +381,13 @@ type IMAGE_RESOURCE_DIRECTORY_ENTRY(n:int32, o:int32) =
buf.EmitInt32 offset
buf.Close()
-let bytesToIRDE (buffer:byte[]) (offset:int) =
+let bytesToIRDE (buffer: byte[]) (offset: int) =
if (buffer.Length - offset) < IMAGE_RESOURCE_DIRECTORY_ENTRY.Width then
invalidArg "buffer" "buffer too small to fit an IMAGE_RESOURCE_DIRECTORY_ENTRY"
IMAGE_RESOURCE_DIRECTORY_ENTRY( bytesToDWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3]), // Name
bytesToDWord(buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7])) // Offset
-type IMAGE_RESOURCE_DATA_ENTRY(o:int32, s:int32, c:int32, r:int32) =
+type IMAGE_RESOURCE_DATA_ENTRY(o: int32, s: int32, c: int32, r: int32) =
let mutable offsetToData = o
let mutable size = s
let mutable codePage = c
@@ -415,7 +415,7 @@ type IMAGE_RESOURCE_DATA_ENTRY(o:int32, s:int32, c:int32, r:int32) =
buf.EmitInt32 codePage
buf.EmitInt32 reserved
-let bytesToIRDataE (buffer:byte[]) (offset:int) =
+let bytesToIRDataE (buffer: byte[]) (offset: int) =
if (buffer.Length - offset) < IMAGE_RESOURCE_DATA_ENTRY.Width then
invalidArg "buffer" "buffer too small to fit an IMAGE_RESOURCE_DATA_ENTRY"
IMAGE_RESOURCE_DATA_ENTRY(bytesToDWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3]), // OffsetToData
@@ -478,7 +478,7 @@ type ResFormatHeader() =
buf.EmitInt32 dwCharacteristics
buf.Close()
-type ResFormatNode(tid:int32, nid:int32, lid:int32, dataOffset:int32, pbLinkedResource:byte[]) =
+type ResFormatNode(tid: int32, nid: int32, lid: int32, dataOffset: int32, pbLinkedResource: byte[]) =
let mutable resHdr = ResFormatHeader()
let mutable dataEntry = Unchecked.defaultof
let mutable cType = 0
@@ -518,7 +518,7 @@ type ResFormatNode(tid:int32, nid:int32, lid:int32, dataOffset:int32, pbLinkedRe
member x.Name
with get() = wzName
- member x.Save(ulLinkedResourceBaseRVA:int32, pbLinkedResource:byte[], pUnlinkedResource:byte[], offset:int) =
+ member x.Save(ulLinkedResourceBaseRVA: int32, pbLinkedResource: byte[], pUnlinkedResource: byte[], offset: int) =
// Dump them to pUnlinkedResource
// For each resource write header and data
let size = ref 0
@@ -529,7 +529,7 @@ type ResFormatNode(tid:int32, nid:int32, lid:int32, dataOffset:int32, pbLinkedRe
if Unchecked.defaultof <> wzName then
resHdr.HeaderSize <- resHdr.HeaderSize + ((cName + 1) * 2) - 4
- let SaveChunk(p : byte[], sz : int) =
+ let SaveChunk(p: byte[], sz: int) =
if Unchecked.defaultof <> pUnlinkedResource then
Bytes.blit p 0 pUnlinkedResource (!unlinkedResourceOffset + offset) sz
unlinkedResourceOffset := !unlinkedResourceOffset + sz
@@ -537,7 +537,7 @@ type ResFormatNode(tid:int32, nid:int32, lid:int32, dataOffset:int32, pbLinkedRe
()
- // ---- Constant part of the header : DWORD, DWORD
+ // ---- Constant part of the header: DWORD, DWORD
SaveChunk(dwToBytes resHdr.DataSize)
SaveChunk(dwToBytes resHdr.HeaderSize)
@@ -578,10 +578,10 @@ type ResFormatNode(tid:int32, nid:int32, lid:int32, dataOffset:int32, pbLinkedRe
!size
-let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRVA:int32) (fileType:PEFileType) (outputFilePath:string) =
+let linkNativeResources (unlinkedResources: byte[] list) (ulLinkedResourceBaseRVA: int32) (fileType: PEFileType) (outputFilePath: string) =
let nPEFileType = match fileType with X86 -> 0 | X64 -> 2
- let mutable tempResFiles : string list = []
- let mutable objBytes : byte[] = [||]
+ let mutable tempResFiles: string list = []
+ let mutable objBytes: byte[] = [||]
let unlinkedResources = unlinkedResources |> List.filter (fun arr -> arr.Length > 0)
if isNil unlinkedResources then // bail if there's nothing to link
@@ -619,7 +619,7 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV
let createCvtresArgs path =
let tempObjFileName = GetUniqueRandomFileName(path)
let mutable cmdLineArgs = sprintf "%s \"/Out:%s\"" cmdLineArgsPreamble tempObjFileName
- let mutable resFiles : string list = []
+ let mutable resFiles: string list = []
for _ulr in unlinkedResources do
let tempResFileName = GetUniqueRandomFileName(path)
@@ -633,7 +633,7 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV
let attempts =
outputFilePaths |>
List.map (fun path -> createCvtresArgs path) |>
- List.filter (fun ((argstring:string),(_t:string),(_f:string list)) -> (cvtres.Length + argstring.Length) < MAX_PATH)
+ List.filter (fun ((argstring: string),(_t: string),(_f: string list)) -> (cvtres.Length + argstring.Length) < MAX_PATH)
let invoc,tmp,files =
match attempts with
| [] -> createCvtresArgs ".\\" // hope for the best...
@@ -717,7 +717,7 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV
let IMAGE_SYM_CLASS_STATIC = 0x3uy
let IMAGE_SYM_TYPE_NULL = 0x0s
- let GetSymbolEntry (buffer : byte[]) (idx : int) =
+ let GetSymbolEntry (buffer: byte[]) (idx: int) =
bytesToIS buffer (symbolTableHead + (idx * IMAGE_SYMBOL.Width) )
for iReloc = 0 to (int)(rsrc01.NumberOfRelocations - 1s) do
@@ -746,7 +746,7 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV
// return the buffer
pResBuffer
-let unlinkResource (ulLinkedResourceBaseRVA:int32) (pbLinkedResource:byte[]) =
+let unlinkResource (ulLinkedResourceBaseRVA: int32) (pbLinkedResource: byte[]) =
let mutable nResNodes = 0
let pirdType = bytesToIRD pbLinkedResource 0
@@ -778,7 +778,7 @@ let unlinkResource (ulLinkedResourceBaseRVA:int32) (pbLinkedResource:byte[]) =
else
nResNodes <- nResNodes + 1
- let pResNodes : ResFormatNode [] = Array.zeroCreate nResNodes
+ let pResNodes: ResFormatNode [] = Array.zeroCreate nResNodes
nResNodes <- 0
// fill out the entry buffer
@@ -857,153 +857,153 @@ let unlinkResource (ulLinkedResourceBaseRVA:int32) (pbLinkedResource:byte[]) =
[]
[]
type IMetaDataDispenser =
- abstract DefineScope : unit -> unit // need this here to fill the first vtable slot
- abstract OpenScope : [] szScope : string * [] dwOpenFlags:Int32 * [] riid : System.Guid byref * [] punk:Object byref -> unit
+ abstract DefineScope: unit -> unit // need this here to fill the first vtable slot
+ abstract OpenScope: [] szScope: string * [] dwOpenFlags: Int32 * [] riid: System.Guid byref * [] punk: Object byref -> unit
[]
[]
[]
type IMetadataImport =
- abstract Placeholder : unit -> unit
+ abstract Placeholder: unit -> unit
[]
[]
[]
type IMetadataEmit =
- abstract Placeholder : unit -> unit
+ abstract Placeholder: unit -> unit
[]
[< Guid("B01FAFEB-C450-3A4D-BEEC-B4CEEC01E006") ; InterfaceType(ComInterfaceType.InterfaceIsIUnknown) >]
[< ComVisible(false) >]
type ISymUnmanagedDocumentWriter =
- abstract SetSource : sourceSize : int * [] source : byte[] -> unit
- abstract SetCheckSum : algorithmId : System.Guid * checkSumSize : int * [] checkSum : byte [] -> unit
+ abstract SetSource: sourceSize: int * [] source: byte[] -> unit
+ abstract SetCheckSum: algorithmId: System.Guid * checkSumSize: int * [] checkSum: byte [] -> unit
// Struct used to retrieve info on the debug output
[]
type ImageDebugDirectory =
- val Characteristics : int32
- val TimeDateStamp : int32
- val MajorVersion : int16
- val MinorVersion : int16
- val Type : int32
- val SizeOfData : int32
- val AddressOfRawData : int32
- val PointerToRawData : int32
+ val Characteristics: int32
+ val TimeDateStamp: int32
+ val MajorVersion: int16
+ val MinorVersion: int16
+ val Type: int32
+ val SizeOfData: int32
+ val AddressOfRawData: int32
+ val PointerToRawData: int32
[]
[]
type ISymUnmanagedWriter2 =
- abstract DefineDocument : [] url : string *
- language : System.Guid byref *
- languageVendor : System.Guid byref *
- documentType : System.Guid byref *
- [] RetVal : ISymUnmanagedDocumentWriter byref -> unit
- abstract SetUserEntryPoint : entryMethod : uint32 -> unit
- abstract OpenMethod : meth : int -> unit
- abstract CloseMethod : unit -> unit
- abstract OpenScope : startOffset : int * pRetVal : int byref -> unit
- abstract CloseScope : endOffset : int -> unit
- abstract SetScopeRange : scopeID : int * startOffset : int * endOffset : int -> unit
- abstract DefineLocalVariable : [] varname : string *
- attributes : int *
- cSig : int *
- []signature : byte[] *
- addressKind : int *
- addr1 : int *
- addr2 : int *
- addr3 : int *
- startOffset : int *
- endOffset : int -> unit
- abstract DefineParameter : [] paramname : string *
- attributes : int *
- sequence : int *
- addressKind : int *
- addr1 : int *
- addr2 : int *
- addr3 : int -> unit
- abstract DefineField : parent : int *
- [] fieldname : string *
- attributes : int *
- cSig : int *
- []signature : byte[] *
- addressKind : int *
- addr1 : int *
- addr2 : int *
- addr3 : int -> unit
- abstract DefineGlobalVariable : [] globalvarname : string *
- attributes : int *
- cSig : int *
- []signature : byte[] *
- addressKind : int *
- addr1 : int *
- addr2 : int *
- addr3 : int -> unit
- abstract Close : unit -> unit
- abstract SetSymAttribute : parent : int *
- [] attname : string *
- cData : int *
- []data : byte[] -> unit
- abstract OpenNamespace : [] nsname : string -> unit
- abstract CloseNamespace : unit -> unit
- abstract UsingNamespace : [] fullName : string -> unit
- abstract SetMethodSourceRange : startDoc : ISymUnmanagedDocumentWriter *
- startLine : int *
- startColumn : int *
- endDoc : ISymUnmanagedDocumentWriter *
- endLine : int *
- endColumn : int -> unit
- abstract Initialize : emitter : nativeint *
- [] filename : string *
- stream : IStream *
- fullBuild : bool -> unit
- abstract GetDebugInfo : iDD : ImageDebugDirectory byref *
- cData : int *
- pcData : int byref *
- []data : byte[] -> unit
- abstract DefineSequencePoints : document : ISymUnmanagedDocumentWriter *
- spCount : int *
- []offsets : int [] *
- []lines : int [] *
- []columns : int [] *
- []endLines : int [] *
- []endColumns : int [] -> unit
- abstract RemapToken : oldToken : int * newToken : int -> unit
- abstract Initialize2 : emitter : nativeint *
- [] tempfilename : string *
- stream : IStream *
- fullBuild : bool *
- [] finalfilename : string -> unit
- abstract DefineConstant : [] constname : string *
- value : Object *
- cSig : int *
- []signature : byte[] -> unit
- abstract Abort : unit -> unit
- abstract DefineLocalVariable2 : [] localvarname2 : string *
- attributes : int *
- sigToken : int *
- addressKind : int *
- addr1 : int *
- addr2 : int *
- addr3 : int *
- startOffset : int *
- endOffset : int -> unit
- abstract DefineGlobalVariable2 : [] globalvarname2 : string *
- attributes : int *
- sigToken : int *
- addressKind : int *
- addr1 : int *
- addr2 : int *
- addr3 : int -> unit
- abstract DefineConstant2 : [] constantname2 : string *
- value : Object *
- sigToken : int -> unit
- abstract OpenMethod2 : method2 : int *
- isect : int *
- offset : int -> unit
-
-type PdbWriter = { symWriter : ISymUnmanagedWriter2 }
-type PdbDocumentWriter = { symDocWriter : ISymUnmanagedDocumentWriter } (* pointer to pDocumentWriter COM object *)
+ abstract DefineDocument: [] url: string *
+ language: System.Guid byref *
+ languageVendor: System.Guid byref *
+ documentType: System.Guid byref *
+ [] RetVal: ISymUnmanagedDocumentWriter byref -> unit
+ abstract SetUserEntryPoint: entryMethod: uint32 -> unit
+ abstract OpenMethod: meth: int -> unit
+ abstract CloseMethod: unit -> unit
+ abstract OpenScope: startOffset: int * pRetVal: int byref -> unit
+ abstract CloseScope: endOffset: int -> unit
+ abstract SetScopeRange: scopeID: int * startOffset: int * endOffset: int -> unit
+ abstract DefineLocalVariable: [] varname: string *
+ attributes: int *
+ cSig: int *
+ []signature: byte[] *
+ addressKind: int *
+ addr1: int *
+ addr2: int *
+ addr3: int *
+ startOffset: int *
+ endOffset: int -> unit
+ abstract DefineParameter: [] paramname: string *
+ attributes: int *
+ sequence: int *
+ addressKind: int *
+ addr1: int *
+ addr2: int *
+ addr3: int -> unit
+ abstract DefineField: parent: int *
+ [] fieldname: string *
+ attributes: int *
+ cSig: int *
+ []signature: byte[] *
+ addressKind: int *
+ addr1: int *
+ addr2: int *
+ addr3: int -> unit
+ abstract DefineGlobalVariable: [] globalvarname: string *
+ attributes: int *
+ cSig: int *
+ []signature: byte[] *
+ addressKind: int *
+ addr1: int *
+ addr2: int *
+ addr3: int -> unit
+ abstract Close: unit -> unit
+ abstract SetSymAttribute: parent: int *
+ [] attname: string *
+ cData: int *
+ []data: byte[] -> unit
+ abstract OpenNamespace: [] nsname: string -> unit
+ abstract CloseNamespace: unit -> unit
+ abstract UsingNamespace: [] fullName: string -> unit
+ abstract SetMethodSourceRange: startDoc: ISymUnmanagedDocumentWriter *
+ startLine: int *
+ startColumn: int *
+ endDoc: ISymUnmanagedDocumentWriter *
+ endLine: int *
+ endColumn: int -> unit
+ abstract Initialize: emitter: nativeint *
+ [] filename: string *
+ stream: IStream *
+ fullBuild: bool -> unit
+ abstract GetDebugInfo: iDD: ImageDebugDirectory byref *
+ cData: int *
+ pcData: int byref *
+ []data: byte[] -> unit
+ abstract DefineSequencePoints: document: ISymUnmanagedDocumentWriter *
+ spCount: int *
+ []offsets: int [] *
+ []lines: int [] *
+ []columns: int [] *
+ []endLines: int [] *
+ []endColumns: int [] -> unit
+ abstract RemapToken: oldToken: int * newToken: int -> unit
+ abstract Initialize2: emitter: nativeint *
+ [] tempfilename: string *
+ stream: IStream *
+ fullBuild: bool *
+ [] finalfilename: string -> unit
+ abstract DefineConstant: [] constname: string *
+ value: Object *
+ cSig: int *
+ []signature: byte[] -> unit
+ abstract Abort: unit -> unit
+ abstract DefineLocalVariable2: [] localvarname2: string *
+ attributes: int *
+ sigToken: int *
+ addressKind: int *
+ addr1: int *
+ addr2: int *
+ addr3: int *
+ startOffset: int *
+ endOffset: int -> unit
+ abstract DefineGlobalVariable2: [] globalvarname2: string *
+ attributes: int *
+ sigToken: int *
+ addressKind: int *
+ addr1: int *
+ addr2: int *
+ addr3: int -> unit
+ abstract DefineConstant2: [] constantname2: string *
+ value: Object *
+ sigToken: int -> unit
+ abstract OpenMethod2: method2: int *
+ isect: int *
+ offset: int -> unit
+
+type PdbWriter = { symWriter: ISymUnmanagedWriter2 }
+type PdbDocumentWriter = { symDocWriter: ISymUnmanagedDocumentWriter } (* pointer to pDocumentWriter COM object *)
type idd =
{ iddCharacteristics: int32
iddMajorVersion: int32; (* actually u16 in IMAGE_DEBUG_DIRECTORY *)
@@ -1013,7 +1013,7 @@ type idd =
#endif
#if !FX_NO_PDB_WRITER
-let pdbInitialize (binaryName:string) (pdbName:string) =
+let pdbInitialize (binaryName: string) (pdbName: string) =
// collect necessary COM types
let CorMetaDataDispenser = System.Type.GetTypeFromProgID("CLRMetaData.CorMetaDataDispenser")
@@ -1036,15 +1036,15 @@ let pdbInitialize (binaryName:string) (pdbName:string) =
{ symWriter = writer }
-[]
+[]
do()
-let pdbCloseDocument(documentWriter : PdbDocumentWriter) =
+let pdbCloseDocument(documentWriter: PdbDocumentWriter) =
Marshal.ReleaseComObject (documentWriter.symDocWriter)
|> ignore
-[]
-let pdbClose (writer:PdbWriter) dllFilename pdbFilename =
+[