Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Merge future-stabilization into master #12127

Merged
merged 84 commits into from Jun 23, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
1662e3b
Generalize the version update script, add support for LKG
tmat Jun 11, 2016
8abe2b9
Merge pull request #11935 from tmat/update_deps
tmat Jun 12, 2016
5116e42
Update prerelease nuget version for Dev15 Preview 3
shyamnamboodiripad Jun 13, 2016
ada58c6
Update to corefx RTM
cston Jun 12, 2016
bd23fe4
Merge pull request #11945 from cston/u3-rtm
cston Jun 13, 2016
71f5cf5
Update to corefx RTM
cston Jun 13, 2016
169f8e8
Merge pull request #11955 from cston/u3-rtm-2
cston Jun 13, 2016
4e63530
Update PreReleaseOnlyPackages
cston Jun 13, 2016
4911b8c
Merge pull request #11957 from cston/u3-rtm-3
cston Jun 13, 2016
b54df73
Prevent stack overflow when creating symbol ids.
CyrusNajmabadi Jun 13, 2016
214aa34
Merge pull request #11963 from CyrusNajmabadi/symbolIdOverflow
CyrusNajmabadi Jun 13, 2016
251191e
fix crash due to result existing both in compiler and ide side.
heejaechang Jun 13, 2016
8b2e60b
Revert changes to generate release versions
cston Jun 13, 2016
9bdaba0
Merge pull request #11954 from shyamnamboodiripad/future-stabilization
shyamnamboodiripad Jun 13, 2016
21aead4
Add option to disable converting metadata to project references
mattwar Jun 13, 2016
a7c04df
disable workspace document events on project disconnect
mattwar Jun 10, 2016
ab599a0
Merge pull request #11974 from cston/pre-release
cston Jun 14, 2016
24de6a5
Merge pull request #11985 from mattwar/Issue11912Stab
mattwar Jun 14, 2016
0648b01
Relax compiler server spinwait test (#11864)
agocke Jun 14, 2016
559ab3b
Merge pull request #11972 from heejaechang/fixcrash10
heejaechang Jun 14, 2016
035bc15
Merge pull request #11982 from mattwar/Issue11913Stab
mattwar Jun 14, 2016
55836e7
Change version to 1.3.1
cston Jun 14, 2016
225b0a1
Update bindingRedirects for 1.3.1
cston Jun 14, 2016
32b8b32
Revert changes to PreReleaseOnlyPackages
cston Jun 14, 2016
b4f28a3
Merge pull request #12003 from cston/version
cston Jun 14, 2016
38df45c
Merge pull request #12009 from cston/publish
cston Jun 14, 2016
8ad20ad
Merge remote-tracking branch 'upstream/stabilization' into merge-stab…
jinujoseph Jun 15, 2016
644ab8d
MicrosoftDiaSymReaderNativeVersion version changed to rc2
jinujoseph Jun 15, 2016
4441acf
Fixing the dependencies
jinujoseph Jun 15, 2016
31fadd6
Merge pull request #12030 from vslsnap/merge-stabilization-into-futur…
jinujoseph Jun 15, 2016
42fd266
Fix Interactive Window versioning (don't version separately)...
KevinH-MS Jun 16, 2016
0ec704a
Merge pull request #12048 from KevinH-MS/FixInteractiveVersion
KevinH-MS Jun 16, 2016
816218d
Merge pull request #12054 from dotnet/stabilization
jinujoseph Jun 16, 2016
15bc390
add csharp 7 language version flag (#11660)
TyOverby Jun 2, 2016
0eae3a4
Move language features to the langver switch
jaredpar Jun 17, 2016
df88a0d
Merge pull request #12080 from jaredpar/patch
jaredpar Jun 19, 2016
6205883
Fixed up the code references
jaredpar Jun 19, 2016
1d939f2
Provide C# options for controlling new Dev15 features.
CyrusNajmabadi Jun 2, 2016
dea8f4e
Don't load Dev15 binaries unless a dev15 completion option is set.
CyrusNajmabadi Jun 2, 2016
43ca856
Add VB support for these options as well.
CyrusNajmabadi Jun 2, 2016
c11295f
Break non-language-specific options into its own Class.
CyrusNajmabadi Jun 2, 2016
34136d6
PR feedback.
CyrusNajmabadi Jun 2, 2016
05f4acd
Remove file.
CyrusNajmabadi Jun 3, 2016
da07713
Actually listen to completion options.
CyrusNajmabadi Jun 3, 2016
c9eb85c
Formatting.
CyrusNajmabadi Jun 3, 2016
e1415dd
Fix all of the unit test diagnostic messages
jaredpar Jun 20, 2016
29c11cd
Properly implement type inference for C# member access expressions.
CyrusNajmabadi Jun 20, 2016
045003e
Add VB side.
CyrusNajmabadi Jun 20, 2016
1e4027f
Share comment.
CyrusNajmabadi Jun 20, 2016
91cad67
More VB side.
CyrusNajmabadi Jun 20, 2016
033e770
Merge pull request #12099 from Pilchie/CompletionOptions
Pilchie Jun 20, 2016
19fedfc
Make sure CompletionItems have DisplayTexts of differing lengths befo…
Jun 20, 2016
41a1d64
Fix inference in awaits.
CyrusNajmabadi Jun 20, 2016
058ffc1
Don't invoke SignFiles if there's no files to sign
jasonmalinowski Jun 21, 2016
138ac57
Only compute entry points when compiling everything.
gafter Jun 21, 2016
b35bac4
Merge branch 'master' into typeInferenceWork
CyrusNajmabadi Jun 21, 2016
f29a6cb
Add better inference for task and enumerable scenarios.
CyrusNajmabadi Jun 21, 2016
6bdb5a5
VB side of type inference.
CyrusNajmabadi Jun 21, 2016
e11beed
Fix test.
CyrusNajmabadi Jun 21, 2016
3491dd2
Only consider identifiers that bind to lambda parameters.
CyrusNajmabadi Jun 21, 2016
bc2369d
Merge pull request #12119 from jasonmalinowski/fix-signed-build-warnings
jasonmalinowski Jun 21, 2016
16fde31
Redirect more of MSBuild
jasonmalinowski Jun 21, 2016
52595d7
Merge pull request #12120 from gafter/master-12113
gafter Jun 21, 2016
a5b8071
Add test.
CyrusNajmabadi Jun 21, 2016
96568b8
Merge pull request #12110 from CyrusNajmabadi/typeInferenceWork
CyrusNajmabadi Jun 21, 2016
76b3818
Update CoreFX to RTM and CorecLR to the latest vNext
tmat Jun 17, 2016
2ba614e
Delete types and tests moved to System.Reflection.Metadata
tmat May 8, 2016
c6a1c2c
Fix up namespaces
tmat May 8, 2016
ea2bca8
Merge pull request #12103 from jaredpar/move
jaredpar Jun 21, 2016
f8296d1
Use linked files for shared sources
jaredpar Jun 21, 2016
ef1f1a4
Adjust to API changes.
tmat May 14, 2016
eca2b74
Update update_dependencies.csx
tmat Jun 21, 2016
e8c3712
Linked more files
jaredpar Jun 21, 2016
4c34104
SRM version correction
tmat Jun 21, 2016
7abdbb5
Improve lambda type inference for erroneous method groups
gafter Jun 13, 2016
1d7a91e
Don't deploy VSIX during perf correctness run
jaredpar Jun 21, 2016
3e27633
Merge pull request #12133 from jasonmalinowski/fix-signed-build-warnings
jasonmalinowski Jun 21, 2016
9f74043
Merge branch 'master-errlambda05'
gafter Jun 22, 2016
eed3167
Merge pull request #12073 from tmat/CoreRTM
tmat Jun 22, 2016
aa1fb65
Merge pull request #12144 from jaredpar/dupe
jaredpar Jun 22, 2016
99b92a7
Merge pull request #12149 from jaredpar/sanity
jaredpar Jun 22, 2016
5d42f86
Merge pull request #12115 from rchande/fixPrefixCheck
Jun 22, 2016
6b525d0
Merge remote-tracking branch 'upstream/future-stabilization' into mer…
jinujoseph Jun 22, 2016
4107f24
Getting rid of RequiredFeatureLegacy
jinujoseph Jun 22, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adjust to API changes.
  • Loading branch information
tmat committed Jun 21, 2016
commit ef1f1a43c98a06523ff30b87ea2285f483770a9f
3 changes: 2 additions & 1 deletion src/Compilers/Core/Portable/CryptographicHashProvider.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Collections.Generic;
using System.Collections.Immutable;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -165,7 +166,7 @@ internal static ImmutableArray<byte> ComputeSha1(byte[] bytes)
}
}

internal static ImmutableArray<byte> ComputeSha1(BlobBuilder bytes)
internal static ImmutableArray<byte> ComputeSha1(IEnumerable<Blob> bytes)
{
using (var incrementalHash = IncrementalHash.Create(AssemblyHashAlgorithm.Sha1))
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections.Generic;
using System.Reflection.Metadata;

namespace Roslyn.Utilities
{
internal static class IncrementalHashExtensions
{
internal static void AppendData(this IncrementalHash hash, BlobBuilder builder)
internal static void AppendData(this IncrementalHash hash, IEnumerable<Blob> blobs)
{
foreach (var blob in builder.GetBlobs())
foreach (var blob in blobs)
{
hash.AppendData(blob.GetBytes());
}
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/Core/Portable/NativePdbWriter/PdbWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private void EnsureSpace(int space)
// that should be very rare though.
if (_logData.Count + space >= bufferFlushLimit)
{
_incrementalHash.AppendData(_logData);
_incrementalHash.AppendData(_logData.GetBlobs());
_logData.Clear();
}
}
Expand All @@ -88,7 +88,7 @@ internal byte[] GetLogHash()
{
Debug.Assert(_logData != null);

_incrementalHash.AppendData(_logData);
_incrementalHash.AppendData(_logData.GetBlobs());
_logData.Clear();

return _incrementalHash.GetHashAndReset();
Expand Down Expand Up @@ -834,7 +834,7 @@ public void SetMetadataEmitter(MetadataWriter metadataWriter)
}
}

public unsafe ContentId GetContentId()
public unsafe BlobContentId GetContentId()
{
if (_deterministic)
{
Expand Down Expand Up @@ -910,7 +910,7 @@ public unsafe ContentId GetContentId()
Debug.Assert(age == Age);

Debug.Assert(BitConverter.IsLittleEndian);
return new ContentId(guidBytes, BitConverter.GetBytes(stamp));
return new BlobContentId(new Guid(guidBytes), stamp);
}

public void SetEntryPoint(uint entryMethodToken)
Expand Down
9 changes: 3 additions & 6 deletions src/Compilers/Core/Portable/PEWriter/CustomDebugInfoWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Reflection.Metadata.Ecma335;
using System.Reflection.Metadata;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Emit;
using Roslyn.Utilities;
using CDI = Microsoft.Cci.CustomDebugInfoConstants;

namespace Microsoft.Cci
{
using Roslyn.Reflection;

internal sealed class CustomDebugInfoWriter
{
private int _methodTokenWithModuleInfo;
Expand Down Expand Up @@ -164,7 +161,7 @@ private static PooledBlobBuilder SerializeRecord(

recordSerializer(debugInfo, cmw);

int length = cmw.Position;
int length = cmw.Count;
int alignedLength = 4 * ((length + 3) / 4);
byte alignmentSize = (byte)(alignedLength - length);
cmw.WriteBytes(0, alignmentSize);
Expand Down Expand Up @@ -194,7 +191,7 @@ private static void SerializeReferenceToIteratorClass(string iteratorClassName,
cmw.WriteUTF16(iteratorClassName);
cmw.WriteInt16(0);
cmw.Align(4);
Debug.Assert(cmw.Position == length);
Debug.Assert(cmw.Count == length);
customDebugInfo.Add(cmw);
}

Expand Down
126 changes: 101 additions & 25 deletions src/Compilers/Core/Portable/PEWriter/MetadataWriter.PortablePdb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@

namespace Microsoft.Cci
{
using Roslyn.Reflection;
using Roslyn.Reflection.Metadata.Ecma335;
using Roslyn.Reflection.Metadata.Ecma335.Blobs;

internal partial class MetadataWriter
{
/// <summary>
Expand Down Expand Up @@ -168,15 +164,15 @@ private BlobHandle SerializeLocalConstantSignature(ILocalDefinition localConstan
// PrimitiveConstant or EnumConstant
if (value is decimal)
{
builder.WriteByte(0x11);
builder.WriteCompressedInteger(CodedIndex.ToTypeDefOrRefOrSpec(GetTypeHandle(type)));
builder.WriteByte((byte)SignatureTypeKind.ValueType);
builder.WriteCompressedInteger(CodedIndex.TypeDefOrRefOrSpec(GetTypeHandle(type)));

builder.WriteDecimal((decimal)value);
}
else if (value is DateTime)
{
builder.WriteByte(0x11);
builder.WriteCompressedInteger(CodedIndex.ToTypeDefOrRefOrSpec(GetTypeHandle(type)));
builder.WriteByte((byte)SignatureTypeKind.ValueType);
builder.WriteCompressedInteger(CodedIndex.TypeDefOrRefOrSpec(GetTypeHandle(type)));

builder.WriteDateTime((DateTime)value);
}
Expand All @@ -195,31 +191,111 @@ private BlobHandle SerializeLocalConstantSignature(ILocalDefinition localConstan
else if (value != null)
{
// TypeCode
builder.WriteByte((byte)MetadataWriterUtilities.GetConstantTypeCode(value));

builder.WriteByte((byte)GetConstantTypeCode(value));

// Value
builder.WriteConstant(value);

// EnumType
if (type.IsEnum)
{
builder.WriteCompressedInteger(CodedIndex.ToTypeDefOrRefOrSpec(GetTypeHandle(type)));
builder.WriteCompressedInteger(CodedIndex.TypeDefOrRefOrSpec(GetTypeHandle(type)));
}
}
else if (this.module.IsPlatformType(type, PlatformType.SystemObject))
{
builder.WriteByte(0x1c);
builder.WriteByte((byte)SignatureTypeCode.Object);
}
else
{
builder.WriteByte((byte)(type.IsValueType ? 0x11 : 0x12));
builder.WriteCompressedInteger(CodedIndex.ToTypeDefOrRefOrSpec(GetTypeHandle(type)));
builder.WriteByte((byte)(type.IsValueType ? SignatureTypeKind.ValueType : SignatureTypeKind.Class));
builder.WriteCompressedInteger(CodedIndex.TypeDefOrRefOrSpec(GetTypeHandle(type)));
}

return _debugMetadataOpt.GetOrAddBlob(builder);
}

private static SignatureTypeCode GetConstantTypeCode(object value)
{
if (value == null)
{
// The encoding of Type for the nullref value for FieldInit is ELEMENT_TYPE_CLASS with a Value of a zero.
return (SignatureTypeCode)SignatureTypeKind.Class;
}

Debug.Assert(!value.GetType().GetTypeInfo().IsEnum);

// Perf: Note that JIT optimizes each expression val.GetType() == typeof(T) to a single register comparison.
// Also the checks are sorted by commonality of the checked types.

if (value.GetType() == typeof(int))
{
return SignatureTypeCode.Int32;
}

if (value.GetType() == typeof(string))
{
return SignatureTypeCode.String;
}

if (value.GetType() == typeof(bool))
{
return SignatureTypeCode.Boolean;
}

if (value.GetType() == typeof(char))
{
return SignatureTypeCode.Char;
}

if (value.GetType() == typeof(byte))
{
return SignatureTypeCode.Byte;
}

if (value.GetType() == typeof(long))
{
return SignatureTypeCode.Int64;
}

if (value.GetType() == typeof(double))
{
return SignatureTypeCode.Double;
}

if (value.GetType() == typeof(short))
{
return SignatureTypeCode.Int16;
}

if (value.GetType() == typeof(ushort))
{
return SignatureTypeCode.UInt16;
}

if (value.GetType() == typeof(uint))
{
return SignatureTypeCode.UInt32;
}

if (value.GetType() == typeof(sbyte))
{
return SignatureTypeCode.SByte;
}

if (value.GetType() == typeof(ulong))
{
return SignatureTypeCode.UInt64;
}

if (value.GetType() == typeof(float))
{
return SignatureTypeCode.Single;
}

throw ExceptionUtilities.Unreachable;
}

#region ImportScope

private static readonly ImportScopeHandle ModuleImportScopeHandle = MetadataTokens.ImportScopeHandle(1);
Expand All @@ -228,7 +304,7 @@ private void SerializeImport(BlobBuilder writer, AssemblyReferenceAlias alias)
{
// <import> ::= AliasAssemblyReference <alias> <target-assembly>
writer.WriteByte((byte)ImportDefinitionKind.AliasAssemblyReference);
writer.WriteCompressedInteger(_debugMetadataOpt.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUtf8(alias.Name)));
writer.WriteCompressedInteger(MetadataTokens.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUTF8(alias.Name)));
writer.WriteCompressedInteger(MetadataTokens.GetRowNumber(GetOrAddAssemblyReferenceHandle(alias.Assembly)));
}

Expand All @@ -242,8 +318,8 @@ private void SerializeImport(BlobBuilder writer, UsedNamespaceOrType import)

// <import> ::= ImportXmlNamespace <alias> <target-namespace>
writer.WriteByte((byte)ImportDefinitionKind.ImportXmlNamespace);
writer.WriteCompressedInteger(_debugMetadataOpt.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUtf8(import.AliasOpt)));
writer.WriteCompressedInteger(_debugMetadataOpt.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUtf8(import.TargetXmlNamespaceOpt)));
writer.WriteCompressedInteger(MetadataTokens.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUTF8(import.AliasOpt)));
writer.WriteCompressedInteger(MetadataTokens.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUTF8(import.TargetXmlNamespaceOpt)));
}
else if (import.TargetTypeOpt != null)
{
Expand All @@ -254,15 +330,15 @@ private void SerializeImport(BlobBuilder writer, UsedNamespaceOrType import)
{
// <import> ::= AliasType <alias> <target-type>
writer.WriteByte((byte)ImportDefinitionKind.AliasType);
writer.WriteCompressedInteger(_debugMetadataOpt.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUtf8(import.AliasOpt)));
writer.WriteCompressedInteger(MetadataTokens.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUTF8(import.AliasOpt)));
}
else
{
// <import> ::= ImportType <target-type>
writer.WriteByte((byte)ImportDefinitionKind.ImportType);
}

writer.WriteCompressedInteger(CodedIndex.ToTypeDefOrRefOrSpec(GetTypeHandle(import.TargetTypeOpt))); // TODO: index in release build
writer.WriteCompressedInteger(CodedIndex.TypeDefOrRefOrSpec(GetTypeHandle(import.TargetTypeOpt))); // TODO: index in release build
}
else if (import.TargetNamespaceOpt != null)
{
Expand All @@ -272,7 +348,7 @@ private void SerializeImport(BlobBuilder writer, UsedNamespaceOrType import)
{
// <import> ::= AliasAssemblyNamespace <alias> <target-assembly> <target-namespace>
writer.WriteByte((byte)ImportDefinitionKind.AliasAssemblyNamespace);
writer.WriteCompressedInteger(_debugMetadataOpt.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUtf8(import.AliasOpt)));
writer.WriteCompressedInteger(MetadataTokens.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUTF8(import.AliasOpt)));
}
else
{
Expand All @@ -288,7 +364,7 @@ private void SerializeImport(BlobBuilder writer, UsedNamespaceOrType import)
{
// <import> ::= AliasNamespace <alias> <target-namespace>
writer.WriteByte((byte)ImportDefinitionKind.AliasNamespace);
writer.WriteCompressedInteger(_debugMetadataOpt.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUtf8(import.AliasOpt)));
writer.WriteCompressedInteger(MetadataTokens.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUTF8(import.AliasOpt)));
}
else
{
Expand All @@ -299,7 +375,7 @@ private void SerializeImport(BlobBuilder writer, UsedNamespaceOrType import)

// TODO: cache?
string namespaceName = TypeNameSerializer.BuildQualifiedNamespaceName(import.TargetNamespaceOpt);
writer.WriteCompressedInteger(_debugMetadataOpt.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUtf8(namespaceName)));
writer.WriteCompressedInteger(MetadataTokens.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUTF8(namespaceName)));
}
else
{
Expand All @@ -308,7 +384,7 @@ private void SerializeImport(BlobBuilder writer, UsedNamespaceOrType import)
Debug.Assert(import.TargetAssemblyOpt == null);

writer.WriteByte((byte)ImportDefinitionKind.ImportAssemblyReferenceAlias);
writer.WriteCompressedInteger(_debugMetadataOpt.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUtf8(import.AliasOpt)));
writer.WriteCompressedInteger(MetadataTokens.GetHeapOffset(_debugMetadataOpt.GetOrAddBlobUTF8(import.AliasOpt)));
}
}

Expand Down Expand Up @@ -380,7 +456,7 @@ private void SerializeModuleDefaultNamespace()
_debugMetadataOpt.AddCustomDebugInformation(
parent: EntityHandle.ModuleDefinition,
kind: _debugMetadataOpt.GetOrAddGuid(PortableCustomDebugInfoKinds.DefaultNamespace),
value: _debugMetadataOpt.GetOrAddBlobUtf8(module.DefaultNamespace));
value: _debugMetadataOpt.GetOrAddBlobUTF8(module.DefaultNamespace));
}

#endregion
Expand Down Expand Up @@ -654,7 +730,7 @@ private BlobHandle SerializeDocumentName(string name)
foreach (var part in name.Split(separator))
{
BlobHandle partIndex = _debugMetadataOpt.GetOrAddBlob(ImmutableArray.Create(s_utf8Encoding.GetBytes(part)));
writer.WriteCompressedInteger(_debugMetadataOpt.GetHeapOffset(partIndex));
writer.WriteCompressedInteger(MetadataTokens.GetHeapOffset(partIndex));
}

return _debugMetadataOpt.GetOrAddBlob(writer);
Expand Down
Loading