Skip to content

Commit

Permalink
Merge remote-tracking branch 'dotnet/features/ioperation' into unify-…
Browse files Browse the repository at this point in the history
…throw-statement-expression

* dotnet/features/ioperation: (41 commits)
  Update CSharpReplaceMethodWithPropertyService.cs
  Add VB side of fix.
  Remove unneeded function.
  Improve trivia preservation when converting methods into a property.
  VB side of do-not-simplify-nameof if it changes semantics.
  Do not simplify to an alias in a nameof if it changes the value of hte nameof.
  Include System.Runtime.Serialization.Primitives and System.Security.Cryptography.Csp in PortableFacades CoreXT package. (dotnet#21438)
  Address one more refactoring feedback
  Address PR feedback
  Fix possible race conditions in TestExtensionErrorHandler
  Fix expected test results to properly consider trivia
  Improve messages when tests fail due to expected text
  Default to considering trivia during testing
  Remove RemoveUnneededReferences from LamdaRewriter (dotnet#21367)
  Enable embedding sources to Windows PDBs (dotnet#21391)
  re-enabled assert we have disabled
  Do not insert Microsoft.DiaSymReader.Native (dotnet#21420)
  Recommend 'case' keyword after a pattern-case-clause.
  Fix NamedArgumentInParameterOrderWithDefaultValue test for new IOperation output.
  Resolving merge conflict
  ...
  • Loading branch information
333fred committed Aug 14, 2017
2 parents d18797b + a2840b9 commit 5d6d6e4
Show file tree
Hide file tree
Showing 295 changed files with 7,240 additions and 3,762 deletions.
9 changes: 5 additions & 4 deletions build/Targets/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
<MicrosoftCSharpVersion>4.3.0</MicrosoftCSharpVersion>
<MicrosoftDiagnosticsRuntimeVersion>0.8.31-beta</MicrosoftDiagnosticsRuntimeVersion>
<MicrosoftDiagnosticsTracingTraceEventVersion>1.0.35</MicrosoftDiagnosticsTracingTraceEventVersion>
<MicrosoftDiaSymReaderVersion>1.1.0</MicrosoftDiaSymReaderVersion>
<MicrosoftDiaSymReaderConverterXmlVersion>1.0.0-beta1-61708-01</MicrosoftDiaSymReaderConverterXmlVersion>
<MicrosoftDiaSymReaderNativeVersion>1.6.0-beta2-25304</MicrosoftDiaSymReaderNativeVersion>
<MicrosoftDiaSymReaderPortablePdbVersion>1.3.0</MicrosoftDiaSymReaderPortablePdbVersion>
<MicrosoftDiaSymReaderVersion>1.2.0-beta1-62008-01</MicrosoftDiaSymReaderVersion>
<MicrosoftDiaSymReaderConverterXmlVersion>1.1.0-beta1-62008-01</MicrosoftDiaSymReaderConverterXmlVersion>
<MicrosoftDiaSymReaderNativeVersion>1.7.0-private-25604</MicrosoftDiaSymReaderNativeVersion>
<MicrosoftDiaSymReaderPortablePdbVersion>1.3.0-beta1-62008-01</MicrosoftDiaSymReaderPortablePdbVersion>
<MicrosoftDotNetIBCMerge>4.7.2-alpha-00001</MicrosoftDotNetIBCMerge>
<MicrosoftDotNetVersionToolsVersion>1.0.27-prerelease-01811-02</MicrosoftDotNetVersionToolsVersion>
<MicrosoftIdentityModelClientsActiveDirectoryVersion>3.13.8</MicrosoftIdentityModelClientsActiveDirectoryVersion>
Expand Down Expand Up @@ -194,6 +194,7 @@
<SystemRuntimeSerializationPrimitivesVersion>4.3.0</SystemRuntimeSerializationPrimitivesVersion>
<SystemSecurityAccessControlVersion>4.3.0</SystemSecurityAccessControlVersion>
<SystemSecurityCryptographyAlgorithmsVersion>4.3.0</SystemSecurityCryptographyAlgorithmsVersion>
<SystemSecurityCryptographyCspVersion>4.3.0</SystemSecurityCryptographyCspVersion>
<SystemSecurityCryptographyEncodingVersion>4.3.0</SystemSecurityCryptographyEncodingVersion>
<SystemSecurityCryptographyPrimitivesVersion>4.3.0</SystemSecurityCryptographyPrimitivesVersion>
<SystemSecurityCryptographyX509CertificatesVersion>4.3.0</SystemSecurityCryptographyX509CertificatesVersion>
Expand Down
1 change: 1 addition & 0 deletions build/Targets/Settings.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<RoslynPortableTargetFrameworks>net46;netcoreapp2.0</RoslynPortableTargetFrameworks>

<Features>strict,IOperation</Features>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<SignAssembly>true</SignAssembly>
<!-- The new SDK introduced a GenerateAssemblyInfo target, which is disabled by GenerateAssemblyInfo=false.
Expand Down
4 changes: 4 additions & 0 deletions build/scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ function Test-XUnit() {
# Exclude out the multi-targetted netcore app projects
$dlls = $dlls | ?{ -not ($_.FullName -match ".*netcoreapp.*") }

# Exclude out the ref assemblies
$dlls = $dlls | ?{ -not ($_.FullName -match ".*\\ref\\.*") }
$dlls = $dlls | ?{ -not ($_.FullName -match ".*/ref/.*") }

if ($cibuild) {
# Use a 50 minute timeout on CI
$args += " -xml -timeout:50"
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/CSharpParseOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ internal CSharpParseOptions(
LanguageVersion languageVersion,
DocumentationMode documentationMode,
SourceCodeKind kind,
IEnumerable<string> preprocessorSymbols,
ImmutableArray<string> preprocessorSymbols,
IReadOnlyDictionary<string, string> features)
: base(kind, documentationMode)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/CSharpResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/CSharpResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -4986,7 +4986,7 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<value>/sourcelink switch is only supported when emitting PDB.</value>
</data>
<data name="ERR_CannotEmbedWithoutPdb" xml:space="preserve">
<value>/embed switch is only supported when emitting Portable PDB (/debug:portable or /debug:embedded).</value>
<value>/embed switch is only supported when emitting a PDB.</value>
</data>
<data name="ERR_InvalidInstrumentationKind" xml:space="preserve">
<value>Invalid instrumentation kind: {0}</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1243,14 +1243,9 @@ internal sealed override CommandLineArguments CommonParse(IEnumerable<string> ar
embeddedFiles.AddRange(sourceFiles);
}

if (embeddedFiles.Count > 0)
if (embeddedFiles.Count > 0 && !emitPdb)
{
// Restricted to portable PDBs for now, but the IsPortable condition should be removed
// and the error message adjusted accordingly when native PDB support is added.
if (!emitPdb || !debugInformationFormat.IsPortable())
{
AddDiagnostic(diagnostics, ErrorCode.ERR_CannotEmbedWithoutPdb);
}
AddDiagnostic(diagnostics, ErrorCode.ERR_CannotEmbedWithoutPdb);
}

var parsedFeatures = ParseFeatures(features);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ internal MethodWithBody(MethodSymbol method, BoundStatement body, ImportChain im

public readonly CSharpCompilation Compilation;

public LambdaFrame StaticLambdaFrame;
public SynthesizedClosureEnvironment StaticLambdaFrame;

/// <summary>
/// A graph of method->method references for this(...) constructor initializers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,13 @@ protected override void GetStateMachineFieldMapFromMetadata(
awaiterSlotCount = maxAwaiterSlotIndex + 1;
}

protected override ImmutableArray<EncLocalInfo> TryGetLocalSlotMapFromMetadata(MethodDefinitionHandle handle, EditAndContinueMethodDebugInformation debugInfo)
protected override ImmutableArray<EncLocalInfo> GetLocalSlotMapFromMetadata(StandaloneSignatureHandle handle, EditAndContinueMethodDebugInformation debugInfo)
{
ImmutableArray<LocalInfo<TypeSymbol>> slotMetadata;
if (!_metadataDecoder.TryGetLocals(handle, out slotMetadata))
{
return default(ImmutableArray<EncLocalInfo>);
}
Debug.Assert(!handle.IsNil);

var result = CreateLocalSlotMap(debugInfo, slotMetadata);
Debug.Assert(result.Length == slotMetadata.Length);
var localInfos = _metadataDecoder.GetLocalsOrThrow(handle);
var result = CreateLocalSlotMap(debugInfo, localInfos);
Debug.Assert(result.Length == localInfos.Length);
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private LambdaCapturedVariable(SynthesizedContainer frame, TypeSymbol type, stri
_isThis = isThisParameter;
}

public static LambdaCapturedVariable Create(LambdaFrame frame, Symbol captured, ref int uniqueId)
public static LambdaCapturedVariable Create(SynthesizedClosureEnvironment frame, Symbol captured, ref int uniqueId)
{
Debug.Assert(captured is LocalSymbol || captured is ParameterSymbol);

Expand Down Expand Up @@ -87,7 +87,7 @@ private static TypeSymbol GetCapturedVariableFieldType(SynthesizedContainer fram
if ((object)local != null)
{
// if we're capturing a generic frame pointer, construct it with the new frame's type parameters
var lambdaFrame = local.Type.OriginalDefinition as LambdaFrame;
var lambdaFrame = local.Type.OriginalDefinition as SynthesizedClosureEnvironment;
if ((object)lambdaFrame != null)
{
// lambdaFrame may have less generic type parameters than frame, so trim them down (the first N will always match)
Expand Down
Loading

0 comments on commit 5d6d6e4

Please sign in to comment.