From ac3595e47432b728ddccabdc280692ac0e9405f7 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Wed, 9 Sep 2020 07:05:33 -0700 Subject: [PATCH] Integrate minor fixes from dotnet/runtimelab:NativeAOT (#41999) --- src/coreclr/clr.featuredefines.props | 2 -- .../src/System/Reflection/Emit/MethodBuilder.cs | 14 -------------- .../src/System/Reflection/Emit/TypeBuilder.cs | 9 --------- src/coreclr/src/inc/gcinfodecoder.h | 14 ++++++++++++-- .../Common/Compiler/VectorFieldLayoutAlgorithm.cs | 2 +- .../TypeSystem/Canon/InstantiatedMethod.Canon.cs | 4 ++-- .../Canon/StandardCanonicalizationAlgorithm.cs | 16 ++++++++-------- .../tools/Common/TypeSystem/Canon/TypeDesc.Canon.cs | 4 ++-- .../TypeSystem/Canon/TypeSystemContext.Canon.cs | 4 ++-- .../TypeSystem/Common/GenericParameterDesc.cs | 6 +++--- .../Common/InstantiatedType.Interfaces.cs | 5 ++--- .../Common/MetadataVirtualMethodAlgorithm.cs | 4 ++-- .../Common/Utilities/LockFreeReaderHashtable.cs | 4 ++-- .../TypeSystem/Common/VirtualMethodAlgorithm.cs | 2 +- .../src/tools/Common/TypeSystem/IL/EcmaMethodIL.cs | 13 ++++--------- .../Common/TypeSystem/Interop/IL/Marshaller.cs | 2 +- .../Compiler/ReadyToRunCompilerContext.cs | 2 +- src/coreclr/src/vm/gcinfodecoder.cpp | 21 ++++++++++----------- src/libraries/Native/Unix/System.Native/pal_time.c | 4 ++-- .../src/System.Diagnostics.StackTrace.csproj | 1 - .../src/Resources/Strings.resx | 3 --- .../src/System.Private.CoreLib.Shared.projitems | 1 + .../src/System/Diagnostics/StackFrameExtensions.cs | 0 .../Runtime/CompilerServices/RuntimeFeature.cs | 4 ---- .../System.Private.CoreLib.csproj | 2 -- 25 files changed, 56 insertions(+), 87 deletions(-) rename src/libraries/{System.Diagnostics.StackTrace => System.Private.CoreLib}/src/System/Diagnostics/StackFrameExtensions.cs (100%) diff --git a/src/coreclr/clr.featuredefines.props b/src/coreclr/clr.featuredefines.props index c5119c8..6c4c132 100644 --- a/src/coreclr/clr.featuredefines.props +++ b/src/coreclr/clr.featuredefines.props @@ -9,7 +9,6 @@ true true true - true true @@ -58,7 +57,6 @@ $(DefineConstants);FEATURE_PERFTRACING $(DefineConstants);FEATURE_EVENTSOURCE_XPLAT $(DefineConstants);FEATURE_WIN32_REGISTRY - $(DefineConstants);FEATURE_DEFAULT_INTERFACES $(DefineConstants);FEATURE_TYPEEQUIVALENCE $(DefineConstants);FEATURE_BASICFREEZE $(DefineConstants);FEATURE_PORTABLE_SHUFFLE_THUNKS diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs index 65b5033..6d7f7fc 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs @@ -98,20 +98,6 @@ namespace System.Reflection.Emit throw new ArgumentException(SR.Arg_NoStaticVirtual); } -#if !FEATURE_DEFAULT_INTERFACES - if ((attributes & MethodAttributes.SpecialName) != MethodAttributes.SpecialName) - { - if ((type.Attributes & TypeAttributes.Interface) == TypeAttributes.Interface) - { - // methods on interface have to be abstract + virtual except special name methods such as type initializer - if ((attributes & (MethodAttributes.Abstract | MethodAttributes.Virtual)) != - (MethodAttributes.Abstract | MethodAttributes.Virtual) && - (attributes & MethodAttributes.Static) == 0) - throw new ArgumentException(SR.Argument_BadAttributeOnInterfaceMethod); - } - } -#endif - m_callingConvention = callingConvention; if (parameterTypes != null) diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs index 5b2acd1..6292367 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs @@ -1291,15 +1291,6 @@ namespace System.Reflection.Emit ThrowIfCreated(); -#if !FEATURE_DEFAULT_INTERFACES - if (!m_isHiddenGlobalType) - { - if (((m_iAttr & TypeAttributes.ClassSemanticsMask) == TypeAttributes.Interface) && - (attributes & MethodAttributes.Abstract) == 0 && (attributes & MethodAttributes.Static) == 0) - throw new ArgumentException(SR.Argument_BadAttributeOnInterfaceMethod); - } -#endif - // pass in Method attributes MethodBuilder method = new MethodBuilder( name, attributes, callingConvention, diff --git a/src/coreclr/src/inc/gcinfodecoder.h b/src/coreclr/src/inc/gcinfodecoder.h index 3eeeb00..576b520 100644 --- a/src/coreclr/src/inc/gcinfodecoder.h +++ b/src/coreclr/src/inc/gcinfodecoder.h @@ -42,8 +42,6 @@ typedef ArrayDPTR(const uint8_t) PTR_CBYTE; #define VALIDATE_ROOT(isInterior, hCallBack, pObjRef) -#define _ASSERTE(x) assert(x) - #define UINT32 UInt32 #define INT32 Int32 #define UINT16 UInt16 @@ -56,6 +54,18 @@ typedef void * OBJECTREF; #define GET_CALLER_SP(pREGDISPLAY) ((TADDR)0) +struct GCInfoToken +{ + PTR_VOID Info; + UINT32 Version; + + GCInfoToken(PTR_VOID info) + { + Info = info; + Version = 2; + } +}; + #else // FEATURE_REDHAWK // Stuff from cgencpu.h: diff --git a/src/coreclr/src/tools/Common/Compiler/VectorFieldLayoutAlgorithm.cs b/src/coreclr/src/tools/Common/Compiler/VectorFieldLayoutAlgorithm.cs index e9cb2ab..95bbf35 100644 --- a/src/coreclr/src/tools/Common/Compiler/VectorFieldLayoutAlgorithm.cs +++ b/src/coreclr/src/tools/Common/Compiler/VectorFieldLayoutAlgorithm.cs @@ -15,7 +15,7 @@ namespace ILCompiler private readonly FieldLayoutAlgorithm _fallbackAlgorithm; private readonly bool _vectorAbiIsStable; - public VectorFieldLayoutAlgorithm(FieldLayoutAlgorithm fallbackAlgorithm, bool vectorAbiIsStable) + public VectorFieldLayoutAlgorithm(FieldLayoutAlgorithm fallbackAlgorithm, bool vectorAbiIsStable = true) { _vectorAbiIsStable = vectorAbiIsStable; _fallbackAlgorithm = fallbackAlgorithm; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/InstantiatedMethod.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/InstantiatedMethod.Canon.cs index 973c86f..8f8d0a6 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/InstantiatedMethod.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/InstantiatedMethod.Canon.cs @@ -12,8 +12,8 @@ namespace Internal.TypeSystem /// Stores a cached version of the canonicalized form of this method since /// calculating it is a recursive operation /// - InstantiatedMethod _specificCanonCache = null; - InstantiatedMethod _universalCanonCache = null; + InstantiatedMethod _specificCanonCache; + InstantiatedMethod _universalCanonCache; /// /// Returns the result of canonicalizing this method over the given kind of Canon diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/StandardCanonicalizationAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/StandardCanonicalizationAlgorithm.cs index ed0f412..26b7ee2 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/StandardCanonicalizationAlgorithm.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/StandardCanonicalizationAlgorithm.cs @@ -14,6 +14,8 @@ namespace Internal.TypeSystem /// Returns a new instantiation that canonicalizes all types in /// if possible under the policy of '' /// + /// Instantiation to canonicalize. + /// The type of cannonicalization to apply. /// True if the returned instantiation is different from ''. public static Instantiation ConvertInstantiationToCanonForm(Instantiation instantiation, CanonicalFormKind kind, out bool changed) { @@ -64,14 +66,12 @@ namespace Internal.TypeSystem return instantiation; } - /// - /// Helper API to convert a type to its canonical or universal canonical form. - /// Note that for now, there is no mixture between specific canonical and universal canonical forms, - /// meaning that the canonical form or Foo can either be Foo<__Canon, int> or - /// Foo<__UniversalCanon, __UniversalCanon>. It cannot be Foo<__Canon, __UniversalCanon> (yet) - /// for simplicity. We can always change that rule in the futue and add support for the mixture, but - /// for now we are keeping it simple. - /// + // Helper API to convert a type to its canonical or universal canonical form. + // Note that for now, there is no mixture between specific canonical and universal canonical forms, + // meaning that the canonical form or Foo can either be Foo<__Canon, int> or + // Foo<__UniversalCanon, __UniversalCanon>. It cannot be Foo<__Canon, __UniversalCanon> (yet) + // for simplicity. We can always change that rule in the futue and add support for the mixture, but + // for now we are keeping it simple. public static TypeDesc ConvertToCanon(TypeDesc typeToConvert, CanonicalFormKind kind) { // Wrap the call to the version that potentially modifies the parameter. External diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeDesc.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeDesc.Canon.cs index c87408e..c0ce802 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeDesc.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeDesc.Canon.cs @@ -12,8 +12,8 @@ namespace Internal.TypeSystem /// Stores a cached version of the canonicalized form of this type since /// calculating it is a recursive operation /// - TypeDesc _specificCanonCache = null; - TypeDesc _universalCanonCache = null; + TypeDesc _specificCanonCache; + TypeDesc _universalCanonCache; TypeDesc GetCachedCanonValue(CanonicalFormKind kind) { switch (kind) diff --git a/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeSystemContext.Canon.cs b/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeSystemContext.Canon.cs index 5da631b..091f26b 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeSystemContext.Canon.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Canon/TypeSystemContext.Canon.cs @@ -11,7 +11,7 @@ namespace Internal.TypeSystem // Includes canonicalization objects local to a particular context public partial class TypeSystemContext { - private CanonType _canonType = null; + private CanonType _canonType; /// /// Instance of System.__Canon for this context /// @@ -27,7 +27,7 @@ namespace Internal.TypeSystem } } - private UniversalCanonType _universalCanonType = null; + private UniversalCanonType _universalCanonType; /// /// Instance of System.__UniversalCanon for this context /// diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.cs index 5615efc..21b85d7 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/GenericParameterDesc.cs @@ -45,10 +45,10 @@ namespace Internal.TypeSystem /// A type can be substituted for the generic type parameter only if it is a reference type. /// ReferenceTypeConstraint = 0x04, - + /// - // A type can be substituted for the generic type parameter only if it is a value - // type and is not nullable. + /// A type can be substituted for the generic type parameter only if it is a value + /// type and is not nullable. /// NotNullableValueTypeConstraint = 0x08, diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.Interfaces.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.Interfaces.cs index 33d38d0..9e4cae5 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.Interfaces.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/InstantiatedType.Interfaces.cs @@ -10,13 +10,12 @@ namespace Internal.TypeSystem public sealed partial class InstantiatedType : MetadataType { - private DefType[] _implementedInterfaces = null; + private DefType[] _implementedInterfaces; private DefType[] InitializeImplementedInterfaces() { - return InstantiateTypeArray(_typeDef.ExplicitlyImplementedInterfaces, _instantiation, new Instantiation()); - // TODO Add duplicate detection + return (_implementedInterfaces = InstantiateTypeArray(_typeDef.ExplicitlyImplementedInterfaces, _instantiation, new Instantiation())); } /// diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs index c255421..8604736 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs @@ -42,10 +42,10 @@ namespace Internal.TypeSystem private class UnificationGroup { private MethodDesc[] _members = MethodDesc.EmptyMethods; - private int _memberCount = 0; + private int _memberCount; private MethodDesc[] _methodsRequiringSlotUnification = MethodDesc.EmptyMethods; - private int _methodsRequiringSlotUnificationCount = 0; + private int _methodsRequiringSlotUnificationCount; /// /// Custom enumerator struct for Unification group. Makes enumeration require 0 allocations. diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtable.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtable.cs index 59204c2..9890045 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtable.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtable.cs @@ -64,14 +64,14 @@ namespace Internal.TypeSystem /// _count is used in combination with _resizeCount to control when the /// hashtable should expand /// - private volatile int _count = 0; + private volatile int _count; /// /// Represents _count plus the number of potential adds currently happening. /// If this reaches _hashTable.Length-1, an expansion is required (because /// one slot must always be null for seeks to complete). /// - private int _reserve = 0; + private int _reserve; /// /// _resizeCount represents the size at which the hashtable should resize. diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/VirtualMethodAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/VirtualMethodAlgorithm.cs index 3a291fb..2ccf630 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/VirtualMethodAlgorithm.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/VirtualMethodAlgorithm.cs @@ -17,7 +17,7 @@ namespace Internal.TypeSystem public abstract class VirtualMethodAlgorithm { /// - /// Resolves interface method '' to a method on '' + /// Resolves interface method '' to a method on '' /// that implements the the method. /// public abstract MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType); diff --git a/src/coreclr/src/tools/Common/TypeSystem/IL/EcmaMethodIL.cs b/src/coreclr/src/tools/Common/TypeSystem/IL/EcmaMethodIL.cs index 5f1389b..e014280 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/IL/EcmaMethodIL.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/IL/EcmaMethodIL.cs @@ -22,24 +22,19 @@ namespace Internal.IL private LocalVariableDefinition[] _locals; private ILExceptionRegion[] _ilExceptionRegions; - // TODO: Remove: Workaround for missing ClearInitLocals transforms in CoreRT CoreLib - private readonly bool _clearInitLocals; - - public static EcmaMethodIL Create(EcmaMethod method, bool clearInitLocals = false) + public static EcmaMethodIL Create(EcmaMethod method) { var rva = method.MetadataReader.GetMethodDefinition(method.Handle).RelativeVirtualAddress; if (rva == 0) return null; - return new EcmaMethodIL(method, rva, clearInitLocals); + return new EcmaMethodIL(method, rva); } - private EcmaMethodIL(EcmaMethod method, int rva, bool clearInitLocals) + private EcmaMethodIL(EcmaMethod method, int rva) { _method = method; _module = method.Module; _methodBody = _module.PEReader.GetMethodBody(rva); - - _clearInitLocals = clearInitLocals; } public EcmaModule Module @@ -71,7 +66,7 @@ namespace Internal.IL { get { - return !_clearInitLocals && _methodBody.LocalVariablesInitialized; + return _methodBody.LocalVariablesInitialized; } } diff --git a/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/Marshaller.cs b/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/Marshaller.cs index ecd7b0d..6dd2d23 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/Marshaller.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Interop/IL/Marshaller.cs @@ -1084,7 +1084,7 @@ namespace Internal.TypeSystem.Interop codeStream.Emit(ILOpcode.brfalse, lNullArray); // allocate memory - // nativeParameter = (byte**)CoTaskMemAllocAndZeroMemory((IntPtr)(checked(managedParameter.Length * sizeof(byte*)))); + // nativeParameter = AllocCoTaskMem(checked(managedParameter.Length * sizeof(NativeElementType))); // loads the number of elements EmitElementCount(codeStream, MarshalDirection.Forward); diff --git a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs index bf914ea..5b8c098 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs @@ -116,7 +116,7 @@ namespace ILCompiler private DefType _similarVectorOpenType; private bool _vectorAbiIsStable; - public VectorOfTFieldLayoutAlgorithm(FieldLayoutAlgorithm fallbackAlgorithm, FieldLayoutAlgorithm vectorFallbackAlgorithm, string similarVector, bool vectorAbiIsStable) + public VectorOfTFieldLayoutAlgorithm(FieldLayoutAlgorithm fallbackAlgorithm, FieldLayoutAlgorithm vectorFallbackAlgorithm, string similarVector, bool vectorAbiIsStable = true) { _fallbackAlgorithm = fallbackAlgorithm; _vectorFallbackAlgorithm = vectorFallbackAlgorithm; diff --git a/src/coreclr/src/vm/gcinfodecoder.cpp b/src/coreclr/src/vm/gcinfodecoder.cpp index ac28d04..2c515fb 100644 --- a/src/coreclr/src/vm/gcinfodecoder.cpp +++ b/src/coreclr/src/vm/gcinfodecoder.cpp @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - #include "common.h" #include "gcinfodecoder.h" @@ -158,7 +157,7 @@ GcInfoDecoder::GcInfoDecoder( if (hasGSCookie) { // Note that normalization as a code offset can be different than - // normalization as code legnth + // normalization as code length UINT32 normCodeLength = NORMALIZE_CODE_OFFSET(m_CodeLength); // Decode prolog/epilog information @@ -275,7 +274,7 @@ GcInfoDecoder::GcInfoDecoder( if (hasReversePInvokeFrame) { - m_ReversePInvokeFrameStackSlot = (INT32)m_Reader.DecodeVarLengthSigned(REVERSE_PINVOKE_FRAME_ENCBASE); + m_ReversePInvokeFrameStackSlot = (INT32)DENORMALIZE_STACK_SLOT(m_Reader.DecodeVarLengthSigned(REVERSE_PINVOKE_FRAME_ENCBASE)); } else { @@ -322,7 +321,7 @@ GcInfoDecoder::GcInfoDecoder( else if(flags & DECODE_FOR_RANGES_CALLBACK) { // Note that normalization as a code offset can be different than - // normalization as code legnth + // normalization as code length UINT32 normCodeLength = NORMALIZE_CODE_OFFSET(m_CodeLength); UINT32 numBitsPerOffset = CeilOfLog2(normCodeLength); @@ -445,7 +444,7 @@ void GcInfoDecoder::EnumerateInterruptibleRanges ( EnumerateInterruptibleRangesCallback *pCallback, void * hCallback) { - // If no info is found for the call site, we default to fully-interruptbile + // If no info is found for the call site, we default to fully-interruptible LOG((LF_GCROOTS, LL_INFO1000000, "No GC info found for call site at offset %x. Defaulting to fully-interruptible information.\n", (int) m_InstructionOffset)); UINT32 lastInterruptibleRangeStopOffsetNormalized = 0; @@ -804,7 +803,7 @@ bool GcInfoDecoder::EnumerateLiveSlots( _ASSERTE(m_NumInterruptibleRanges); _ASSERTE(numInterruptibleLength); - // If no info is found for the call site, we default to fully-interruptbile + // If no info is found for the call site, we default to fully-interruptible LOG((LF_GCROOTS, LL_INFO1000000, "No GC info found for call site at offset %x. Defaulting to fully-interruptible information.\n", (int) m_InstructionOffset)); UINT32 numChunks = (numInterruptibleLength + NUM_NORM_CODE_OFFSETS_PER_CHUNK - 1) / NUM_NORM_CODE_OFFSETS_PER_CHUNK; @@ -1365,7 +1364,7 @@ OBJECTREF* GcInfoDecoder::GetRegisterSlot( return (OBJECTREF*)*(ppRax + regNum); } -#ifdef TARGET_UNIX +#if defined(TARGET_UNIX) && !defined(FEATURE_REDHAWK) OBJECTREF* GcInfoDecoder::GetCapturedRegister( int regNum, PREGDISPLAY pRD @@ -1381,7 +1380,7 @@ OBJECTREF* GcInfoDecoder::GetCapturedRegister( return (OBJECTREF*)(pRax + regNum); } -#endif // TARGET_UNIX +#endif // TARGET_UNIX && !FEATURE_REDHAWK bool GcInfoDecoder::IsScratchRegister(int regNum, PREGDISPLAY pRD) { @@ -1435,7 +1434,7 @@ void GcInfoDecoder::ReportRegisterToGC( // AMD64 LOG((LF_GCROOTS, LL_INFO1000, "Reporting " FMT_REG, regNum )); OBJECTREF* pObjRef = GetRegisterSlot( regNum, pRD ); -#if defined(TARGET_UNIX) && !defined(SOS_TARGET_AMD64) +#if defined(TARGET_UNIX) && !defined(FEATURE_REDHAWK) && !defined(SOS_TARGET_AMD64) // On PAL, we don't always have the context pointers available due to // a limitation of an unwinding library. In such case, the context // pointers for some nonvolatile registers are NULL. @@ -1455,7 +1454,7 @@ void GcInfoDecoder::ReportRegisterToGC( // AMD64 gcFlags |= GC_CALL_PINNED; } -#endif // TARGET_UNIX && !SOS_TARGET_AMD64 +#endif // TARGET_UNIX && !FEATURE_REDHAWK && !SOS_TARGET_AMD64 #ifdef _DEBUG if(IsScratchRegister(regNum, pRD)) @@ -1810,7 +1809,7 @@ void GcInfoDecoder::ReportStackSlotToGC( GCINFODECODER_CONTRACT; OBJECTREF* pObjRef = GetStackSlot(spOffset, spBase, pRD); - _ASSERTE( IS_ALIGNED( pObjRef, sizeof( Object* ) ) ); + _ASSERTE(IS_ALIGNED(pObjRef, sizeof(OBJECTREF*))); #ifdef _DEBUG LOG((LF_GCROOTS, LL_INFO1000, /* Part One */ diff --git a/src/libraries/Native/Unix/System.Native/pal_time.c b/src/libraries/Native/Unix/System.Native/pal_time.c index 039e935..decfbad 100644 --- a/src/libraries/Native/Unix/System.Native/pal_time.c +++ b/src/libraries/Native/Unix/System.Native/pal_time.c @@ -32,13 +32,13 @@ int32_t SystemNative_UTimensat(const char* path, TimeSpec* times) updatedTimes[0].tv_nsec = (long)times[0].tv_nsec; updatedTimes[1].tv_sec = (time_t)times[1].tv_sec; - updatedTimes[1].tv_nsec = (long)times[1].tv_nsec; + updatedTimes[1].tv_nsec = (long)times[1].tv_nsec; while (CheckInterrupted(result = utimensat(AT_FDCWD, path, updatedTimes, 0))); #else struct timeval updatedTimes[2]; updatedTimes[0].tv_sec = (long)times[0].tv_sec; updatedTimes[0].tv_usec = (int)times[0].tv_nsec / 1000; - + updatedTimes[1].tv_sec = (long)times[1].tv_sec; updatedTimes[1].tv_usec = (int)times[1].tv_nsec / 1000; while (CheckInterrupted(result = utimes(path, updatedTimes))); diff --git a/src/libraries/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj b/src/libraries/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj index 4c218b7..8cecf8e 100644 --- a/src/libraries/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj +++ b/src/libraries/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj @@ -6,7 +6,6 @@ $(NetCoreAppCurrent) - diff --git a/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx b/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx index c2d6cea..8654f04 100644 --- a/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx +++ b/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx @@ -835,9 +835,6 @@ Attribute names must be unique. - - Interface method must be abstract and virtual. - Bad default value. diff --git a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems index 89c14ca..52fe72f 100644 --- a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems +++ b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems @@ -255,6 +255,7 @@ + diff --git a/src/libraries/System.Diagnostics.StackTrace/src/System/Diagnostics/StackFrameExtensions.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackFrameExtensions.cs similarity index 100% rename from src/libraries/System.Diagnostics.StackTrace/src/System/Diagnostics/StackFrameExtensions.cs rename to src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackFrameExtensions.cs diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.cs index b5740fe..4bb3b13 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.cs @@ -10,12 +10,10 @@ namespace System.Runtime.CompilerServices /// public const string PortablePdb = nameof(PortablePdb); -#if FEATURE_DEFAULT_INTERFACES /// /// Indicates that this version of runtime supports default interface method implementations. /// public const string DefaultImplementationsOfInterfaces = nameof(DefaultImplementationsOfInterfaces); -#endif /// /// Indicates that this version of runtime supports the Unmanaged calling convention value. @@ -37,9 +35,7 @@ namespace System.Runtime.CompilerServices case PortablePdb: case CovariantReturnsOfClasses: case UnmanagedSignatureCallingConvention: -#if FEATURE_DEFAULT_INTERFACES case DefaultImplementationsOfInterfaces: -#endif return true; case nameof(IsDynamicCodeSupported): return IsDynamicCodeSupported; diff --git a/src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj index 13c8ef1..034e8fc 100644 --- a/src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj +++ b/src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj @@ -113,14 +113,12 @@ true true true - true $(DefineConstants);FEATURE_MANAGED_ETW $(DefineConstants);FEATURE_MANAGED_ETW_CHANNELS $(DefineConstants);FEATURE_PERFTRACING - $(DefineConstants);FEATURE_DEFAULT_INTERFACES -- 2.7.4