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

fix typos #108116

Merged
merged 3 commits into from
Sep 23, 2024
Merged

fix typos #108116

Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions docs/tools/illink/error-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ This is technically possible if a custom assembly defines `DynamicDependencyAttr
public override void TestMethod() {}
}
```
A derived member has the attribute but the overriden base member does not have the attribute
A derived member has the attribute but the overridden base member does not have the attribute
```C#
public class Base
{
Expand Down Expand Up @@ -1953,7 +1953,7 @@ void TestMethod()
public override void TestMethod() {}
}
```
A derived member has the attribute but the overriden base member does not have the attribute
A derived member has the attribute but the overridden base member does not have the attribute
```C#
public class Base
{
Expand Down
2 changes: 1 addition & 1 deletion eng/DotNetBuild.props
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<InnerBuildArgs Condition="'$(DotNetBuildMonoBundleLLVMOptimizer)' != ''">$(InnerBuildArgs) /p:MonoBundleLLVMOptimizer=$(DotNetBuildMonoBundleLLVMOptimizer)</InnerBuildArgs>
<InnerBuildArgs Condition="'$(PgoInstrument)' == 'true'">$(InnerBuildArgs) $(FlagParameterPrefix)pgoinstrument</InnerBuildArgs>

<!-- This prop needs to be passed to the inner build manually as the BaseInnerSourceBuildCommand gets overriden above -->
<!-- This prop needs to be passed to the inner build manually as the BaseInnerSourceBuildCommand gets overridden above -->
<InnerBuildArgs Condition="'$(DotNetBuildRepo)' == 'true'">$(InnerBuildArgs) /p:DotNetBuildRepo=true</InnerBuildArgs>
<InnerBuildArgs Condition="'$(DotNetBuildOrchestrator)' == 'true'">$(InnerBuildArgs) /p:DotNetBuildOrchestrator=true</InnerBuildArgs>
<InnerBuildArgs Condition="'$(OfficialBuildId)' != ''">$(InnerBuildArgs) /p:OfficialBuildId=$(OfficialBuildId)</InnerBuildArgs>
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48839,7 +48839,7 @@ HRESULT GCHeap::Initialize()

nhp_from_config = static_cast<uint32_t>(GCConfig::GetHeapCount());

// The CPU count may be overriden by the user. Ensure that we create no more than g_num_processors
// The CPU count may be overridden by the user. Ensure that we create no more than g_num_processors
// heaps as that is the number of slots we have allocated for handle tables.
g_num_active_processors = min (GCToEEInterface::GetCurrentProcessCpuCount(), g_num_processors);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ private static void FindBaseUnificationGroup(MetadataType currentType, Unificati
// We may want to build up a unification group for the base just to check the further MethodImpl case here.
FindBaseUnificationGroup(baseType, unificationGroup);

// We should check to see if a the DefiningMethod on the base unification group is overriden via MethodImpl
// We should check to see if a the DefiningMethod on the base unification group is overridden via MethodImpl
// TODO! check to see if we need to check for MethodImpls affecting other members of the unification group
// other than the defining method
if (unificationGroup.DefiningMethod != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,24 @@ public static MethodIL EmitIL(MethodDesc method)
ILEmitter emitter = new ILEmitter();
ILCodeStream codestream = emitter.NewCodeStream();

ILCodeLabel lOverriden = emitter.NewCodeLabel();
ILCodeLabel lOverridden = emitter.NewCodeLabel();

ILToken beginMethodToken = emitter.NewToken(beginMethod);
codestream.EmitLdArg(0);
codestream.Emit(ILOpcode.ldvirtftn, beginMethodToken);
codestream.Emit(ILOpcode.ldftn, beginMethodToken);
codestream.Emit(ILOpcode.bne_un, lOverriden);
codestream.Emit(ILOpcode.bne_un, lOverridden);

ILToken endMethodToken = emitter.NewToken(endMethod);
codestream.EmitLdArg(0);
codestream.Emit(ILOpcode.ldvirtftn, endMethodToken);
codestream.Emit(ILOpcode.ldftn, endMethodToken);
codestream.Emit(ILOpcode.bne_un, lOverriden);
codestream.Emit(ILOpcode.bne_un, lOverridden);

codestream.EmitLdc(0);
codestream.Emit(ILOpcode.ret);

codestream.EmitLabel(lOverriden);
codestream.EmitLabel(lOverridden);
codestream.EmitLdc(1);
codestream.Emit(ILOpcode.ret);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,10 @@ public sealed override IEnumerable<CombinedDependencyListEntry> GetConditionalSt

// If this is an abstract type, only request a tentative entrypoint (whose body
// might just be stubbed out). This lets us avoid generating method bodies for
// virtual method on abstract types that are overriden in all their children.
// virtual method on abstract types that are overridden in all their children.
//
// We don't do this if the method can be placed in the sealed vtable since
// those can never be overriden by children anyway.
// those can never be overridden by children anyway.
bool canUseTentativeMethod = isNonInterfaceAbstractType
&& !decl.CanMethodBeInSealedVTable(factory)
&& factory.CompilationModuleGroup.AllowVirtualMethodOnAbstractTypeOptimization(canonImpl);
Expand Down Expand Up @@ -1031,7 +1031,7 @@ private void OutputVirtualSlots(NodeFactory factory, ref ObjectDataBuilder objDa
// If the type we're generating now is abstract, and the implementation comes from an abstract type,
// only use a tentative method entrypoint that can have its body replaced by a throwing stub
// if no "hard" reference to that entrypoint exists in the program.
// This helps us to eliminate method bodies for virtual methods on abstract types that are fully overriden
// This helps us to eliminate method bodies for virtual methods on abstract types that are fully overridden
// in the children of that abstract type.
bool canUseTentativeEntrypoint = implType is MetadataType mdImplType && mdImplType.IsAbstract && !mdImplType.IsInterface
&& implMethod.OwningType is MetadataType mdImplMethodType && mdImplMethodType.IsAbstract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public override IEnumerable<CombinedDependencyListEntry> SearchDynamicDependenci
openInstantiation[instArg] = context.GetSignatureVariable(instArg, method: true);
MethodDesc implementingMethodInstantiation = slotDecl.MakeInstantiatedMethod(openInstantiation).InstantiateSignature(potentialOverrideType.Instantiation, _method.Instantiation);

// Static virtuals cannot be further overriden so this is an impl use. Otherwise it's a virtual slot use.
// Static virtuals cannot be further overridden so this is an impl use. Otherwise it's a virtual slot use.
if (implementingMethodInstantiation.Signature.IsStatic)
dynamicDependencies.Add(new CombinedDependencyListEntry(factory.GenericVirtualMethodImpl(implementingMethodInstantiation.GetCanonMethodTarget(CanonicalFormKind.Specific)), null, "ImplementingMethodInstantiation"));
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ private sealed class ScannedDevirtualizationManager : DevirtualizationManager
private HashSet<TypeDesc> _unsealedTypes = new HashSet<TypeDesc>();
private Dictionary<TypeDesc, HashSet<TypeDesc>> _implementators = new();
private HashSet<TypeDesc> _disqualifiedTypes = new();
private HashSet<MethodDesc> _overridenMethods = new();
private HashSet<MethodDesc> _overriddenMethods = new();
private HashSet<MethodDesc> _generatedVirtualMethods = new();

public ScannedDevirtualizationManager(NodeFactory factory, ImmutableArray<DependencyNodeCore<NodeFactory>> markedNodes)
Expand Down Expand Up @@ -583,7 +583,7 @@ static List<MethodDesc> BuildVTable(NodeFactory factory, TypeDesc currentType, T
for (int i = 0; i < baseVtable.Count; i++)
{
if (baseVtable[i] != vtable[i])
_overridenMethods.Add(baseVtable[i]);
_overriddenMethods.Add(baseVtable[i]);
}
}
}
Expand Down Expand Up @@ -681,7 +681,7 @@ public override bool IsEffectivelySealed(MethodDesc method)
return false;

// If we haven't seen any other method override this, this method is sealed
return !_overridenMethods.Contains(canonMethod);
return !_overriddenMethods.Contains(canonMethod);
}

protected override MethodDesc ResolveVirtualMethod(MethodDesc declMethod, DefType implType, out CORINFO_DEVIRTUALIZATION_DETAIL devirtualizationDetail)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ public virtual void GetDependenciesDueToDelegateCreation(ref CombinedDependencyL
}

/// <summary>
/// This method is an extension point that can provide additional dependencies for overriden methods on constructed types.
/// This method is an extension point that can provide additional dependencies for overridden methods on constructed types.
/// </summary>
public virtual void GetDependenciesForOverridingMethod(ref CombinedDependencyList dependencies, NodeFactory factory, MethodDesc decl, MethodDesc impl)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ Task<bool> ValidateTypeWorkerHelper(TypeDesc typeToCheckForSkipValidation)
// Override rules
// Validate that each override results does not violate accessibility rules -- UNIMPLEMENTED

HashSet<MethodDesc> overridenDeclMethods = new HashSet<MethodDesc>();
HashSet<MethodDesc> overriddenDeclMethods = new HashSet<MethodDesc>();

foreach (var methodImplHandle in typeDef.GetMethodImplementations())
{
Expand Down Expand Up @@ -352,7 +352,7 @@ Task<bool> ValidateTypeWorkerHelper(TypeDesc typeToCheckForSkipValidation)
}

// Validate that multiple MethodImpls don't override the same method
if (!overridenDeclMethods.Add(methodDecl))
if (!overriddenDeclMethods.Add(methodDecl))
{
AddTypeValidationError(type, $"Multiple MethodImpl records override '{methodDecl}'");
return false;
Expand Down Expand Up @@ -388,7 +388,7 @@ Task<bool> ValidateTypeWorkerHelper(TypeDesc typeToCheckForSkipValidation)
// Validate that for every override involving generic methods that the generic method constraints are matching
if (!CompareMethodConstraints(interfaceMethod, resolvedMethod))
{
AddTypeValidationError(type, $"Interface method '{interfaceMethod}' overriden by method '{resolvedMethod}' which does not have matching generic constraints");
AddTypeValidationError(type, $"Interface method '{interfaceMethod}' overridden by method '{resolvedMethod}' which does not have matching generic constraints");
return false;
}
}
Expand All @@ -410,7 +410,7 @@ Task<bool> ValidateTypeWorkerHelper(TypeDesc typeToCheckForSkipValidation)
// Validate that for every override involving generic methods that the generic method constraints are matching
if (!CompareMethodConstraints(interfaceMethod, impl))
{
AddTypeValidationError(type, $"Interface method '{interfaceMethod}' overriden by method '{impl}' which does not have matching generic constraints");
AddTypeValidationError(type, $"Interface method '{interfaceMethod}' overridden by method '{impl}' which does not have matching generic constraints");
return false;
}
}
Expand All @@ -428,7 +428,7 @@ Task<bool> ValidateTypeWorkerHelper(TypeDesc typeToCheckForSkipValidation)
// Validate that for every override involving generic methods that the generic method constraints are matching
if (!CompareMethodConstraints(virtualMethod, implementationMethod))
{
AddTypeValidationError(type, $"Virtual method '{virtualMethod}' overriden by method '{implementationMethod}' which does not have matching generic constraints");
AddTypeValidationError(type, $"Virtual method '{virtualMethod}' overridden by method '{implementationMethod}' which does not have matching generic constraints");
return false;
}

Expand All @@ -439,7 +439,7 @@ Task<bool> ValidateTypeWorkerHelper(TypeDesc typeToCheckForSkipValidation)
var implementationOnBaseType = baseTypeVirtualMethodAlgorithm.FindVirtualFunctionTargetMethodOnObjectType(virtualMethod, type.BaseType);
if (!implementationMethod.Signature.ApplySubstitution(type.Instantiation).EquivalentWithCovariantReturnType(implementationOnBaseType.Signature.ApplySubstitution(type.Instantiation)))
{
AddTypeValidationError(type, $"Virtual method '{virtualMethod}' overriden by method '{implementationMethod}' does not satisfy the covariant return type introduced with '{implementationOnBaseType}'");
AddTypeValidationError(type, $"Virtual method '{virtualMethod}' overridden by method '{implementationMethod}' does not satisfy the covariant return type introduced with '{implementationOnBaseType}'");
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ public void TestPreserveBaseOverridesBehavior(string exactScenarioName, string s
[InlineData("Impl", "ImplCovariant")]
[InlineData("SubImpl", "SubImplCovariant")]
[InlineData("SubImpl_OverrideViaNameSig", "SubImplCovariant2")]
[InlineData("SubImpl_OverrideViaNameSig_OverridenViaMethodImpl", "SubSubImplCovariant")]
[InlineData("SubImpl_OverrideViaNameSig_OverriddenViaMethodImpl", "SubSubImplCovariant")]
public void TestSubImplCovariant(string exactScenarioName, string typeToConstruct)
{
this._logger.WriteLine(exactScenarioName);
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/methodtable.inl
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ inline MethodDesc* MethodTable::GetMethodDescForSlot_NoThrow(DWORD slot)

if (pCode == (PCODE)NULL)
{
// This code path should only be hit for methods which have not been overriden
// This code path should only be hit for methods which have not been overridden
MethodTable *pMTToSearchForMethodDesc = this->GetCanonicalMethodTable();
while (pMTToSearchForMethodDesc != NULL)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
<data name="Argument_InterfaceNotFound" xml:space="preserve">
<value>Interface not found.</value>
</data>
<data name="Argument_MethodOverriden" xml:space="preserve">
<data name="Argument_MethodOverridden" xml:space="preserve">
<value>Method '{0}' on type '{1}' is overriding a method that has been overridden.</value>
</data>
<data name="Argument_MustBeInterface" xml:space="preserve">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ protected override void DefineMethodOverrideCore(MethodInfo methodInfoBody, Meth
{
if (im.Exists(pair => pair.ifaceMethod.Equals(methodInfoDeclaration)))
{
throw new ArgumentException(SR.Format(SR.Argument_MethodOverriden, methodInfoBody.Name, FullName), nameof(methodInfoDeclaration));
throw new ArgumentException(SR.Format(SR.Argument_MethodOverridden, methodInfoBody.Name, FullName), nameof(methodInfoDeclaration));
}

im.Add((methodInfoDeclaration, methodInfoBody));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ public int Encode(Span<byte> destination)
}

/// <summary>
/// When overriden in a derived class, attempts to encode this message into the specified buffer.
/// When overridden in a derived class, attempts to encode this message into the specified buffer.
/// </summary>
/// <param name="destination">The buffer in which to write the encoded value.</param>
/// <param name="bytesWritten">On success, receives the number of bytes written to <paramref name="destination"/>. This parameter is treated as uninitialized.</param>
Expand All @@ -632,7 +632,7 @@ public int Encode(Span<byte> destination)
public abstract bool TryEncode(Span<byte> destination, out int bytesWritten);

/// <summary>
/// When overriden in a derived class, calculates the number of bytes produced by encoding this <see cref="CoseMessage"/>.
/// When overridden in a derived class, calculates the number of bytes produced by encoding this <see cref="CoseMessage"/>.
/// </summary>
/// <returns>The number of bytes produced by encoding this message.</returns>
public abstract int GetEncodedLength();
Expand Down
12 changes: 6 additions & 6 deletions src/libraries/System.Security.Cryptography/tests/HmacMD5Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public void HMacMD5_EmptyKey()
[Fact]
public void HmacMD5_Stream_MultipleOf4096()
{
// Verfied with:
// Verified with:
// for _ in {1..1024}; do echo -n "0102030405060708"; done | openssl md5 -hex -mac HMAC -macopt hexkey:000102030405060708090A0B0C0D0E0F
VerifyRepeating(
input: "0102030405060708",
Expand All @@ -171,7 +171,7 @@ public void HmacMD5_Stream_MultipleOf4096()
[Fact]
public void HmacMD5_Stream_NotMultipleOf4096()
{
// Verfied with:
// Verified with:
// for _ in {1..1025}; do echo -n "0102030405060708"; done | openssl md5 -hex -mac HMAC -macopt hexkey:000102030405060708090A0B0C0D0E0F
VerifyRepeating(
input: "0102030405060708",
Expand All @@ -183,7 +183,7 @@ public void HmacMD5_Stream_NotMultipleOf4096()
[Fact]
public void HmacMD5_Stream_Empty()
{
// Verfied with:
// Verified with:
// echo -n "" | openssl md5 -hex -mac HMAC -macopt hexkey:000102030405060708090A0B0C0D0E0F
VerifyRepeating(
input: "",
Expand All @@ -195,7 +195,7 @@ public void HmacMD5_Stream_Empty()
[Fact]
public async Task HmacMD5_Stream_MultipleOf4096_Async()
{
// Verfied with:
// Verified with:
// for _ in {1..1024}; do echo -n "0102030405060708"; done | openssl md5 -hex -mac HMAC -macopt hexkey:000102030405060708090A0B0C0D0E0F
await VerifyRepeatingAsync(
input: "0102030405060708",
Expand All @@ -207,7 +207,7 @@ await VerifyRepeatingAsync(
[Fact]
public async Task HmacMD5_Stream_NotMultipleOf4096_Async()
{
// Verfied with:
// Verified with:
// for _ in {1..1025}; do echo -n "0102030405060708"; done | openssl md5 -hex -mac HMAC -macopt hexkey:000102030405060708090A0B0C0D0E0F
await VerifyRepeatingAsync(
input: "0102030405060708",
Expand All @@ -219,7 +219,7 @@ await VerifyRepeatingAsync(
[Fact]
public async Task HmacMD5_Stream_Empty_Async()
{
// Verfied with:
// Verified with:
// echo -n "" | openssl md5 -hex -mac HMAC -macopt hexkey:000102030405060708090A0B0C0D0E0F
await VerifyRepeatingAsync(
input: "",
Expand Down
Loading
Loading