Skip to content

Commit

Permalink
Merge pull request #25430 from VSadov/stackallocMerge
Browse files Browse the repository at this point in the history
Merging Dev15.7.x into features/stackalloc-init
  • Loading branch information
VSadov authored Mar 13, 2018
2 parents 5952447 + 3925afd commit 4258cf3
Show file tree
Hide file tree
Showing 207 changed files with 4,840 additions and 3,316 deletions.
7 changes: 4 additions & 3 deletions build/Targets/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>1.0.1</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
<MicrosoftCodeAnalysisEditorFeaturesTextVersion>1.0.1</MicrosoftCodeAnalysisEditorFeaturesTextVersion>
<MicrosoftCodeAnalysisElfieVersion>0.10.6</MicrosoftCodeAnalysisElfieVersion>
<MicrosoftCodeAnalysisTestResourcesProprietaryVersion>2.0.5</MicrosoftCodeAnalysisTestResourcesProprietaryVersion>
<MicrosoftCodeAnalysisTestResourcesProprietaryVersion>2.0.7</MicrosoftCodeAnalysisTestResourcesProprietaryVersion>
<MicrosoftCodeAnalysisVisualBasicVersion>1.0.1</MicrosoftCodeAnalysisVisualBasicVersion>
<MicrosoftCodeAnalysisVisualBasicWorkspacesVersion>1.0.1</MicrosoftCodeAnalysisVisualBasicWorkspacesVersion>
<MicrosoftCodeAnalysisWorkspacesCommonVersion>1.0.1</MicrosoftCodeAnalysisWorkspacesCommonVersion>
Expand All @@ -41,8 +41,8 @@
<MicrosoftDiagnosticsRuntimeVersion>0.8.31-beta</MicrosoftDiagnosticsRuntimeVersion>
<MicrosoftDiagnosticsTracingTraceEventVersion>1.0.35</MicrosoftDiagnosticsTracingTraceEventVersion>
<MicrosoftDiaSymReaderVersion>1.2.0</MicrosoftDiaSymReaderVersion>
<MicrosoftDiaSymReaderConverterVersion>1.1.0-beta1-62221-01</MicrosoftDiaSymReaderConverterVersion>
<MicrosoftDiaSymReaderConverterXmlVersion>1.1.0-beta1-62221-01</MicrosoftDiaSymReaderConverterXmlVersion>
<MicrosoftDiaSymReaderConverterVersion>1.1.0-beta1-62628-01</MicrosoftDiaSymReaderConverterVersion>
<MicrosoftDiaSymReaderConverterXmlVersion>1.1.0-beta1-62628-01</MicrosoftDiaSymReaderConverterXmlVersion>
<MicrosoftDiaSymReaderNativeVersion>1.7.0</MicrosoftDiaSymReaderNativeVersion>
<MicrosoftDiaSymReaderPortablePdbVersion>1.4.0</MicrosoftDiaSymReaderPortablePdbVersion>
<MicrosoftDotNetIBCMerge>4.7.2-alpha-00001</MicrosoftDotNetIBCMerge>
Expand Down Expand Up @@ -161,6 +161,7 @@
<SystemCollectionsConcurrentVersion>4.3.0</SystemCollectionsConcurrentVersion>
<SystemCollectionsImmutableVersion>1.3.1</SystemCollectionsImmutableVersion>
<SystemConsoleVersion>4.3.0</SystemConsoleVersion>
<SystemDataCommonVersion>4.3.0</SystemDataCommonVersion>
<SystemDiagnosticsContractsVersion>4.3.0</SystemDiagnosticsContractsVersion>
<SystemDiagnosticsDebugVersion>4.3.0</SystemDiagnosticsDebugVersion>
<SystemDiagnosticsFileVersionInfoVersion>4.3.0</SystemDiagnosticsFileVersionInfoVersion>
Expand Down
4 changes: 4 additions & 0 deletions build/scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@ function Test-XUnitCoreClr() {
$args += " $dllPath"
$args += " -xml " + (Join-Path $logDir ([IO.Path]::ChangeExtension($dllName, ".xml")))

# https://github.com/dotnet/roslyn/issues/25049
# Disable parallel runs everywhere until we get assembly specific settings working again
$args += " -parallel none"

try {
Write-Host "Running $dllName"
Exec-Console $dotnet $args
Expand Down
7 changes: 6 additions & 1 deletion build/scripts/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,14 @@ do
echo Running "${runtime} ${file_name[@]}"
if [[ "${runtime}" == "dotnet" ]]; then
runner="dotnet exec --depsfile ${deps_json} --runtimeconfig ${runtimeconfig_json}"
if [[ "${file_name[@]}" == *'Roslyn.Compilers.CSharp.Emit.UnitTests.dll' ]]
then
echo "Skipping ${file_name[@]}"
continue
fi
elif [[ "${runtime}" == "mono" ]]; then
runner=mono
if [[ "${file_name[@]}" == *'Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests.dll' || "${file_name[@]}" == *'Roslyn.Compilers.CompilerServer.UnitTests.dll' ]]
if [[ "${file_name[@]}" == *'Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests.dll' || "${file_name[@]}" == *'Roslyn.Compilers.CompilerServer.UnitTests.dll' || "${file_name[@]}" == *'Roslyn.Compilers.CSharp.Emit.UnitTests.dll' ]]
then
echo "Skipping ${file_name[@]}"
continue
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/Errors/MessageID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ internal enum MessageID

// Message IDs may refer to strings that need to be localized.
// This struct makes an IFormattable wrapper around a MessageID
internal struct LocalizableErrorArgument : IFormattable, IMessageSerializable
internal struct LocalizableErrorArgument : IFormattable
{
private readonly MessageID _id;

Expand Down
7 changes: 6 additions & 1 deletion src/Compilers/CSharp/Portable/Symbols/Symbol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace Microsoft.CodeAnalysis.CSharp
/// exposed by the compiler.
/// </summary>
[DebuggerDisplay("{GetDebuggerDisplay(), nq}")]
internal abstract partial class Symbol : ISymbol, IMessageSerializable
internal abstract partial class Symbol : ISymbol, IFormattable
{
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// Changes to the public interface of this class should remain synchronized with the VB version of Symbol.
Expand Down Expand Up @@ -1286,5 +1286,10 @@ ISymbol ISymbol.OriginalDefinition
public abstract TResult Accept<TResult>(CSharpSymbolVisitor<TResult> visitor);

#endregion

string IFormattable.ToString(string format, IFormatProvider formatProvider)
{
return ToString();
}
}
}
12 changes: 9 additions & 3 deletions src/Compilers/CSharp/Portable/Symbols/SymbolDistinguisher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using Microsoft.CodeAnalysis.CSharp.Symbols;
using Roslyn.Utilities;
using System;
using System.Collections.Immutable;
using System.Diagnostics;

Expand Down Expand Up @@ -36,12 +37,12 @@ public SymbolDistinguisher(Compilation compilation, Symbol symbol0, Symbol symbo
_symbol1 = symbol1;
}

public IMessageSerializable First
public IFormattable First
{
get { return new Description(this, 0); }
}

public IMessageSerializable Second
public IFormattable Second
{
get { return new Description(this, 1); }
}
Expand Down Expand Up @@ -197,7 +198,7 @@ private string GetDescription(int index)
return _lazyDescriptions[index];
}

private sealed class Description : IMessageSerializable
private sealed class Description : IFormattable
{
private readonly SymbolDistinguisher _distinguisher;
private readonly int _index;
Expand Down Expand Up @@ -236,6 +237,11 @@ public override string ToString()
{
return _distinguisher.GetDescription(_index);
}

string IFormattable.ToString(string format, IFormatProvider formatProvider)
{
return ToString();
}
}
}
}
7 changes: 6 additions & 1 deletion src/Compilers/CSharp/Portable/Syntax/CSharpSyntaxNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Microsoft.CodeAnalysis.CSharp
//to defer the realization of strings. Often diagnostics generated while binding
//in service of a SemanticModel API are never realized. So this
//deferral can result in meaningful savings of strings.
public abstract partial class CSharpSyntaxNode : SyntaxNode, IMessageSerializable
public abstract partial class CSharpSyntaxNode : SyntaxNode, IFormattable
{
internal CSharpSyntaxNode(GreenNode green, SyntaxNode parent, int position)
: base(green, parent, position)
Expand Down Expand Up @@ -549,5 +549,10 @@ internal override bool ShouldCreateWeakList()
}

#endregion

string IFormattable.ToString(string format, IFormatProvider formatProvider)
{
return ToString();
}
}
}
24 changes: 12 additions & 12 deletions src/Compilers/CSharp/Test/Emit/Attributes/AttributeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ public class Test
);
}

[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void TestWellKnownAttributeOnProperty_DynamicAttribute()
{
string source = @"
Expand Down Expand Up @@ -3464,7 +3464,7 @@ public static void Main() {}
[Fact]
public void TestAttributeStringForEnumTypedConstant()
{
var source = CreateCompilation(@"
var source = CreateCompilationWithMscorlib40(@"
using System;
namespace AttributeTest
{
Expand Down Expand Up @@ -7372,7 +7372,7 @@ public class Object : System.Attribute {}
}
";

CreateCompilation(source).VerifyDiagnostics(
CreateCompilationWithMscorlib40(source).VerifyDiagnostics(
// (4,6): error CS0616: 'System.Runtime.InteropServices.DllImportAttribute' is not an attribute class
// [DllImport] // Error
Diagnostic(ErrorCode.ERR_NotAnAttributeClass, "DllImport").WithArguments("System.Runtime.InteropServices.DllImportAttribute"),
Expand Down Expand Up @@ -7482,7 +7482,7 @@ class System : Attribute
}
";

var compilation = CreateCompilation(source);
var compilation = CreateCompilationWithMscorlib40(source);

compilation.VerifyDiagnostics(
// (2,7): warning CS0437: The type 'System' in '' conflicts with the imported namespace 'System' in 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Using the type defined in ''.
Expand Down Expand Up @@ -7513,8 +7513,8 @@ public class X: Attribute
{
}
";
var comp1 = CreateCompilation(source2, assemblyName: "Temp0").ToMetadataReference();
CreateCompilation(source, references: new[] { comp1 }).VerifyDiagnostics(
var comp1 = CreateCompilationWithMscorlib40(source2, assemblyName: "Temp0").ToMetadataReference();
CreateCompilationWithMscorlib40(source, references: new[] { comp1 }).VerifyDiagnostics(
// (2,12): error CS0616: 'X' is not an attribute class
// [assembly: X]
Diagnostic(ErrorCode.ERR_NotAnAttributeClass, "X").WithArguments("X"));
Expand All @@ -7539,9 +7539,9 @@ class Y
{
}
";
comp1 = CreateCompilation(source2, assemblyName: "Temp1").ToMetadataReference();
comp1 = CreateCompilationWithMscorlib40(source2, assemblyName: "Temp1").ToMetadataReference();
var comp2 = CreateEmptyCompilation(source3, assemblyName: "Temp2").ToMetadataReference();
var comp3 = CreateCompilation(source4, references: new[] { comp1, comp2 });
var comp3 = CreateCompilationWithMscorlib40(source4, references: new[] { comp1, comp2 });
comp3.VerifyDiagnostics(
// (2,2): error CS0434: The namespace 'X' in 'Temp2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' conflicts with the type 'X' in 'Temp1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
// [X]
Expand All @@ -7554,7 +7554,7 @@ class X
{
}
";
comp3 = CreateCompilation(source5, references: new[] { comp1, comp2 });
comp3 = CreateCompilationWithMscorlib40(source5, references: new[] { comp1, comp2 });
comp3.VerifyDiagnostics(
// (2,2): error CS0616: 'X' is not an attribute class
// [X]
Expand All @@ -7568,7 +7568,7 @@ class X: Attribute
{
}
";
CompileAndVerify(source5, references: new[] { comp1, comp2 });
CompileAndVerifyWithMscorlib40(source5, references: new[] { comp1, comp2 });

// Multiple from PE, multiple from Source
var source6 = @"
Expand All @@ -7581,7 +7581,7 @@ namespace X
{
}
";
comp3 = CreateCompilation(source6, references: new[] { comp1, comp2 });
comp3 = CreateCompilationWithMscorlib40(source6, references: new[] { comp1, comp2 });
comp3.VerifyDiagnostics(
// (3,7): error CS0101: The namespace '<global namespace>' already contains a definition for 'X'
// class X
Expand All @@ -7596,7 +7596,7 @@ class Goo: Attribute
{
}
";
comp3 = CreateCompilation(source7, references: new[] { comp1, comp2 });
comp3 = CreateCompilationWithMscorlib40(source7, references: new[] { comp1, comp2 });
comp3.VerifyDiagnostics(
// (4,2): error CS0576: Namespace '<global namespace>' contains a definition conflicting with alias 'X'
// [X]
Expand Down
Loading

0 comments on commit 4258cf3

Please sign in to comment.