diff --git a/docs/coding-guidelines/libraries-packaging.md b/docs/coding-guidelines/libraries-packaging.md index 59f80488dd534..3c03ab6439891 100644 --- a/docs/coding-guidelines/libraries-packaging.md +++ b/docs/coding-guidelines/libraries-packaging.md @@ -72,7 +72,7 @@ Some packages may wish to include a companion analyzer or source-generator with To include an analyzer in a package, simply add an `AnalyzerReference` item to the project that produces the package that should contain the analyzer and set the `Pack` metadata to true. If you just want to include the analyzer but not consume it, set the `ReferenceAnalyzer` metadata to false. ```xml - + ``` @@ -86,7 +86,7 @@ In the analyzer project make sure to do the following. Ensure it only targets `n ``` -In order to mitigate design-time/build-time performance issues with source generators, we generate build logic to allow the end user to disable the source generator from the package. By default, the MSBuild property an end user can set is named `Disable{PackageId}SourceGenerator`. If a package needs a custom property name, this can be overriden by setting the following property in the project that produces the package +In order to mitigate design-time/build-time performance issues with source generators, we generate build logic to allow the end user to disable the source generator from the package. By default, the MSBuild property an end user can set is named `Disable{PackageId}SourceGenerator`. If a package needs a custom property name, this can be overridden by setting the following property in the project that produces the package ```xml CustomPropertyName @@ -102,7 +102,7 @@ The infrastructure generates a targets file that throws a user readable Error wh buildTransitive\net461\Microsoft.Extensions.Configuration.UserSecrets.targets <- This file is generated and throws an Error buildTransitive\net462\_._ buildTransitive\netcoreapp2.0\Microsoft.Extensions.Configuration.UserSecrets.targets <- This file is generated and throws an Error -buildTransitive\net6.0\_._ +buildTransitive\net6.0\_._ ``` Whenever a library wants to author their own set of props and targets files (i.e. for source generators) and the above mentioned infrastructure kicks in (because the library targets .NETStandard), such files **must be included not only for the .NETStandard target framework but also for the specific minimum supported target frameworks**. The _.NETStandard Compatibility packaging infrastructure_ then omits the otherwise necessary placeholder files. Example: diff --git a/docs/design/coreclr/botr/readytorun-format.md b/docs/design/coreclr/botr/readytorun-format.md index 5839770bf3372..d4b1e57a98359 100644 --- a/docs/design/coreclr/botr/readytorun-format.md +++ b/docs/design/coreclr/botr/readytorun-format.md @@ -311,12 +311,12 @@ additional data determined by the flags. #### Virtual override signatures -ECMA 335 does not have a natural encoding for describing an overriden method. These signatures are encoded as a ReadyToRunVirtualFunctionOverrideFlags byte, followed by a method signature representing the declaration method, a type signature representing the type which is being devirtualized, and (optionally) a method signature indicating the implementation method. +ECMA 335 does not have a natural encoding for describing an overridden method. These signatures are encoded as a ReadyToRunVirtualFunctionOverrideFlags byte, followed by a method signature representing the declaration method, a type signature representing the type which is being devirtualized, and (optionally) a method signature indicating the implementation method. | ReadyToRunVirtualFunctionOverrideFlags | Value | Description |:------------------------------------------------------|------:|:----------- | READYTORUN_VIRTUAL_OVERRIDE_None | 0x00 | No flags are set -| READYTORUN_VIRTUAL_OVERRIDE_VirtualFunctionOverriden | 0x01 | If set, then the virtual function has an implementation, which is encoded in the optional method implementation signature. +| READYTORUN_VIRTUAL_OVERRIDE_VirtualFunctionOverridden | 0x01 | If set, then the virtual function has an implementation, which is encoded in the optional method implementation signature. #### IL Body signatures diff --git a/docs/design/coreclr/jit/finally-optimizations.md b/docs/design/coreclr/jit/finally-optimizations.md index d35d5a47bd8ba..88497df38868d 100644 --- a/docs/design/coreclr/jit/finally-optimizations.md +++ b/docs/design/coreclr/jit/finally-optimizations.md @@ -378,7 +378,7 @@ integrity of the handler table. ### Finally Cloning (Sketch) -Skip over all methods, if the runtime suports thread abort. More on +Skip over all methods, if the runtime supports thread abort. More on this below. Skip over methods that have no EH, are compiled with min opts, or diff --git a/docs/design/coreclr/jit/inline-size-estimates.md b/docs/design/coreclr/jit/inline-size-estimates.md index 3004780325fda..9b6054ab8de1e 100644 --- a/docs/design/coreclr/jit/inline-size-estimates.md +++ b/docs/design/coreclr/jit/inline-size-estimates.md @@ -348,7 +348,7 @@ there. So we can now see why this particular case has such extreme `SizeImpact`: the un-inlined call triggers frame creation and a fair -amount of shuffling to accomodate the potential side effects of the +amount of shuffling to accommodate the potential side effects of the call. #### Case 2: Typical Savings diff --git a/docs/design/coreclr/jit/variabletracking.md b/docs/design/coreclr/jit/variabletracking.md index 2533f92e115fd..d8a0f06e426a0 100644 --- a/docs/design/coreclr/jit/variabletracking.md +++ b/docs/design/coreclr/jit/variabletracking.md @@ -241,7 +241,7 @@ The death of a variable is handled at the end of the last `BasicBlock` as variab ### Reporting Information -We just iterate throught all the `VariableLiveRange`s of all the variables that are tracked in `CodeGen::genSetScopeInfoUsingVariableRanges()`. +We just iterate through all the `VariableLiveRange`s of all the variables that are tracked in `CodeGen::genSetScopeInfoUsingVariableRanges()`. Turning On Debug Info -------- diff --git a/docs/design/coreclr/profiling/davbr-blog-archive/samples/sigformat.cpp b/docs/design/coreclr/profiling/davbr-blog-archive/samples/sigformat.cpp index c5b2eb39769c4..39c284cde16a4 100644 --- a/docs/design/coreclr/profiling/davbr-blog-archive/samples/sigformat.cpp +++ b/docs/design/coreclr/profiling/davbr-blog-archive/samples/sigformat.cpp @@ -197,7 +197,7 @@ class SigFormat : public SigParser } // sentinel indication the location of the "..." in the method signature - virtual void NotifySentinal() + virtual void NotifySentinel() { Print("...\n"); } @@ -316,7 +316,7 @@ class SigFormat : public SigParser } // BUG BUG lower bounds can be negative, how can this be encoded? - // number of dimensions with specified lower bounds followed by lower bound of each + // number of dimensions with specified lower bounds followed by lower bound of each virtual void NotifyNumLoBounds(sig_count count) { Print("Num Low Bounds: '%d'\n", count); diff --git a/docs/design/coreclr/profiling/davbr-blog-archive/samples/sigparse.cpp b/docs/design/coreclr/profiling/davbr-blog-archive/samples/sigparse.cpp index e62bb0021f3d2..b9b59312700e1 100644 --- a/docs/design/coreclr/profiling/davbr-blog-archive/samples/sigparse.cpp +++ b/docs/design/coreclr/profiling/davbr-blog-archive/samples/sigparse.cpp @@ -3,11 +3,11 @@ // Sig ::= MethodDefSig | MethodRefSig | StandAloneMethodSig | FieldSig | PropertySig | LocalVarSig // MethodDefSig ::= [[HASTHIS] [EXPLICITTHIS]] (DEFAULT|VARARG|GENERIC GenParamCount) ParamCount RetType Param* // MethodRefSig ::= [[HASTHIS] [EXPLICITTHIS]] VARARG ParamCount RetType Param* [SENTINEL Param+] -// StandAloneMethodSig ::= [[HASTHIS] [EXPLICITTHIS]] (DEFAULT|VARARG|C|STDCALL|THISCALL|FASTCALL) +// StandAloneMethodSig ::= [[HASTHIS] [EXPLICITTHIS]] (DEFAULT|VARARG|C|STDCALL|THISCALL|FASTCALL) // ParamCount RetType Param* [SENTINEL Param+] // FieldSig ::= FIELD CustomMod* Type // PropertySig ::= PROPERTY [HASTHIS] ParamCount CustomMod* Type Param* -// LocalVarSig ::= LOCAL_SIG Count (TYPEDBYREF | ([CustomMod] [Constraint])* [BYREF] Type)+ +// LocalVarSig ::= LOCAL_SIG Count (TYPEDBYREF | ([CustomMod] [Constraint])* [BYREF] Type)+ // ------------- @@ -18,7 +18,7 @@ // Type ::= ( BOOLEAN | CHAR | I1 | U1 | U2 | U2 | I4 | U4 | I8 | U8 | R4 | R8 | I | U | // | VALUETYPE TypeDefOrRefEncoded // | CLASS TypeDefOrRefEncoded -// | STRING +// | STRING // | OBJECT // | PTR CustomMod* VOID // | PTR CustomMod* Type @@ -118,7 +118,7 @@ class SigParser sig_byte *pbCur; sig_byte *pbEnd; -public: +public: bool Parse(sig_byte *blob, sig_count len); private: @@ -161,7 +161,7 @@ class SigParser virtual void NotifyEndParam() {} // sentinel indication the location of the "..." in the method signature - virtual void NotifySentinal() {} + virtual void NotifySentinel() {} // number of generic parameters in this method signature (if any) virtual void NotifyGenericParamCount(sig_count) {} @@ -209,8 +209,8 @@ class SigParser virtual void NotifySize(sig_count) {} // BUG BUG lower bounds can be negative, how can this be encoded? - // number of dimensions with specified lower bounds followed by lower bound of each - virtual void NotifyNumLoBounds(sig_count) {} + // number of dimensions with specified lower bounds followed by lower bound of each + virtual void NotifyNumLoBounds(sig_count) {} virtual void NotifyLoBound(sig_count) {} //---------------------------------------------------- @@ -247,10 +247,10 @@ class SigParser virtual void NotifyTypeGenericInst(sig_elem_type elem_type, sig_index_type indexType, sig_index index, sig_mem_number number) {} // the type is the type of the nth generic type parameter for the class - virtual void NotifyTypeGenericTypeVariable(sig_mem_number number) {} + virtual void NotifyTypeGenericTypeVariable(sig_mem_number number) {} // the type is the type of the nth generic type parameter for the member - virtual void NotifyTypeGenericMemberVariable(sig_mem_number number) {} + virtual void NotifyTypeGenericMemberVariable(sig_mem_number number) {} // the type will be a value type virtual void NotifyTypeValueType() {} @@ -295,19 +295,19 @@ bool SigParser::Parse(sig_byte *pb, sig_count cbBuffer) case SIG_METHOD_VARARG: // vararg calling convention return ParseMethod(elem_type); break; - + case SIG_FIELD: // encodes a field return ParseField(elem_type); break; - + case SIG_LOCAL_SIG: // used for the .locals directive return ParseLocals(elem_type); break; - + case SIG_PROPERTY: // used to encode a property return ParseProperty(elem_type); break; - + default: // unknown signature break; @@ -347,7 +347,7 @@ bool SigParser::ParseMethod(sig_elem_type elem_type) return false; } - NotifyGenericParamCount(gen_param_count); + NotifyGenericParamCount(gen_param_count); } if (!ParseNumber(¶m_count)) @@ -362,7 +362,7 @@ bool SigParser::ParseMethod(sig_elem_type elem_type) return false; } - bool fEncounteredSentinal = false; + bool fEncounteredSentinel = false; for (sig_count i = 0; i < param_count; i++) { @@ -373,13 +373,13 @@ bool SigParser::ParseMethod(sig_elem_type elem_type) if (*pbCur == ELEMENT_TYPE_SENTINEL) { - if (fEncounteredSentinal) + if (fEncounteredSentinel) { return false; } - fEncounteredSentinal = true; - NotifySentinal(); + fEncounteredSentinel = true; + NotifySentinel(); pbCur++; } @@ -458,7 +458,7 @@ bool SigParser::ParseProperty(sig_elem_type elem_type) bool SigParser::ParseLocals(sig_elem_type elem_type) { - // LocalVarSig ::= LOCAL_SIG Count (TYPEDBYREF | ([CustomMod] [Constraint])* [BYREF] Type)+ + // LocalVarSig ::= LOCAL_SIG Count (TYPEDBYREF | ([CustomMod] [Constraint])* [BYREF] Type)+ NotifyBeginLocals(elem_type); @@ -530,7 +530,7 @@ bool SigParser::ParseLocal() bool SigParser::ParseOptionalCustomModsOrConstraint() -{ +{ for (;;) { if (pbCur >= pbEnd) @@ -579,7 +579,7 @@ bool SigParser::ParseOptionalCustomMods() { return false; } - break; + break; default: return true; @@ -698,7 +698,7 @@ bool SigParser::ParseRetType() return false; } - Success: + Success: NotifyEndRetType(); return true; } @@ -753,7 +753,7 @@ bool SigParser::ParseArrayShape() } NotifyEndArrayShape(); - return true; + return true; } bool SigParser::ParseType() @@ -761,7 +761,7 @@ bool SigParser::ParseType() // Type ::= ( BOOLEAN | CHAR | I1 | U1 | U2 | U2 | I4 | U4 | I8 | U8 | R4 | R8 | I | U | // | VALUETYPE TypeDefOrRefEncoded // | CLASS TypeDefOrRefEncoded - // | STRING + // | STRING // | OBJECT // | PTR CustomMod* VOID // | PTR CustomMod* Type @@ -788,15 +788,15 @@ bool SigParser::ParseType() case ELEMENT_TYPE_BOOLEAN: case ELEMENT_TYPE_CHAR: case ELEMENT_TYPE_I1: - case ELEMENT_TYPE_U1: - case ELEMENT_TYPE_U2: - case ELEMENT_TYPE_I2: - case ELEMENT_TYPE_I4: - case ELEMENT_TYPE_U4: - case ELEMENT_TYPE_I8: - case ELEMENT_TYPE_U8: - case ELEMENT_TYPE_R4: - case ELEMENT_TYPE_R8: + case ELEMENT_TYPE_U1: + case ELEMENT_TYPE_U2: + case ELEMENT_TYPE_I2: + case ELEMENT_TYPE_I4: + case ELEMENT_TYPE_U4: + case ELEMENT_TYPE_I8: + case ELEMENT_TYPE_U8: + case ELEMENT_TYPE_R4: + case ELEMENT_TYPE_R8: case ELEMENT_TYPE_I: case ELEMENT_TYPE_U: case ELEMENT_TYPE_STRING: @@ -835,7 +835,7 @@ bool SigParser::ParseType() break; - case ELEMENT_TYPE_CLASS: + case ELEMENT_TYPE_CLASS: // CLASS TypeDefOrRefEncoded NotifyTypeClass(); @@ -844,10 +844,10 @@ bool SigParser::ParseType() return false; } - NotifyTypeDefOrRef(indexType, index); + NotifyTypeDefOrRef(indexType, index); break; - case ELEMENT_TYPE_VALUETYPE: + case ELEMENT_TYPE_VALUETYPE: //VALUETYPE TypeDefOrRefEncoded NotifyTypeValueType(); @@ -856,7 +856,7 @@ bool SigParser::ParseType() return false; } - NotifyTypeDefOrRef(indexType, index); + NotifyTypeDefOrRef(indexType, index); break; case ELEMENT_TYPE_FNPTR: @@ -1030,11 +1030,11 @@ bool SigParser::ParseNumber(sig_count *pOut) // must be a 4 byte encoding - if ( (b1 & 0x20) != 0) + if ( (b1 & 0x20) != 0) { // 4 byte encoding has this bit clear -- error if not return false; - } + } if (!ParseByte(&b3)) { diff --git a/docs/design/features/AssemblyLoadContext.ContextualReflection.md b/docs/design/features/AssemblyLoadContext.ContextualReflection.md index b2c7cb15d2a90..456bc1bb2dd23 100644 --- a/docs/design/features/AssemblyLoadContext.ContextualReflection.md +++ b/docs/design/features/AssemblyLoadContext.ContextualReflection.md @@ -243,7 +243,7 @@ After a thread or asynchronous task completes, the `AsyncLocalOpaque disposable struct used to restore CurrentContextualReflectionContext /// -/// This is an implmentation detail of the AssemblyLoadContext.EnterContextualReflection APIs. +/// This is an implementation detail of the AssemblyLoadContext.EnterContextualReflection APIs. /// It is a struct, to avoid heap allocation. /// It is required to be public to avoid boxing. /// diff --git a/docs/design/features/assemblyloadcontext.md b/docs/design/features/assemblyloadcontext.md index 7e3d5584bd600..b7ef39da7c5a2 100644 --- a/docs/design/features/assemblyloadcontext.md +++ b/docs/design/features/assemblyloadcontext.md @@ -64,7 +64,7 @@ This property will return a reference to the *Default LoadContext*. ### Load -This method should be overriden in a *Custom LoadContext* if the intent is to override the assembly resolution that would be done during fallback to *Default LoadContext* +This method should be overridden in a *Custom LoadContext* if the intent is to override the assembly resolution that would be done during fallback to *Default LoadContext* ### LoadFromAssemblyName diff --git a/docs/design/features/code-versioning.md b/docs/design/features/code-versioning.md index 751378ddf7e1e..6a8ea9c449ab4 100644 --- a/docs/design/features/code-versioning.md +++ b/docs/design/features/code-versioning.md @@ -160,7 +160,7 @@ Implementation The implementation can be located in [codeversion.h](../../../src/coreclr/vm/codeversion.h) and [codeversion.cpp](../../../src/coreclr/vm/codeversion.cpp) -Code versions are embodied by the configuration in NativeCodeVersion structure as well as the configuration in the transitively reachable ILCodeVersion. NativeCodeVersion::GetILCodeVersion() allows trivial access from one part of the configuration to the other. These structures have various accesors to retrieve all the code and configuration data such as: +Code versions are embodied by the configuration in NativeCodeVersion structure as well as the configuration in the transitively reachable ILCodeVersion. NativeCodeVersion::GetILCodeVersion() allows trivial access from one part of the configuration to the other. These structures have various accessors to retrieve all the code and configuration data such as: ``` NativeCodeVersion::GetVersionId() @@ -363,7 +363,7 @@ The runtime's current classification is: Future roadmap possibilities ============================ -A few (completely uncommited) thoughts on how this area of the code might evolve in the future, in no particular order: +A few (completely uncommitted) thoughts on how this area of the code might evolve in the future, in no particular order: - Make the debugger configuration for EnC another explicit build pipeline stage. This seems most interesting to allow diagnostic tools that use profiler instrumentation to coexist with a live debugging session that is rewriting code using EnC. - Add code version collection to save memory when certain code versions are no longer being used. diff --git a/docs/design/features/covariant-return-methods.md b/docs/design/features/covariant-return-methods.md index eda783ace17dd..ae2d28bda81b3 100644 --- a/docs/design/features/covariant-return-methods.md +++ b/docs/design/features/covariant-return-methods.md @@ -6,7 +6,7 @@ This feature allows an overriding method to have a return type that is different Covariant return methods can only be described through MethodImpl records, and as an initial implementation will only be applicable to methods on reference types. Methods on interfaces and value types will not be supported (may be supported later in the future). -MethodImpl checking will allow a return type to vary as long as the override is compatible with the return type of the method overriden (ECMA I.8.7.1). +MethodImpl checking will allow a return type to vary as long as the override is compatible with the return type of the method overridden (ECMA I.8.7.1). If a language wishes for the override to be semantically visible such that users of the more derived type may rely on the covariant return type it shall make the override a newslot method with appropriate visibility AND name to be used outside of the class. diff --git a/docs/design/features/cross-platform-cryptography.md b/docs/design/features/cross-platform-cryptography.md index b6f1d125552e4..d9fb3b9578f29 100644 --- a/docs/design/features/cross-platform-cryptography.md +++ b/docs/design/features/cross-platform-cryptography.md @@ -313,9 +313,9 @@ On macOS the X509Store class is a projection of system trust decisions (read-onl | Open LocalMachine\Disallowed (ReadOnly) | :white_check_mark: | `CryptographicException` | :white_check_mark: | | Open LocalMachine\Disallowed (ReadWrite) | :white_check_mark: | `CryptographicException` | `CryptographicException` | | Open LocalMachine\Disallowed (ExistingOnly) | :white_check_mark: | `CryptographicException` | :white_check_mark: (if ReadOnly) | -| Open non-existant store (ExistingOnly) | `CryptographicException` | `CryptographicException` | `CryptographicException` | -| Open CurrentUser non-existant store (ReadWrite) | :white_check_mark: | :white_check_mark: | `CryptographicException` | -| Open LocalMachine non-existant store (ReadWrite) | :white_check_mark: | `CryptographicException` | `CryptographicException` | +| Open non-existent store (ExistingOnly) | `CryptographicException` | `CryptographicException` | `CryptographicException` | +| Open CurrentUser non-existent store (ReadWrite) | :white_check_mark: | :white_check_mark: | `CryptographicException` | +| Open LocalMachine non-existent store (ReadWrite) | :white_check_mark: | `CryptographicException` | `CryptographicException` | On Linux stores are created on first-write, and no user stores exist by default, so opening CurrentUser\My with ExistingOnly may fail. diff --git a/docs/design/features/hosting-layer-apis.md b/docs/design/features/hosting-layer-apis.md index ae5170c60f613..57d7f6fd735e7 100644 --- a/docs/design/features/hosting-layer-apis.md +++ b/docs/design/features/hosting-layer-apis.md @@ -374,7 +374,7 @@ Contract for performing operations on an initialized hostpolicy. * `delegate` - function pointer to the requested runtime functionality ``` C -enum intialization_options_t +enum initialization_options_t { none = 0x0, wait_for_initialized = 0x1, diff --git a/docs/design/features/source-generator-com.md b/docs/design/features/source-generator-com.md index 0b068d1b7e5d6..547cd922c147a 100644 --- a/docs/design/features/source-generator-com.md +++ b/docs/design/features/source-generator-com.md @@ -67,7 +67,7 @@ To implement this support, we would need to introduce a strong contract to be ab Basic support for this feature would naturally fall out from supporting the scenario described in open question 1. Depending on implementation, we may be able to make this more or less efficient. -3. Given two assemblies, `A` and `B`, that each define their own `IComFoo` interface that is a C# projection of an `IFoo` COM interface, should `A`'s `IComFoo` be implicitly convertable to `B`'s `IComFoo`? +3. Given two assemblies, `A` and `B`, that each define their own `IComFoo` interface that is a C# projection of an `IFoo` COM interface, should `A`'s `IComFoo` be implicitly convertible to `B`'s `IComFoo`? Supporting this would require either some form of type equivalence, which exists in a limited form in the runtime, or assembly-independent types, for which a C# proposal exists that has not been planned for any release. Since a solution here would require solutions for questions 1 and 2, we can likely require users to use explicit casts and avoid having any issues. diff --git a/docs/design/features/standalone-gc-eventing.md b/docs/design/features/standalone-gc-eventing.md index edc304c7e349d..0f906b95f7e27 100644 --- a/docs/design/features/standalone-gc-eventing.md +++ b/docs/design/features/standalone-gc-eventing.md @@ -147,7 +147,7 @@ It is useful for a standalone GC to be able to fire events that the EE was not p (the "CLR GC") to interopate seamlessly with future versions of the .NET Core EE, which implies that it should be possible for the GC within this repository to add new events without having to recompile the runtime. -While it is possible for some eventing implementations to receive events that are created at runtime, not all eventing implementations (particularly LTTNG) are not flexible enough for this. In order to accomodate new events, another method is added to `IGCToCLREventSink`: +While it is possible for some eventing implementations to receive events that are created at runtime, not all eventing implementations (particularly LTTNG) are not flexible enough for this. In order to accommodate new events, another method is added to `IGCToCLREventSink`: ```c++ void IGCToCLREventSink::FireDynamicEvent( diff --git a/docs/design/features/standalone-gc-loading.md b/docs/design/features/standalone-gc-loading.md index 0cb1a32a16f29..118b5cbf93e9f 100644 --- a/docs/design/features/standalone-gc-loading.md +++ b/docs/design/features/standalone-gc-loading.md @@ -127,7 +127,7 @@ standalone GCs has a major version number and minor version number that is obtai incompatible interfaces. A change is considered breaking if it alters the semantics of an existing method or if it deletes or renames existing methods so that VTable layouts are not compatible. * If the EE's MinorVersion is greater than the MinorVersion obtained from the candidate GC, accept - (Forward compatability). The EE must take care not to call any new APIs that are not present in the version of + (Forward compatibility). The EE must take care not to call any new APIs that are not present in the version of the candidate GC. * Otherwise, accept (Backward compatibility). It is perfectly safe to use a GC whose MinorVersion exceeds the EE's MinorVersion. diff --git a/docs/design/features/tailcalls-with-helpers.md b/docs/design/features/tailcalls-with-helpers.md index f471e498233cb..d0b037e394a52 100644 --- a/docs/design/features/tailcalls-with-helpers.md +++ b/docs/design/features/tailcalls-with-helpers.md @@ -232,7 +232,7 @@ Note that we take care to zero out PortableTailCallFrame.NextCall from the CallTailCallTarget stub instead of doing it in the dispatcher before calling the stub. This is because GC will use NextCall to keep collectible assemblies alive in the event that there is a GC inside the dispatcher. Once control has -been transfered to CallTailCallTarget we can safely reset the field. +been transferred to CallTailCallTarget we can safely reset the field. ## The JIT's transformation Based on these functions the JIT needs to do a relatively simple transformation diff --git a/docs/design/specs/Ecma-335-Augments.md b/docs/design/specs/Ecma-335-Augments.md index 4dad995a49a65..7322d3bd9cdbe 100644 --- a/docs/design/specs/Ecma-335-Augments.md +++ b/docs/design/specs/Ecma-335-Augments.md @@ -725,7 +725,7 @@ operations. T Exponential(T exponent) where T : IArithmetic, T : IMultiplicationBy - + { T result = T.One(); T powerOfValue = exponent; @@ -852,7 +852,7 @@ class Base class Derived : Base { - // Note that the VirtualMethod here overrides the VirtualMethod defined on Base even though the + // Note that the VirtualMethod here overrides the VirtualMethod defined on Base even though the // return types are not the same. However, the return types are compatible in a covariant fashion. public override string VirtualMethod() { return null;} } @@ -881,7 +881,7 @@ Edit the first paragraph "The .override directive specifies that a virtual metho ### II.10.3.4 Impact of overrides on derived classes Add a third bullet -"- If a virtual method is overridden via an .override directive or if a derived class provides an implentation and that virtual method in parent class was overriden with an .override directive where the method body of that second .override directive is decorated with `System.Runtime.CompilerServices.PreserveBaseOverridesAttribute` then the implementation of the virtual method shall be the implementation of the method body of the second .override directive as well. If this results in the implementor of the virtual method in the parent class not having a signature which is *covariant-return-compatible-with* the virtual method in the parent class, the program is not valid. +"- If a virtual method is overridden via an .override directive or if a derived class provides an implentation and that virtual method in parent class was overridden with an .override directive where the method body of that second .override directive is decorated with `System.Runtime.CompilerServices.PreserveBaseOverridesAttribute` then the implementation of the virtual method shall be the implementation of the method body of the second .override directive as well. If this results in the implementor of the virtual method in the parent class not having a signature which is *covariant-return-compatible-with* the virtual method in the parent class, the program is not valid. ``` @@ -890,8 +890,8 @@ Add a third bullet } .class B extends A { .method virtual DerivedRetType VirtualFunction() { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = ( 01 00 00 00 ) - .override A.VirtualFuncion + .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = ( 01 00 00 00 ) + .override A.VirtualFuncion ... } } @@ -905,8 +905,8 @@ Add a third bullet .class D extends C { .method virtual DerivedRetTypeNotDerivedFromMoreDerivedRetType VirtualFunction() { - .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = ( 01 00 00 00 ) - .override A.VirtualFuncion + .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = ( 01 00 00 00 ) + .override A.VirtualFuncion ... } } diff --git a/docs/workflow/building/coreclr/cross-building.md b/docs/workflow/building/coreclr/cross-building.md index 6753941d29778..73c64b55cced8 100644 --- a/docs/workflow/building/coreclr/cross-building.md +++ b/docs/workflow/building/coreclr/cross-building.md @@ -151,7 +151,7 @@ Some parts of our build process need some native components that are built for t - Crossgen2 JIT tools - Diagnostic libraries -The Crossgen2 JIT tools are used to run Crossgen2 on libraries built during the current build, such as during the clr.nativecorelib stage. These tools are automatically built when using the `./build.cmd` or `./build.sh` scripts at the root of the repo to build any of the CoreCLR native files, but they are not automatically built when using the `build-runtime.cmd/sh` scripts. To build these tools, you need to pass the `-hostarch` flag with the architecture of the host machine and the `-component crosscomponents` flag to specify that you only want to build the cross-targetting tools. For example: +The Crossgen2 JIT tools are used to run Crossgen2 on libraries built during the current build, such as during the clr.nativecorelib stage. These tools are automatically built when using the `./build.cmd` or `./build.sh` scripts at the root of the repo to build any of the CoreCLR native files, but they are not automatically built when using the `build-runtime.cmd/sh` scripts. To build these tools, you need to pass the `-hostarch` flag with the architecture of the host machine and the `-component crosscomponents` flag to specify that you only want to build the cross-targeting tools. For example: ``` ./src/coreclr/build-runtime.sh -arm -hostarch x64 -component crosscomponents -cmakeargs -DCLR_CROSS_COMPONENTS_BUILD=1 diff --git a/docs/workflow/debugging/coreclr/debugging-aot-compilers.md b/docs/workflow/debugging/coreclr/debugging-aot-compilers.md index d21fa21a5cb77..551a9602c7574 100644 --- a/docs/workflow/debugging/coreclr/debugging-aot-compilers.md +++ b/docs/workflow/debugging/coreclr/debugging-aot-compilers.md @@ -29,11 +29,11 @@ To do this use the `--parallelism 1` switch to specify that the maximum parallel - Since the compilers are by default multi-threaded, they produce results fairly quickly even when compiling using a Debug variant of the JIT. In general, when debugging JIT issues we recommend using the debug JIT regardless of which environment caused a problem. -- The compilers support nearly arbitrary cross-targetting, including OS and architecture cross targeting. The only restriction is that 32bit architecture cannot compile targetting a 64bit architecture. This allows the use of the debugging environment most convenient to the developer. In particular, if there is an issue which crosses the managed/native boundary, it is often convenient to debug using the mixed mode debugger on Windows X64. +- The compilers support nearly arbitrary cross-targeting, including OS and architecture cross targeting. The only restriction is that 32bit architecture cannot compile targeting a 64bit architecture. This allows the use of the debugging environment most convenient to the developer. In particular, if there is an issue which crosses the managed/native boundary, it is often convenient to debug using the mixed mode debugger on Windows X64. - If the correct set of assemblies/command line arguments are passed to the compiler, it should produce binary identical output on all platforms. - The compiler does not check the OS/Architecture specified for input assemblies, which allows compiling using a non-architecture/OS matched version of the framework to target an arbitrary target. While this isn't useful for producing the diagnosing all issues, it can be cheaply used to identify the general behavior of a change on the full swath of supported architectures. -Control compilation behavior by using the `--targetos` and `--targetarch` switches. The default behavior is to target the compiler's own OS/Arch pair, but all 64bit versions of the compilers are capable of targetting arbitrary OS/Arch combinations. +Control compilation behavior by using the `--targetos` and `--targetarch` switches. The default behavior is to target the compiler's own OS/Arch pair, but all 64bit versions of the compilers are capable of targeting arbitrary OS/Arch combinations. At the time of writing the current supported sets of valid arguments are: | Command line arguments | --- | diff --git a/docs/workflow/debugging/mono/wasm-debugging.md b/docs/workflow/debugging/mono/wasm-debugging.md index 4e7945ce515b6..35fcd74ccff89 100644 --- a/docs/workflow/debugging/mono/wasm-debugging.md +++ b/docs/workflow/debugging/mono/wasm-debugging.md @@ -59,7 +59,7 @@ disassemble wasm executables (.wasm files). # Deterministic execution Wasm execution can be made deterministic by passing the -s DETERMINISTIC=1 option to emcc. -This will cause the app to allways execute the same way, i.e. using the same memory +This will cause the app to always execute the same way, i.e. using the same memory addresses, random numbers, etc. This can be used to make random crashes happen reliably. Sometimes, hovewer, turning this on will make the problem disappear. In this case, it might be useful to add some controlled indeterminism. For example, to make the diff --git a/eng/Subsets.props b/eng/Subsets.props index 1c278d6c40f91..fc751194d2459 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -112,7 +112,7 @@ - + diff --git a/eng/native/init-distro-rid.sh b/eng/native/init-distro-rid.sh index e44524e8e30e6..75012240633da 100644 --- a/eng/native/init-distro-rid.sh +++ b/eng/native/init-distro-rid.sh @@ -138,7 +138,7 @@ initDistroRidGlobal() fi if [ -n "${rootfsDir}" ]; then - # We may have a cross build. Check for the existance of the rootfsDir + # We may have a cross build. Check for the existence of the rootfsDir if [ ! -e "${rootfsDir}" ]; then echo "Error rootfsDir has been passed, but the location is not valid." exit 1 diff --git a/eng/pipelines/coreclr/crossgen2-outerloop.yml b/eng/pipelines/coreclr/crossgen2-outerloop.yml index b60cc7860fbc2..a1209cd8bd371 100644 --- a/eng/pipelines/coreclr/crossgen2-outerloop.yml +++ b/eng/pipelines/coreclr/crossgen2-outerloop.yml @@ -129,7 +129,7 @@ jobs: # test crossgen target Windows X86 # This job verifies that 32-bit and 64 bit crossgen2 produces the same binaries, -# and that cross-os targetting works +# and that cross-os targeting works - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/coreclr/templates/crossgen2-comparison-job.yml @@ -146,7 +146,7 @@ jobs: targetarch: x86 # test target Linux X64 -# verify that cross OS targetting works +# verify that cross OS targeting works - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/coreclr/templates/crossgen2-comparison-job.yml @@ -162,7 +162,7 @@ jobs: targetarch: x64 # test target Windows X64 -# verify that cross OS targetting works +# verify that cross OS targeting works - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/coreclr/templates/crossgen2-comparison-job.yml @@ -178,7 +178,7 @@ jobs: targetarch: x64 # test target Linux arm -# verify that cross architecture targetting works +# verify that cross architecture targeting works - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/coreclr/templates/crossgen2-comparison-job.yml @@ -194,7 +194,7 @@ jobs: targetarch: arm # test target Linux arm64 -# verify that cross architecture targetting works +# verify that cross architecture targeting works - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/coreclr/templates/crossgen2-comparison-job.yml @@ -210,7 +210,7 @@ jobs: targetarch: arm64 # test target osx-arm64 -# verify that cross architecture targetting works +# verify that cross architecture targeting works - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/coreclr/templates/crossgen2-comparison-job.yml diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index fd077f2e85558..0b258b5ed7af3 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -202,11 +202,11 @@ jobs: - ${{ if ne(parameters.archType, 'x64') }}: - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -hostarch x64 $(osArg) -ci $(compilerArg) -component crosscomponents -cmakeargs "-DCLR_CROSS_COMPONENTS_BUILD=1" $(officialBuildIdArg) $(clrRuntimePortableBuildArg) - displayName: Build CoreCLR Cross-Arch Tools (Tools that run on x64 targetting x86) + displayName: Build CoreCLR Cross-Arch Tools (Tools that run on x64 targeting x86) - ${{ if and(eq(parameters.osGroup, 'windows'), eq(parameters.archType, 'arm')) }}: - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -hostarch x86 $(osArg) -ci $(compilerArg) -component crosscomponents -cmakeargs "-DCLR_CROSS_COMPONENTS_BUILD=1" $(officialBuildIdArg) $(clrRuntimePortableBuildArg) - displayName: Build CoreCLR Cross-Arch Tools (Tools that run on x86 targetting arm) + displayName: Build CoreCLR Cross-Arch Tools (Tools that run on x86 targeting arm) - ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}: - script: | diff --git a/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs index 612697a96cf2f..59d7eaa0056a0 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs @@ -607,7 +607,7 @@ public static bool IsDefined(ParameterInfo element, Type attributeType, bool inh public static Attribute? GetCustomAttribute(ParameterInfo element, Type attributeType, bool inherit) { - // Returns an Attribute of base class/inteface attributeType on the ParameterInfo or null if none exists. + // Returns an Attribute of base class/interface attributeType on the ParameterInfo or null if none exists. // throws an AmbiguousMatchException if there are more than one defined. Attribute[] attrib = GetCustomAttributes(element, attributeType, inherit); @@ -679,7 +679,7 @@ public static bool IsDefined(Module element, Type attributeType, bool inherit) public static Attribute? GetCustomAttribute(Module element, Type attributeType, bool inherit) { - // Returns an Attribute of base class/inteface attributeType on the Module or null if none exists. + // Returns an Attribute of base class/interface attributeType on the Module or null if none exists. // throws an AmbiguousMatchException if there are more than one defined. Attribute[] attrib = GetCustomAttributes(element, attributeType, inherit); @@ -748,7 +748,7 @@ public static bool IsDefined(Assembly element, Type attributeType, bool inherit) public static Attribute? GetCustomAttribute(Assembly element, Type attributeType, bool inherit) { - // Returns an Attribute of base class/inteface attributeType on the Assembly or null if none exists. + // Returns an Attribute of base class/interface attributeType on the Assembly or null if none exists. // throws an AmbiguousMatchException if there are more than one defined. Attribute[] attrib = GetCustomAttributes(element, attributeType, inherit); diff --git a/src/coreclr/System.Private.CoreLib/src/System/Exception.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Exception.CoreCLR.cs index ac33b4fe8e9a2..276d3f86a3651 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Exception.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Exception.CoreCLR.cs @@ -107,7 +107,7 @@ private void OnDeserialized(StreamingContext context) // copy the stack trace to _remoteStackTraceString. internal void InternalPreserveStackTrace() { - // Make sure that the _source field is initialized if Source is not overriden. + // Make sure that the _source field is initialized if Source is not overridden. // We want it to contain the original faulting point. _ = Source; diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Associates.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Associates.cs index f8ace6da0773f..e20889d18f7d0 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Associates.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Associates.cs @@ -81,7 +81,7 @@ internal static bool IncludeAccessor(MethodInfo? associate, bool nonPublic) // Note this is the first time the property was encountered walking from the most derived class // towards the base class. It would seem to follow that any associated methods would not - // be overriden -- but this is not necessarily true. A more derived class may have overriden a + // be overridden -- but this is not necessarily true. A more derived class may have overridden a // virtual method associated with a property in a base class without associating the override with // the same or any property in the derived class. if ((methAttr & MethodAttributes.Virtual) != 0) diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs index 4fdd536b36e4c..a2d74336bee2b 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs @@ -208,7 +208,7 @@ public DynamicMethod(string name, false); } - // helpers for intialization + // helpers for initialization private static void CheckConsistency(MethodAttributes attributes, CallingConventions callingConvention) { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs index 6498a250155d4..55ea753e9f8e7 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs @@ -1092,7 +1092,7 @@ public virtual void BeginFinallyBlock() int catchEndAddr = 0; if (state != __ExceptionInfo.State_Try) { - // generate leave for any preceeding catch clause + // generate leave for any preceding catch clause Emit(OpCodes.Leave, endLabel); catchEndAddr = m_length; } diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs index 3310d40b53c90..2430d328f343f 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs @@ -1797,7 +1797,7 @@ private EventBuilder DefineEventNoLock(string name, EventAttributes attributes, MethodAttributes methodAttrs = meth.Attributes; - // Any of these flags in the implemenation flags is set, we will not attach the IL method body + // Any of these flags in the implementation flags is set, we will not attach the IL method body if (((meth.GetMethodImplementationFlags() & (MethodImplAttributes.CodeTypeMask | MethodImplAttributes.PreserveSig | MethodImplAttributes.Unmanaged)) != MethodImplAttributes.IL) || ((methodAttrs & MethodAttributes.PinvokeImpl) != (MethodAttributes)0)) { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs index d61c14b55d28c..82c582a338665 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs @@ -83,7 +83,7 @@ internal bool EqualsSig(RuntimePropertyInfo target) // when an interfaces declare properies with the same signature. // Note that we intentionally don't resolve generic arguments so that we don't treat // signatures that only match in certain instantiations as duplicates. This has the - // down side of treating overriding and overriden properties as different properties + // down side of treating overriding and overridden properties as different properties // in some cases. But PopulateProperties in rttype.cs should have taken care of that // by comparing VTable slots. // diff --git a/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs index 3ae8e5f385034..17d4a4aa1f1b6 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs @@ -1366,7 +1366,7 @@ private void PopulateProperties( // The inheritance of properties are defined by the inheritance of their // getters and setters. // - // A property on a base type is "overriden" by a property on a sub type + // A property on a base type is "overridden" by a property on a sub type // if the getter/setter of the latter occupies the same vtable slot as // the getter/setter of the former. // diff --git a/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs b/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs index 4063f0b22836e..595f5482fca5b 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs @@ -301,7 +301,7 @@ internal static unsafe IntPtr ConvertToNative(string strManaged, IntPtr pNativeB if (length == 1) { // In the empty string case, we need to use FastAllocateString rather than the - // String .ctor, since newing up a 0 sized string will always return String.Emtpy. + // String .ctor, since newing up a 0 sized string will always return String.Empty. // When we marshal that out as a bstr, it can wind up getting modified which // corrupts string.Empty. ret = string.FastAllocateString(0); diff --git a/src/coreclr/classlibnative/bcltype/arraynative.cpp b/src/coreclr/classlibnative/bcltype/arraynative.cpp index cd9db56ce52a3..ce0ea564bbb21 100644 --- a/src/coreclr/classlibnative/bcltype/arraynative.cpp +++ b/src/coreclr/classlibnative/bcltype/arraynative.cpp @@ -1015,7 +1015,7 @@ FCIMPL3(void, ArrayNative::SetValue, ArrayBase* refThisUNSAFE, Object* objUNSAFE pData = refThis->GetDataPtr() + flattenedIndex * refThis->GetComponentSize(); UINT cbSize = CorTypeInfo::Size(targetType); - memcpyNoGCRefs(pData, ArgSlotEndianessFixup(&value, cbSize), cbSize); + memcpyNoGCRefs(pData, ArgSlotEndiannessFixup(&value, cbSize), cbSize); HELPER_METHOD_FRAME_END(); } diff --git a/src/coreclr/classlibnative/bcltype/varargsnative.cpp b/src/coreclr/classlibnative/bcltype/varargsnative.cpp index fe6367ba308a5..7fae7d1e3ab6b 100644 --- a/src/coreclr/classlibnative/bcltype/varargsnative.cpp +++ b/src/coreclr/classlibnative/bcltype/varargsnative.cpp @@ -580,7 +580,7 @@ VarArgsNative::GetNextArgHelper( #if BIGENDIAN // Adjust the pointer for small valuetypes if (origArgPtr == value->data) { - value->data = StackElemEndianessFixup(origArgPtr, cbRaw); + value->data = StackElemEndiannessFixup(origArgPtr, cbRaw); } #endif diff --git a/src/coreclr/debug/createdump/crashinfo.cpp b/src/coreclr/debug/createdump/crashinfo.cpp index d7f6945ed8c3d..45058edab2eed 100644 --- a/src/coreclr/debug/createdump/crashinfo.cpp +++ b/src/coreclr/debug/createdump/crashinfo.cpp @@ -241,7 +241,7 @@ GetHResultString(HRESULT hr) return "Invalid argument"; case E_OUTOFMEMORY: return "Out of memory"; - case CORDBG_E_UNCOMPATIBLE_PLATFORMS: + case CORDBG_E_INCOMPATIBLE_PLATFORMS: return "The operation failed because debuggee and debugger are on incompatible platforms"; case CORDBG_E_MISSING_DEBUGGER_EXPORTS: return "The debuggee memory space does not have the expected debugging export table"; @@ -856,7 +856,7 @@ GetDirectory(const std::string& fileName) } // -// Formats a std::string with printf syntax. The final formated string is limited +// Formats a std::string with printf syntax. The final formatted string is limited // to MAX_LONGPATH (1024) chars. Returns an empty string on any error. // std::string diff --git a/src/coreclr/debug/daccess/daccess.cpp b/src/coreclr/debug/daccess/daccess.cpp index 55c7a4d0829f9..fd6cee21c9a61 100644 --- a/src/coreclr/debug/daccess/daccess.cpp +++ b/src/coreclr/debug/daccess/daccess.cpp @@ -5536,7 +5536,7 @@ ClrDataAccess::Initialize(void) { // DAC fatal error: Platform mismatch - the platform reported by the data target // is not what this version of mscordacwks.dll was built for. - return CORDBG_E_UNCOMPATIBLE_PLATFORMS; + return CORDBG_E_INCOMPATIBLE_PLATFORMS; } // diff --git a/src/coreclr/debug/daccess/dacdbiimpl.cpp b/src/coreclr/debug/daccess/dacdbiimpl.cpp index f9ce52fd25722..7fac44a1766fd 100644 --- a/src/coreclr/debug/daccess/dacdbiimpl.cpp +++ b/src/coreclr/debug/daccess/dacdbiimpl.cpp @@ -1207,10 +1207,10 @@ mdSignature DacDbiInterfaceImpl::GetILCodeAndSigHelper(Module * pModule, TADDR pTargetIL; // target address of start of IL blob - // This works for methods in dynamic modules, and methods overriden by a profiler. + // This works for methods in dynamic modules, and methods overridden by a profiler. pTargetIL = pModule->GetDynamicIL(mdMethodToken, TRUE); - // Method not overriden - get the original copy of the IL by going to the PE file/RVA + // Method not overridden - get the original copy of the IL by going to the PE file/RVA // If this is in a dynamic module then don't even attempt this since ReflectionModule::GetIL isn't // implemend for DAC. if (pTargetIL == 0 && !pModule->IsReflection()) @@ -4255,7 +4255,7 @@ bool DacDbiInterfaceImpl::MetadataUpdatesApplied() #endif } -// Helper to intialize a TargetBuffer from a MemoryRange +// Helper to initialize a TargetBuffer from a MemoryRange // // Arguments: // memoryRange - memory range. @@ -4277,7 +4277,7 @@ void InitTargetBufferFromMemoryRange(const MemoryRange memoryRange, TargetBuffer pTargetBuffer->Init(addr, (ULONG)memoryRange.Size()); } -// Helper to intialize a TargetBuffer (host representation of target) from an SBuffer (target) +// Helper to initialize a TargetBuffer (host representation of target) from an SBuffer (target) // // Arguments: // pBuffer - target pointer to a SBuffer structure. If pBuffer is NULL, then target buffer will be empty. @@ -6203,7 +6203,7 @@ void EnumerateBlockingObjectsCallback(PTR_DebugBlockingItem obj, VOID* pUserData BlockingObjectUserDataWrapper* wrapper = (BlockingObjectUserDataWrapper*)pUserData; DacBlockingObject dacObj; - // init to an arbitrary value to avoid mac compiler error about unintialized use + // init to an arbitrary value to avoid mac compiler error about uninitialized use // it will be correctly set in the switch and is never used with only this init here dacObj.blockingReason = DacBlockReason_MonitorCriticalSection; diff --git a/src/coreclr/debug/daccess/dacdbiimpl.h b/src/coreclr/debug/daccess/dacdbiimpl.h index e885703113197..453ead2d08c6e 100644 --- a/src/coreclr/debug/daccess/dacdbiimpl.h +++ b/src/coreclr/debug/daccess/dacdbiimpl.h @@ -414,7 +414,7 @@ class DacDbiInterfaceImpl : // Returns: // S_OK on success. // If it's a jitted method, error codes equivalent to GetMethodDescPtrFromIp - // E_INVALIDARG if a non-jitted metod can't be located in the stubs. + // E_INVALIDARG if a non-jitted method can't be located in the stubs. HRESULT GetMethodDescPtrFromIpEx( TADDR funcIp, OUT VMPTR_MethodDesc *ppMD); diff --git a/src/coreclr/debug/daccess/stack.cpp b/src/coreclr/debug/daccess/stack.cpp index dfcb16c31523f..309cb89657a96 100644 --- a/src/coreclr/debug/daccess/stack.cpp +++ b/src/coreclr/debug/daccess/stack.cpp @@ -201,7 +201,7 @@ ClrDataStackWalk::Next(void) switch(action) { case SWA_CONTINUE: - // We sucessfully unwound a frame so update + // We successfully unwound a frame so update // the previous stack pointer before going into // filtering to get the amount of stack skipped // by the filtering. diff --git a/src/coreclr/debug/di/arm/floatconversion.S b/src/coreclr/debug/di/arm/floatconversion.S index 91bfa29492c5c..feea0db7abed7 100644 --- a/src/coreclr/debug/di/arm/floatconversion.S +++ b/src/coreclr/debug/di/arm/floatconversion.S @@ -4,7 +4,7 @@ #include // Arguments -// input: (in R0) the adress of the ULONGLONG to be converted to a double +// input: (in R0) the address of the ULONGLONG to be converted to a double // output: the double corresponding to the ULONGLONG input value LEAF_ENTRY FPFillR8, .TEXT diff --git a/src/coreclr/debug/di/arm/floatconversion.asm b/src/coreclr/debug/di/arm/floatconversion.asm index 8669dba37091f..a8b62b8892121 100644 --- a/src/coreclr/debug/di/arm/floatconversion.asm +++ b/src/coreclr/debug/di/arm/floatconversion.asm @@ -4,7 +4,7 @@ #include "ksarm.h" ;; Arguments -;; input: (in R0) the adress of the ULONGLONG to be converted to a double +;; input: (in R0) the address of the ULONGLONG to be converted to a double ;; output: the double corresponding to the ULONGLONG input value LEAF_ENTRY FPFillR8 diff --git a/src/coreclr/debug/di/divalue.cpp b/src/coreclr/debug/di/divalue.cpp index 6819f1ae36e5d..9edcb38c955c5 100644 --- a/src/coreclr/debug/di/divalue.cpp +++ b/src/coreclr/debug/di/divalue.cpp @@ -3709,7 +3709,7 @@ HRESULT CordbArrayValue::GetDimensions(ULONG32 cdim, ULONG32 dims[]) // Arguments: // output: pbHasBaseIndices - true iff the array has more than one dimension and pbHasBaseIndices is not null // Return Value: S_OK on success or E_INVALIDARG if pbHasBaseIndices is null -HRESULT CordbArrayValue::HasBaseIndicies(BOOL *pbHasBaseIndices) +HRESULT CordbArrayValue::HasBaseIndices(BOOL *pbHasBaseIndices) { PUBLIC_REENTRANT_API_ENTRY(this); FAIL_IF_NEUTERED(this); @@ -3717,7 +3717,7 @@ HRESULT CordbArrayValue::HasBaseIndicies(BOOL *pbHasBaseIndices) *pbHasBaseIndices = m_info.arrayInfo.offsetToLowerBounds != 0; return S_OK; -} // CordbArrayValue::HasBaseIndicies +} // CordbArrayValue::HasBaseIndices // gets the base indices for a multidimensional array // Arguments: @@ -3725,7 +3725,7 @@ HRESULT CordbArrayValue::HasBaseIndicies(BOOL *pbHasBaseIndices) // indices - an array to hold the base indices for the array dimensions (allocated and managed // by the caller, it must have space for cdim elements) // Return Value: S_OK on success or E_INVALIDARG if cdim is not equal to the array rank or indices is null -HRESULT CordbArrayValue::GetBaseIndicies(ULONG32 cdim, ULONG32 indices[]) +HRESULT CordbArrayValue::GetBaseIndices(ULONG32 cdim, ULONG32 indices[]) { PUBLIC_REENTRANT_API_ENTRY(this); FAIL_IF_NEUTERED(this); @@ -3743,7 +3743,7 @@ HRESULT CordbArrayValue::GetBaseIndicies(ULONG32 cdim, ULONG32 indices[]) indices[i] = m_arrayLowerBase[i]; return S_OK; -} // CordbArrayValue::GetBaseIndicies +} // CordbArrayValue::GetBaseIndices // Get an element at the position indicated by the values in indices (one index for each dimension) // Arguments: diff --git a/src/coreclr/debug/di/eventredirectionpipeline.h b/src/coreclr/debug/di/eventredirectionpipeline.h index a8a0aeed8067f..4338772fd6582 100644 --- a/src/coreclr/debug/di/eventredirectionpipeline.h +++ b/src/coreclr/debug/di/eventredirectionpipeline.h @@ -121,7 +121,7 @@ class EventRedirectionPipeline : // even in the create case. Use "-pr -pb" in Windbg to attach to a create-suspended process. // // Common Windbg options: - // -WX disable automatic workspace loading. This gaurantees the newly created windbg has a clean + // -WX disable automatic workspace loading. This guarantees the newly created windbg has a clean // environment and is not tainted with settings that will break the extension dll. // -pr option will tell real Debugger to resume main thread. This goes with the CREATE_SUSPENDED flag we passed to CreateProcess. // -pb option is required when attaching to newly created suspended process. It tells the debugger diff --git a/src/coreclr/debug/di/module.cpp b/src/coreclr/debug/di/module.cpp index ad5cf926c4eef..1a523e6201ed8 100644 --- a/src/coreclr/debug/di/module.cpp +++ b/src/coreclr/debug/di/module.cpp @@ -1752,7 +1752,7 @@ CordbFunction * CordbModule::LookupOrCreateFunction(mdMethodDef funcMetaDataToke CordbFunction * pFunction = m_functions.GetBase(funcMetaDataToken); - // special case non-existance as need to add to the hash table too + // special case non-existence as need to add to the hash table too if (pFunction == NULL) { // EnC adds each version to the hash. So if the hash lookup fails, diff --git a/src/coreclr/debug/di/platformspecific.cpp b/src/coreclr/debug/di/platformspecific.cpp index 5247fd8436bc9..2f70acf4d9c8b 100644 --- a/src/coreclr/debug/di/platformspecific.cpp +++ b/src/coreclr/debug/di/platformspecific.cpp @@ -6,7 +6,7 @@ // // This file exists just to pull in platform specific source files. More precisely we're switching on the -// platform being targetted for debugging (not the platform we're currently building debugger executables +// platform being targeted for debugging (not the platform we're currently building debugger executables // for). We do this instead of using build rules to overcome limitations with build when it comes including // different source files based on build macros. // diff --git a/src/coreclr/debug/di/process.cpp b/src/coreclr/debug/di/process.cpp index 578b114c16529..d44c80beac144 100644 --- a/src/coreclr/debug/di/process.cpp +++ b/src/coreclr/debug/di/process.cpp @@ -233,7 +233,7 @@ bool IsLegalFatalError(HRESULT hr) return (hr == CORDBG_E_INCOMPATIBLE_PROTOCOL) || (hr == CORDBG_E_CANNOT_DEBUG_FIBER_PROCESS) || - (hr == CORDBG_E_UNCOMPATIBLE_PLATFORMS) || + (hr == CORDBG_E_INCOMPATIBLE_PLATFORMS) || (hr == CORDBG_E_MISMATCHED_CORWKS_AND_DACWKS_DLLS) || // This should only happen in the case of a security attack on us. (hr == E_ACCESSDENIED) || @@ -964,7 +964,7 @@ CordbProcess::CordbProcess(ULONG64 clrInstanceId, m_cPatch(0), m_rgData(NULL), m_rgNextPatch(NULL), - m_rgUncommitedOpcode(NULL), + m_rgUncommittedOpcode(NULL), m_minPatchAddr(MAX_ADDRESS), m_maxPatchAddr(MIN_ADDRESS), m_iFirstPatch(0), @@ -1650,7 +1650,7 @@ IEventChannel * CordbProcess::GetEventChannel() // Since we're always on the naitve-pipeline, the Enabling interop debugging just changes // how the native debug events are being handled. So this must be called after Init, but // before any events are actually handled. -// This mus be calle on the win32 event thread to gaurantee that it's called before WFDE. +// This mus be calle on the win32 event thread to guarantee that it's called before WFDE. void CordbProcess::EnableInteropDebugging() { CONTRACTL @@ -1660,7 +1660,7 @@ void CordbProcess::EnableInteropDebugging() } CONTRACTL_END; - // Must be on W32ET to gaurantee that we're called after Init yet before WFDE (which + // Must be on W32ET to guarantee that we're called after Init yet before WFDE (which // are both called on the W32et). _ASSERTE(IsWin32EventThread()); #ifdef FEATURE_INTEROP_DEBUGGING @@ -4260,7 +4260,7 @@ static ICorDebugBreakpoint *CordbBreakpointToInterface(CordbBreakpoint * pBreakp class ShimAssemblyCallbackData { public: - // Ctor to intialize callback data + // Ctor to initialize callback data // // Arguments: // pAppDomain - appdomain that the assemblies are in. @@ -4395,7 +4395,7 @@ void CordbProcess::GetAssembliesInLoadOrder( class ShimModuleCallbackData { public: - // Ctor to intialize callback data + // Ctor to initialize callback data // // Arguments: // pAssembly - assembly that the Modules are in. @@ -6146,7 +6146,7 @@ HRESULT CordbProcess::GetHelperThreadID(DWORD *pThreadID) // sending an IPC event to the RS, and should be excluded. // // Return Value: -// Typical HRESULT symantics, nothing abnormal. +// Typical HRESULT semantics, nothing abnormal. // HRESULT CordbProcess::SetAllThreadsDebugState(CorDebugThreadState state, ICorDebugThread * pExceptThread) @@ -6223,7 +6223,7 @@ HRESULT CordbProcess::EnumerateObjects(ICorDebugObjectEnum **ppObjects) // transition stub, FALSE if not. Only valid if this method returns a success code. // // Return Value: -// Typical HRESULT symantics, nothing abnormal. +// Typical HRESULT semantics, nothing abnormal. // //--------------------------------------------------------------------------------------- HRESULT CordbProcess::IsTransitionStub(CORDB_ADDRESS address, BOOL *pfTransitionStub) @@ -6760,7 +6760,7 @@ HRESULT CordbProcess::AdjustBuffer( CORDB_ADDRESS address, //There can be multiple patches at the same address: we don't want 2nd+ patches to get the // break opcode, so we read from the unmodified copy. - m_rgUncommitedOpcode[iNextFree] = + m_rgUncommittedOpcode[iNextFree] = CORDbgGetInstructionEx(*bufferCopy, address, patchAddress, opcode, size); //put the breakpoint into the memory itself @@ -6804,11 +6804,11 @@ void CordbProcess::CommitBufferAdjustments( CORDB_ADDRESS start, BYTE *patchAddress = *(BYTE**)(DebuggerControllerPatch + m_runtimeOffsets.m_offAddr); if (IsPatchInRequestedRange(start, (SIZE_T)(end - start), PTR_TO_CORDB_ADDRESS(patchAddress)) && - !PRDIsBreakInst(&(m_rgUncommitedOpcode[iPatch]))) + !PRDIsBreakInst(&(m_rgUncommittedOpcode[iPatch]))) { //copy this back to the copy of the patch table *(PRD_TYPE *)(DebuggerControllerPatch + m_runtimeOffsets.m_offOpcode) = - m_rgUncommitedOpcode[iPatch]; + m_rgUncommittedOpcode[iPatch]; } iPatch = m_rgNextPatch[iPatch]; @@ -6823,7 +6823,7 @@ void CordbProcess::ClearBufferAdjustments( ) ULONG iPatch = m_iFirstPatch; while( iPatch != DPT_TERMINATING_INDEX ) { - InitializePRDToBreakInst(&(m_rgUncommitedOpcode[iPatch])); + InitializePRDToBreakInst(&(m_rgUncommittedOpcode[iPatch])); iPatch = m_rgNextPatch[iPatch]; } } @@ -6841,8 +6841,8 @@ void CordbProcess::ClearPatchTable(void ) delete [] m_rgNextPatch; m_rgNextPatch = NULL; - delete [] m_rgUncommitedOpcode; - m_rgUncommitedOpcode = NULL; + delete [] m_rgUncommittedOpcode; + m_rgUncommittedOpcode = NULL; m_iFirstPatch = DPT_TERMINATING_INDEX; m_minPatchAddr = MAX_ADDRESS; @@ -6929,7 +6929,7 @@ HRESULT CordbProcess::RefreshPatchTable(CORDB_ADDRESS address, SIZE_T size, BYTE // Throwing news m_pPatchTable = new BYTE[ cbPatchTable ]; m_rgNextPatch = new ULONG[m_cPatch]; - m_rgUncommitedOpcode = new PRD_TYPE[m_cPatch]; + m_rgUncommittedOpcode = new PRD_TYPE[m_cPatch]; TargetBuffer tb(m_rgData, cbPatchTable); this->SafeReadBuffer(tb, m_pPatchTable); // Throws @@ -6940,7 +6940,7 @@ HRESULT CordbProcess::RefreshPatchTable(CORDB_ADDRESS address, SIZE_T size, BYTE // // 2. Link all valid entries into a linked list, the first entry of which is m_iFirstPatch // - // 3. Initialize m_rgUncommitedOpcode, so that we can undo local patch table changes if WriteMemory can't write + // 3. Initialize m_rgUncommittedOpcode, so that we can undo local patch table changes if WriteMemory can't write // atomically. // // 4. If the patch is in the memory we grabbed, unapply it. @@ -6986,7 +6986,7 @@ HRESULT CordbProcess::RefreshPatchTable(CORDB_ADDRESS address, SIZE_T size, BYTE iDebuggerControllerPatchPrev = iPatch; // (3), above - InitializePRDToBreakInst(&(m_rgUncommitedOpcode[iPatch])); + InitializePRDToBreakInst(&(m_rgUncommittedOpcode[iPatch])); // (4), above if (IsPatchInRequestedRange(address, size, patchAddress)) @@ -7040,7 +7040,7 @@ HRESULT CordbProcess::RefreshPatchTable(CORDB_ADDRESS address, SIZE_T size, BYTE // success code. // // Return Value: -// Typical HRESULT symantics, nothing abnormal. +// Typical HRESULT semantics, nothing abnormal. // // Note: this method is pretty in-efficient. It refreshes the patch table, then scans it. // Refreshing the patch table involves a scan, too, so this method could be folded @@ -7607,7 +7607,7 @@ void CordbProcess::VerifyControlBlock() } // CordbProcess::VerifyControlBlock //----------------------------------------------------------------------------- -// This is the CordbProcess objects chance to inspect the DCB and intialize stuff +// This is the CordbProcess objects chance to inspect the DCB and initialize stuff // // Return Value: // Typical HRESULT return values, nothing abnormal. @@ -8910,7 +8910,7 @@ HRESULT CordbProcess::GetObject(ICorDebugValue **ppObject) // ppThread - OUT: Space for storing the thread corresponding to the taskId given. // // Return Value: -// Typical HRESULT symantics, nothing abnormal. +// Typical HRESULT semantics, nothing abnormal. // HRESULT CordbProcess::GetThreadForTaskID(TASKID taskId, ICorDebugThread2 ** ppThread) { @@ -14023,7 +14023,7 @@ void CordbWin32EventThread::AttachProcess() _ASSERTE(m_pProcess == NULL); m_pProcess.Assign(pProcess); - pProcess.Clear(); // ownership transfered to m_pProcess + pProcess.Clear(); // ownership transferred to m_pProcess // Should have succeeded if we got to this point. _ASSERTE(SUCCEEDED(hr)); @@ -14892,7 +14892,7 @@ HRESULT CordbProcess::IsReadyForDetach() * Look for any thread which was last seen in the specified AppDomain. * The CordbAppDomain object is about to be neutered due to an AD Unload * So the thread must no longer be considered to be in that domain. - * Note that this is a workaround due to the existance of the (possibly incorrect) + * Note that this is a workaround due to the existence of the (possibly incorrect) * cached AppDomain value. Ideally we would remove the cached value entirely * and there would be no need for this. * @@ -15097,7 +15097,7 @@ bool CordbProcess::IsCompatibleWith(DWORD clrMajorVersion) // 1) You should ensure new versions of all ICorDebug users in DevDiv (VS Debugger, MDbg, etc.) // are using a creation path that explicitly specifies that they support this new major // version of the CLR. - // 2) You should file an issue to track blocking earlier debuggers from targetting this + // 2) You should file an issue to track blocking earlier debuggers from targeting this // version of the CLR (i.e. update requiredVersion to the new CLR major // version). To enable a smooth internal transition, this often isn't done until absolutely // necessary (sometimes as late as Beta2). diff --git a/src/coreclr/debug/di/publish.cpp b/src/coreclr/debug/di/publish.cpp index c6ec238a69461..c7fd4ff049905 100644 --- a/src/coreclr/debug/di/publish.cpp +++ b/src/coreclr/debug/di/publish.cpp @@ -314,7 +314,7 @@ HRESULT CorpubPublish::GetProcessInternal( } // Acquire the mutex, only waiting two seconds. - // We can't actually gaurantee that the target put a mutex object in here. + // We can't actually guarantee that the target put a mutex object in here. DWORD dwRetVal = WaitForSingleObject(hMutex, SAFETY_TIMEOUT); if (dwRetVal == WAIT_OBJECT_0) @@ -406,7 +406,7 @@ CorpubProcess::CorpubProcess(DWORD dwProcessId, // need to load it dynamically. if (fpGetModuleFileNameEx != NULL) { - // MSDN is very confused about whether the lenght is in bytes (MSDN 2002) or chars (MSDN 2004). + // MSDN is very confused about whether the length is in bytes (MSDN 2002) or chars (MSDN 2004). // We err on the safe side by having buffer that's twice as large, and ignoring // the units on the return value. WCHAR szName[MAX_LONGPATH * sizeof(WCHAR)]; @@ -674,7 +674,7 @@ HRESULT CorpubProcess::EnumAppDomains(ICorPublishAppDomainEnum **ppIEnum) int iAppDomainCount = 0; AppDomainInfo *pADI = NULL; - // Make a copy of the IPC block so that we can gaurantee that it's not changing on us. + // Make a copy of the IPC block so that we can guarantee that it's not changing on us. AppDomainEnumerationIPCBlock tempBlock; memcpy(&tempBlock, m_AppDomainCB, sizeof(tempBlock)); diff --git a/src/coreclr/debug/di/rsfunction.cpp b/src/coreclr/debug/di/rsfunction.cpp index b45c65567c7e5..8a123b7abc354 100644 --- a/src/coreclr/debug/di/rsfunction.cpp +++ b/src/coreclr/debug/di/rsfunction.cpp @@ -1208,7 +1208,7 @@ HRESULT CordbFunction::LookupOrCreateReJitILCode(VMPTR_ILCodeVersionNode vmILCod CordbReJitILCode * pILCode = m_reJitILCodes.GetBase(VmPtrToCookie(vmILCodeVersionNode)); - // special case non-existance as need to add to the hash table too + // special case non-existence as need to add to the hash table too if (pILCode == NULL) { // we don't yet support ENC and ReJIT together, so the version should be 1 diff --git a/src/coreclr/debug/di/rspriv.h b/src/coreclr/debug/di/rspriv.h index 4062cf37138a0..62e718ac317ff 100644 --- a/src/coreclr/debug/di/rspriv.h +++ b/src/coreclr/debug/di/rspriv.h @@ -230,7 +230,7 @@ class BaseRSPtrArray m_cElements = 0; } - // Is the array emtpy? + // Is the array empty? bool IsEmpty() const { return (m_pArray == NULL); @@ -280,7 +280,7 @@ class BaseRSPtrArray m_cElements = 0; } - // Array lookup. Caller gaurantees this is in range. + // Array lookup. Caller guarantees this is in range. // Used for reading T* operator [] (unsigned int index) const { @@ -299,7 +299,7 @@ class BaseRSPtrArray m_pArray[index].Assign(pValue); } - // Get lenght of array in elements. + // Get length of array in elements. unsigned int Length() const { return m_cElements; @@ -545,7 +545,7 @@ class RsPtrTable //----------------------------------------------------------------------------- -// Simple Holder for RS object intialization to cooperate with Neutering +// Simple Holder for RS object initialization to cooperate with Neutering // semantics. // The ctor will do an addref. // The dtor (invoked in exception) will neuter and release the object. This @@ -1221,7 +1221,7 @@ class CordbCommonBase : public IUnknown void init(UINT_PTR id, enumCordbDerived type) { - // To help us track object leaks, we want to log when we create & destory CordbBase objects. + // To help us track object leaks, we want to log when we create & destroy CordbBase objects. #ifdef _DEBUG InterlockedIncrement(&s_TotalObjectCount); InterlockedIncrement(&s_CordbObjectUID); @@ -1262,7 +1262,7 @@ class CordbCommonBase : public IUnknown // m_sdThis[m_type][m_dwInstance] = NULL; //} #endif - // To help us track object leaks, we want to log when we create & destory CordbBase objects. + // To help us track object leaks, we want to log when we create & destroy CordbBase objects. LOG((LF_CORDB, LL_EVERYTHING, "Memory: CordbBase object deleted: this=%p, id=%p, Refcount=0x%x\n", this, m_id, m_RefCount)); #ifdef _DEBUG @@ -3978,7 +3978,7 @@ class CordbProcess : ULONG *m_rgNextPatch; // This has m_cPatch elements. - PRD_TYPE *m_rgUncommitedOpcode; + PRD_TYPE *m_rgUncommittedOpcode; // CORDB_ADDRESS's are UINT_PTR's (64 bit under HOST_64BIT, 32 bit otherwise) #if defined(TARGET_64BIT) @@ -9729,8 +9729,8 @@ class CordbArrayValue : public CordbValue, COM_METHOD GetRank(ULONG32 * pnRank); COM_METHOD GetCount(ULONG32 * pnCount); COM_METHOD GetDimensions(ULONG32 cdim, ULONG32 dims[]); - COM_METHOD HasBaseIndicies(BOOL * pbHasBaseIndices); - COM_METHOD GetBaseIndicies(ULONG32 cdim, ULONG32 indices[]); + COM_METHOD HasBaseIndices(BOOL * pbHasBaseIndices); + COM_METHOD GetBaseIndices(ULONG32 cdim, ULONG32 indices[]); COM_METHOD GetElement(ULONG32 cdim, ULONG32 indices[], ICorDebugValue ** ppValue); COM_METHOD GetElementAtPosition(ULONG32 nIndex, ICorDebugValue ** ppValue); diff --git a/src/coreclr/debug/di/rsthread.cpp b/src/coreclr/debug/di/rsthread.cpp index 7bd63544a0da2..f6ebb31d75bfb 100644 --- a/src/coreclr/debug/di/rsthread.cpp +++ b/src/coreclr/debug/di/rsthread.cpp @@ -3091,7 +3091,7 @@ HRESULT CordbUnmanagedThread::GetTlsSlot(DWORD slot, REMOTE_PTR * pValue) // // Notes: // This is very brittle because the OS can lazily allocates storage for TLS slots. -// In order to gaurantee the storage is available, it must have been written to by the debuggee. +// In order to guarantee the storage is available, it must have been written to by the debuggee. // For managed threads, that's easy because the Thread* is already written to the slot. // But for pure native threads where GetThread() == NULL, the storage may not yet be allocated. // diff --git a/src/coreclr/debug/di/rstype.cpp b/src/coreclr/debug/di/rstype.cpp index ebe039cab807a..e96d6c5f2fcaf 100644 --- a/src/coreclr/debug/di/rstype.cpp +++ b/src/coreclr/debug/di/rstype.cpp @@ -2599,7 +2599,7 @@ void CordbType::CountTypeDataNodes(unsigned int *count) // genericArgsCount - size of the genericArgs array in elements. // genericArgs - array of type parameters. // count - IN/OUT - will increment with total number of generic args. -// caller must intialize this (likely to 0). +// caller must initialize this (likely to 0). //----------------------------------------------------------------------------- void CordbType::CountTypeDataNodesForInstantiation(unsigned int genericArgsCount, ICorDebugType *genericArgs[], unsigned int *count) { diff --git a/src/coreclr/debug/di/shimlocaldatatarget.cpp b/src/coreclr/debug/di/shimlocaldatatarget.cpp index a6e8e7779f549..4240c3dd15978 100644 --- a/src/coreclr/debug/di/shimlocaldatatarget.cpp +++ b/src/coreclr/debug/di/shimlocaldatatarget.cpp @@ -237,7 +237,7 @@ HRESULT BuildPlatformSpecificDataTarget(MachineInfo machineInfo, { if (!CompatibleHostAndTargetPlatforms(hProcess)) { - hr = CORDBG_E_UNCOMPATIBLE_PLATFORMS; + hr = CORDBG_E_INCOMPATIBLE_PLATFORMS; goto Label_Exit; } } diff --git a/src/coreclr/debug/di/shimprocess.cpp b/src/coreclr/debug/di/shimprocess.cpp index 76fd64731dd00..ef89ae95b879b 100644 --- a/src/coreclr/debug/di/shimprocess.cpp +++ b/src/coreclr/debug/di/shimprocess.cpp @@ -344,7 +344,7 @@ void ShimProcess::TrackFileHandleForDebugEvent(const DEBUG_EVENT * pEvent) // // We do this in a new thread proc to avoid thread restrictions: // Can't call this on win32 event thread because that can't send the IPC event to -// make the aysnc-break request. +// make the async-break request. // Can't call this on the RCET because that can't send an async-break (see SendIPCEvent for details) // So we just spin up a new thread to do the work. //--------------------------------------------------------------------------------------- diff --git a/src/coreclr/debug/ee/amd64/amd64InstrDecode.h b/src/coreclr/debug/ee/amd64/amd64InstrDecode.h index 17f54fbbc1a35..39bae5528872d 100644 --- a/src/coreclr/debug/ee/amd64/amd64InstrDecode.h +++ b/src/coreclr/debug/ee/amd64/amd64InstrDecode.h @@ -13,7 +13,7 @@ namespace Amd64InstrDecode // MOp // Instruction supports modrm RIP memory operations // M1st // Memory op is first operand normally src/dst // MOnly // Memory op is only operand. May not be a write... - // MUnknown // Memory op size is unknown. Size not included in disassemby + // MUnknown // Memory op size is unknown. Size not included in disassembly // MAddr // Memory op is address load effective address // M1B // Memory op is 1 byte // M2B // Memory op is 2 bytes diff --git a/src/coreclr/debug/ee/amd64/gen_amd64InstrDecode/Amd64InstructionTableGenerator.cs b/src/coreclr/debug/ee/amd64/gen_amd64InstrDecode/Amd64InstructionTableGenerator.cs index dd72a6c08be9f..4cd620a6f481f 100644 --- a/src/coreclr/debug/ee/amd64/gen_amd64InstrDecode/Amd64InstructionTableGenerator.cs +++ b/src/coreclr/debug/ee/amd64/gen_amd64InstrDecode/Amd64InstructionTableGenerator.cs @@ -29,7 +29,7 @@ internal enum SuffixFlags : int MOp = 0x1, // Instruction supports modrm RIP memory operations M1st = 0x3, // Memory op is first operand normally src/dst MOnly = 0x7, // Memory op is only operand. May not be a write... - MUnknown = 0x8, // Memory op size is unknown. Size not included in disassemby + MUnknown = 0x8, // Memory op size is unknown. Size not included in disassembly MAddr = 0x10, // Memory op is address load effective address M1B = 0x20, // Memory op is 1 byte M2B = 0x40, // Memory op is 2 bytes @@ -190,10 +190,10 @@ private static List parseEncoding(string encodingDisassembly) return encoding; } - private static List parseOperands(string operandDisassemby) + private static List parseOperands(string operandDisassembly) { var operands = new List(); - string rest = operandDisassemby; + string rest = operandDisassembly; while (rest?.Length != 0) { @@ -790,7 +790,7 @@ private void WriteCode() Console.WriteLine(" // MOp // Instruction supports modrm RIP memory operations"); Console.WriteLine(" // M1st // Memory op is first operand normally src/dst"); Console.WriteLine(" // MOnly // Memory op is only operand. May not be a write..."); - Console.WriteLine(" // MUnknown // Memory op size is unknown. Size not included in disassemby"); + Console.WriteLine(" // MUnknown // Memory op size is unknown. Size not included in disassembly"); Console.WriteLine(" // MAddr // Memory op is address load effective address"); Console.WriteLine(" // M1B // Memory op is 1 byte"); Console.WriteLine(" // M2B // Memory op is 2 bytes"); diff --git a/src/coreclr/debug/ee/controller.cpp b/src/coreclr/debug/ee/controller.cpp index 6be73bc8be21a..e8800159fd2cf 100644 --- a/src/coreclr/debug/ee/controller.cpp +++ b/src/coreclr/debug/ee/controller.cpp @@ -385,7 +385,7 @@ StackWalkAction ControllerStackInfo::WalkStack(FrameInfo *pInfo, void *data) if (i->m_bottomFP == LEAF_MOST_FRAME) i->m_bottomFP = pInfo->fp; - // This is part of the targetted fix for issue 650903 (see the other + // This is part of the targeted fix for issue 650903 (see the other // parts in code:TrackUMChain and code:DebuggerStepper::TrapStepOut). // // pInfo->fIgnoreThisFrameIfSuppressingUMChainFromComPlusMethodFrameGeneric has been @@ -665,7 +665,7 @@ void DebuggerPatchTable::BindPatch(DebuggerControllerPatch *patch, CORDB_ADDRESS _ASSERTE(!patch->IsBound() ); //Since the actual patch doesn't move, we don't have to worry about - //zeroing out the opcode field (see lenghty comment above) + //zeroing out the opcode field (see lengthy comment above) // Since the patch is double-hashed based off Address, if we change the address, // we must remove and reinsert the patch. CHashTable::Delete(HashKey(&patch->key), ItemIndex((HASHENTRY*)patch)); @@ -1156,7 +1156,7 @@ void DebuggerController::DisableAll() // DebuggerControllers since we no longer have the lock. So we have to // do this reference counting thing to make sure that the controllers // don't get toasted as we're trying to invoke SendEvent on them. We have to -// reaquire the lock before invoking Dequeue because Dequeue may +// reacquire the lock before invoking Dequeue because Dequeue may // result in the controller being deleted, which would change the global // controller list. // How: InterlockIncrement( m_eventQueuedCount ) @@ -2374,7 +2374,7 @@ bool DebuggerController::PatchTrace(TraceDestination *trace, // Code versioning allows calls to be redirected to alternate code potentially after this trace is complete but before // execution reaches the call target. Rather than bind the breakpoint to a specific jitted code instance that is currently - // configured to receive execution we need to prepare for that potential retargetting by binding all jitted code instances. + // configured to receive execution we need to prepare for that potential retargeting by binding all jitted code instances. // // Triggering this based of the native offset is a little subtle, but all of the stubmanagers follow a rule that if they // trace across a call boundary into jitted code they either stop at offset zero of the new method, or they continue tracing @@ -2635,7 +2635,7 @@ DPOSS_ACTION DebuggerController::ScanForTriggers(CORDB_ADDRESS_TYPE *address, // Annoyingly, TriggerPatch may add patches, which may cause // the patch table to move, which may, in turn, invalidate - // the patch (and patchNext) pointers. Store indeces, instead. + // the patch (and patchNext) pointers. Store indices, instead. iEvent = g_patches->GetItemIndex( (HASHENTRY *)patch ); if (patchNext != NULL) @@ -3112,7 +3112,7 @@ void DebuggerController::EnableSingleStep() #ifdef _DEBUG // Some controllers don't need to set the SS to do their job, and if they are setting it, it's likely an issue. - // So we assert here to catch them red-handed. This assert can always be updated to accomodate changes + // So we assert here to catch them red-handed. This assert can always be updated to accommodate changes // in a controller's behavior. switch(GetDCType()) @@ -6336,7 +6336,7 @@ void DebuggerStepper::TrapStepOut(ControllerStackInfo *info, bool fForceTraditio // stack. StackTraceTicket ticket(info); - // The last parameter here is part of a really targetted (*cough* dirty) fix to + // The last parameter here is part of a really targeted (*cough* dirty) fix to // disable getting an unwanted UMChain to fix issue 650903 (See // code:ControllerStackInfo::WalkStack and code:TrackUMChain for the other // parts.) In the case of managed step out we know that we aren't interested in @@ -8849,7 +8849,7 @@ TP_RESULT DebuggerEnCBreakpoint::TriggerPatch(DebuggerControllerPatch *patch, // We're returning then we'll have to re-get this lock. Be careful that we haven't kept any controller/patches // in the caller. They can move when we unlock, so when we release the lock and reget it here, things might have // changed underneath us. - // inverseLock holder will reaquire lock. + // inverseLock holder will reacquire lock. return TPR_IGNORE; } diff --git a/src/coreclr/debug/ee/controller.h b/src/coreclr/debug/ee/controller.h index af20de39a7821..361ef79a37f03 100644 --- a/src/coreclr/debug/ee/controller.h +++ b/src/coreclr/debug/ee/controller.h @@ -214,7 +214,7 @@ class ControllerStackInfo bool m_returnFound; FrameInfo m_returnFrame; - // A ridiculous flag that is targetting a very narrow fix at issue 650903 + // A ridiculous flag that is targeting a very narrow fix at issue 650903 // (4.5.1/Blue). This is set for the duration of a stackwalk designed to // help us "Step Out" to a managed frame (i.e., managed-only debugging). bool m_suppressUMChainFromComPlusMethodFrameGeneric; @@ -850,7 +850,7 @@ class DebuggerPatchTable : private CHashTableAndData return EntryPtr(iEntry); } - // Used by DebuggerController to grab indeces of patches + // Used by DebuggerController to grab indices of patches // rather than holding direct pointers to them. inline ULONG GetItemIndex(HASHENTRY * p) { @@ -986,8 +986,8 @@ inline void VerifyExecutableAddress(const BYTE* address) { if (!(mbi.State & MEM_COMMIT)) { - STRESS_LOG1(LF_GCROOTS, LL_ERROR, "VerifyExecutableAddress: address is uncommited memory, address=0x%p", address); - CONSISTENCY_CHECK_MSGF((mbi.State & MEM_COMMIT), ("VEA: address (0x%p) is uncommited memory.", address)); + STRESS_LOG1(LF_GCROOTS, LL_ERROR, "VerifyExecutableAddress: address is uncommitted memory, address=0x%p", address); + CONSISTENCY_CHECK_MSGF((mbi.State & MEM_COMMIT), ("VEA: address (0x%p) is uncommitted memory.", address)); } if (!(mbi.Protect & (PAGE_EXECUTE | PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY))) diff --git a/src/coreclr/debug/ee/debugger.cpp b/src/coreclr/debug/ee/debugger.cpp index 954836a3e0f74..1e818a05d9911 100644 --- a/src/coreclr/debug/ee/debugger.cpp +++ b/src/coreclr/debug/ee/debugger.cpp @@ -1585,7 +1585,7 @@ DebuggerHeap * Debugger::GetInteropSafeExecutableHeap_NoThrow() void Debugger::RaiseStartupNotification() { // Right-side will read this field from OOP via DAC-primitive to determine attach or launch case. - // We do an interlocked increment to gaurantee this is an atomic memory write, and to ensure + // We do an interlocked increment to guarantee this is an atomic memory write, and to ensure // that it's flushed from any CPU cache into memory. InterlockedIncrement(&m_fLeftSideInitialized); @@ -1687,7 +1687,7 @@ void Debugger::SendRawEvent(const DebuggerIPCEvent * pManagedEvent) // This will start a synchronization. // // Notes: -// In V2, this also gives the RS a chance to intialize the IPC protocol. +// In V2, this also gives the RS a chance to initialize the IPC protocol. // Spefically, this needs to be sent before the LS can send a sync-complete. //--------------------------------------------------------------------------------------- void Debugger::SendCreateProcess(DebuggerLockHolder * pDbgLockHolder) @@ -7336,7 +7336,7 @@ struct SendExceptionOnHelperThreadParams // dwFlags : additional flags (see CorDebugExceptionFlags). // // Returns: -// S_OK on sucess. Else some error. May also throw. +// S_OK on success. Else some error. May also throw. // // Notes: // This is a helper for code:Debugger.SendExceptionEventsWorker. @@ -8502,7 +8502,7 @@ void Debugger::MarkDebuggerUnattachedInternal() //----------------------------------------------------------------------------- // Favor to do lazy initialization on helper thread. -// This is needed to allow lazy intialization in Stack Overflow scenarios. +// This is needed to allow lazy initialization in Stack Overflow scenarios. // We may or may not already be initialized. //----------------------------------------------------------------------------- void LazyInitFavor(void *) @@ -10134,7 +10134,7 @@ void Debugger::FuncEvalComplete(Thread* pThread, DebuggerEval *pDE) _ASSERTE(ipce->FuncEvalComplete.resultType.elementType != ELEMENT_TYPE_VALUETYPE); // We must adjust the result address to point to the right place - ipce->FuncEvalComplete.resultAddr = ArgSlotEndianessFixup((ARG_SLOT*)ipce->FuncEvalComplete.resultAddr, + ipce->FuncEvalComplete.resultAddr = ArgSlotEndiannessFixup((ARG_SLOT*)ipce->FuncEvalComplete.resultAddr, GetSizeForCorElementType(ipce->FuncEvalComplete.resultType.elementType)); LOG((LF_CORDB, LL_INFO1000, "D::FEC: returned el %04x resultAddr %p\n", @@ -10430,7 +10430,7 @@ bool Debugger::HandleIPCEvent(DebuggerIPCEvent * pEvent) StartCanaryThread(); // In V3 after attaching event was handled we iterate throughout all ADs and made shadow copies of PDBs in the BIN directories. - // After all AppDomain, DomainAssembly and modules iteration was available in out-of-proccess model in V4 the code that enables + // After all AppDomain, DomainAssembly and modules iteration was available in out-of-process model in V4 the code that enables // PDBs to be copied was not called at attach time. // Eliminating PDBs copying side effect is an issue: Dev10 #927143 EX_TRY @@ -14910,7 +14910,7 @@ HRESULT Debugger::TerminateAppDomainIPC(void) RemoteHANDLE m = m_pAppDomainCB->m_hMutex; m_pAppDomainCB->m_hMutex.m_hLocal = NULL; - // And bring us back to a fully unintialized state. + // And bring us back to a fully uninitialized state. ZeroMemory(m_pAppDomainCB, sizeof(*m_pAppDomainCB)); // We're done. release and close the mutex. Note that this must be done diff --git a/src/coreclr/debug/ee/frameinfo.cpp b/src/coreclr/debug/ee/frameinfo.cpp index a785f85cd94da..2c5c537189a7c 100644 --- a/src/coreclr/debug/ee/frameinfo.cpp +++ b/src/coreclr/debug/ee/frameinfo.cpp @@ -2015,7 +2015,7 @@ bool PrepareLeafUMChain(DebuggerFrameData * pData, CONTEXT * pCtxTemp) } // @todo - this context is less important because the RS will overwrite it with the live context. - // We don't need to even bother getting it. We can just intialize the regdisplay w/ a sentinal. + // We don't need to even bother getting it. We can just initialize the regdisplay w/ a sentinel. fOk = g_pEEInterface->InitRegDisplay(thread, pRDSrc, pCtxTemp, false); thread->ResumeThread(); diff --git a/src/coreclr/debug/ee/frameinfo.h b/src/coreclr/debug/ee/frameinfo.h index 9acb883d3b91c..76489c9c52f63 100644 --- a/src/coreclr/debug/ee/frameinfo.h +++ b/src/coreclr/debug/ee/frameinfo.h @@ -103,7 +103,7 @@ struct FrameInfo #endif // FEATURE_EH_FUNCLETS - // A ridiculous flag that is targetting a very narrow fix at issue 650903 (4.5.1/Blue). + // A ridiculous flag that is targeting a very narrow fix at issue 650903 (4.5.1/Blue). // This is set when the currently walked frame is a ComPlusMethodFrameGeneric. If the // dude doing the walking is trying to ignore such frames (see // code:ControllerStackInfo::m_suppressUMChainFromComPlusMethodFrameGeneric), AND diff --git a/src/coreclr/debug/ee/funceval.cpp b/src/coreclr/debug/ee/funceval.cpp index 88495632c5d9d..c031b56b9e6cb 100644 --- a/src/coreclr/debug/ee/funceval.cpp +++ b/src/coreclr/debug/ee/funceval.cpp @@ -904,7 +904,7 @@ static void GetFuncEvalArgValue(DebuggerEval *pDE, #endif // TARGET_AMD64 ) { - memcpyNoGCRefs(ArgSlotEndianessFixup(pArgument, sizeof(LPVOID)), pAddr, size); + memcpyNoGCRefs(ArgSlotEndiannessFixup(pArgument, sizeof(LPVOID)), pAddr, size); } else { @@ -1126,7 +1126,7 @@ static void GetFuncEvalArgValue(DebuggerEval *pDE, if (size <= sizeof(ARG_SLOT)) { // Its not ByRef, so we need to copy the value class onto the ARG_SLOT. - CopyValueClass(ArgSlotEndianessFixup(pArgument, sizeof(LPVOID)), pData, o1->GetMethodTable()); + CopyValueClass(ArgSlotEndiannessFixup(pArgument, sizeof(LPVOID)), pData, o1->GetMethodTable()); } else { @@ -3783,7 +3783,7 @@ void FuncEvalHijackRealWorker(DebuggerEval *pDE, Thread* pThread, FuncEvalFrame* // // FuncEvalHijackWorker is the function that managed threads start executing in order to perform a function -// evaluation. Control is transfered here on the proper thread by hijacking that that's IP to this method in +// evaluation. Control is transferred here on the proper thread by hijacking that that's IP to this method in // Debugger::FuncEvalSetup. This function can also be called directly by a Runtime thread that is stopped sending a // first or second chance exception to the Right Side. // diff --git a/src/coreclr/debug/ee/functioninfo.cpp b/src/coreclr/debug/ee/functioninfo.cpp index 2b287eb07fcd1..90328b012d38d 100644 --- a/src/coreclr/debug/ee/functioninfo.cpp +++ b/src/coreclr/debug/ee/functioninfo.cpp @@ -952,7 +952,7 @@ void DebuggerJitInfo::LazyInitBounds() EX_CATCH { LOG((LF_CORDB,LL_WARNING, "DJI::LazyInitBounds: this=0x%x Exception was thrown and caught\n", this)); - // Just catch the exception. The DJI maps may or may-not be intialized, + // Just catch the exception. The DJI maps may or may-not be initialized, // but they should still be in a consistent state, so we should be ok. } EX_END_CATCH(SwallowAllExceptions) diff --git a/src/coreclr/debug/inc/dacdbiinterface.h b/src/coreclr/debug/inc/dacdbiinterface.h index 2691dcf6853ef..09a7b1c43f8ed 100644 --- a/src/coreclr/debug/inc/dacdbiinterface.h +++ b/src/coreclr/debug/inc/dacdbiinterface.h @@ -118,7 +118,7 @@ const DWORD kCurrentDbiVersionFormat = 1; // Module::GetName should either return the name, or fail) // // Cordb must neuter any Cordb objects that have any pre-existing handles to the object. -// After this point, gauranteed that nobody can discover the VMPTR any more: +// After this point, guaranteed that nobody can discover the VMPTR any more: // - doesn't show up in enumerations (so can't be discoverered implicitly) // - object should not be discoverable by other objects in VM. // - any Cordb object that already had it would be neutered by Dbi. @@ -244,7 +244,7 @@ class IDacDbiInterface // // // Return Value: - // BOOL whether Left-side is intialized. + // BOOL whether Left-side is initialized. // // Notes: // If the Left-side is not yet started up, then data in the LS is not yet initialized enough @@ -511,7 +511,7 @@ class IDacDbiInterface // vmModule - target module to get metadata for. // pTargetBuffer - Out parameter to get target-buffer for metadata. Gauranteed to be non-empty on // return. This will throw CORDBG_E_MISSING_METADATA hr if the buffer is empty. - // This does not gaurantee that the buffer is readable. For example, in a minidump, buffer's + // This does not guarantee that the buffer is readable. For example, in a minidump, buffer's // memory may not be present. // // Notes: diff --git a/src/coreclr/debug/inc/dacdbistructures.h b/src/coreclr/debug/inc/dacdbistructures.h index aca5c668de42b..10d4a99c059ae 100644 --- a/src/coreclr/debug/inc/dacdbistructures.h +++ b/src/coreclr/debug/inc/dacdbistructures.h @@ -550,7 +550,7 @@ class MSLAYOUT FieldData void SetStaticAddress( TADDR addr ); // If this is an instance field, return its offset - // Note that this offset is allways a real offset (possibly larger than 22 bits), which isn't + // Note that this offset is always a real offset (possibly larger than 22 bits), which isn't // necessarily the same as the overloaded FieldDesc.dwOffset field which can have // some special FIELD_OFFSET tokens. SIZE_T GetInstanceOffset(); diff --git a/src/coreclr/debug/inc/dacdbistructures.inl b/src/coreclr/debug/inc/dacdbistructures.inl index 84dd234319863..9478ce5132c51 100644 --- a/src/coreclr/debug/inc/dacdbistructures.inl +++ b/src/coreclr/debug/inc/dacdbistructures.inl @@ -79,7 +79,7 @@ void DacDbiArrayList::Dealloc() } // Alloc and Init are very similar. Both preallocate the array; but Alloc leaves the -// contents unintialized while Init provides initial values. The array contents are always +// contents uninitialized while Init provides initial values. The array contents are always // mutable. // allocate space for the list--in some instances, we'll know the count first, and then diff --git a/src/coreclr/debug/inc/dbgipcevents.h b/src/coreclr/debug/inc/dbgipcevents.h index 6cea497955c4f..c281a7193d05b 100644 --- a/src/coreclr/debug/inc/dbgipcevents.h +++ b/src/coreclr/debug/inc/dbgipcevents.h @@ -1283,7 +1283,7 @@ inline bool IsEqualOrCloserToRoot(FramePointer fp1, FramePointer fp2) // the address of the real start address of the native code. // This field will be NULL only if the method hasn't been JITted // yet (and thus no code is available). Otherwise, it will be -// the adress of a CORDB_ADDRESS in the remote memory. This +// the address of a CORDB_ADDRESS in the remote memory. This // CORDB_ADDRESS may be NULL, in which case the code is unavailable // has been pitched (return CORDBG_E_CODE_NOT_AVAILABLE) // diff --git a/src/coreclr/debug/inc/dbgtargetcontext.h b/src/coreclr/debug/inc/dbgtargetcontext.h index 5104c5d25d4e5..403039e24d6a5 100644 --- a/src/coreclr/debug/inc/dbgtargetcontext.h +++ b/src/coreclr/debug/inc/dbgtargetcontext.h @@ -11,7 +11,7 @@ // // The right side of the debugger can be built to target multiple platforms. This means it is not // safe to use the CONTEXT structure directly: the context of the platform we're building for might not match -// that of the one the debugger is targetting. So all right side code will use the DT_CONTEXT abstraction +// that of the one the debugger is targeting. So all right side code will use the DT_CONTEXT abstraction // instead. When the debugger target is the local platform this will just resolve back into CONTEXT, but cross // platform we'll provide a hand-rolled version. // diff --git a/src/coreclr/debug/inc/dbgtransportsession.h b/src/coreclr/debug/inc/dbgtransportsession.h index 5c305b1781874..b27fedb1f3c38 100644 --- a/src/coreclr/debug/inc/dbgtransportsession.h +++ b/src/coreclr/debug/inc/dbgtransportsession.h @@ -747,7 +747,7 @@ class DbgTransportSession #ifndef RIGHT_SIDE_COMPILE // The LS requires the addresses of a couple of runtime data structures in order to service MT_GetDCB etc. - // These are provided by the runtime at intialization time. + // These are provided by the runtime at initialization time. DebuggerIPCControlBlock *m_pDCB; AppDomainEnumerationIPCBlock *m_pADB; #endif // !RIGHT_SIDE_COMPILE diff --git a/src/coreclr/gc/env/gcenv.h b/src/coreclr/gc/env/gcenv.h index b057e5b9a2761..8a55b5297a6f6 100644 --- a/src/coreclr/gc/env/gcenv.h +++ b/src/coreclr/gc/env/gcenv.h @@ -44,8 +44,8 @@ #ifdef STRESS_LOG /* STRESS_LOG_VA was added to allow sending GC trace output to the stress log. msg must be enclosed in ()'s and contain a format string followed by 0 to 12 arguments. The arguments must be numbers - or string literals. This was done because GC Trace uses dprintf which dosen't contain info on - how many arguments are getting passed in and using va_args would require parsing the format + or string literals. This was done because GC Trace uses dprintf which dosen't contain info on + how many arguments are getting passed in and using va_args would require parsing the format string during the GC */ #define STRESS_LOG_VA(level, msg) do { \ @@ -139,12 +139,12 @@ enum LogLevel LL_FATALERROR, LL_ERROR, LL_WARNING, - LL_INFO10, // can be expected to generate 10 logs per small but not trival run - LL_INFO100, // can be expected to generate 100 logs per small but not trival run - LL_INFO1000, // can be expected to generate 1,000 logs per small but not trival run - LL_INFO10000, // can be expected to generate 10,000 logs per small but not trival run - LL_INFO100000, // can be expected to generate 100,000 logs per small but not trival run - LL_INFO1000000, // can be expected to generate 1,000,000 logs per small but not trival run + LL_INFO10, // can be expected to generate 10 logs per small but not trivial run + LL_INFO100, // can be expected to generate 100 logs per small but not trivial run + LL_INFO1000, // can be expected to generate 1,000 logs per small but not trivial run + LL_INFO10000, // can be expected to generate 10,000 logs per small but not trivial run + LL_INFO100000, // can be expected to generate 100,000 logs per small but not trivial run + LL_INFO1000000, // can be expected to generate 1,000,000 logs per small but not trivial run LL_EVERYTHING, }; diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp index 8774b94f0779a..4462ed110f62b 100644 --- a/src/coreclr/gc/gc.cpp +++ b/src/coreclr/gc/gc.cpp @@ -12980,14 +12980,14 @@ uint32_t gc_heap::adjust_heaps_hard_limit (uint32_t nhp) size_t gc_heap::adjust_segment_size_hard_limit_va (size_t seg_size) { - return (use_large_pages_p ? - align_on_segment_hard_limit (seg_size) : + return (use_large_pages_p ? + align_on_segment_hard_limit (seg_size) : round_up_power2 (seg_size)); } size_t gc_heap::adjust_segment_size_hard_limit (size_t limit, uint32_t nhp) { - if (!limit) + if (!limit) { limit = min_segment_size_hard_limit; } @@ -15414,7 +15414,7 @@ void gc_heap::adjust_limit_clr (uint8_t* start, size_t limit_size, size_t size, #endif //USE_REGIONS { size_t pad_size = aligned_min_obj_size; - dprintf (3, ("contigous ac: making min obj gap %Ix->%Ix(%Id)", + dprintf (3, ("contiguous ac: making min obj gap %Ix->%Ix(%Id)", acontext->alloc_ptr, (acontext->alloc_ptr + pad_size), pad_size)); make_unused_array (acontext->alloc_ptr, pad_size); acontext->alloc_ptr += pad_size; @@ -20273,7 +20273,7 @@ int gc_heap::generation_to_condemn (int n_initial, // For background GC we want to do blocking collections more eagerly because we don't // want to get into the situation where the memory load becomes high while we are in // a background GC and we'd have to wait for the background GC to finish to start - // a blocking collection (right now the implemenation doesn't handle converting + // a blocking collection (right now the implementation doesn't handle converting // a background GC to a blocking collection midway. dprintf (GTC_LOG, ("h%d: bgc - BLOCK", heap_number)); *blocking_collection_p = TRUE; @@ -33790,7 +33790,7 @@ void gc_heap::decommit_mark_array_by_seg (heap_segment* seg) } } - dprintf (GC_TABLE_LOG, ("decommited [%Ix for address [%Ix", beg_word, seg)); + dprintf (GC_TABLE_LOG, ("decommitted [%Ix for address [%Ix", beg_word, seg)); } } @@ -44075,7 +44075,7 @@ HRESULT GCHeap::Initialize() seg_size = gc_heap::soh_segment_size; #ifndef USE_REGIONS - + if (gc_heap::heap_hard_limit) { if (gc_heap::heap_hard_limit_oh[soh]) diff --git a/src/coreclr/gc/gcevent_serializers.h b/src/coreclr/gc/gcevent_serializers.h index 0443d04c668eb..cee8af21c9ed0 100644 --- a/src/coreclr/gc/gcevent_serializers.h +++ b/src/coreclr/gc/gcevent_serializers.h @@ -61,7 +61,7 @@ struct EventSerializationTraits * the buffer double-pointer to point to the next byte to be written. * * It is the responsibility of the caller to ensure that the buffer is - * large enough to accomodate the serialized form of T. + * large enough to accommodate the serialized form of T. */ static void Serialize(const T& value, uint8_t** buffer) = delete; diff --git a/src/coreclr/gc/handletablecore.cpp b/src/coreclr/gc/handletablecore.cpp index 07f2d563cee8c..08a92424c2675 100644 --- a/src/coreclr/gc/handletablecore.cpp +++ b/src/coreclr/gc/handletablecore.cpp @@ -516,7 +516,7 @@ BOOL SegmentInitialize(TableSegment *pSegment, HandleTable *pTable) return FALSE; } - // remember how many blocks we commited + // remember how many blocks we committed pSegment->bCommitLine = (uint8_t)((dwCommit - HANDLE_HEADER_SIZE) / HANDLE_BYTES_PER_BLOCK); // now preinitialize the 0xFF guys @@ -873,7 +873,7 @@ uint32_t SegmentInsertBlockFromFreeListWorker(TableSegment *pSegment, uint32_t u // use the previous commit line as the new decommit line pSegment->bDecommitLine = (uint8_t)uCommitLine; - // adjust the commit line by the number of blocks we commited + // adjust the commit line by the number of blocks we committed pSegment->bCommitLine = (uint8_t)(uCommitLine + (dwCommit / HANDLE_BYTES_PER_BLOCK)); } diff --git a/src/coreclr/gc/handletablepriv.h b/src/coreclr/gc/handletablepriv.h index 52c8b2c211334..90c3ac4b73017 100644 --- a/src/coreclr/gc/handletablepriv.h +++ b/src/coreclr/gc/handletablepriv.h @@ -248,7 +248,7 @@ struct _TableSegmentHeader /* * Commit Line * - * Index of the first uncommited block in the segment. + * Index of the first uncommitted block in the segment. */ uint8_t bCommitLine; diff --git a/src/coreclr/gc/unix/gcenv.unix.cpp b/src/coreclr/gc/unix/gcenv.unix.cpp index a03edc3765126..d51a6e5c62922 100644 --- a/src/coreclr/gc/unix/gcenv.unix.cpp +++ b/src/coreclr/gc/unix/gcenv.unix.cpp @@ -764,7 +764,7 @@ bool GCToOSInterface::VirtualDecommit(void* address, size_t size) // TODO: This can fail, however the GC does not handle the failure gracefully // Explicitly calling mmap instead of mprotect here makes it // that much more clear to the operating system that we no - // longer need these pages. Also, GC depends on re-commited pages to + // longer need these pages. Also, GC depends on re-committed pages to // be zeroed-out. return mmap(address, size, PROT_NONE, MAP_FIXED | MAP_ANON | MAP_PRIVATE, -1, 0) != NULL; } diff --git a/src/coreclr/gcinfo/CMakeLists.txt b/src/coreclr/gcinfo/CMakeLists.txt index 34b3843d6893e..a9d8a6f5848d0 100644 --- a/src/coreclr/gcinfo/CMakeLists.txt +++ b/src/coreclr/gcinfo/CMakeLists.txt @@ -64,7 +64,7 @@ else() set(TARGET_OS_NAME win) endif() -# For clrjit we need to build an exact targetted gcinfo instead of the universal one +# For clrjit we need to build an exact targeted gcinfo instead of the universal one if (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_ARM) create_gcinfo_lib(TARGET gcinfo_${TARGET_OS_NAME}_${ARCH_TARGET_NAME} OS ${TARGET_OS_NAME} ARCH ${ARCH_TARGET_NAME}) endif() diff --git a/src/coreclr/ilasm/asmparse.y b/src/coreclr/ilasm/asmparse.y index 3f545d3a12ee9..0d3f6c73e0f92 100644 --- a/src/coreclr/ilasm/asmparse.y +++ b/src/coreclr/ilasm/asmparse.y @@ -61,7 +61,7 @@ /* multi-character punctuation */ %token DCOLON /* :: */ -%token ELIPSIS /* ... */ +%token ELLIPSIS /* ... */ /* Keywords Note the undersores are to avoid collisions as these are common names */ %token VOID_ BOOL_ CHAR_ UNSIGNED_ INT_ INT8_ INT16_ INT32_ INT64_ FLOAT_ FLOAT32_ FLOAT64_ BYTEARRAY_ @@ -1474,7 +1474,7 @@ sigArgs1 : sigArg { $$ = $1; } | sigArgs1 ',' sigArg { $$ = $1; $$->append($3); delete $3; } ; -sigArg : ELIPSIS { $$ = new BinStr(); $$->appendInt8(ELEMENT_TYPE_SENTINEL); } +sigArg : ELLIPSIS { $$ = new BinStr(); $$->appendInt8(ELEMENT_TYPE_SENTINEL); } | paramAttr type marshalClause { $$ = new BinStr(); $$->append($2); PASM->addArgName(NULL, $2, $3, $1); } | paramAttr type marshalClause id { $$ = new BinStr(); $$->append($2); PASM->addArgName($4, $2, $3, $1);} ; @@ -1748,7 +1748,7 @@ type : CLASS_ className { if($2 == PASM->m | NATIVE_ UNSIGNED_ INT_ { $$ = new BinStr(); $$->appendInt8(ELEMENT_TYPE_U); } | NATIVE_ UINT_ { $$ = new BinStr(); $$->appendInt8(ELEMENT_TYPE_U); } | simpleType { $$ = $1; } - | ELIPSIS type { $$ = $2; $$->insertInt8(ELEMENT_TYPE_SENTINEL); } + | ELLIPSIS type { $$ = $2; $$->insertInt8(ELEMENT_TYPE_SENTINEL); } ; simpleType : CHAR_ { $$ = new BinStr(); $$->appendInt8(ELEMENT_TYPE_CHAR); } @@ -1776,12 +1776,12 @@ bounds1 : bound { $$ = $1; } ; bound : /* EMPTY */ { $$ = new BinStr(); $$->appendInt32(0x7FFFFFFF); $$->appendInt32(0x7FFFFFFF); } - | ELIPSIS { $$ = new BinStr(); $$->appendInt32(0x7FFFFFFF); $$->appendInt32(0x7FFFFFFF); } + | ELLIPSIS { $$ = new BinStr(); $$->appendInt32(0x7FFFFFFF); $$->appendInt32(0x7FFFFFFF); } | int32 { $$ = new BinStr(); $$->appendInt32(0); $$->appendInt32($1); } - | int32 ELIPSIS int32 { FAIL_UNLESS($1 <= $3, ("lower bound %d must be <= upper bound %d\n", $1, $3)); + | int32 ELLIPSIS int32 { FAIL_UNLESS($1 <= $3, ("lower bound %d must be <= upper bound %d\n", $1, $3)); if ($1 > $3) { YYERROR; }; $$ = new BinStr(); $$->appendInt32($1); $$->appendInt32($3-$1+1); } - | int32 ELIPSIS { $$ = new BinStr(); $$->appendInt32($1); $$->appendInt32(0x7FFFFFFF); } + | int32 ELLIPSIS { $$ = new BinStr(); $$->appendInt32($1); $$->appendInt32(0x7FFFFFFF); } ; /* Security declarations */ diff --git a/src/coreclr/ilasm/extractGrammar.pl b/src/coreclr/ilasm/extractGrammar.pl index 0c2019ef98b2a..0e1c80e9f9010 100644 --- a/src/coreclr/ilasm/extractGrammar.pl +++ b/src/coreclr/ilasm/extractGrammar.pl @@ -27,7 +27,7 @@ $grammar =~ s/\b_([A-Z0-9]+)\b/'\L.$1\E'/sg; # do the special punctuation by hand -$grammar =~ s/\bELIPSIS\b/'...'/sg; +$grammar =~ s/\bELLIPSIS\b/'...'/sg; $grammar =~ s/\bDCOLON\b/'::'/sg; # diff --git a/src/coreclr/ilasm/grammar_after.cpp b/src/coreclr/ilasm/grammar_after.cpp index 9df0cc05ec7f0..73cdc7ef1e7a3 100644 --- a/src/coreclr/ilasm/grammar_after.cpp +++ b/src/coreclr/ilasm/grammar_after.cpp @@ -1232,7 +1232,7 @@ int yylex() if (Sym(nextchar(curPos))=='.' && Sym(nextchar(nextchar(curPos)))=='.') { curPos = nextchar(nextchar(nextchar(curPos))); - tok = ELIPSIS; + tok = ELLIPSIS; } else { diff --git a/src/coreclr/ilasm/prebuilt/asmparse.cpp b/src/coreclr/ilasm/prebuilt/asmparse.cpp index 096ed433243c4..6bf91f56c57f4 100644 --- a/src/coreclr/ilasm/prebuilt/asmparse.cpp +++ b/src/coreclr/ilasm/prebuilt/asmparse.cpp @@ -64,7 +64,7 @@ typedef union { # define TYPEDEF_MR 272 # define TYPEDEF_CA 273 # define DCOLON 274 -# define ELIPSIS 275 +# define ELLIPSIS 275 # define VOID_ 276 # define BOOL_ 277 # define CHAR_ 278 diff --git a/src/coreclr/ildasm/dasm.cpp b/src/coreclr/ildasm/dasm.cpp index cca36fdbcf0ae..7ceaf468752e5 100644 --- a/src/coreclr/ildasm/dasm.cpp +++ b/src/coreclr/ildasm/dasm.cpp @@ -2217,7 +2217,7 @@ BOOL PrettyPrintCustomAttributeBlob(mdToken tkType, BYTE* pBlob, ULONG ulLen, vo { char* initszptr = szString + strlen(szString); PCCOR_SIGNATURE typePtr; // type to convert, - ULONG typeLen; // the lenght of 'typePtr' + ULONG typeLen; // the length of 'typePtr' CHECK_LOCAL_STATIC_VAR(static CQuickBytes out); // where to put the pretty printed string IMDInternalImport *pIMDI = g_pImport; // ptr to IMDInternalImport class with ComSig diff --git a/src/coreclr/inc/allocacheck.h b/src/coreclr/inc/allocacheck.h index ca2a57a277cdf..ea7e6df316f01 100644 --- a/src/coreclr/inc/allocacheck.h +++ b/src/coreclr/inc/allocacheck.h @@ -37,19 +37,19 @@ class AllocaCheck { enum { CheckBytes = 0xCCCDCECF, }; - struct AllocaSentinal { + struct AllocaSentinel { int check; - AllocaSentinal* next; + AllocaSentinel* next; }; public: /***************************************************/ AllocaCheck() { - sentinals = 0; + sentinels = 0; } ~AllocaCheck() { - AllocaSentinal* ptr = sentinals; + AllocaSentinel* ptr = sentinels; while (ptr != 0) { if (ptr->check != (int)CheckBytes) _ASSERTE(!"alloca buffer overrun"); @@ -58,20 +58,20 @@ class AllocaCheck { } void* add(void* allocaBuff, unsigned size) { - AllocaSentinal* newSentinal = (AllocaSentinal*) ((char*) allocaBuff + size); - newSentinal->check = CheckBytes; - newSentinal->next = sentinals; - sentinals = newSentinal; + AllocaSentinel* newSentinel = (AllocaSentinel*) ((char*) allocaBuff + size); + newSentinel->check = CheckBytes; + newSentinel->next = sentinels; + sentinels = newSentinel; memset(allocaBuff, 0xDD, size); return allocaBuff; } private: - AllocaSentinal* sentinals; + AllocaSentinel* sentinels; }; #define ALLOCA_CHECK() AllocaCheck __allocaChecker -#define ALLOCA(size) __allocaChecker.add(_alloca(size+sizeof(AllocaCheck::AllocaSentinal)), size); +#define ALLOCA(size) __allocaChecker.add(_alloca(size+sizeof(AllocaCheck::AllocaSentinel)), size); #else diff --git a/src/coreclr/inc/caparser.h b/src/coreclr/inc/caparser.h index a6a153b217249..177e5aa592684 100644 --- a/src/coreclr/inc/caparser.h +++ b/src/coreclr/inc/caparser.h @@ -281,7 +281,7 @@ class CustomAttributeParser { HRESULT hr; if (BytesLeft() == 0) - { // Need to check for NULL string sentinal (see below), + { // Need to check for NULL string sentinel (see below), // so need to have at least one byte to read. IfFailRet(META_E_CA_INVALID_BLOB); } diff --git a/src/coreclr/inc/ceegen.h b/src/coreclr/inc/ceegen.h index 03600e901309f..cb86a18c3f827 100644 --- a/src/coreclr/inc/ceegen.h +++ b/src/coreclr/inc/ceegen.h @@ -82,7 +82,7 @@ typedef DWORD StringRef; | Low -level file writer | +----------------------------+ | Knows how to do | | ICeeFileGen | | pointer relocs | | | - | | | C-style inteface. Deals | + | | | C-style interface. Deals | +------------------------+ | with HCEEFILE, HCEESECTION | | etc. It is mostly just a | | thin wrapper for a | diff --git a/src/coreclr/inc/cor.h b/src/coreclr/inc/cor.h index 8ccc151cc0378..bb8f2dde652c6 100644 --- a/src/coreclr/inc/cor.h +++ b/src/coreclr/inc/cor.h @@ -2211,7 +2211,7 @@ inline ULONG CorSigCompressSignedInt( // return number of bytes that compresse *(pBytes + 3) = BYTE(iData & 0xff); return 4; } - // Out of compressable range + // Out of compressible range return (ULONG)-1; } // CorSigCompressSignedInt diff --git a/src/coreclr/inc/cordebug.idl b/src/coreclr/inc/cordebug.idl index 8a1b441e1fa1f..2c47970e69751 100644 --- a/src/coreclr/inc/cordebug.idl +++ b/src/coreclr/inc/cordebug.idl @@ -4168,7 +4168,7 @@ interface ICorDebugThread : IUnknown * and thereafter not have to worry about it. * * Suspending threads and resuming the process can cause deadlocks, though it's - * usually unlikely. This is an intrinisc quality of threads and processes and is by-design. + * usually unlikely. This is an intrinsic quality of threads and processes and is by-design. * A debugger can async break and resume the threads to break the deadlock. * * If the thread's user state includes USER_UNSAFE_POINT, then the thread may block a GC. @@ -6451,7 +6451,7 @@ interface ICorDebugGenericValue : ICorDebugValue * An ICorDebugReference will either cooperate with GCs such that its information is updated * after the GC, or it will be implicitly neutered before the GC. * - * The ICorDebugReferenceValue inteface may be implicitly neutered after the debuggee + * The ICorDebugReferenceValue interface may be implicitly neutered after the debuggee * has been continued. The derived ICorDebugHandleValue is not neutered until explicitly * released or exposed. * @@ -6805,20 +6805,20 @@ interface ICorDebugArrayValue : ICorDebugHeapValue length_is(cdim)] ULONG32 dims[]); /* - * HasBaseIndicies returns whether or not the array has base indicies. + * HasBaseIndices returns whether or not the array has base indices. * If the answer is no, then all dimensions have a base index of 0. */ - HRESULT HasBaseIndicies([out] BOOL *pbHasBaseIndicies); + HRESULT HasBaseIndices([out] BOOL *pbHasBaseIndices); /* - * GetBaseIndicies returns the base index of each dimension in + * GetBaseIndices returns the base index of each dimension in * the array */ - HRESULT GetBaseIndicies([in] ULONG32 cdim, + HRESULT GetBaseIndices([in] ULONG32 cdim, [out, size_is(cdim), - length_is(cdim)] ULONG32 indicies[]); + length_is(cdim)] ULONG32 indices[]); /* * GetElement returns a value representing the given element in the array. diff --git a/src/coreclr/inc/cordebuginfo.h b/src/coreclr/inc/cordebuginfo.h index 31308b95ca1e1..35e0eca6fd789 100644 --- a/src/coreclr/inc/cordebuginfo.h +++ b/src/coreclr/inc/cordebuginfo.h @@ -18,7 +18,7 @@ class ICorDebugInfo NO_MAPPING = -1, PROLOG = -2, EPILOG = -3, - MAX_MAPPING_VALUE = -3 // Sentinal value. This should be set to the largest magnitude value in the enum + MAX_MAPPING_VALUE = -3 // Sentinel value. This should be set to the largest magnitude value in the enum // so that the compression routines know the enum's range. }; @@ -351,7 +351,7 @@ class ICorDebugInfo UNKNOWN_ILNUM = -4, // Unknown variable - MAX_ILNUM = -4 // Sentinal value. This should be set to the largest magnitude value in th enum + MAX_ILNUM = -4 // Sentinel value. This should be set to the largest magnitude value in th enum // so that the compression routines know the enum's range. }; diff --git a/src/coreclr/inc/corerror.xml b/src/coreclr/inc/corerror.xml index 3e5dafe3065fd..df8fae9b74d09 100644 --- a/src/coreclr/inc/corerror.xml +++ b/src/coreclr/inc/corerror.xml @@ -1877,7 +1877,7 @@ - CORDBG_E_UNCOMPATIBLE_PLATFORMS + CORDBG_E_INCOMPATIBLE_PLATFORMS "The operation failed because debuggee and debugger are on incompatible platforms." The operation failed because debuggee and debugger are on incompatible platform diff --git a/src/coreclr/inc/corhlpr.cpp b/src/coreclr/inc/corhlpr.cpp index e01cdc58099a4..19f81f9077d2f 100644 --- a/src/coreclr/inc/corhlpr.cpp +++ b/src/coreclr/inc/corhlpr.cpp @@ -26,7 +26,7 @@ extern "C" { /***************************************************************************/ -/* Note that this construtor does not set the LocalSig, but has the +/* Note that this constructor does not set the LocalSig, but has the advantage that it does not have any dependancy on EE structures. inside the EE use the FunctionDesc constructor */ diff --git a/src/coreclr/inc/corinfo.h b/src/coreclr/inc/corinfo.h index 6a816ded56b0e..84169d3c0a7e4 100644 --- a/src/coreclr/inc/corinfo.h +++ b/src/coreclr/inc/corinfo.h @@ -1652,7 +1652,7 @@ struct CORINFO_DEVIRTUALIZATION_INFO // - requiresInstMethodTableArg is set to TRUE if the devirtualized method requires a type handle arg. // - exactContext is set to wrapped CORINFO_CLASS_HANDLE of devirt'ed method table. // - details on the computation done by the jit host - // - If pResolvedTokenDevirtualizedMethod is not set to NULL and targetting an R2R image + // - If pResolvedTokenDevirtualizedMethod is not set to NULL and targeting an R2R image // use it as the parameter to getCallInfo // CORINFO_METHOD_HANDLE devirtualizedMethod; diff --git a/src/coreclr/inc/daccess.h b/src/coreclr/inc/daccess.h index af91b845bb735..fd50420d63d67 100644 --- a/src/coreclr/inc/daccess.h +++ b/src/coreclr/inc/daccess.h @@ -1808,7 +1808,7 @@ typedef DPTR(PTR_VOID) PTR_PTR_VOID; // const-correctness. However, if we wanted to support true void* / const void* // behavior, we could probably build the follow functionality by templating // __VoidPtr: -// * A PTR_VOID would be implicitly convertable to PTR_CVOID +// * A PTR_VOID would be implicitly convertible to PTR_CVOID // * An explicit coercion (ideally const_cast) would be required to convert a // PTR_CVOID to a PTR_VOID // * Similarily, an explicit coercion would be required to convert a cost PTR @@ -2266,7 +2266,7 @@ public: name(int dummy) : base(dummy) {} // TADDR <- ?PTR(Src) - Get TADDR of PTR object (DPtr etc.) // TADDR <- Src * - Get TADDR of dac host object instance // -// Note that there is no direct convertion to other host-pointer types (because we don't +// Note that there is no direct conversion to other host-pointer types (because we don't // know if you want a DPTR or VPTR etc.). However, due to the implicit DAC conversions, // you can just use dac_cast and assign that to a Foo*. // diff --git a/src/coreclr/inc/eventtracebase.h b/src/coreclr/inc/eventtracebase.h index 29dae12400121..fe901fb2ea84c 100644 --- a/src/coreclr/inc/eventtracebase.h +++ b/src/coreclr/inc/eventtracebase.h @@ -1320,7 +1320,7 @@ EXTERN_C DOTNET_TRACE_CONTEXT MICROSOFT_WINDOWS_DOTNETRUNTIME_STRESS_PROVIDER_DO // Special Handling of Startup events // -// "mc.exe -MOF" already generates this block for XP-suported builds inside ClrEtwAll.h; +// "mc.exe -MOF" already generates this block for XP-supported builds inside ClrEtwAll.h; // on Vista+ builds, mc is run without -MOF, and we still have code that depends on it, so // we manually place it here. ETW_INLINE @@ -1386,7 +1386,7 @@ class ETWTraceStartup { } } }; -// "mc.exe -MOF" already generates this block for XP-suported builds inside ClrEtwAll.h; +// "mc.exe -MOF" already generates this block for XP-supported builds inside ClrEtwAll.h; // on Vista+ builds, mc is run without -MOF, and we still have code that depends on it, so // we manually place it here. FORCEINLINE diff --git a/src/coreclr/inc/formattype.cpp b/src/coreclr/inc/formattype.cpp index 7100fe285ab14..a1b2e043ee3c6 100644 --- a/src/coreclr/inc/formattype.cpp +++ b/src/coreclr/inc/formattype.cpp @@ -87,7 +87,7 @@ static void appendStrNum(CQuickBytes *out, int num) { PCCOR_SIGNATURE PrettyPrintSignature( PCCOR_SIGNATURE typePtr, // type to convert, - unsigned typeLen, // the lenght of 'typePtr' + unsigned typeLen, // the length of 'typePtr' const char* name, // can be "", the name of the method for this sig 0 means local var sig CQuickBytes *out, // where to put the pretty printed string IMDInternalImport *pIMDI, // ptr to IMDInternalImport class with ComSig @@ -174,7 +174,7 @@ const char* PrettyPrintSig( PCCOR_SIGNATURE PrettyPrintSignature( PCCOR_SIGNATURE typePtr, // type to convert, - unsigned typeLen, // the lenght of 'typePtr' + unsigned typeLen, // the length of 'typePtr' const char* name, // can be "", the name of the method for this sig 0 means local var sig CQuickBytes *out, // where to put the pretty printed string IMDInternalImport *pIMDI, // ptr to IMDInternalImport class with ComSig diff --git a/src/coreclr/inc/formattype.h b/src/coreclr/inc/formattype.h index 30eed1295441a..b112c9792dc44 100644 --- a/src/coreclr/inc/formattype.h +++ b/src/coreclr/inc/formattype.h @@ -37,7 +37,7 @@ char* asString(CQuickBytes *out); const char* PrettyPrintSig( PCCOR_SIGNATURE typePtr, // type to convert, - unsigned typeLen, // the lenght of 'typePtr' + unsigned typeLen, // the length of 'typePtr' const char* name, // can be "", the name of the method for this sig 0 means local var sig CQuickBytes *out, // where to put the pretty printed string IMDInternalImport *pIMDI, // ptr to IMDInternalImport class with ComSig diff --git a/src/coreclr/inc/log.h b/src/coreclr/inc/log.h index 57d716b5c81fd..cc61d9cee2bf5 100644 --- a/src/coreclr/inc/log.h +++ b/src/coreclr/inc/log.h @@ -26,12 +26,12 @@ enum { #define LL_EVERYTHING 10 -#define LL_INFO1000000 9 // can be expected to generate 1,000,000 logs per small but not trival run -#define LL_INFO100000 8 // can be expected to generate 100,000 logs per small but not trival run -#define LL_INFO10000 7 // can be expected to generate 10,000 logs per small but not trival run -#define LL_INFO1000 6 // can be expected to generate 1,000 logs per small but not trival run -#define LL_INFO100 5 // can be expected to generate 100 logs per small but not trival run -#define LL_INFO10 4 // can be expected to generate 10 logs per small but not trival run +#define LL_INFO1000000 9 // can be expected to generate 1,000,000 logs per small but not trivial run +#define LL_INFO100000 8 // can be expected to generate 100,000 logs per small but not trivial run +#define LL_INFO10000 7 // can be expected to generate 10,000 logs per small but not trivial run +#define LL_INFO1000 6 // can be expected to generate 1,000 logs per small but not trivial run +#define LL_INFO100 5 // can be expected to generate 100 logs per small but not trivial run +#define LL_INFO10 4 // can be expected to generate 10 logs per small but not trivial run #define LL_WARNING 3 #define LL_ERROR 2 #define LL_FATALERROR 1 diff --git a/src/coreclr/inc/metadata.h b/src/coreclr/inc/metadata.h index 4606f76aac1e5..766893bea17b8 100644 --- a/src/coreclr/inc/metadata.h +++ b/src/coreclr/inc/metadata.h @@ -166,7 +166,7 @@ struct HENUMInternal DWORD tkKind, // kind of token that we are iterating HENUMInternal **ppEnum); // return the created HENUMInternal - // Destory Enum. This will free the memory + // Destroy Enum. This will free the memory static void DestroyEnum( HENUMInternal *pmdEnum); diff --git a/src/coreclr/inc/profilepriv.h b/src/coreclr/inc/profilepriv.h index 4bd3801644002..ceceafad1edcf 100644 --- a/src/coreclr/inc/profilepriv.h +++ b/src/coreclr/inc/profilepriv.h @@ -106,7 +106,7 @@ class ProfilerInfo // **** IMPORTANT!! **** CurrentProfilerStatus curProfStatus; - + EventMask eventMask; Volatile inUse; @@ -130,7 +130,7 @@ enum class ProfilerCallbackType // cause another profiler to not be able to detach. We can't just check the event masks // before and after the call because it is legal for a profiler to change its event mask, // and then it would be possible for a profiler to permanently prevent itself from detaching. -// +// // WHEN IS EvacuationCounterHolder REQUIRED? // Answer: any time you access a ProfilerInfo *. There is a specific sequence that must be followed: // - Do a dirty read of the Profiler interface @@ -192,7 +192,7 @@ class ProfControlBlock // Now indicate we are accessing the profiler EvacuationCounterHolder evacuationCounter(pProfilerInfo); #endif // FEATURE_PROFAPI_ATTACH_DETACH - + if ((callbackType == ProfilerCallbackType::Active && IsProfilerPresent(pProfilerInfo)) || (callbackType == ProfilerCallbackType::ActiveOrInitializing && IsProfilerPresentOrInitializing(pProfilerInfo))) { @@ -205,7 +205,7 @@ class ProfControlBlock FORCEINLINE VOID IterateProfilers(ProfilerCallbackType callbackType, Func callback, Args... args) { DoOneProfilerIteration(&mainProfilerInfo, callbackType, callback, args...); - + if (notificationProfilerCount > 0) { for (SIZE_T i = 0; i < MAX_NOTIFICATION_PROFILERS; ++i) @@ -258,7 +258,7 @@ class ProfControlBlock #endif #ifdef _DEBUG - // Test-only, debug-only code to allow attaching profilers to call ICorProfilerInfo inteface, + // Test-only, debug-only code to allow attaching profilers to call ICorProfilerInfo interface, // which would otherwise be disallowed for attaching profilers BOOL fTestOnlyEnableICorProfilerInfo; #endif // _DEBUG @@ -308,7 +308,7 @@ class ProfControlBlock BOOL IsCallback5Supported(); BOOL RequiresGenericsContextForEnterLeave(); UINT_PTR EEFunctionIDMapper(FunctionID funcId, BOOL * pbHookFunction); - + void ThreadCreated(ThreadID threadID); void ThreadDestroyed(ThreadID threadID); void ThreadAssignedToOSThread(ThreadID managedThreadId, DWORD osThreadId); @@ -385,7 +385,7 @@ class ProfControlBlock void GarbageCollectionStarted(int cGenerations, BOOL generationCollected[], COR_PRF_GC_REASON reason); void GarbageCollectionFinished(); void GetAssemblyReferences(LPCWSTR wszAssemblyPath, IAssemblyBindingClosure *pClosure, AssemblyReferenceClosureWalkContextForProfAPI *pContext); - void EventPipeEventDelivered(EventPipeProvider *provider, DWORD eventId, DWORD eventVersion, ULONG cbMetadataBlob, LPCBYTE metadataBlob, ULONG cbEventData, + void EventPipeEventDelivered(EventPipeProvider *provider, DWORD eventId, DWORD eventVersion, ULONG cbMetadataBlob, LPCBYTE metadataBlob, ULONG cbEventData, LPCBYTE eventData, LPCGUID pActivityId, LPCGUID pRelatedActivityId, Thread *pEventThread, ULONG numStackFrames, UINT_PTR stackFrames[]); void EventPipeProviderCreated(EventPipeProvider *provider); }; diff --git a/src/coreclr/inc/readytorun.h b/src/coreclr/inc/readytorun.h index 4ba409d849952..ba36f7c555a33 100644 --- a/src/coreclr/inc/readytorun.h +++ b/src/coreclr/inc/readytorun.h @@ -166,7 +166,7 @@ enum ReadyToRunTypeLayoutFlags enum ReadyToRunVirtualFunctionOverrideFlags { READYTORUN_VIRTUAL_OVERRIDE_None = 0x00, - READYTORUN_VIRTUAL_OVERRIDE_VirtualFunctionOverriden = 0x01, + READYTORUN_VIRTUAL_OVERRIDE_VirtualFunctionOverridden = 0x01, }; enum class ReadyToRunCrossModuleInlineFlags : uint32_t diff --git a/src/coreclr/inc/safemath.h b/src/coreclr/inc/safemath.h index 12ec1c6973c0c..3f6d5c5716bdb 100644 --- a/src/coreclr/inc/safemath.h +++ b/src/coreclr/inc/safemath.h @@ -159,7 +159,7 @@ inline bool DoubleFitsInIntType(double val) // Modified to track an overflow bit instead of throwing exceptions. In most // cases the Visual C++ optimizer (Whidbey beta1 - v14.00.40607) is able to // optimize the bool away completely. -// Note that using a sentinal value (IntMax for example) to represent overflow +// Note that using a sentinel value (IntMax for example) to represent overflow // actually results in poorer code-gen. // // This has also been simplified significantly to remove functionality we diff --git a/src/coreclr/inc/shash.h b/src/coreclr/inc/shash.h index c00fc72c17e64..b22be8474225b 100644 --- a/src/coreclr/inc/shash.h +++ b/src/coreclr/inc/shash.h @@ -63,13 +63,13 @@ // (Note that the Null- and Deleted-related functions below // are not affected by this and must always be NOTHROW.) // -// static element_t Null() Return the Null sentinal value. May be inherited from +// static element_t Null() Return the Null sentinel value. May be inherited from // default traits if it can be assigned from 0. -// static element_t Deleted() Return the Deleted sentinal value. May be inherited from the +// static element_t Deleted() Return the Deleted sentinel value. May be inherited from the // default traits if it can be assigned from -1. -// static const bool IsNull(const ELEMENT &e) Compare element with Null sentinal value. May be inherited from +// static const bool IsNull(const ELEMENT &e) Compare element with Null sentinel value. May be inherited from // default traits if it can be assigned from 0. -// static const bool IsDeleted(const ELEMENT &e) Compare element with Deleted sentinal value. May be inherited from the +// static const bool IsDeleted(const ELEMENT &e) Compare element with Deleted sentinel value. May be inherited from the // default traits if it can be assigned from -1. // static bool ShouldDelete(const ELEMENT &e) Called in addition to IsDeleted() when s_supports_autoremove is true, see more // information there. diff --git a/src/coreclr/inc/sigparser.h b/src/coreclr/inc/sigparser.h index b9b79e951e40b..417660e2df4c2 100644 --- a/src/coreclr/inc/sigparser.h +++ b/src/coreclr/inc/sigparser.h @@ -488,7 +488,7 @@ class SigParser } //------------------------------------------------------------------------ - // Is this at the Sentinal (the ... in a varargs signature) that marks + // Is this at the Sentinel (the ... in a varargs signature) that marks // the beginning of varguments that are not decared at the target bool AtSentinel() const @@ -966,7 +966,7 @@ class CorTypeInfo // Returns the address of the payload inside the stackelem -inline void* StackElemEndianessFixup(void* pStackElem, UINT cbSize) { +inline void* StackElemEndiannessFixup(void* pStackElem, UINT cbSize) { LIMITED_METHOD_CONTRACT; BYTE *pRetVal = (BYTE*)pStackElem; diff --git a/src/coreclr/inc/sstring.h b/src/coreclr/inc/sstring.h index 32f61f088bf9e..f2eb2a2c771a0 100644 --- a/src/coreclr/inc/sstring.h +++ b/src/coreclr/inc/sstring.h @@ -317,7 +317,7 @@ class EMPTY_BASES_DECL SString : private SBuffer // // For CIterator & Iterator, we try our best to iterate the string without // modifying it. (Currently, we do require an ASCII or Unicode string - // for simple WCHAR retrival, but you could imagine being more flexible + // for simple WCHAR retrieval, but you could imagine being more flexible // going forward - perhaps even supporting iterating multibyte encodings // directly.) // @@ -356,7 +356,7 @@ class EMPTY_BASES_DECL SString : private SBuffer public: // Note these should supercede the Indexer versions - // since this class comes first in the inheritence list + // since this class comes first in the inheritance list WCHAR operator*() const; void operator->() const; WCHAR operator[](int index) const; diff --git a/src/coreclr/inc/sstring.inl b/src/coreclr/inc/sstring.inl index 27f87bd49373c..831eaf927962f 100644 --- a/src/coreclr/inc/sstring.inl +++ b/src/coreclr/inc/sstring.inl @@ -1836,7 +1836,7 @@ inline void SString::ConvertToFixed() const //----------------------------------------------------------------------------- // Convert the internal representation to be an iteratable one (current -// requirements here are that it be trivially convertable to unicode chars.) +// requirements here are that it be trivially convertible to unicode chars.) //----------------------------------------------------------------------------- inline void SString::ConvertToIteratable() const { diff --git a/src/coreclr/inc/utilcode.h b/src/coreclr/inc/utilcode.h index 8f65ae980430d..5caca73dbdc6f 100644 --- a/src/coreclr/inc/utilcode.h +++ b/src/coreclr/inc/utilcode.h @@ -1676,8 +1676,8 @@ template class CQuickSort if (iLeft >= iRight) return; - // ASSERT that we now have valid indicies. This is statically provable - // since this private function is only called with valid indicies, + // ASSERT that we now have valid indices. This is statically provable + // since this private function is only called with valid indices, // and iLeft and iRight only converge towards eachother. However, // PreFast can't detect this because it doesn't know about our callers. COMPILER_ASSUME(iLeft >= 0 && iLeft < m_iCount); @@ -2023,7 +2023,7 @@ class CHashTable //***************************************************************************** // Returns the first entry in the first hash bucket and inits the search // struct. Use the FindNextEntry function to continue walking the list. The -// return order is not gauranteed. +// return order is not guaranteed. //***************************************************************************** BYTE *FindFirstEntry( // First entry found, or 0. HASHFIND *psSrch) // Search object. @@ -2264,7 +2264,7 @@ class CHashTableAndData : public CHashTable // accessors here. So if you're not using these functions, don't start. // We can hopefully remove them. // Note that we can't just make RCThread a friend of this class (we tried - // originally) because the inheritence chain has a private modifier, + // originally) because the inheritance chain has a private modifier, // so DebuggerPatchTable::m_pcEntries is illegal. static SIZE_T helper_GetOffsetOfEntries() { @@ -4216,7 +4216,7 @@ template void DeleteExecutable(T *p) INDEBUG(BOOL DbgIsExecutable(LPVOID lpMem, SIZE_T length);) -BOOL ThreadWillCreateGuardPage(SIZE_T sizeReservedStack, SIZE_T sizeCommitedStack); +BOOL ThreadWillCreateGuardPage(SIZE_T sizeReservedStack, SIZE_T sizeCommittedStack); #ifdef FEATURE_COMINTEROP FORCEINLINE void HolderSysFreeString(BSTR str) { CONTRACT_VIOLATION(ThrowsViolation); SysFreeString(str); } diff --git a/src/coreclr/inc/xclrdata.idl b/src/coreclr/inc/xclrdata.idl index aeddf9529bee4..129e672a8a3c7 100644 --- a/src/coreclr/inc/xclrdata.idl +++ b/src/coreclr/inc/xclrdata.idl @@ -2177,7 +2177,7 @@ typedef enum } CLRDataExceptionSameFlag; #pragma warning(push) -#pragma warning(disable:28718) /* suppress warning 28718 for inteface IXCLRDataExceptionState */ +#pragma warning(disable:28718) /* suppress warning 28718 for interface IXCLRDataExceptionState */ [ object, local, diff --git a/src/coreclr/interop/comwrappers.cpp b/src/coreclr/interop/comwrappers.cpp index f07786e580c0c..ea8b8d7b59a7f 100644 --- a/src/coreclr/interop/comwrappers.cpp +++ b/src/coreclr/interop/comwrappers.cpp @@ -472,7 +472,7 @@ void ManagedObjectWrapper::Destroy(_In_ ManagedObjectWrapper* wrapper) // The destroy sentinel represents the bit that indicates the wrapper // should be destroyed. Since the reference count field (64-bit) holds - // two counters we rely on the singular sentinal value - no other bits + // two counters we rely on the singular sentinel value - no other bits // in the 64-bit counter are set. If there are outstanding bits set it // indicates there are still outstanding references. if (refCount == DestroySentinel) diff --git a/src/coreclr/interop/trackerobjectmanager.cpp b/src/coreclr/interop/trackerobjectmanager.cpp index 5214e6b8349d1..d4302054baedb 100644 --- a/src/coreclr/interop/trackerobjectmanager.cpp +++ b/src/coreclr/interop/trackerobjectmanager.cpp @@ -279,7 +279,7 @@ HRESULT TrackerObjectManager::OnIReferenceTrackerFound(_In_ IReferenceTracker* o // Attempt to set the tracker instance. if (InterlockedCompareExchangePointer((void**)&s_TrackerManager, trackerManager.p, nullptr) == nullptr) { - (void)trackerManager.Detach(); // Ownership has been transfered + (void)trackerManager.Detach(); // Ownership has been transferred RETURN_IF_FAILED(s_TrackerManager->SetReferenceTrackerHost(hostServices)); } diff --git a/src/coreclr/jit/bitset.h b/src/coreclr/jit/bitset.h index eb29a133e2992..f3b4842defb0d 100644 --- a/src/coreclr/jit/bitset.h +++ b/src/coreclr/jit/bitset.h @@ -102,7 +102,7 @@ FORCEINLINE unsigned BitSetSupport::CountBitsInIntegral(unsigned c) // initialization. We often want to reason about BitSets as immutable values, and just copying // the representation would introduce sharing in the indirect case, which is usually not what's // desired. On the other hand, there are many cases in which the RHS value has just been -// created functionally, and the intialization/assignment is obviously its last use. In these +// created functionally, and the initialization/assignment is obviously its last use. In these // cases, allocating a new indirect representation for the lhs (if it does not already have one) // would be unnecessary and wasteful. Thus, for assignment, we have a "normal" assignment // function, which makes a copy of the referent data structure in the indirect case, and an diff --git a/src/coreclr/jit/bitsetasuint64.h b/src/coreclr/jit/bitsetasuint64.h index f227d8ec8ecd4..27ebad72094c4 100644 --- a/src/coreclr/jit/bitsetasuint64.h +++ b/src/coreclr/jit/bitsetasuint64.h @@ -221,7 +221,7 @@ class BitSetOpsIsMultiRegNode()); genConsumeRegs(op1); - // Treat dst register as a homogenous vector with element size equal to the src size + // Treat dst register as a homogeneous vector with element size equal to the src size // Insert pieces in reverse order for (int i = regCount - 1; i >= 0; --i) { @@ -4475,7 +4475,7 @@ void CodeGen::genSIMDSplitReturn(GenTree* src, ReturnTypeDesc* retTypeDesc) assert(src->isUsedFromReg()); regNumber srcReg = src->GetRegNum(); - // Treat src register as a homogenous vector with element size equal to the reg size + // Treat src register as a homogeneous vector with element size equal to the reg size // Insert pieces in order unsigned regCount = retTypeDesc->GetReturnRegCount(); for (unsigned i = 0; i < regCount; ++i) diff --git a/src/coreclr/jit/codegencommon.cpp b/src/coreclr/jit/codegencommon.cpp index 9a4497597f7ae..b6880178f8679 100644 --- a/src/coreclr/jit/codegencommon.cpp +++ b/src/coreclr/jit/codegencommon.cpp @@ -562,7 +562,7 @@ void CodeGenInterface::genUpdateRegLife(const LclVarDsc* varDsc, bool isBorn, bo // There's some work to be done in several places in the JIT to // accurately track the registers that are getting killed by // helper calls: -// a) LSRA needs several changes to accomodate more precise killsets +// a) LSRA needs several changes to accommodate more precise killsets // for every helper call it sees (both explicitly [easy] and // implicitly [hard]) // b) Currently for AMD64, when we generate code for a helper call @@ -8945,7 +8945,7 @@ CodeGenInterface::VariableLiveKeeper* CodeGenInterface::getVariableLiveKeeper() //------------------------------------------------------------------------ // VariableLiveKeeper: Create an instance of the object in charge of managing -// VariableLiveRanges and intialize the array "m_vlrLiveDsc". +// VariableLiveRanges and initialize the array "m_vlrLiveDsc". // // Arguments: // totalLocalCount - the count of args, special args and IL Local diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index be9610aa3c3d7..f397d4bcd9e88 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -6570,7 +6570,7 @@ class Compiler struct CSEdsc { CSEdsc* csdNextInBucket; // used by the hash table - size_t csdHashKey; // the orginal hashkey + size_t csdHashKey; // the original hashkey ssize_t csdConstDefValue; // When we CSE similar constants, this is the value that we use as the def ValueNum csdConstDefVN; // When we CSE similar constants, this is the ValueNumber that we use for the LclVar // assignment @@ -6673,7 +6673,7 @@ class Compiler return TARGET_SIGN_BIT | (key >> CSE_CONST_SHARED_LOW_BITS); } - // returns the orginal key + // returns the original key static size_t Decode_Shared_Const_CSE_Value(size_t enckey) { assert(Is_Shared_Const_CSE(enckey)); @@ -8993,7 +8993,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #define DEFAULT_MIN_OPTS_LV_NUM_COUNT 2000 #define DEFAULT_MIN_OPTS_LV_REF_COUNT 8000 -// Maximun number of locals before turning off the inlining +// Maximum number of locals before turning off the inlining #define MAX_LV_NUM_COUNT_FOR_INLINING 512 bool compMinOpts; @@ -9200,7 +9200,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX bool compExpandCallsEarly; // True if we should expand virtual call targets early for this method -// Default numbers used to perform loop alignment. All the numbers are choosen +// Default numbers used to perform loop alignment. All the numbers are chosen // based on experimenting with various benchmarks. // Default minimum loop block weight required to enable loop alignment. @@ -10173,7 +10173,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX public: // Returns true if child is equal to or a subtype of parent for merge purposes - // This support is necessary to suport attributes that are not described in + // This support is necessary to support attributes that are not described in // for example, signatures. For example, the permanent home byref (byref that // points to the gc heap), isn't a property of method signatures, therefore, // it is safe to have mismatches here (that tiCompatibleWith will not flag), diff --git a/src/coreclr/jit/emitarm64.cpp b/src/coreclr/jit/emitarm64.cpp index 0e93db80e7210..831c8a558e515 100644 --- a/src/coreclr/jit/emitarm64.cpp +++ b/src/coreclr/jit/emitarm64.cpp @@ -12694,9 +12694,9 @@ void emitter::emitDispInsHelp( emitDispImm((ssize_t)id->idAddr()->iiaAddr, false); size_t targetHandle = id->idDebugOnlyInfo()->idMemCookie; - if (targetHandle == THT_IntializeArrayIntrinsics) + if (targetHandle == THT_InitializeArrayIntrinsics) { - targetName = "IntializeArrayIntrinsics"; + targetName = "InitializeArrayIntrinsics"; } else if (targetHandle == THT_GSCookieCheck) { diff --git a/src/coreclr/jit/emitloongarch64.cpp b/src/coreclr/jit/emitloongarch64.cpp index d2213845552a0..232c065729afe 100644 --- a/src/coreclr/jit/emitloongarch64.cpp +++ b/src/coreclr/jit/emitloongarch64.cpp @@ -1912,7 +1912,7 @@ void emitter::emitIns_R_R_R_R( * * Add an instruction with a register + static member operands. * Constant is stored into JIT data which is adjacent to code. - * For LOONGARCH64, maybe not the best, here just suports the func-interface. + * For LOONGARCH64, maybe not the best, here just supports the func-interface. * */ void emitter::emitIns_R_C( diff --git a/src/coreclr/jit/forwardsub.cpp b/src/coreclr/jit/forwardsub.cpp index 9a4bb27a245ec..f8e1b41b66bcb 100644 --- a/src/coreclr/jit/forwardsub.cpp +++ b/src/coreclr/jit/forwardsub.cpp @@ -64,7 +64,7 @@ // For profitability we first try and avoid code growth. We do this // by only substituting in cases where lcl has exactly one def and one use. // This info is computed for us but the RCS_Early ref counting done during -// the immediately preceeding fgMarkAddressExposedLocals phase. +// the immediately preceding fgMarkAddressExposedLocals phase. // // Because of this, once we've substituted "tree" we know that lcl is dead // and we can remove the assignment statement. diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index 2ea14e33ced95..99d80905bd0d5 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -8717,7 +8717,7 @@ GenTree* Compiler::gtCloneExpr( DONE: - copy->gtVNPair = tree->gtVNPair; // A cloned tree gets the orginal's Value number pair + copy->gtVNPair = tree->gtVNPair; // A cloned tree gets the original's Value number pair /* Compute the flags for the copied node. Note that we can do this only if we didnt gtFoldExpr(copy) */ diff --git a/src/coreclr/jit/gentree.h b/src/coreclr/jit/gentree.h index d572143ac4e08..bf8897a96c0c8 100644 --- a/src/coreclr/jit/gentree.h +++ b/src/coreclr/jit/gentree.h @@ -177,10 +177,10 @@ inline ExceptionSetFlags& operator&=(ExceptionSetFlags& a, ExceptionSetFlags b) */ enum TargetHandleType : BYTE { - THT_Unknown = 2, - THT_GSCookieCheck = 4, - THT_SetGSCookie = 6, - THT_IntializeArrayIntrinsics = 8 + THT_Unknown = 2, + THT_GSCookieCheck = 4, + THT_SetGSCookie = 6, + THT_InitializeArrayIntrinsics = 8 }; #endif /*****************************************************************************/ @@ -6761,7 +6761,7 @@ struct GenTreeAddrMode : public GenTreeOp // // So, for example: // 1. Base + Index is legal with Scale==1 - // 2. If Index is null, Scale should be zero (or unintialized / unused) + // 2. If Index is null, Scale should be zero (or uninitialized / unused) // 3. If Scale==1, then we should have "Base" instead of "Index*Scale", and "Base + Offset" instead of // "Index*Scale + Offset". diff --git a/src/coreclr/jit/gschecks.cpp b/src/coreclr/jit/gschecks.cpp index ced9e3cf97109..e0b489970246c 100644 --- a/src/coreclr/jit/gschecks.cpp +++ b/src/coreclr/jit/gschecks.cpp @@ -376,7 +376,7 @@ bool Compiler::gsFindVulnerableParams() void Compiler::gsParamsToShadows() { // Cache old count since we'll add new variables, and - // gsShadowVarInfo will not grow to accomodate the new ones. + // gsShadowVarInfo will not grow to accommodate the new ones. UINT lvaOldCount = lvaCount; // Create shadow copy for each param candidate diff --git a/src/coreclr/jit/importer.cpp b/src/coreclr/jit/importer.cpp index d5d5b64a439cc..48a500a785135 100644 --- a/src/coreclr/jit/importer.cpp +++ b/src/coreclr/jit/importer.cpp @@ -3474,7 +3474,7 @@ GenTree* Compiler::impInitializeArrayIntrinsic(CORINFO_SIG_INFO* sig) GenTree* src = gtNewIndOfIconHandleNode(TYP_STRUCT, (size_t)initData, GTF_ICON_CONST_PTR, true); #ifdef DEBUG - src->gtGetOp1()->AsIntCon()->gtTargetHandle = THT_IntializeArrayIntrinsics; + src->gtGetOp1()->AsIntCon()->gtTargetHandle = THT_InitializeArrayIntrinsics; #endif return gtNewBlkOpNode(dst, // dst @@ -3631,7 +3631,7 @@ GenTree* Compiler::impCreateSpanIntrinsic(CORINFO_SIG_INFO* sig) // Intrinsics are generally not recognized in minopts and debug codegen. // // However, certain traditional intrinsics are identifed as "must expand" -// if there is no fallback implmentation to invoke; these must be handled +// if there is no fallback implementation to invoke; these must be handled // in all codegen modes. // // New style intrinsics (where the fallback implementation is in IL) are @@ -11445,7 +11445,7 @@ void Compiler::impImportLeave(BasicBlock* block) #ifdef DEBUG if (verbose) { - printf("\nBefore import CEE_LEAVE in " FMT_BB " (targetting " FMT_BB "):\n", block->bbNum, + printf("\nBefore import CEE_LEAVE in " FMT_BB " (targeting " FMT_BB "):\n", block->bbNum, block->bbJumpDest->bbNum); fgDispBasicBlocks(); fgDispHandlerTab(); @@ -11912,7 +11912,7 @@ void Compiler::impResetLeaveBlock(BasicBlock* block, unsigned jmpAddr) // In the above nested try-finally example, we create a step block (call it Bstep) which in branches to a block // where a finally would branch to (and such block is marked as finally target). Block B1 branches to step block. // Because of re-import of B0, Bstep is also orphaned. Since Bstep is a finally target it cannot be removed. To - // work around this we will duplicate B0 (call it B0Dup) before reseting. B0Dup is marked as BBJ_CALLFINALLY and + // work around this we will duplicate B0 (call it B0Dup) before resetting. B0Dup is marked as BBJ_CALLFINALLY and // only serves to pair up with B1 (BBJ_ALWAYS) that got orphaned. Now during orphan block deletion B0Dup and B1 // will be treated as pair and handled correctly. if (block->bbJumpKind == BBJ_CALLFINALLY) @@ -15469,7 +15469,7 @@ void Compiler::impImportBlockCode(BasicBlock* block) // 3) Class Size can be determined beforehand (normal case) // In the first case, we need to call a NEWOBJ helper (multinewarray). // In the second case we call the constructor with a '0' this pointer. - // In the third case we alloc the memory, then call the constuctor. + // In the third case we alloc the memory, then call the constructor. clsFlags = callInfo.classFlags; if (clsFlags & CORINFO_FLG_ARRAY) @@ -18354,7 +18354,7 @@ void Compiler::impVerifyEHBlock(BasicBlock* block, bool isTryStart) if (HBtab->HasCatchHandler() || HBtab->HasFinallyHandler() || HBtab->HasFilter()) { BADCODE( - "The 'this' pointer of an instance constructor is not intialized upon entry to a try region"); + "The 'this' pointer of an instance constructor is not initialized upon entry to a try region"); } else { @@ -22357,7 +22357,7 @@ CORINFO_CLASS_HANDLE Compiler::impGetSpecialIntrinsicExactReturnType(CORINFO_MET CORINFO_CLASS_HANDLE result = nullptr; - // See what intrinisc we have... + // See what intrinsic we have... const NamedIntrinsic ni = lookupNamedIntrinsic(methodHnd); switch (ni) { diff --git a/src/coreclr/jit/inline.cpp b/src/coreclr/jit/inline.cpp index 9ab568357286b..2aa061cb29cda 100644 --- a/src/coreclr/jit/inline.cpp +++ b/src/coreclr/jit/inline.cpp @@ -230,7 +230,7 @@ bool InlDecisionIsFailure(InlineDecision d) } //------------------------------------------------------------------------ -// InlDecisionIsSuccess: check if this decision describes a sucessful inline +// InlDecisionIsSuccess: check if this decision describes a successful inline // // Arguments: // d - the decision in question @@ -814,7 +814,7 @@ void InlineResult::Report() } //------------------------------------------------------------------------ -// InlineStrategy construtor +// InlineStrategy constructor // // Arguments // compiler - root compiler instance diff --git a/src/coreclr/jit/inline.h b/src/coreclr/jit/inline.h index bd086b77175b4..1acc0c2df3df8 100644 --- a/src/coreclr/jit/inline.h +++ b/src/coreclr/jit/inline.h @@ -913,7 +913,7 @@ class InlineStrategy // Root context InlineContext* GetRootContext(); - // Context for the last sucessful inline + // Context for the last successful inline // (or root if no inlines) InlineContext* GetLastContext() const { diff --git a/src/coreclr/jit/jiteh.cpp b/src/coreclr/jit/jiteh.cpp index cccf9a72022e2..f0877dabf76eb 100644 --- a/src/coreclr/jit/jiteh.cpp +++ b/src/coreclr/jit/jiteh.cpp @@ -2382,7 +2382,7 @@ bool Compiler::fgNormalizeEHCase2() newTryStart->bbFlags |= BBF_BACKWARD_JUMP_TARGET; } - // Now we need to split any flow edges targetting the old try begin block between the old + // Now we need to split any flow edges targeting the old try begin block between the old // and new block. Note that if we are handling a multiply-nested 'try', we may have already // split the inner set. So we need to split again, from the most enclosing block that we've // already created, namely, insertBeforeBlk. diff --git a/src/coreclr/jit/jitexpandarray.h b/src/coreclr/jit/jitexpandarray.h index a81b1caeae625..d812f85854625 100644 --- a/src/coreclr/jit/jitexpandarray.h +++ b/src/coreclr/jit/jitexpandarray.h @@ -3,7 +3,7 @@ #pragma once -// An array of T that expands automatically (and never shrinks) to accomodate +// An array of T that expands automatically (and never shrinks) to accommodate // any index access. Elements added as a result of automatic expansion are // value-initialized (that is, they are assigned T()). template @@ -28,7 +28,7 @@ class JitExpandArray // Assumptions: // Assumes that the element array has aready been allocated // and that low and high are valid indices. The array is not - // expanded to accomodate invalid indices. + // expanded to accommodate invalid indices. // void InitializeRange(unsigned low, unsigned high) { diff --git a/src/coreclr/jit/lclvars.cpp b/src/coreclr/jit/lclvars.cpp index d0edfbda3bdc4..53aea41cabd68 100644 --- a/src/coreclr/jit/lclvars.cpp +++ b/src/coreclr/jit/lclvars.cpp @@ -709,9 +709,9 @@ void Compiler::lvaInitUserArgs(InitVarDscInfo* varDscInfo, unsigned skipArgs, un if (isHfaArg) { // We have an HFA argument, so from here on out treat the type as a float, double, or vector. - // The orginal struct type is available by using origArgType. + // The original struct type is available by using origArgType. // We also update the cSlots to be the number of float/double/vector fields in the HFA. - argType = hfaType; // TODO-Cleanup: remove this asignment and mark `argType` as const. + argType = hfaType; // TODO-Cleanup: remove this assignment and mark `argType` as const. varDsc->SetHfaType(hfaType); cSlots = varDsc->lvHfaSlots(); } @@ -5971,7 +5971,7 @@ void Compiler::lvaAssignVirtualFrameOffsetsToArgs() // individual argument, and return the offset for the next argument. // Note: This method only calculates the initial offset of the stack passed/spilled arguments // (if any - the RA might decide to spill(home on the stack) register passed arguments, if rarely used.) -// The final offset is calculated in lvaFixVirtualFrameOffsets method. It accounts for FP existance, +// The final offset is calculated in lvaFixVirtualFrameOffsets method. It accounts for FP existence, // ret address slot, stack frame padding, alloca instructions, etc. // Note: This is the implementation for UNIX_AMD64 System V platforms. // @@ -6064,7 +6064,7 @@ int Compiler::lvaAssignVirtualFrameOffsetToArg(unsigned lclNum, // individual argument, and return the offset for the next argument. // Note: This method only calculates the initial offset of the stack passed/spilled arguments // (if any - the RA might decide to spill(home on the stack) register passed arguments, if rarely used.) -// The final offset is calculated in lvaFixVirtualFrameOffsets method. It accounts for FP existance, +// The final offset is calculated in lvaFixVirtualFrameOffsets method. It accounts for FP existence, // ret address slot, stack frame padding, alloca instructions, etc. // Note: This implementation for all the platforms but UNIX_AMD64 OSs (System V 64 bit.) int Compiler::lvaAssignVirtualFrameOffsetToArg(unsigned lclNum, @@ -6604,7 +6604,7 @@ void Compiler::lvaAssignVirtualFrameOffsetsToLocals() int offset = originalFrameStkOffs + originalOffset; JITDUMP( - "---OSR--- V%02u (on tier0 frame, monitor aquired) tier0 FP-rel offset %d tier0 frame offset %d new " + "---OSR--- V%02u (on tier0 frame, monitor acquired) tier0 FP-rel offset %d tier0 frame offset %d new " "virt offset %d\n", lvaMonAcquired, originalOffset, originalFrameStkOffs, offset); diff --git a/src/coreclr/jit/liveness.cpp b/src/coreclr/jit/liveness.cpp index 17ebbed259066..58ebf8e590f3b 100644 --- a/src/coreclr/jit/liveness.cpp +++ b/src/coreclr/jit/liveness.cpp @@ -2331,7 +2331,7 @@ bool Compiler::fgRemoveDeadStore(GenTree** pTree, assert(asgNode->OperIs(GT_ASG)); - // We are now commited to removing the store. + // We are now committed to removing the store. *pStoreRemoved = true; // Check for side effects diff --git a/src/coreclr/jit/loopcloning.cpp b/src/coreclr/jit/loopcloning.cpp index c6373e4543005..b0027ad671710 100644 --- a/src/coreclr/jit/loopcloning.cpp +++ b/src/coreclr/jit/loopcloning.cpp @@ -1715,7 +1715,7 @@ bool Compiler::optIsLoopClonable(unsigned loopInd) } // Is the first block after the last block of the loop a handler or filter start? - // Usually, we create a dummy block after the orginal loop, to skip over the loop clone + // Usually, we create a dummy block after the original loop, to skip over the loop clone // and go to where the original loop did. That raises problems when we don't actually go to // that block; this is one of those cases. This could be fixed fairly easily; for example, // we could add a dummy nop block after the (cloned) loop bottom, in the same handler scope as the diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index be46793c0a7ac..d11758ff4fc8f 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -5248,7 +5248,7 @@ GenTree* Compiler::fgMorphField(GenTree* tree, MorphAddrContext* mac) // | // CNS(pIdAddr) // - // # Denotes the orginal node + // # Denotes the original node // void** pIdAddr = nullptr; unsigned IdValue = info.compCompHnd->getFieldThreadLocalStoreID(symHnd, (void**)&pIdAddr); @@ -8869,7 +8869,7 @@ GenTree* Compiler::fgMorphOneAsgBlockOp(GenTree* tree) { if (clsHnd == NO_CLASS_HANDLE) { - // A register-sized cpblk can be treated as an integer asignment. + // A register-sized cpblk can be treated as an integer assignment. asgType = TYP_I_IMPL; } else @@ -11293,7 +11293,7 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) if ((typ != TYP_STRUCT) && ((lclOffs + genTypeSize(typ)) <= lvaLclExactSize(lclNum))) { - // We will change the type of the node to match the orginal GT_IND type. + // We will change the type of the node to match the original GT_IND type. // temp->gtType = typ; diff --git a/src/coreclr/jit/morphblock.cpp b/src/coreclr/jit/morphblock.cpp index c1897c0d95afe..0346eeb2456ec 100644 --- a/src/coreclr/jit/morphblock.cpp +++ b/src/coreclr/jit/morphblock.cpp @@ -186,7 +186,7 @@ void MorphInitBlockHelper::PrepareDst() if (m_asg->TypeGet() != m_dst->TypeGet()) { assert(!m_initBlock && "the asg type should be final for an init block."); - JITDUMP("changing type of asignment from %-6s to %-6s\n", varTypeName(m_asg->TypeGet()), + JITDUMP("changing type of assignment from %-6s to %-6s\n", varTypeName(m_asg->TypeGet()), varTypeName(m_dst->TypeGet())); m_asg->ChangeType(m_dst->TypeGet()); @@ -761,7 +761,7 @@ void MorphCopyBlockHelper::PrepareSrc() } // TrySpecialCases: check special cases that require special transformations. -// The current special cases include asignments with calls in RHS. +// The current special cases include assignments with calls in RHS. // // Notes: // It could change multiReg flags or change m_dst node. @@ -1130,7 +1130,7 @@ void MorphCopyBlockHelper::MorphStructCases() } //------------------------------------------------------------------------ -// CopyFieldByField: transform the copy block to a field by field asignment. +// CopyFieldByField: transform the copy block to a field by field assignment. // // Notes: // We do it for promoted lclVars which fields can be enregistered. @@ -1282,7 +1282,7 @@ GenTree* MorphCopyBlockHelper::CopyFieldByField() { if (i == (fieldCnt - 1)) { - // Reuse the orginal "dstAddr" tree for the last field. + // Reuse the original "dstAddr" tree for the last field. dstAddrClone = dstAddr; } else @@ -1370,7 +1370,7 @@ GenTree* MorphCopyBlockHelper::CopyFieldByField() { if (i == (fieldCnt - 1)) { - // Reuse the orginal m_srcAddr tree for the last field. + // Reuse the original m_srcAddr tree for the last field. srcAddrClone = srcAddr; } else @@ -1478,7 +1478,7 @@ GenTree* MorphCopyBlockHelper::CopyFieldByField() // tree - a block copy (i.e. an assignment with a block op on the lhs). // // Return Value: -// We can return the orginal block copy unmodified (least desirable, but always correct) +// We can return the original block copy unmodified (least desirable, but always correct) // We can return a single assignment, when fgMorphOneAsgBlockOp transforms it (most desirable). // If we have performed struct promotion of the Source() or the Dest() then we will try to // perform a field by field assignment for each of the promoted struct fields. @@ -1492,7 +1492,7 @@ GenTree* MorphCopyBlockHelper::CopyFieldByField() // When performing a field by field assignment we can have one of Source() or Dest treated as a blob of bytes // and in such cases we will call lvaSetVarDoNotEnregister() on the one treated as a blob of bytes. // If the Source() or Dest() is a struct that has a "CustomLayout" and "ConstainsHoles" then we -// can not use a field by field assignment and must leave the orginal block copy unmodified. +// can not use a field by field assignment and must leave the original block copy unmodified. // GenTree* Compiler::fgMorphCopyBlock(GenTree* tree) { @@ -1511,7 +1511,7 @@ GenTree* Compiler::fgMorphCopyBlock(GenTree* tree) // perform a field by field assignment for each of the promoted struct fields. // This is not always possible (e.g. if the struct is address exposed). // -// Otherwise the orginal GT_ASG tree is returned unmodified, note that the +// Otherwise the original GT_ASG tree is returned unmodified, note that the // nodes can still be changed. // // Assumptions: diff --git a/src/coreclr/jit/optcse.cpp b/src/coreclr/jit/optcse.cpp index 8343a79612b94..71fbc717971e6 100644 --- a/src/coreclr/jit/optcse.cpp +++ b/src/coreclr/jit/optcse.cpp @@ -3285,7 +3285,7 @@ class CSE_Heuristic // cannot add any new exceptions } - cse->CopyReg(exp); // The cse inheirits any reg num property from the orginal exp node + cse->CopyReg(exp); // The cse inheirits any reg num property from the original exp node exp->ClearRegNum(); // The exp node (for a CSE def) no longer has a register requirement // Walk the statement 'stmt' and find the pointer diff --git a/src/coreclr/jit/optimizer.cpp b/src/coreclr/jit/optimizer.cpp index bb09aeb85561f..55cebdb5597bc 100644 --- a/src/coreclr/jit/optimizer.cpp +++ b/src/coreclr/jit/optimizer.cpp @@ -9898,7 +9898,7 @@ PhaseStatus Compiler::optOptimizeBools() typedef JitHashTable, unsigned> LclVarRefCounts; //------------------------------------------------------------------------------------------ -// optRemoveRedundantZeroInits: Remove redundant zero intializations. +// optRemoveRedundantZeroInits: Remove redundant zero initializations. // // Notes: // This phase iterates over basic blocks starting with the first basic block until there is no unique @@ -10122,7 +10122,7 @@ void Compiler::optRemoveRedundantZeroInits() (!GetInterruptible() && !hasGCSafePoint && !compMethodRequiresPInvokeFrame())) { // The local hasn't been used and won't be reported to the gc between - // the prolog and this explicit intialization. Therefore, it doesn't + // the prolog and this explicit initialization. Therefore, it doesn't // require zero initialization in the prolog. lclDsc->lvHasExplicitInit = 1; JITDUMP("Marking V%02u as having an explicit init\n", lclNum); diff --git a/src/coreclr/jit/phase.cpp b/src/coreclr/jit/phase.cpp index 5c28f0decf9a3..6aa55958de9e2 100644 --- a/src/coreclr/jit/phase.cpp +++ b/src/coreclr/jit/phase.cpp @@ -80,7 +80,7 @@ void Phase::PrePhase() // // In the long run the aim is to get rid of all pre-phase checks // and dumps, relying instead on post-phase checks and dumps from - // the preceeding phase. + // the preceding phase. // // Currently the list is just the set of phases that have custom // derivations from the Phase class. diff --git a/src/coreclr/jit/redundantbranchopts.cpp b/src/coreclr/jit/redundantbranchopts.cpp index 38911bc879540..19f3fb5e35c63 100644 --- a/src/coreclr/jit/redundantbranchopts.cpp +++ b/src/coreclr/jit/redundantbranchopts.cpp @@ -1129,7 +1129,7 @@ bool Compiler::optRedundantRelop(BasicBlock* const block) } // If prevTree has side effects, bail, - // unless it is in the immediately preceeding statement. + // unless it is in the immediately preceding statement. // // (we'll later show that any exception must come from the RHS as the LHS // will be a simple local). diff --git a/src/coreclr/jit/scopeinfo.cpp b/src/coreclr/jit/scopeinfo.cpp index b349d5e7aae64..44f585af89f31 100644 --- a/src/coreclr/jit/scopeinfo.cpp +++ b/src/coreclr/jit/scopeinfo.cpp @@ -306,7 +306,7 @@ void CodeGenInterface::siVarLoc::siFillStackVarLoc( // See lvaSetStruct for further detail. // // Now, the VM expects a special enum for these type of local vars: VLT_STK_BYREF - // to accomodate for this situation. + // to accommodate for this situation. if (varDsc->lvIsImplicitByRef) { assert(varDsc->lvIsParam); diff --git a/src/coreclr/jit/simd.cpp b/src/coreclr/jit/simd.cpp index f0fc16be21c67..1cd9583cfd7e8 100644 --- a/src/coreclr/jit/simd.cpp +++ b/src/coreclr/jit/simd.cpp @@ -1680,7 +1680,7 @@ bool Compiler::areArgumentsContiguous(GenTree* op1, GenTree* op2) } //-------------------------------------------------------------------------------------------------------- -// createAddressNodeForSIMDInit: Generate the address node if we want to intialize vector2, vector3 or vector4 +// createAddressNodeForSIMDInit: Generate the address node if we want to initialize vector2, vector3 or vector4 // from first argument's address. // // Arguments: @@ -1992,7 +1992,7 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, if (areArgsContiguous && simdBaseType == TYP_FLOAT) { // Since Vector2, Vector3 and Vector4's arguments type are only float, - // we intialize the vector from first argument address, only when + // we initialize the vector from first argument address, only when // the simdBaseType is TYP_FLOAT and the arguments are located contiguously in memory initFromFirstArgIndir = true; GenTree* op2Address = createAddressNodeForSIMDInit(nodeBuilder.GetOperand(0), size); diff --git a/src/coreclr/jit/target.h b/src/coreclr/jit/target.h index 3a96f4bf96e6a..c01ba5b476d66 100644 --- a/src/coreclr/jit/target.h +++ b/src/coreclr/jit/target.h @@ -706,7 +706,7 @@ C_ASSERT(sizeof(target_ssize_t) == TARGET_POINTER_SIZE); #if defined(TARGET_X86) // instrDescCns holds constant values for the emitter. The X86 compiler is unique in that it // may represent relocated pointer values with these constants. On the 64bit to 32 bit -// cross-targetting jit, the constant value must be represented as a 64bit value in order +// cross-targeting jit, the constant value must be represented as a 64bit value in order // to represent these pointers. typedef ssize_t cnsval_ssize_t; typedef size_t cnsval_size_t; diff --git a/src/coreclr/jit/valuenum.cpp b/src/coreclr/jit/valuenum.cpp index 21a5ad5290601..b203ea7b10784 100644 --- a/src/coreclr/jit/valuenum.cpp +++ b/src/coreclr/jit/valuenum.cpp @@ -1295,7 +1295,7 @@ bool ValueNumStore::VNPExcIsSubset(ValueNumPair vnpFullSet, ValueNumPair vnpCand // Return Values: - This method signature is void but returns two values using // the write back parameters. // -// Note: When 'vnWx' does not have an exception set, the orginal value is the +// Note: When 'vnWx' does not have an exception set, the original value is the // normal value and is written to 'pvn' and VNForEmptyExcSet() is // written to 'pvnx'. // When we have an exception set 'vnWx' will be a VN func with m_func @@ -1380,7 +1380,7 @@ ValueNumPair ValueNumStore::VNPUnionExcSet(ValueNumPair vnpWx, ValueNumPair vnpE // // Return Value: // - The Value Number for the expression without the exception set. -// This can be the orginal 'vn', when there are no exceptions. +// This can be the original 'vn', when there are no exceptions. // // Notes: - Whenever we have an exception set the Value Number will be // a VN func with VNF_ValWithExc. @@ -1510,7 +1510,7 @@ ValueNumPair ValueNumStore::VNPUniqueWithExc(var_types type, ValueNumPair vnpExc // // Return Value: // - The Value Number for the expression without the exception set. -// This can be the orginal 'vn', when there are no exceptions. +// This can be the original 'vn', when there are no exceptions. // // Notes: - Whenever we have an exception set the Value Number will be // a VN func with VNF_ValWithExc. diff --git a/src/coreclr/jit/valuenum.h b/src/coreclr/jit/valuenum.h index 819dc3764c792..83dc00067b436 100644 --- a/src/coreclr/jit/valuenum.h +++ b/src/coreclr/jit/valuenum.h @@ -140,7 +140,7 @@ // And similarly for the $SubjVal - we end up with a nice $Add($ObjVal, $SubjVal) feeding the return. // // While the above example focuses on fields, the idea is universal to all supported location types. Statics are -// modeled as straight indicies into the heap (MapSelect($Heap, $Field) returns the value of the field for them), +// modeled as straight indices into the heap (MapSelect($Heap, $Field) returns the value of the field for them), // arrays - like fields, but with the primiary selector being not the first field, but the "equivalence class" of // an array, i. e. the type of its elements, taking into account things like "int[]" being legally aliasable as // "uint[]". Physical maps are used to number local fields. @@ -513,7 +513,7 @@ class ValueNumStore bool VNCheckAscending(ValueNum item, ValueNum xs1); // Returns the VN representing the union of the two exception sets "xs0" and "xs1". - // These must be VNForEmtpyExcSet() or applications of VNF_ExcSetCons, obeying + // These must be VNForEmptyExcSet() or applications of VNF_ExcSetCons, obeying // the ascending order invariant. (which is preserved in the result) ValueNum VNExcSetUnion(ValueNum xs0, ValueNum xs1); diff --git a/src/coreclr/jit/varset.h b/src/coreclr/jit/varset.h index c4cba1b57797a..8ec025a8ff6a5 100644 --- a/src/coreclr/jit/varset.h +++ b/src/coreclr/jit/varset.h @@ -23,7 +23,7 @@ // reason about VARSET_TP as immutable values, and just copying the contents would // introduce sharing in the indirect case, which is usually not what's desired. On // the other hand, there are many cases in which the RHS value has just been -// created functionally, and the intialization/assignment is obviously its last +// created functionally, and the initialization/assignment is obviously its last // use. In these cases, allocating a new indirect representation for the lhs (if // it does not already have one) would be unnecessary and wasteful. Thus, for both // initialization and assignment, we have normal versions, which do make copies to diff --git a/src/coreclr/md/compiler/assemblymd.cpp b/src/coreclr/md/compiler/assemblymd.cpp index 5bc499d80fbbd..1282109db30ec 100644 --- a/src/coreclr/md/compiler/assemblymd.cpp +++ b/src/coreclr/md/compiler/assemblymd.cpp @@ -720,7 +720,7 @@ STDMETHODIMP RegMeta::FindAssembliesByName( // S_OK or error return hr; #else //!FEATURE_METADATA_IN_VM - // Calls to fusion are not suported outside VM + // Calls to fusion are not supported outside VM return E_NOTIMPL; #endif //!FEATURE_METADATA_IN_VM } // RegMeta::FindAssembliesByName diff --git a/src/coreclr/md/compiler/emit.cpp b/src/coreclr/md/compiler/emit.cpp index 8fbcdd106755d..1397eb2d29e84 100644 --- a/src/coreclr/md/compiler/emit.cpp +++ b/src/coreclr/md/compiler/emit.cpp @@ -417,7 +417,7 @@ STDMETHODIMP RegMeta::DefineTypeRefByName( // S_OK or error. // Create a reference, in an emit scope, to a TypeDef in another scope. //***************************************************************************** STDMETHODIMP RegMeta::DefineImportType( // S_OK or error. - IMetaDataAssemblyImport *pAssemImport, // [IN] Assemby containing the TypeDef. + IMetaDataAssemblyImport *pAssemImport, // [IN] Assembly containing the TypeDef. const void *pbHashValue, // [IN] Hash Blob for Assembly. ULONG cbHashValue, // [IN] Count of bytes. IMetaDataImport *pImport, // [IN] Scope containing the TypeDef. @@ -589,7 +589,7 @@ STDMETHODIMP RegMeta::DefineMemberRef( // S_OK or error // Create a MemberRef record based on a member in an import scope. //***************************************************************************** STDMETHODIMP RegMeta::DefineImportMember( // S_OK or error. - IMetaDataAssemblyImport *pAssemImport, // [IN] Assemby containing the Member. + IMetaDataAssemblyImport *pAssemImport, // [IN] Assembly containing the Member. const void *pbHashValue, // [IN] Hash Blob for Assembly. ULONG cbHashValue, // [IN] Count of bytes. IMetaDataImport *pImport, // [IN] Import scope, with member. diff --git a/src/coreclr/md/compiler/regmeta.h b/src/coreclr/md/compiler/regmeta.h index 83df906cf84f0..8a2ef8b438686 100644 --- a/src/coreclr/md/compiler/regmeta.h +++ b/src/coreclr/md/compiler/regmeta.h @@ -789,7 +789,7 @@ class RegMeta : mdTypeRef *ptr); // [OUT] Put TypeRef token here. STDMETHODIMP DefineImportType( // S_OK or error. - IMetaDataAssemblyImport *pAssemImport, // [IN] Assemby containing the TypeDef. + IMetaDataAssemblyImport *pAssemImport, // [IN] Assembly containing the TypeDef. const void *pbHashValue, // [IN] Hash Blob for Assembly. ULONG cbHashValue, // [IN] Count of bytes. IMetaDataImport *pImport, // [IN] Scope containing the TypeDef. @@ -805,7 +805,7 @@ class RegMeta : mdMemberRef *pmr); // [OUT] memberref token STDMETHODIMP DefineImportMember( // S_OK or error. - IMetaDataAssemblyImport *pAssemImport, // [IN] Assemby containing the Member. + IMetaDataAssemblyImport *pAssemImport, // [IN] Assembly containing the Member. const void *pbHashValue, // [IN] Hash Blob for Assembly. ULONG cbHashValue, // [IN] Count of bytes. IMetaDataImport *pImport, // [IN] Import scope, with member. diff --git a/src/coreclr/md/compiler/regmeta_emit.cpp b/src/coreclr/md/compiler/regmeta_emit.cpp index 2f4b00be2b2ab..df3634a7b1897 100644 --- a/src/coreclr/md/compiler/regmeta_emit.cpp +++ b/src/coreclr/md/compiler/regmeta_emit.cpp @@ -362,7 +362,7 @@ HRESULT RegMeta::UnmarkAll() IsTdNestedFamORAssem(pRec->GetFlags()) ) { // This nested class would potentially be visible outside, either - // directly or through inheritence. If the enclosing class is + // directly or through inheritance. If the enclosing class is // marked, this nested class must be marked. // IfFailGo(m_pStgdb->m_MiniMd.FindNestedClassHelper(TokenFromRid(i, mdtTypeDef), &ulEncloser)); @@ -920,7 +920,7 @@ HRESULT RegMeta::RefToDefOptimization() // Look for a member with the same def. Might not be found if it is // inherited from a base class. - //@future: this should support inheritence checking. + //@future: this should support inheritance checking. // Look for a member with the same name and signature. hr = ImportHelper::FindMember(pMiniMd, tkParent, szName, pvSig, cbSig, &mfdef); if (hr != S_OK) @@ -1141,7 +1141,7 @@ HRESULT RegMeta::_DefineMethodSemantics( // S_OK or error. // Turn the specified internal flags on. //******************************************************************************* HRESULT RegMeta::_TurnInternalFlagsOn( // S_OK or error. - mdToken tkObj, // [IN] Target object whose internal flags are targetted. + mdToken tkObj, // [IN] Target object whose internal flags are targeted. DWORD flags) // [IN] Specifies flags to be turned on. { HRESULT hr; diff --git a/src/coreclr/md/datablob.h b/src/coreclr/md/datablob.h index c972f0bac626a..e8d6cb97736b2 100644 --- a/src/coreclr/md/datablob.h +++ b/src/coreclr/md/datablob.h @@ -6,7 +6,7 @@ // // Class code:MetaData::DataBlob provides secure access to a block of memory from MetaData (i.e. with fixed -// endianess). +// endianness). // // ====================================================================================== diff --git a/src/coreclr/md/datablob.inl b/src/coreclr/md/datablob.inl index 72397eb374273..2eda1cbe86637 100644 --- a/src/coreclr/md/datablob.inl +++ b/src/coreclr/md/datablob.inl @@ -6,7 +6,7 @@ // // Class code:MetaData::DataBlob provides secure access to a block of memory from MetaData (i.e. with fixed -// endianess). +// endianness). // // ====================================================================================== diff --git a/src/coreclr/md/databuffer.h b/src/coreclr/md/databuffer.h index 972867393c8b1..ff4f90c7e47da 100644 --- a/src/coreclr/md/databuffer.h +++ b/src/coreclr/md/databuffer.h @@ -135,7 +135,7 @@ class DataBuffer // Skips the buffer to exact size (cbSize). // Returns FALSE if there's less than cbSize data represented. - // Returns TRUE otherwise and skips data at the beggining, so that the result has size cbSize. + // Returns TRUE otherwise and skips data at the beginning, so that the result has size cbSize. __checkReturn inline BOOL SkipToExactSize(UINT32 cbSize); diff --git a/src/coreclr/md/databuffer.inl b/src/coreclr/md/databuffer.inl index 252997d1ff855..dade2e6ef6b0b 100644 --- a/src/coreclr/md/databuffer.inl +++ b/src/coreclr/md/databuffer.inl @@ -238,7 +238,7 @@ DataBuffer::TruncateBySize(UINT32 cbSize) // // Skips the buffer to size (cbSize). // Returns FALSE if there's less than cbSize data represented. -// Returns TRUE otherwise and skips data at the beggining, so that the result has size cbSize. +// Returns TRUE otherwise and skips data at the beginning, so that the result has size cbSize. // __checkReturn inline diff --git a/src/coreclr/md/enc/metamodelrw.cpp b/src/coreclr/md/enc/metamodelrw.cpp index 21fa4e0409a16..582cf6785556c 100644 --- a/src/coreclr/md/enc/metamodelrw.cpp +++ b/src/coreclr/md/enc/metamodelrw.cpp @@ -3988,7 +3988,7 @@ CMiniMdRW::Impl_GetStringW( if (*szString == 0) { - // If emtpy string "", return pccBuffer 0 + // If empty string "", return pccBuffer 0 if ( szOut && cchBuffer ) szOut[0] = W('\0'); if ( pcchBuffer ) diff --git a/src/coreclr/md/runtime/metamodel.cpp b/src/coreclr/md/runtime/metamodel.cpp index b13ee6a736aaf..14654f7657b95 100644 --- a/src/coreclr/md/runtime/metamodel.cpp +++ b/src/coreclr/md/runtime/metamodel.cpp @@ -782,7 +782,7 @@ CMiniMdBase::InitColsForTable( // definition templates, only if the fixed field columns appear at the beginning // of a table record. // Initializing StartOffset and Length (4th and 5th columns of the portable PDB - // LocalScope table) can cause assertion to fail at this point, since preceeding + // LocalScope table) can cause assertion to fail at this point, since preceding // column sizes are determined dynamically (2 or 4 bytes for RIDs depending on the // number of records) and cannot be compared against the static template. #endif diff --git a/src/coreclr/md/runtime/metamodelro.cpp b/src/coreclr/md/runtime/metamodelro.cpp index 35b24af046dae..4d6dfaf05398e 100644 --- a/src/coreclr/md/runtime/metamodelro.cpp +++ b/src/coreclr/md/runtime/metamodelro.cpp @@ -116,7 +116,7 @@ CMiniMd::Impl_GetStringW( if (*szString == 0) { - // If emtpy string "", return pccBuffer 0 + // If empty string "", return pccBuffer 0 if ((szOut != NULL) && (cchBuffer != 0)) szOut[0] = W('\0'); if (pcchBuffer != NULL) diff --git a/src/coreclr/minipal/minipal.h b/src/coreclr/minipal/minipal.h index 39098f9bc1295..38ab07ec63c54 100644 --- a/src/coreclr/minipal/minipal.h +++ b/src/coreclr/minipal/minipal.h @@ -45,7 +45,7 @@ class VMToOSInterface // Committed range start static void* CommitDoubleMappedMemory(void* pStart, size_t size, bool isExecutable); - // Release a block of virtual memory previously commited by the CommitDoubleMappedMemory + // Release a block of virtual memory previously committed by the CommitDoubleMappedMemory // Parameters: // mapperHandle - handle of the double mapped memory mapper to use // pStart - start address of the virtual address range to release. It must be one diff --git a/src/coreclr/nativeaot/Runtime/DebugHeader.cpp b/src/coreclr/nativeaot/Runtime/DebugHeader.cpp index 7460ed2930379..ddd787b98f821 100644 --- a/src/coreclr/nativeaot/Runtime/DebugHeader.cpp +++ b/src/coreclr/nativeaot/Runtime/DebugHeader.cpp @@ -74,16 +74,16 @@ struct DotNetRuntimeDebugHeader const uint8_t Cookie[4] = { 0x44, 0x4E, 0x44, 0x48 }; // This counter can be incremented to indicate breaking changes - // This field must be encoded little endian, regardless of the typical endianess of + // This field must be encoded little endian, regardless of the typical endianness of // the machine const uint16_t MajorVersion = 1; // This counter can be incremented to indicate back-compatible changes - // This field must be encoded little endian, regardless of the typical endianess of + // This field must be encoded little endian, regardless of the typical endianness of // the machine const uint16_t MinorVersion = 0; - // These flags must be encoded little endian, regardless of the typical endianess of + // These flags must be encoded little endian, regardless of the typical endianness of // the machine. Ie Bit 0 is the least significant bit of the first byte. // Bit 0 - Set if the pointer size is 8 bytes, otherwise pointer size is 4 bytes // Bit 1 - Set if the machine is big endian @@ -95,9 +95,9 @@ struct DotNetRuntimeDebugHeader // follow but future usage will be considered a back-compatible change. const uint32_t ReservedPadding1 = 0; - // Header pointers below here are encoded using the defined pointer size and endianess + // Header pointers below here are encoded using the defined pointer size and endianness // specified in the Flags field. The data within the contracts they point to also uses - // the same pointer size and endianess encoding unless otherwise specified. + // the same pointer size and endianness encoding unless otherwise specified. // A pointer to an array describing important types and their offsets DebugTypeEntry (* volatile DebugTypeEntries)[DebugTypeEntriesArraySize] = nullptr; diff --git a/src/coreclr/nativeaot/Runtime/allocheap.cpp b/src/coreclr/nativeaot/Runtime/allocheap.cpp index 00fb40914d65b..2f76d4892c835 100644 --- a/src/coreclr/nativeaot/Runtime/allocheap.cpp +++ b/src/coreclr/nativeaot/Runtime/allocheap.cpp @@ -231,7 +231,7 @@ bool AllocHeap::_UpdateMemPtrs(uint8_t* pNextFree, uint8_t* pFreeCommitEnd, uint { #ifndef STRESS_MEMACCESSMGR // Create or update the alloc cache, used to speed up new allocations. - // If there is available commited memory and either m_pNextFree is + // If there is available committed memory and either m_pNextFree is // being updated past a page boundary or the current cache is empty, // then update the cache. if (ALIGN_DOWN(m_pNextFree, OS_PAGE_SIZE) != ALIGN_DOWN(pNextFree, OS_PAGE_SIZE) || diff --git a/src/coreclr/nativeaot/Runtime/eventtracebase.h b/src/coreclr/nativeaot/Runtime/eventtracebase.h index ebac235859313..ff7a67e2304ae 100644 --- a/src/coreclr/nativeaot/Runtime/eventtracebase.h +++ b/src/coreclr/nativeaot/Runtime/eventtracebase.h @@ -730,7 +730,7 @@ extern ETW::CEtwTracer * g_pEtwTracer; #define ETWLoaderDynamicLoad 1 // Dynamic assembly load #if defined(FEATURE_EVENT_TRACE) && !defined(FEATURE_PAL) && !defined(WINXP_AND_WIN2K3_BUILD_SUPPORT) -// "mc.exe -MOF" already generates this block for XP-suported builds inside ClrEtwAll.h; +// "mc.exe -MOF" already generates this block for XP-supported builds inside ClrEtwAll.h; // on Vista+ builds, mc is run without -MOF, and we still have code that depends on it, so // we manually place it here. FORCEINLINE @@ -977,7 +977,7 @@ namespace ETW // #if defined(FEATURE_EVENT_TRACE) && !defined(FEATURE_PAL) && !defined(WINXP_AND_WIN2K3_BUILD_SUPPORT) -// "mc.exe -MOF" already generates this block for XP-suported builds inside ClrEtwAll.h; +// "mc.exe -MOF" already generates this block for XP-supported builds inside ClrEtwAll.h; // on Vista+ builds, mc is run without -MOF, and we still have code that depends on it, so // we manually place it here. ETW_INLINE diff --git a/src/coreclr/nativeaot/Runtime/inc/daccess.h b/src/coreclr/nativeaot/Runtime/inc/daccess.h index 7d024bee480c0..a1eca9d8b6040 100644 --- a/src/coreclr/nativeaot/Runtime/inc/daccess.h +++ b/src/coreclr/nativeaot/Runtime/inc/daccess.h @@ -1803,7 +1803,7 @@ typedef DPTR(PTR_VOID) PTR_PTR_VOID; // const-correctness. However, if we wanted to support true void* / const void* // behavior, we could probably build the follow functionality by templating // __VoidPtr: -// * A PTR_VOID would be implicitly convertable to PTR_CVOID +// * A PTR_VOID would be implicitly convertible to PTR_CVOID // * An explicit coercion (ideally const_cast) would be required to convert a // PTR_CVOID to a PTR_VOID // * Similarily, an explicit coercion would be required to convert a cost PTR @@ -2217,7 +2217,7 @@ typedef void** PTR_PTR_VOID; // TADDR <- ?PTR(Src) - Get TADDR of PTR object (DPtr etc.) // TADDR <- Src * - Get TADDR of dac host object instance // -// Note that there is no direct convertion to other host-pointer types (because we don't +// Note that there is no direct conversion to other host-pointer types (because we don't // know if you want a DPTR or VPTR etc.). However, due to the implicit DAC conversions, // you can just use dac_cast and assign that to a Foo*. // diff --git a/src/coreclr/nativeaot/Runtime/inc/stressLog.h b/src/coreclr/nativeaot/Runtime/inc/stressLog.h index d3fd707201ba9..abc14c0d7012e 100644 --- a/src/coreclr/nativeaot/Runtime/inc/stressLog.h +++ b/src/coreclr/nativeaot/Runtime/inc/stressLog.h @@ -60,12 +60,12 @@ enum LogFacilitiesEnum: unsigned int { #define LL_EVERYTHING 10 -#define LL_INFO1000000 9 // can be expected to generate 1,000,000 logs per small but not trival run -#define LL_INFO100000 8 // can be expected to generate 100,000 logs per small but not trival run -#define LL_INFO10000 7 // can be expected to generate 10,000 logs per small but not trival run -#define LL_INFO1000 6 // can be expected to generate 1,000 logs per small but not trival run -#define LL_INFO100 5 // can be expected to generate 100 logs per small but not trival run -#define LL_INFO10 4 // can be expected to generate 10 logs per small but not trival run +#define LL_INFO1000000 9 // can be expected to generate 1,000,000 logs per small but not trivial run +#define LL_INFO100000 8 // can be expected to generate 100,000 logs per small but not trivial run +#define LL_INFO10000 7 // can be expected to generate 10,000 logs per small but not trivial run +#define LL_INFO1000 6 // can be expected to generate 1,000 logs per small but not trivial run +#define LL_INFO100 5 // can be expected to generate 100 logs per small but not trivial run +#define LL_INFO10 4 // can be expected to generate 10 logs per small but not trivial run #define LL_WARNING 3 #define LL_ERROR 2 #define LL_FATALERROR 1 @@ -98,8 +98,8 @@ enum LogFacilitiesEnum: unsigned int { /* STRESS_LOG_VA was added to allow sending GC trace output to the stress log. msg must be enclosed in ()'s and contain a format string followed by 0 to 12 arguments. The arguments must be numbers - or string literals. This was done because GC Trace uses dprintf which dosen't contain info on - how many arguments are getting passed in and using va_args would require parsing the format + or string literals. This was done because GC Trace uses dprintf which dosen't contain info on + how many arguments are getting passed in and using va_args would require parsing the format string during the GC */ #define _Args(...) __VA_ARGS__ diff --git a/src/coreclr/nativeaot/Runtime/thread.cpp b/src/coreclr/nativeaot/Runtime/thread.cpp index 3500e46f48a4e..72d6cd07a63de 100644 --- a/src/coreclr/nativeaot/Runtime/thread.cpp +++ b/src/coreclr/nativeaot/Runtime/thread.cpp @@ -97,9 +97,9 @@ void Thread::WaitForGC(PInvokeTransitionFrame* pTransitionFrame) // the non-zero m_pTransitionFrame value that we saw during suspend so that stackwalks can read this value // without concern of sometimes reading a 0, as would be the case if they read m_pTransitionFrame directly. // -// Returns true if it sucessfully cached the transition frame (i.e. the thread was in unmanaged). +// Returns true if it successfully cached the transition frame (i.e. the thread was in unmanaged). // Returns false otherwise. -// +// // WARNING: This method is called by suspension while one thread is interrupted // in a random location, possibly holding random locks. // It is unsafe to use blocking APIs or allocate in this method. diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Array.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Array.NativeAot.cs index 08725d5744774..32be763b15923 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Array.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Array.NativeAot.cs @@ -84,7 +84,7 @@ private static unsafe Array InternalCreate(RuntimeType elementType, int rank, in } else { - // Create a local copy of the lenghts that cannot be motified by the caller + // Create a local copy of the lengths that cannot be motified by the caller int* pImmutableLengths = stackalloc int[rank]; for (int i = 0; i < rank; i++) pImmutableLengths[i] = pLengths[i]; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs index fe269511e2726..b425fc7502c5d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs @@ -298,7 +298,7 @@ public static bool TryStartNoGCRegion(long totalSize) /// large object heap space is available. /// True if the disallowing of garbage collection was successful, False otherwise /// If the amount of memory requested - /// is too large for the GC to accomodate + /// is too large for the GC to accommodate /// If the GC is already in a NoGCRegion public static bool TryStartNoGCRegion(long totalSize, long lohSize) { @@ -314,7 +314,7 @@ public static bool TryStartNoGCRegion(long totalSize, long lohSize) /// is performed if the requested amount of memory is not available /// True if the disallowing of garbage collection was successful, False otherwise /// If the amount of memory requested - /// is too large for the GC to accomodate + /// is too large for the GC to accommodate /// If the GC is already in a NoGCRegion public static bool TryStartNoGCRegion(long totalSize, bool disallowFullBlockingGC) { @@ -332,7 +332,7 @@ public static bool TryStartNoGCRegion(long totalSize, bool disallowFullBlockingG /// is performed if the requested amount of memory is not available /// True if the disallowing of garbage collection was successful, False otherwise /// If the amount of memory requested - /// is too large for the GC to accomodate + /// is too large for the GC to accommodate /// If the GC is already in a NoGCRegion public static bool TryStartNoGCRegion(long totalSize, long lohSize, bool disallowFullBlockingGC) { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs index ff70df743ffd2..1a4f49a8b41b2 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs @@ -56,7 +56,7 @@ public bool Equals(RuntimeNamedTypeInfo? other) /// /// Override this function to read the Guid attribute from a type's metadata. If the attribute - /// is not present, or isn't parseable, return null. Should be overriden by metadata specific logic + /// is not present, or isn't parseable, return null. Should be overridden by metadata specific logic /// protected abstract Guid? ComputeGuidFromCustomAttributes(); diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.cs index 618cfaab23179..690b81c82bfd1 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.cs @@ -27,7 +27,7 @@ namespace System.Reflection.Runtime.TypeInfos // that apply only to generic parameters.) // // - Inverts the DeclaredMembers/DeclaredX relationship (DeclaredMembers is auto-implemented, others - // are overriden as abstract. This ordering makes more sense when reading from metadata.) + // are overridden as abstract. This ordering makes more sense when reading from metadata.) // // - Overrides many "NotImplemented" members in TypeInfo with abstracts so failure to implement // shows up as build error. @@ -356,7 +356,7 @@ public sealed override MemberTypes MemberType } // - // Left unsealed as there are so many subclasses. Need to be overriden by EcmaFormatRuntimeNamedTypeInfo and RuntimeConstructedGenericTypeInfo + // Left unsealed as there are so many subclasses. Need to be overridden by EcmaFormatRuntimeNamedTypeInfo and RuntimeConstructedGenericTypeInfo // public abstract override int MetadataToken { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeParsing/TypeLexer.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeParsing/TypeLexer.cs index 2dc289a7c2fa4..92a3b8a4c44af 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeParsing/TypeLexer.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeParsing/TypeLexer.cs @@ -204,7 +204,7 @@ private static TokenType CharToToken(char c) // // The desktop typename parser has a strange attitude towards whitespace. It throws away whitespace between punctuation tokens and whitespace - // preceeding identifiers or assembly names (and this cannot be escaped away). But whitespace between the end of an identifier + // preceding identifiers or assembly names (and this cannot be escaped away). But whitespace between the end of an identifier // and the punctuation that ends it is *not* ignored. // // In other words, GetType(" Foo") searches for "Foo" but GetType("Foo ") searches for "Foo ". diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/EETypeCreator.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/EETypeCreator.cs index d70d1bfb68332..7fad51688e5f6 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/EETypeCreator.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/EETypeCreator.cs @@ -449,9 +449,9 @@ private static void CreateEETypeWorker(MethodTable* pTemplateEEType, uint hashCo // The TestGCDescsForEquality helper will compare 2 GCDescs for equality, 4 bytes at a time (GCDesc contents treated as integers), and will read the // GCDesc data in *reverse* order for instance GCDescs (subtracts 4 from the pointer values at each iteration). - // - For the first GCDesc, we use (pEEType - 4) to point to the first 4-byte integer directly preceeding the MethodTable - // - For the second GCDesc, given that the state.NonUniversalInstanceGCDesc already points to the first byte preceeding the template MethodTable, we - // subtract 3 to point to the first 4-byte integer directly preceeding the template MethodTable + // - For the first GCDesc, we use (pEEType - 4) to point to the first 4-byte integer directly preceding the MethodTable + // - For the second GCDesc, given that the state.NonUniversalInstanceGCDesc already points to the first byte preceding the template MethodTable, we + // subtract 3 to point to the first 4-byte integer directly preceding the template MethodTable TestGCDescsForEquality(new IntPtr((byte*)pEEType - 4), state.NonUniversalInstanceGCDesc - 3, cbGCDesc, true); } #endif diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/GenericDictionaryCell.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/GenericDictionaryCell.cs index 5c6deafe47a28..7bc1e5785ef81 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/GenericDictionaryCell.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/GenericDictionaryCell.cs @@ -492,7 +492,7 @@ internal unsafe override void Prepare(TypeBuilder builder) // - Fully universal canonical. USG types always have a dictionary slot, so if the dynamically created type does not share // normal canonical code, we subtract 1 from the vtable offset (the dynamic type does not have a dictionary slot in that case) // - Exact non-canonical type. In that case, we do not need to make any changes to the vtable offset (the binder/ILCompiler - // would have written the correct vtable offset, taking in the account the existance or non-existance of a dictionary slot. + // would have written the correct vtable offset, taking in the account the existence or non-existence of a dictionary slot. // private void AdjustVtableSlot(TypeDesc currentType, TypeDesc currentTemplateType, ref int vtableSlot) { @@ -820,7 +820,7 @@ internal override unsafe IntPtr Create(TypeBuilder builder) { if (_exactFunctionPointer != IntPtr.Zero) { - // We are done... we don't need to create any unboxing stubs or calling convertion translation + // We are done... we don't need to create any unboxing stubs or calling conversion translation // thunks for exact non-shareable method instantiations return _exactFunctionPointer; } diff --git a/src/coreclr/pal/inc/rt/palrt.h b/src/coreclr/pal/inc/rt/palrt.h index 10808247710ac..06aa5e2759221 100644 --- a/src/coreclr/pal/inc/rt/palrt.h +++ b/src/coreclr/pal/inc/rt/palrt.h @@ -933,7 +933,7 @@ interface IMoniker; typedef VOID (WINAPI *LPOVERLAPPED_COMPLETION_ROUTINE)( DWORD dwErrorCode, - DWORD dwNumberOfBytesTransfered, + DWORD dwNumberOfBytesTransferred, LPOVERLAPPED lpOverlapped); // diff --git a/src/coreclr/pal/inc/rt/sal.h b/src/coreclr/pal/inc/rt/sal.h index ef976be402fdc..17273130fd812 100644 --- a/src/coreclr/pal/inc/rt/sal.h +++ b/src/coreclr/pal/inc/rt/sal.h @@ -838,7 +838,7 @@ enum __SAL_YesNo {_SAL_notpresent, _SAL_no, _SAL_maybe, _SAL_yes, _SAL_default}; // 'out' with buffer size -// e.g. void GetIndeces( _Out_cap_(cIndeces) int* rgIndeces, size_t cIndices ); +// e.g. void GetIndices( _Out_cap_(cIndices) int* rgIndices, size_t cIndices ); // buffer capacity is described by another parameter #define _Out_cap_(size) _SAL1_1_Source_(_Out_cap_, (size), _Pre_cap_(size) _Post_valid_impl_) #define _Out_opt_cap_(size) _SAL1_1_Source_(_Out_opt_cap_, (size), _Pre_opt_cap_(size) _Post_valid_impl_) @@ -921,7 +921,7 @@ enum __SAL_YesNo {_SAL_notpresent, _SAL_no, _SAL_maybe, _SAL_yes, _SAL_default}; // 'inout' buffers with initialized elements before and after the call -// e.g. void ModifyIndices( _Inout_count_(cIndices) int* rgIndeces, size_t cIndices ); +// e.g. void ModifyIndices( _Inout_count_(cIndices) int* rgIndices, size_t cIndices ); #define _Inout_count_(size) _SAL1_1_Source_(_Inout_count_, (size), _Prepost_count_(size)) #define _Inout_opt_count_(size) _SAL1_1_Source_(_Inout_opt_count_, (size), _Prepost_opt_count_(size)) #define _Inout_bytecount_(size) _SAL1_1_Source_(_Inout_bytecount_, (size), _Prepost_bytecount_(size)) @@ -933,7 +933,7 @@ enum __SAL_YesNo {_SAL_notpresent, _SAL_no, _SAL_maybe, _SAL_yes, _SAL_default}; #define _Inout_opt_bytecount_c_(size) _SAL1_1_Source_(_Inout_opt_bytecount_c_, (size), _Prepost_opt_bytecount_c_(size)) // nullterminated 'inout' buffers with initialized elements before and after the call -// e.g. void ModifyIndices( _Inout_count_(cIndices) int* rgIndeces, size_t cIndices ); +// e.g. void ModifyIndices( _Inout_count_(cIndices) int* rgIndices, size_t cIndices ); #define _Inout_z_count_(size) _SAL1_1_Source_(_Inout_z_count_, (size), _Prepost_z_ _Prepost_count_(size)) #define _Inout_opt_z_count_(size) _SAL1_1_Source_(_Inout_opt_z_count_, (size), _Prepost_z_ _Prepost_opt_count_(size)) #define _Inout_z_bytecount_(size) _SAL1_1_Source_(_Inout_z_bytecount_, (size), _Prepost_z_ _Prepost_bytecount_(size)) diff --git a/src/coreclr/pal/inc/rt/specstrings_strict.h b/src/coreclr/pal/inc/rt/specstrings_strict.h index 816ba80298ab5..4f36537c97718 100644 --- a/src/coreclr/pal/inc/rt/specstrings_strict.h +++ b/src/coreclr/pal/inc/rt/specstrings_strict.h @@ -1137,7 +1137,7 @@ /************************************************************************** * This should go away. It's only for __success which we should split into. -* __success and __typdecl_sucess +* __success and __typdecl_success ***************************************************************************/ #define __$allowed_on_function_or_typedecl /* empty */ #if (__SPECSTRINGS_STRICT_LEVEL == 1) || (__SPECSTRINGS_STRICT_LEVEL == 2) diff --git a/src/coreclr/pal/prebuilt/corerror/mscorurt.rc b/src/coreclr/pal/prebuilt/corerror/mscorurt.rc index ec20ad3a47af8..c4bcccc6e24a8 100644 --- a/src/coreclr/pal/prebuilt/corerror/mscorurt.rc +++ b/src/coreclr/pal/prebuilt/corerror/mscorurt.rc @@ -260,7 +260,7 @@ BEGIN MSG_FOR_URT_HR(CORDBG_E_ILLEGAL_IN_OPTIMIZED_CODE) "The operation failed because the thread is in optimized code." MSG_FOR_URT_HR(CORDBG_E_APPDOMAIN_MISMATCH) "A supplied object or type belongs to the wrong AppDomain." MSG_FOR_URT_HR(CORDBG_E_CONTEXT_UNVAILABLE) "The thread's context is not available." - MSG_FOR_URT_HR(CORDBG_E_UNCOMPATIBLE_PLATFORMS) "The operation failed because debuggee and debugger are on incompatible platforms." + MSG_FOR_URT_HR(CORDBG_E_INCOMPATIBLE_PLATFORMS) "The operation failed because debuggee and debugger are on incompatible platforms." MSG_FOR_URT_HR(CORDBG_E_DEBUGGING_DISABLED) "The operation failed because the debugging has been disabled" MSG_FOR_URT_HR(CORDBG_E_DETACH_FAILED_ON_ENC) "Detach is illegal after an Edit and Continue on a module." MSG_FOR_URT_HR(CORDBG_E_CURRENT_EXCEPTION_IS_OUTSIDE_CURRENT_EXECUTION_SCOPE) "Cannot intercept the current exception at the specified frame." diff --git a/src/coreclr/pal/prebuilt/inc/cordebug.h b/src/coreclr/pal/prebuilt/inc/cordebug.h index a868b7f2bfabf..2d71f01fe85fe 100644 --- a/src/coreclr/pal/prebuilt/inc/cordebug.h +++ b/src/coreclr/pal/prebuilt/inc/cordebug.h @@ -15644,12 +15644,12 @@ EXTERN_C const IID IID_ICorDebugArrayValue; /* [in] */ ULONG32 cdim, /* [length_is][size_is][out] */ ULONG32 dims[ ]) = 0; - virtual HRESULT STDMETHODCALLTYPE HasBaseIndicies( - /* [out] */ BOOL *pbHasBaseIndicies) = 0; + virtual HRESULT STDMETHODCALLTYPE HasBaseIndices( + /* [out] */ BOOL *pbHasBaseIndices) = 0; - virtual HRESULT STDMETHODCALLTYPE GetBaseIndicies( + virtual HRESULT STDMETHODCALLTYPE GetBaseIndices( /* [in] */ ULONG32 cdim, - /* [length_is][size_is][out] */ ULONG32 indicies[ ]) = 0; + /* [length_is][size_is][out] */ ULONG32 indices[ ]) = 0; virtual HRESULT STDMETHODCALLTYPE GetElement( /* [in] */ ULONG32 cdim, @@ -15722,14 +15722,14 @@ EXTERN_C const IID IID_ICorDebugArrayValue; /* [in] */ ULONG32 cdim, /* [length_is][size_is][out] */ ULONG32 dims[ ]); - HRESULT ( STDMETHODCALLTYPE *HasBaseIndicies )( + HRESULT ( STDMETHODCALLTYPE *HasBaseIndices )( ICorDebugArrayValue * This, - /* [out] */ BOOL *pbHasBaseIndicies); + /* [out] */ BOOL *pbHasBaseIndices); - HRESULT ( STDMETHODCALLTYPE *GetBaseIndicies )( + HRESULT ( STDMETHODCALLTYPE *GetBaseIndices )( ICorDebugArrayValue * This, /* [in] */ ULONG32 cdim, - /* [length_is][size_is][out] */ ULONG32 indicies[ ]); + /* [length_is][size_is][out] */ ULONG32 indices[ ]); HRESULT ( STDMETHODCALLTYPE *GetElement )( ICorDebugArrayValue * This, @@ -15797,11 +15797,11 @@ EXTERN_C const IID IID_ICorDebugArrayValue; #define ICorDebugArrayValue_GetDimensions(This,cdim,dims) \ ( (This)->lpVtbl -> GetDimensions(This,cdim,dims) ) -#define ICorDebugArrayValue_HasBaseIndicies(This,pbHasBaseIndicies) \ - ( (This)->lpVtbl -> HasBaseIndicies(This,pbHasBaseIndicies) ) +#define ICorDebugArrayValue_HasBaseIndices(This,pbHasBaseIndices) \ + ( (This)->lpVtbl -> HasBaseIndices(This,pbHasBaseIndices) ) -#define ICorDebugArrayValue_GetBaseIndicies(This,cdim,indicies) \ - ( (This)->lpVtbl -> GetBaseIndicies(This,cdim,indicies) ) +#define ICorDebugArrayValue_GetBaseIndices(This,cdim,indices) \ + ( (This)->lpVtbl -> GetBaseIndices(This,cdim,indices) ) #define ICorDebugArrayValue_GetElement(This,cdim,indices,ppValue) \ ( (This)->lpVtbl -> GetElement(This,cdim,indices,ppValue) ) diff --git a/src/coreclr/pal/prebuilt/inc/corerror.h b/src/coreclr/pal/prebuilt/inc/corerror.h index e1b0e5c36b2e7..2bfebe10feeb2 100644 --- a/src/coreclr/pal/prebuilt/inc/corerror.h +++ b/src/coreclr/pal/prebuilt/inc/corerror.h @@ -331,7 +331,7 @@ #define CORDBG_E_ILLEGAL_IN_OPTIMIZED_CODE EMAKEHR(0x1c26) #define CORDBG_E_APPDOMAIN_MISMATCH EMAKEHR(0x1c28) #define CORDBG_E_CONTEXT_UNVAILABLE EMAKEHR(0x1c29) -#define CORDBG_E_UNCOMPATIBLE_PLATFORMS EMAKEHR(0x1c30) +#define CORDBG_E_INCOMPATIBLE_PLATFORMS EMAKEHR(0x1c30) #define CORDBG_E_DEBUGGING_DISABLED EMAKEHR(0x1c31) #define CORDBG_E_DETACH_FAILED_ON_ENC EMAKEHR(0x1c32) #define CORDBG_E_CURRENT_EXCEPTION_IS_OUTSIDE_CURRENT_EXECUTION_SCOPE EMAKEHR(0x1c33) diff --git a/src/coreclr/pal/src/arch/amd64/exceptionhelper.S b/src/coreclr/pal/src/arch/amd64/exceptionhelper.S index 360b56e87c87f..1e61336bfd540 100644 --- a/src/coreclr/pal/src/arch/amd64/exceptionhelper.S +++ b/src/coreclr/pal/src/arch/amd64/exceptionhelper.S @@ -14,7 +14,7 @@ // EXTERN_C void ThrowExceptionFromContextInternal(CONTEXT* context, PAL_SEHException* ex); LEAF_ENTRY ThrowExceptionFromContextInternal, _TEXT #ifdef HAS_ASAN - // Need to call __asan_handle_no_return explicitly here because we re-intialize RSP before + // Need to call __asan_handle_no_return explicitly here because we re-initialize RSP before // throwing exception in ThrowExceptionHelper push_nonvol_reg rdi push_nonvol_reg rsi diff --git a/src/coreclr/pal/src/arch/arm/exceptionhelper.S b/src/coreclr/pal/src/arch/arm/exceptionhelper.S index a43ed14be7d98..18878894b0602 100644 --- a/src/coreclr/pal/src/arch/arm/exceptionhelper.S +++ b/src/coreclr/pal/src/arch/arm/exceptionhelper.S @@ -13,7 +13,7 @@ LEAF_ENTRY ThrowExceptionFromContextInternal, _TEXT // Ported from src/pal/src/arch/amd64/exceptionhelper.S #ifdef HAS_ASAN - // Need to call __asan_handle_no_return explicitly here because we re-intialize SP before + // Need to call __asan_handle_no_return explicitly here because we re-initialize SP before // throwing exception in ThrowExceptionHelper push_nonvol_reg "{r0, r1}" bl EXTERNAL_C_FUNC(__asan_handle_no_return) diff --git a/src/coreclr/pal/src/arch/arm64/exceptionhelper.S b/src/coreclr/pal/src/arch/arm64/exceptionhelper.S index c4cf523dcd194..7ad1ae4c58b26 100644 --- a/src/coreclr/pal/src/arch/arm64/exceptionhelper.S +++ b/src/coreclr/pal/src/arch/arm64/exceptionhelper.S @@ -12,7 +12,7 @@ // EXTERN_C void ThrowExceptionFromContextInternal(CONTEXT* context, PAL_SEHException* ex); LEAF_ENTRY ThrowExceptionFromContextInternal, _TEXT #ifdef HAS_ASAN - // Need to call __asan_handle_no_return explicitly here because we re-intialize SP before + // Need to call __asan_handle_no_return explicitly here because we re-initialize SP before // throwing exception in ThrowExceptionHelper stp x0, x1, [sp, -16]! bl EXTERNAL_C_FUNC(__asan_handle_no_return) diff --git a/src/coreclr/pal/src/arch/i386/exceptionhelper.S b/src/coreclr/pal/src/arch/i386/exceptionhelper.S index c41007e0b30ae..9bada09b2cfd3 100644 --- a/src/coreclr/pal/src/arch/i386/exceptionhelper.S +++ b/src/coreclr/pal/src/arch/i386/exceptionhelper.S @@ -18,7 +18,7 @@ LEAF_ENTRY ThrowExceptionFromContextInternal, _TEXT #ifdef HAS_ASAN - // Need to call __asan_handle_no_return explicitly here because we re-intialize ESP before + // Need to call __asan_handle_no_return explicitly here because we re-initialize ESP before // throwing exception in ThrowExceptionHelper call EXTERNAL_C_FUNC(__asan_handle_no_return) #endif diff --git a/src/coreclr/pal/src/include/pal/corunix.hpp b/src/coreclr/pal/src/include/pal/corunix.hpp index ce6bd079e959d..519325a1e066a 100644 --- a/src/coreclr/pal/src/include/pal/corunix.hpp +++ b/src/coreclr/pal/src/include/pal/corunix.hpp @@ -1102,7 +1102,7 @@ namespace CorUnix { WaitSucceeded, Alerted, - MutexAbondoned, + MutexAbandoned, WaitTimeout, WaitFailed }; diff --git a/src/coreclr/pal/src/include/pal/thread.hpp b/src/coreclr/pal/src/include/pal/thread.hpp index 601d6158d82b5..86850b260c930 100644 --- a/src/coreclr/pal/src/include/pal/thread.hpp +++ b/src/coreclr/pal/src/include/pal/thread.hpp @@ -243,7 +243,7 @@ namespace CorUnix // // The only other spot the refcount is touched is from within // CPalObjectBase::ReleaseReference -- incremented before the - // destructors for an ojbect are called, and decremented afterwords. + // destructors for an object are called, and decremented afterwords. // This permits the freeing of the thread structure to happen after // the freeing of the enclosing thread object has completed. // diff --git a/src/coreclr/pal/src/include/pal/virtual.h b/src/coreclr/pal/src/include/pal/virtual.h index 902e3f4fdd6f6..5eeb51f340092 100644 --- a/src/coreclr/pal/src/include/pal/virtual.h +++ b/src/coreclr/pal/src/include/pal/virtual.h @@ -224,7 +224,7 @@ class ExecutableMemoryAllocator Function : ReserveMemoryFromExecutableAllocator - This function is used to reserve a region of virual memory (not commited) + This function is used to reserve a region of virual memory (not committed) that is located close to the coreclr library. The memory comes from the virtual address range that is managed by ExecutableMemoryAllocator. --*/ diff --git a/src/coreclr/pal/src/locale/utf8.cpp b/src/coreclr/pal/src/locale/utf8.cpp index c0cf19dba5d7f..5ae2173aa73b6 100644 --- a/src/coreclr/pal/src/locale/utf8.cpp +++ b/src/coreclr/pal/src/locale/utf8.cpp @@ -247,7 +247,7 @@ class DecoderFallbackBuffer friend class UTF8Encoding; // Most implimentations will probably need an implimenation-specific constructor - // internal methods that cannot be overriden that let us do our fallback thing + // internal methods that cannot be overridden that let us do our fallback thing // These wrap the internal methods so that we can check for people doing stuff that's incorrect public: @@ -722,9 +722,9 @@ class EncoderReplacementFallback : public EncoderFallback class EncoderFallbackBuffer { friend class UTF8Encoding; - // Most implementations will probably need an implemenation-specific constructor + // Most implementations will probably need an implementation-specific constructor - // Public methods that cannot be overriden that let us do our fallback thing + // Public methods that cannot be overridden that let us do our fallback thing // These wrap the internal methods so that we can check for people doing stuff that is incorrect public: @@ -1912,7 +1912,7 @@ class UTF8Encoding goto LongCodeWithMask16; } - // Unfortunately, this is endianess sensitive + // Unfortunately, this is endianness sensitive #if BIGENDIAN *pTarget = (WCHAR)((ch >> 8) & 0x7F); pSrc += 2; @@ -1934,7 +1934,7 @@ class UTF8Encoding goto LongCodeWithMask32; } - // Unfortunately, this is endianess sensitive + // Unfortunately, this is endianness sensitive #if BIGENDIAN *pTarget = (WCHAR)((ch >> 24) & 0x7F); *(pTarget + 1) = (WCHAR)((ch >> 16) & 0x7F); @@ -2412,7 +2412,7 @@ class UTF8Encoding goto LongCodeWithMask; } - // Unfortunately, this is endianess sensitive + // Unfortunately, this is endianness sensitive #if BIGENDIAN *pTarget = (BYTE)(ch >> 16); *(pTarget + 1) = (BYTE)ch; diff --git a/src/coreclr/pal/src/map/virtual.cpp b/src/coreclr/pal/src/map/virtual.cpp index 8f4c87e67e4bf..edb0ead065372 100644 --- a/src/coreclr/pal/src/map/virtual.cpp +++ b/src/coreclr/pal/src/map/virtual.cpp @@ -2089,7 +2089,7 @@ size_t GetVirtualPageSize() Function : ReserveMemoryFromExecutableAllocator - This function is used to reserve a region of virual memory (not commited) + This function is used to reserve a region of virual memory (not committed) that is located close to the coreclr library. The memory comes from the virtual address range that is managed by ExecutableMemoryAllocator. --*/ diff --git a/src/coreclr/pal/src/misc/fmtmessage.cpp b/src/coreclr/pal/src/misc/fmtmessage.cpp index e9d87d19c4a08..44fc3b034dcf2 100644 --- a/src/coreclr/pal/src/misc/fmtmessage.cpp +++ b/src/coreclr/pal/src/misc/fmtmessage.cpp @@ -91,7 +91,7 @@ Function : FMTMSG__watoi Converts a wide string repersentation of an integer number - into a interger number. + into a integer number. Returns a integer number, or 0 on failure. 0 is not a valid number for FormatMessage inserts. diff --git a/src/coreclr/pal/src/objmgr/palobjbase.cpp b/src/coreclr/pal/src/objmgr/palobjbase.cpp index d81c04ebfd20b..dbfdf3b0c7156 100644 --- a/src/coreclr/pal/src/objmgr/palobjbase.cpp +++ b/src/coreclr/pal/src/objmgr/palobjbase.cpp @@ -67,7 +67,7 @@ CPalObjectBase::Initialize( { ERROR("Unable to allocate immutable data\n"); palError = ERROR_OUTOFMEMORY; - goto IntializeExit; + goto InitializeExit; } } @@ -77,7 +77,7 @@ CPalObjectBase::Initialize( if (NO_ERROR != palError) { ERROR("Unable to initialize local data lock!\n"); - goto IntializeExit; + goto InitializeExit; } m_pvLocalData = InternalMalloc(m_pot->GetProcessLocalDataSize()); @@ -89,7 +89,7 @@ CPalObjectBase::Initialize( { ERROR("Unable to allocate local data\n"); palError = ERROR_OUTOFMEMORY; - goto IntializeExit; + goto InitializeExit; } } @@ -98,7 +98,7 @@ CPalObjectBase::Initialize( palError = m_oa.sObjectName.CopyString(&poa->sObjectName); } -IntializeExit: +InitializeExit: LOGEXIT("CPalObjectBase::Initialize returns %d\n", palError); diff --git a/src/coreclr/pal/src/synchmgr/synchcontrollers.cpp b/src/coreclr/pal/src/synchmgr/synchcontrollers.cpp index e24105d281c40..3182f00b43b24 100644 --- a/src/coreclr/pal/src/synchmgr/synchcontrollers.cpp +++ b/src/coreclr/pal/src/synchmgr/synchcontrollers.cpp @@ -1250,7 +1250,7 @@ namespace CorUnix palErr = CPalSynchronizationManager::WakeUpLocalThread( pthrCurrent, ptwiWaitInfo->pthrOwner, - fAbandoned ? MutexAbondoned : WaitSucceeded, + fAbandoned ? MutexAbandoned : WaitSucceeded, dwObjIdx); if (NO_ERROR != palErr) @@ -1514,7 +1514,7 @@ namespace CorUnix palErr = CPalSynchronizationManager::WakeUpLocalThread( pthrCurrent, ptwiWaitInfo->pthrOwner, - fAbandoned ? MutexAbondoned : WaitSucceeded, + fAbandoned ? MutexAbandoned : WaitSucceeded, dwObjIdx); if (NO_ERROR != palErr) diff --git a/src/coreclr/pal/src/synchmgr/synchmanager.cpp b/src/coreclr/pal/src/synchmgr/synchmanager.cpp index 85d2e08c90f82..091e746a8170b 100644 --- a/src/coreclr/pal/src/synchmgr/synchmanager.cpp +++ b/src/coreclr/pal/src/synchmgr/synchmanager.cpp @@ -410,7 +410,7 @@ namespace CorUnix break; } case WaitSucceeded: - case MutexAbondoned: + case MutexAbandoned: *pdwSignaledObject = dwSigObjIdx; break; default: @@ -643,7 +643,7 @@ namespace CorUnix // if the thread is currently waiting/sleeping and it wakes up // before shutdown code manage to suspend it, it will be rerouted // to ThreadPrepareForShutdown (that will be done without holding - // any internal lock, in a way to accomodate shutdown time thread + // any internal lock, in a way to accommodate shutdown time thread // suspension). // At this time we also unregister the wait, so no dummy nodes are // left around on waiting objects. @@ -1836,7 +1836,7 @@ namespace CorUnix // resetting the data by acquiring the object ownership if (psdSynchData->IsAbandoned()) { - twrWakeUpReason = MutexAbondoned; + twrWakeUpReason = MutexAbandoned; } // Acquire ownership diff --git a/src/coreclr/pal/src/synchmgr/synchmanager.hpp b/src/coreclr/pal/src/synchmgr/synchmanager.hpp index e4adcb318a3f5..925b896e7e572 100644 --- a/src/coreclr/pal/src/synchmgr/synchmanager.hpp +++ b/src/coreclr/pal/src/synchmgr/synchmanager.hpp @@ -405,7 +405,7 @@ namespace CorUnix friend class CPalSynchronizationManager; // NB: For perforformance purposes this class is supposed - // to have no virtual methods, contructor and + // to have no virtual methods, constructor and // destructor public: enum ControllerType { WaitController, StateController }; diff --git a/src/coreclr/pal/src/synchmgr/wait.cpp b/src/coreclr/pal/src/synchmgr/wait.cpp index bce09fe91c795..d666d5101ba7a 100644 --- a/src/coreclr/pal/src/synchmgr/wait.cpp +++ b/src/coreclr/pal/src/synchmgr/wait.cpp @@ -655,7 +655,7 @@ DWORD CorUnix::InternalWaitForMultipleObjectsEx( case WaitSucceeded: dwRet = WAIT_OBJECT_0; // offset added later break; - case MutexAbondoned: + case MutexAbandoned: dwRet = WAIT_ABANDONED_0; // offset added later break; case WaitTimeout: @@ -874,8 +874,8 @@ DWORD CorUnix::InternalSleepEx ( _ASSERT_MSG(NO_ERROR == palErr, "Awakened for APC, but no APC is pending\n"); break; - case MutexAbondoned: - ASSERT("Thread %p awakened with reason=MutexAbondoned from a SleepEx\n", pThread); + case MutexAbandoned: + ASSERT("Thread %p awakened with reason=MutexAbandoned from a SleepEx\n", pThread); break; case WaitFailed: default: diff --git a/src/coreclr/pal/src/thread/process.cpp b/src/coreclr/pal/src/thread/process.cpp index 5ea320816b722..0a5b702f00d82 100644 --- a/src/coreclr/pal/src/thread/process.cpp +++ b/src/coreclr/pal/src/thread/process.cpp @@ -756,7 +756,7 @@ CorUnix::InternalCreateProcess( if (NO_ERROR != palError) { - ERROR("Unable to allocate object for new proccess\n"); + ERROR("Unable to allocate object for new process\n"); goto InternalCreateProcessExit; } diff --git a/src/coreclr/pal/tests/palsuite/c_runtime/_wcsnicmp/test1/test1.cpp b/src/coreclr/pal/tests/palsuite/c_runtime/_wcsnicmp/test1/test1.cpp index 0525266132735..4baa9476763f2 100644 --- a/src/coreclr/pal/tests/palsuite/c_runtime/_wcsnicmp/test1/test1.cpp +++ b/src/coreclr/pal/tests/palsuite/c_runtime/_wcsnicmp/test1/test1.cpp @@ -5,10 +5,10 @@ ** ** Source: test1.c ** -** Purpose: Take two wide strings and compare them, giving different lengths. +** Purpose: Take two wide strings and compare them, giving different lengths. ** Comparing str1 and str2 with str2 length, should return <0 ** Comparing str2 and str1 with str2 length, should return >0 -** Comparing str1 and str2 with str1 lenght, should return 0 +** Comparing str1 and str2 with str1 length, should return 0 ** Bring in str3, which has a capital, but this function is doing a lower ** case compare. Just ensure that two strings which differ only by capitals ** return 0. @@ -73,7 +73,7 @@ PALTEST(c_runtime__wcsnicmp_test1_paltest_wcsnicmp_test1, "c_runtime/_wcsnicmp/t } /* new testing */ - + /* str4 should be greater than str5 */ if (_wcsnicmp(str4, str5, wcslen(str4)) <= 0) { diff --git a/src/coreclr/pal/tests/palsuite/c_runtime/strtok/test1/test1.cpp b/src/coreclr/pal/tests/palsuite/c_runtime/strtok/test1/test1.cpp index b14222931ad3b..6eca5728abb4b 100644 --- a/src/coreclr/pal/tests/palsuite/c_runtime/strtok/test1/test1.cpp +++ b/src/coreclr/pal/tests/palsuite/c_runtime/strtok/test1/test1.cpp @@ -5,7 +5,7 @@ ** ** Source: test1.c ** -** Purpose: +** Purpose: ** Search for a number of tokens within strings. Check that the return values ** are what is expect, and also that the strings match up with our expected ** results. @@ -24,7 +24,7 @@ PALTEST(c_runtime_strtok_test1_paltest_strtok_test1, "c_runtime/strtok/test1/pal int len = strlen(str) + 1; char *ptr; - + if (PAL_Initialize(argc, argv)) { return FAIL; @@ -38,7 +38,7 @@ PALTEST(c_runtime_strtok_test1_paltest_strtok_test1, "c_runtime/strtok/test1/pal } if (memcmp(str, result1, len) != 0) { - Fail("strtok altered the string in an unexpeced way!\n"); + Fail("strtok altered the string in an unexpected way!\n"); } ptr = strtok(NULL, "r "); @@ -48,7 +48,7 @@ PALTEST(c_runtime_strtok_test1_paltest_strtok_test1, "c_runtime/strtok/test1/pal } if (memcmp(str, result2, len) != 0) { - Fail("strtok altered the string in an unexpeced way!\n"); + Fail("strtok altered the string in an unexpected way!\n"); } @@ -59,7 +59,7 @@ PALTEST(c_runtime_strtok_test1_paltest_strtok_test1, "c_runtime/strtok/test1/pal } if (memcmp(str, result2, len) != 0) { - Fail("strtok altered the string in an unexpeced way!\n"); + Fail("strtok altered the string in an unexpected way!\n"); } ptr = strtok(NULL, "X"); @@ -69,7 +69,7 @@ PALTEST(c_runtime_strtok_test1_paltest_strtok_test1, "c_runtime/strtok/test1/pal } if (memcmp(str, result2, len) != 0) { - Fail("strtok altered the string in an unexpeced way!\n"); + Fail("strtok altered the string in an unexpected way!\n"); } PAL_Terminate(); diff --git a/src/coreclr/pal/tests/palsuite/composite/threading/threadsuspension/threadsuspension.cpp b/src/coreclr/pal/tests/palsuite/composite/threading/threadsuspension/threadsuspension.cpp index ede0e4b7580ea..9e0492d72cd6c 100644 --- a/src/coreclr/pal/tests/palsuite/composite/threading/threadsuspension/threadsuspension.cpp +++ b/src/coreclr/pal/tests/palsuite/composite/threading/threadsuspension/threadsuspension.cpp @@ -5,32 +5,32 @@ ** ** Source: \composite\threading\threadsuspension\threadsuspension.c ** -** Purpose: To verify Thread Suspension Reegneering effort for this milestone +** Purpose: To verify Thread Suspension Reegneering effort for this milestone PsedoCode: Preparation: Create PROCESS_COUNT processes. Test: - Create Worker Thread + Create Worker Thread Start Reading and writing to a File - + Create Worker Thread - In an infinite loop do the following + In an infinite loop do the following Enter Critical Section Increment Counter - Leave Critical Section - + Leave Critical Section + Create Worker Thread Allocate Memory and Free Memory - + Create Worker Thread In a tight loop add numbers - + In a loop repeated REPEAT_COUNT times - Create Thread - + Create Thread + Suspend all worker threads Resume all worker threads @@ -47,20 +47,20 @@ Scenario: -** +** One thread suspends all remaining threads which are in the middle of doing some work and resume all threads Thread 1: Reading and Writing File Thread 2: Enter and Leave Critical Section Thread 3: Allocating chunks of memory Thread 4: Perform Unsafe Operation (printf, malloc) Thread 5: Suspends Thread 1 to Thread 4 and resumes them - + +** +** ** +** Dependencies: ** ** -** Dependencies: -** -** ** **=========================================================*/ @@ -87,7 +87,7 @@ HANDLE hThread[NUMBER_OF_WORKER_THREAD_TYPES][THREAD_MAX]; /*unsigned int g_readfileoperation; unsigned int g_enterleavecsoperation; -unsigned int g_allocatefreeoperation; +unsigned int g_allocatefreeoperation; unsigned int g_doworintightloop; */ @@ -100,7 +100,7 @@ struct statistics{ unsigned int processId; unsigned int operationsFailed; unsigned int operationsPassed; - unsigned int operationsTotal; + unsigned int operationsTotal; DWORD operationTime; unsigned int relationId; }; @@ -116,10 +116,10 @@ ResultBuffer *resultBuffer; /* Test Input Variables */ -unsigned int USE_PROCESS_COUNT = 0; //Identifies the Process number. There could potentially +unsigned int USE_PROCESS_COUNT = 0; //Identifies the Process number. There could potentially unsigned int WORKER_THREAD_MULTIPLIER_COUNT = 0; //In this test case this represents the number of worker thread instances unsigned int REPEAT_COUNT = 0; //Number of Suspend Resume operation of worker threads -unsigned int RELATION_ID = 0; +unsigned int RELATION_ID = 0; @@ -162,7 +162,7 @@ struct processStatistics processStats; struct statistics* tmpBuf = NULL; int statisticsSize = 0; -DWORD dwThreadId=0; +DWORD dwThreadId=0; HANDLE hMainThread; unsigned int i = 0; int j = 0; @@ -191,7 +191,7 @@ _snprintf(processFileName, MAX_PATH, "%d_process_threadsuspension_%d_.txt", USE_ hProcessFile = fopen(processFileName, "w+"); if(hProcessFile == NULL) - { + { Fail("Error in opening file to write process results for process [%d]\n", USE_PROCESS_COUNT); } @@ -203,13 +203,13 @@ processStats.relationId = RELATION_ID; //Start Process Time Capture dwStart = GetTickCount(); -//Setup for Thread Result Collection +//Setup for Thread Result Collection statisticsSize = sizeof(struct statistics); _snprintf(fileName, MAX_PATH, "%d_thread_threadsuspension_%d_.txt", USE_PROCESS_COUNT,RELATION_ID); hFile = fopen(fileName, "w+"); if(hFile == NULL) - { + { Fail("Error in opening file to write thread results for process [%d]\n", USE_PROCESS_COUNT); } @@ -218,9 +218,9 @@ if(hFile == NULL) resultBuffer = new ResultBuffer( 1, statisticsSize); /* -* Call the Setup Routine +* Call the Setup Routine */ -setup(); +setup(); Trace("WORKER_THREAD_MULTIPLIER_COUNT: %d \n", WORKER_THREAD_MULTIPLIER_COUNT); @@ -228,126 +228,126 @@ Trace("WORKER_THREAD_MULTIPLIER_COUNT: %d \n", WORKER_THREAD_MULTIPLIER_COUNT); for (i=0;igetResultBuffer(i); fprintf(hFile, "%d,%d,%d,%d,%lu,%d\n", buffer->processId, buffer->operationsFailed, buffer->operationsPassed, buffer->operationsTotal, buffer->operationTime, buffer->relationId ); } @@ -392,10 +392,10 @@ if (0!=fclose(hFile)) cleanup(); if (failFlag == TRUE) -{ +{ return FAIL; } -else +else { return PASS; } @@ -410,31 +410,31 @@ VOID setup(VOID) { /*Delete All Temporary Files Created by the previous execution of the test case*/ - HANDLE hSearch; - BOOL fFinished = FALSE; - WIN32_FIND_DATA FileData; + HANDLE hSearch; + BOOL fFinished = FALSE; + WIN32_FIND_DATA FileData; //Start searching for .tmp files in the current directory. - hSearch = FindFirstFile("*.tmp*", &FileData); - if (hSearch == INVALID_HANDLE_VALUE) - { - //No Files That Matched Criteria + hSearch = FindFirstFile("*.tmp*", &FileData); + if (hSearch == INVALID_HANDLE_VALUE) + { + //No Files That Matched Criteria fFinished = TRUE; } - //Delete all files that match the pattern - while (!fFinished) + //Delete all files that match the pattern + while (!fFinished) { if (!DeleteFile(FileData.cFileName)) { - Trace("Setup: Could not delete temporary file %s\n",FileData.cFileName ); - Fail ("GetLastError returned %d\n", GetLastError()); + Trace("Setup: Could not delete temporary file %s\n",FileData.cFileName ); + Fail ("GetLastError returned %d\n", GetLastError()); } - if (!FindNextFile(hSearch, &FileData)) + if (!FindNextFile(hSearch, &FileData)) { - if (GetLastError() == ERROR_NO_MORE_FILES) - { - fFinished = TRUE; + if (GetLastError() == ERROR_NO_MORE_FILES) + { + fFinished = TRUE; } else { @@ -442,14 +442,14 @@ setup(VOID) } } } - + // Close the search handle, only if HANDLE is Valid if (hSearch != INVALID_HANDLE_VALUE) { if (!FindClose(hSearch)) { - Trace("Setup: Could not close search handle \n"); - Fail ("GetLastError returned %d\n", GetLastError()); + Trace("Setup: Could not close search handle \n"); + Fail ("GetLastError returned %d\n", GetLastError()); } } @@ -470,12 +470,12 @@ setup(VOID) VOID cleanup(VOID) { - //DeleteCriticalSection(&g_csUniqueFileName); + //DeleteCriticalSection(&g_csUniqueFileName); PAL_Terminate(); } -VOID +VOID incrementCounter(VOID) { @@ -483,59 +483,59 @@ incrementCounter(VOID) { GLOBAL_COUNTER = 0; } - - GLOBAL_COUNTER++; + + GLOBAL_COUNTER++; } /* - * Worker Thread + * Worker Thread * Read File: Read from a file and write to a temporary file and then delete the temp file */ DWORD -PALAPI +PALAPI readfile( LPVOID lpParam ) { - // Declaring Local Variables + // Declaring Local Variables HANDLE hFile,hTempfile; - char buffer[BUFSIZE]; + char buffer[BUFSIZE]; DWORD dwBytesRead, dwBytesWritten, dwBufSize=BUFSIZE; DWORD dwWaitResult=0; char filename[MAX_PATH]; - //Wait for event to signal to start test + //Wait for event to signal to start test dwWaitResult = WaitForSingleObject(g_hEvent,INFINITE); if (WAIT_OBJECT_0 != dwWaitResult) { Fail ("readfile: Wait for Single Object (g_hEvent) failed. Failing test.\n" - "GetLastError returned %d\n", GetLastError()); + "GetLastError returned %d\n", GetLastError()); } - - + + /*Start Operation*/ - // Open the existing file. + // Open the existing file. while(TRUE) { - hFile = CreateFile("samplefile.dat", // file name - GENERIC_READ, // open for reading - FILE_SHARE_READ, // Share the file for read - NULL, // default security - OPEN_EXISTING, // existing file only - FILE_ATTRIBUTE_NORMAL, // normal file - NULL); // no template + hFile = CreateFile("samplefile.dat", // file name + GENERIC_READ, // open for reading + FILE_SHARE_READ, // Share the file for read + NULL, // default security + OPEN_EXISTING, // existing file only + FILE_ATTRIBUTE_NORMAL, // normal file + NULL); // no template - if (hFile == INVALID_HANDLE_VALUE) - { + if (hFile == INVALID_HANDLE_VALUE) + { Trace("Could not open file \n"); - Fail ( "GetLastError returned %d\n", GetLastError()); - } + Fail ( "GetLastError returned %d\n", GetLastError()); + } //Generate Unique File Name to Write //Enter CS EnterCriticalSection(&g_csUniqueFileName); - + //Increment Number and assign to local variable UNIQUE_FILE_NUMBER++; _snprintf(filename, MAX_PATH, "%d_%d_tempfile.tmp", USE_PROCESS_COUNT,UNIQUE_FILE_NUMBER); @@ -543,59 +543,59 @@ readfile( LPVOID lpParam ) //Leave CS LeaveCriticalSection(&g_csUniqueFileName); - - // Create a temporary file with name generate above - hTempfile = CreateFile(filename, // file name - GENERIC_WRITE, // open for read/write - 0, // do not share - NULL, // default security + + // Create a temporary file with name generate above + hTempfile = CreateFile(filename, // file name + GENERIC_WRITE, // open for read/write + 0, // do not share + NULL, // default security CREATE_ALWAYS, // overwrite existing file - FILE_ATTRIBUTE_NORMAL, // normal file - NULL); // no template + FILE_ATTRIBUTE_NORMAL, // normal file + NULL); // no template - if (hTempfile == INVALID_HANDLE_VALUE) - { - Trace("Could not create temporary file\n"); - Fail ( "GetLastError returned %d\n", GetLastError()); - } + if (hTempfile == INVALID_HANDLE_VALUE) + { + Trace("Could not create temporary file\n"); + Fail ( "GetLastError returned %d\n", GetLastError()); + } - // Read 4K blocks to the buffer. - // Change all characters in the buffer to upper case. - // Write the buffer to the temporary file. - - do + // Read 4K blocks to the buffer. + // Change all characters in the buffer to upper case. + // Write the buffer to the temporary file. + + do { - if (ReadFile(hFile, buffer, 4096, - &dwBytesRead, NULL)) - { - - WriteFile(hTempfile, buffer, dwBytesRead, - &dwBytesWritten, NULL); - } - } while (dwBytesRead == BUFSIZE); - - - - // Close both files. + if (ReadFile(hFile, buffer, 4096, + &dwBytesRead, NULL)) + { + + WriteFile(hTempfile, buffer, dwBytesRead, + &dwBytesWritten, NULL); + } + } while (dwBytesRead == BUFSIZE); + + + + // Close both files. if (0==CloseHandle(hFile)) { - Trace("Could not handle hFile\n"); - Fail ( "GetLastError returned %d\n", GetLastError()); + Trace("Could not handle hFile\n"); + Fail ( "GetLastError returned %d\n", GetLastError()); } if (0==CloseHandle(hTempfile)) { - Trace("Could not handle hTempFile\n"); - Fail ( "GetLastError returned %d\n", GetLastError()); + Trace("Could not handle hTempFile\n"); + Fail ( "GetLastError returned %d\n", GetLastError()); } //Delete the file that was created if (!DeleteFile(filename)) { - Trace("Could not delete temporary file %s\n", filename); - Fail ( "GetLastError returned %d\n", GetLastError()); - + Trace("Could not delete temporary file %s\n", filename); + Fail ( "GetLastError returned %d\n", GetLastError()); + } //g_readfileoperation++; @@ -611,42 +611,42 @@ readfile( LPVOID lpParam ) * Enter and Leave Nested Critical Sections */ DWORD -PALAPI +PALAPI enterandleave_cs( LPVOID lpParam ) { - + //Declare Local Variables - + CRITICAL_SECTION lcs; CRITICAL_SECTION lcsNested; DWORD dwWaitResult; - //Intialize Critical Section Structures + //Initialize Critical Section Structures InitializeCriticalSection ( &lcs); InitializeCriticalSection ( &lcsNested); - - //Wait for event to signal to start test + + //Wait for event to signal to start test dwWaitResult = WaitForSingleObject(g_hEvent,INFINITE); if (WAIT_OBJECT_0 != dwWaitResult) { Fail ("enterandleave_cs: Wait for Single Object (g_hEvent) failed. Failing test.\n" - "GetLastError returned %d\n", GetLastError()); + "GetLastError returned %d\n", GetLastError()); } - + //Trace("Critical Section Started\n"); - + while(TRUE) { EnterCriticalSection(&lcs); EnterCriticalSection(&lcsNested); - + incrementCounter(); LeaveCriticalSection(&lcsNested); - + LeaveCriticalSection(&lcs); //g_enterleavecsoperation++; } @@ -655,34 +655,34 @@ enterandleave_cs( LPVOID lpParam ) DeleteCriticalSection(&lcs); DeleteCriticalSection(&lcsNested); - - + + return 0; } -/* +/* * Allocate and Free Memory */ DWORD -PALAPI +PALAPI allocateandfree_memory( LPVOID lpParam ) { - + int i; char *textArrPtr[64]; DWORD dwWaitResult; - //Wait for event to signal to start test + //Wait for event to signal to start test dwWaitResult = WaitForSingleObject(g_hEvent,INFINITE); if (WAIT_OBJECT_0 != dwWaitResult) { Fail ("allocateandfree_memory: Wait for Single Object (g_hEvent) failed. Failing test.\n" - "GetLastError returned %d\n", GetLastError()); + "GetLastError returned %d\n", GetLastError()); } - - + + while(TRUE) { @@ -697,7 +697,7 @@ allocateandfree_memory( LPVOID lpParam ) testStatus = TEST_FAIL; } } - + for (i=0;i<64;i++) { free(textArrPtr[i]); @@ -705,31 +705,31 @@ allocateandfree_memory( LPVOID lpParam ) //g_allocatefreeoperation++; } - - - + + + return 0; } -/* +/* * Do work in a tight loop */ DWORD -PALAPI +PALAPI doworkintightloop_cs( LPVOID lpParam ) { - + unsigned int i; DWORD dwWaitResult; - - //Wait for event to signal to start test + + //Wait for event to signal to start test dwWaitResult = WaitForSingleObject(g_hEvent,INFINITE); if (WAIT_OBJECT_0 != dwWaitResult) { Fail ("doworkintightloop_cs: Wait for Single Object (g_hEvent) failed. Failing test.\n" - "GetLastError returned %d\n", GetLastError()); + "GetLastError returned %d\n", GetLastError()); } - + i= 0; while (TRUE) { @@ -744,14 +744,14 @@ doworkintightloop_cs( LPVOID lpParam ) } -/* +/* * Main Test Case worker thread which will suspend and resume all other worker threads */ DWORD -PALAPI +PALAPI suspendandresumethreads( LPVOID lpParam ) { - + unsigned int loopcount = REPEAT_COUNT; int Id=(int)lpParam; unsigned int i,j,k; @@ -761,7 +761,7 @@ suspendandresumethreads( LPVOID lpParam ) struct statistics stats; struct statistics* buffer; - + //Initialize the Statistics Structure stats.relationId = RELATION_ID; @@ -771,25 +771,25 @@ suspendandresumethreads( LPVOID lpParam ) stats.operationsTotal = 0; stats.operationTime = 0; - - - //Wait for event to signal to start test + + + //Wait for event to signal to start test WaitForSingleObject(g_hEvent,INFINITE); if (WAIT_OBJECT_0 != dwWaitResult) { Fail ("suspendandresumethreads: Wait for Single Object (g_hEvent) failed. Failing test.\n" - "GetLastError returned %d\n", GetLastError()); + "GetLastError returned %d\n", GetLastError()); } - - //Capture Start Import + + //Capture Start Import dwStart = GetTickCount(); for(i = 0; i < loopcount; i++) { failFlag = false; - + //Suspend Worker Threads for (k=0;kgetResultBuffer(Id); //Trace("\n%d,%d,%d,%lu\n", buffer->operationsFailed, buffer->operationsPassed, buffer->operationsTotal, buffer->operationTime ); - - + + return 0; } @@ -861,43 +861,43 @@ suspendandresumethreads( LPVOID lpParam ) int GetParameters( int argc, char **argv) { - if( (argc != 5) || ((argc == 1) && !strcmp(argv[1],"/?")) + if( (argc != 5) || ((argc == 1) && !strcmp(argv[1],"/?")) || !strcmp(argv[1],"/h") || !strcmp(argv[1],"/H")) { Trace("PAL -Composite Thread Suspension Test\n"); Trace("Usage:\n"); - Trace("\t[PROCESS_COUNT] Greater than or Equal to 1 \n"); - Trace("\t[WORKER_THREAD_MULTIPLIER_COUNT] Greater than or Equal to 1 and Less than or Equal to 64 \n"); + Trace("\t[PROCESS_COUNT] Greater than or Equal to 1 \n"); + Trace("\t[WORKER_THREAD_MULTIPLIER_COUNT] Greater than or Equal to 1 and Less than or Equal to 64 \n"); Trace("\t[REPEAT_COUNT] Greater than or Equal to 1\n"); - Trace("\t[RELATION_ID [greater than or Equal to 1]\n"); + Trace("\t[RELATION_ID [greater than or Equal to 1]\n"); return -1; } // Trace("Args 1 is [%s], Arg 2 is [%s], Arg 3 is [%s]\n", argv[1], argv[2], argv[3]); - + USE_PROCESS_COUNT = atoi(argv[1]); - if( USE_PROCESS_COUNT < 0) + if( USE_PROCESS_COUNT < 0) { Trace("\nPROCESS_COUNT to greater than or equal to 1\n"); return -1; } WORKER_THREAD_MULTIPLIER_COUNT = atoi(argv[2]); - if( WORKER_THREAD_MULTIPLIER_COUNT < 1 || WORKER_THREAD_MULTIPLIER_COUNT > 64) + if( WORKER_THREAD_MULTIPLIER_COUNT < 1 || WORKER_THREAD_MULTIPLIER_COUNT > 64) { Trace("\nWORKER_THREAD_MULTIPLIER_COUNT to be greater than or equal to 1 or less than or equal to 64\n"); return -1; } REPEAT_COUNT = atoi(argv[3]); - if( REPEAT_COUNT < 1) + if( REPEAT_COUNT < 1) { Trace("\nREPEAT_COUNT to greater than or equal to 1\n"); return -1; } RELATION_ID = atoi(argv[4]); - if( RELATION_ID < 1) + if( RELATION_ID < 1) { Trace("\nRELATION_ID to be greater than or equal to 1\n"); return -1; diff --git a/src/coreclr/pal/tests/palsuite/composite/threading/threadsuspension_switchthread/threadsuspension.cpp b/src/coreclr/pal/tests/palsuite/composite/threading/threadsuspension_switchthread/threadsuspension.cpp index 8ccf29d01f850..d1f11d304f5a9 100644 --- a/src/coreclr/pal/tests/palsuite/composite/threading/threadsuspension_switchthread/threadsuspension.cpp +++ b/src/coreclr/pal/tests/palsuite/composite/threading/threadsuspension_switchthread/threadsuspension.cpp @@ -5,32 +5,32 @@ ** ** Source: \composite\threading\threadsuspension\threadsuspension.c ** -** Purpose: To verify Thread Suspension Reegneering effort for this milestone +** Purpose: To verify Thread Suspension Reegneering effort for this milestone PsedoCode: Preparation: Create PROCESS_COUNT processes. Test: - Create Worker Thread + Create Worker Thread Start Reading and writing to a File - + Create Worker Thread - In an infinite loop do the following + In an infinite loop do the following Enter Critical Section Increment Counter - Leave Critical Section - + Leave Critical Section + Create Worker Thread Allocate Memory and Free Memory - + Create Worker Thread In a tight loop add numbers - + In a loop repeated REPEAT_COUNT times - Create Thread - + Create Thread + Suspend all worker threads Resume all worker threads @@ -47,20 +47,20 @@ Scenario: -** +** One thread suspends all remaining threads which are in the middle of doing some work and resume all threads Thread 1: Reading and Writing File Thread 2: Enter and Leave Critical Section Thread 3: Allocating chunks of memory Thread 4: Perform Unsafe Operation (printf, malloc) Thread 5: Suspends Thread 1 to Thread 4 and resumes them - + +** +** ** +** Dependencies: ** ** -** Dependencies: -** -** ** **=========================================================*/ @@ -87,7 +87,7 @@ HANDLE hThread[NUMBER_OF_WORKER_THREAD_TYPES][THREAD_MAX]; /*unsigned int g_readfileoperation; unsigned int g_enterleavecsoperation; -unsigned int g_allocatefreeoperation; +unsigned int g_allocatefreeoperation; unsigned int g_doworintightloop; */ @@ -100,7 +100,7 @@ struct statistics{ unsigned int processId; unsigned int operationsFailed; unsigned int operationsPassed; - unsigned int operationsTotal; + unsigned int operationsTotal; DWORD operationTime; unsigned int relationId; }; @@ -116,10 +116,10 @@ ResultBuffer *resultBuffer; /* Test Input Variables */ -unsigned int USE_PROCESS_COUNT = 0; //Identifies the Process number. There could potentially +unsigned int USE_PROCESS_COUNT = 0; //Identifies the Process number. There could potentially unsigned int WORKER_THREAD_MULTIPLIER_COUNT = 0; //In this test case this represents the number of worker thread instances unsigned int REPEAT_COUNT = 0; //Number of Suspend Resume operation of worker threads -unsigned int RELATION_ID = 0; +unsigned int RELATION_ID = 0; @@ -162,7 +162,7 @@ struct processStatistics processStats; struct statistics* tmpBuf = NULL; int statisticsSize = 0; -DWORD dwThreadId=0; +DWORD dwThreadId=0; HANDLE hMainThread; unsigned int i = 0; int j = 0; @@ -191,7 +191,7 @@ _snprintf(processFileName, MAX_PATH, "%d_process_threadsuspension_%d_.txt", USE_ hProcessFile = fopen(processFileName, "w+"); if(hProcessFile == NULL) - { + { Fail("Error in opening file to write process results for process [%d]\n", USE_PROCESS_COUNT); } @@ -203,13 +203,13 @@ processStats.relationId = RELATION_ID; //Start Process Time Capture dwStart = GetTickCount(); -//Setup for Thread Result Collection +//Setup for Thread Result Collection statisticsSize = sizeof(struct statistics); _snprintf(fileName, MAX_PATH, "%d_thread_threadsuspension_%d_.txt", USE_PROCESS_COUNT,RELATION_ID); hFile = fopen(fileName, "w+"); if(hFile == NULL) - { + { Fail("Error in opening file to write thread results for process [%d]\n", USE_PROCESS_COUNT); } @@ -218,9 +218,9 @@ if(hFile == NULL) resultBuffer = new ResultBuffer( 1, statisticsSize); /* -* Call the Setup Routine +* Call the Setup Routine */ -setup(); +setup(); Trace("WORKER_THREAD_MULTIPLIER_COUNT: %d \n", WORKER_THREAD_MULTIPLIER_COUNT); @@ -228,126 +228,126 @@ Trace("WORKER_THREAD_MULTIPLIER_COUNT: %d \n", WORKER_THREAD_MULTIPLIER_COUNT); for (i=0;igetResultBuffer(i); fprintf(hFile, "%d,%d,%d,%d,%lu,%d\n", buffer->processId, buffer->operationsFailed, buffer->operationsPassed, buffer->operationsTotal, buffer->operationTime, buffer->relationId ); } @@ -392,10 +392,10 @@ if (0!=fclose(hFile)) cleanup(); if (failFlag == TRUE) -{ +{ return FAIL; } -else +else { return PASS; } @@ -410,31 +410,31 @@ VOID setup(VOID) { /*Delete All Temporary Files Created by the previous execution of the test case*/ - HANDLE hSearch; - BOOL fFinished = FALSE; - WIN32_FIND_DATA FileData; + HANDLE hSearch; + BOOL fFinished = FALSE; + WIN32_FIND_DATA FileData; //Start searching for .tmp files in the current directory. - hSearch = FindFirstFile("*.tmp*", &FileData); - if (hSearch == INVALID_HANDLE_VALUE) - { - //No Files That Matched Criteria + hSearch = FindFirstFile("*.tmp*", &FileData); + if (hSearch == INVALID_HANDLE_VALUE) + { + //No Files That Matched Criteria fFinished = TRUE; } - //Delete all files that match the pattern - while (!fFinished) + //Delete all files that match the pattern + while (!fFinished) { if (!DeleteFile(FileData.cFileName)) { - Trace("Setup: Could not delete temporary file %s\n",FileData.cFileName ); - Fail ("GetLastError returned %d\n", GetLastError()); + Trace("Setup: Could not delete temporary file %s\n",FileData.cFileName ); + Fail ("GetLastError returned %d\n", GetLastError()); } - if (!FindNextFile(hSearch, &FileData)) + if (!FindNextFile(hSearch, &FileData)) { - if (GetLastError() == ERROR_NO_MORE_FILES) - { - fFinished = TRUE; + if (GetLastError() == ERROR_NO_MORE_FILES) + { + fFinished = TRUE; } else { @@ -442,14 +442,14 @@ setup(VOID) } } } - + // Close the search handle, only if HANDLE is Valid if (hSearch != INVALID_HANDLE_VALUE) { if (!FindClose(hSearch)) { - Trace("Setup: Could not close search handle \n"); - Fail ("GetLastError returned %d\n", GetLastError()); + Trace("Setup: Could not close search handle \n"); + Fail ("GetLastError returned %d\n", GetLastError()); } } @@ -470,12 +470,12 @@ setup(VOID) VOID cleanup(VOID) { - //DeleteCriticalSection(&g_csUniqueFileName); + //DeleteCriticalSection(&g_csUniqueFileName); PAL_Terminate(); } -VOID +VOID incrementCounter(VOID) { @@ -483,59 +483,59 @@ incrementCounter(VOID) { GLOBAL_COUNTER = 0; } - - GLOBAL_COUNTER++; + + GLOBAL_COUNTER++; } /* - * Worker Thread + * Worker Thread * Read File: Read from a file and write to a temporary file and then delete the temp file */ DWORD -PALAPI +PALAPI readfile( LPVOID lpParam ) { - // Declaring Local Variables + // Declaring Local Variables HANDLE hFile,hTempfile; - char buffer[BUFSIZE]; + char buffer[BUFSIZE]; DWORD dwBytesRead, dwBytesWritten, dwBufSize=BUFSIZE; DWORD dwWaitResult=0; char filename[MAX_PATH]; - //Wait for event to signal to start test + //Wait for event to signal to start test dwWaitResult = WaitForSingleObject(g_hEvent,INFINITE); if (WAIT_OBJECT_0 != dwWaitResult) { Fail ("readfile: Wait for Single Object (g_hEvent) failed. Failing test.\n" - "GetLastError returned %d\n", GetLastError()); + "GetLastError returned %d\n", GetLastError()); } - - + + /*Start Operation*/ - // Open the existing file. + // Open the existing file. while(TRUE) { - hFile = CreateFile("samplefile.dat", // file name - GENERIC_READ, // open for reading - FILE_SHARE_READ, // Share the file for read - NULL, // default security - OPEN_EXISTING, // existing file only - FILE_ATTRIBUTE_NORMAL, // normal file - NULL); // no template + hFile = CreateFile("samplefile.dat", // file name + GENERIC_READ, // open for reading + FILE_SHARE_READ, // Share the file for read + NULL, // default security + OPEN_EXISTING, // existing file only + FILE_ATTRIBUTE_NORMAL, // normal file + NULL); // no template - if (hFile == INVALID_HANDLE_VALUE) - { + if (hFile == INVALID_HANDLE_VALUE) + { Trace("Could not open file \n"); - Fail ( "GetLastError returned %d\n", GetLastError()); - } + Fail ( "GetLastError returned %d\n", GetLastError()); + } //Generate Unique File Name to Write //Enter CS EnterCriticalSection(&g_csUniqueFileName); - + //Increment Number and assign to local variable UNIQUE_FILE_NUMBER++; _snprintf(filename, MAX_PATH, "%d_%d_tempfile.tmp", USE_PROCESS_COUNT,UNIQUE_FILE_NUMBER); @@ -543,59 +543,59 @@ readfile( LPVOID lpParam ) //Leave CS LeaveCriticalSection(&g_csUniqueFileName); - - // Create a temporary file with name generate above - hTempfile = CreateFile(filename, // file name - GENERIC_WRITE, // open for read/write - 0, // do not share - NULL, // default security + + // Create a temporary file with name generate above + hTempfile = CreateFile(filename, // file name + GENERIC_WRITE, // open for read/write + 0, // do not share + NULL, // default security CREATE_ALWAYS, // overwrite existing file - FILE_ATTRIBUTE_NORMAL, // normal file - NULL); // no template + FILE_ATTRIBUTE_NORMAL, // normal file + NULL); // no template - if (hTempfile == INVALID_HANDLE_VALUE) - { - Trace("Could not create temporary file\n"); - Fail ( "GetLastError returned %d\n", GetLastError()); - } + if (hTempfile == INVALID_HANDLE_VALUE) + { + Trace("Could not create temporary file\n"); + Fail ( "GetLastError returned %d\n", GetLastError()); + } - // Read 4K blocks to the buffer. - // Change all characters in the buffer to upper case. - // Write the buffer to the temporary file. - - do + // Read 4K blocks to the buffer. + // Change all characters in the buffer to upper case. + // Write the buffer to the temporary file. + + do { - if (ReadFile(hFile, buffer, 4096, - &dwBytesRead, NULL)) - { - - WriteFile(hTempfile, buffer, dwBytesRead, - &dwBytesWritten, NULL); - } - } while (dwBytesRead == BUFSIZE); - - - - // Close both files. + if (ReadFile(hFile, buffer, 4096, + &dwBytesRead, NULL)) + { + + WriteFile(hTempfile, buffer, dwBytesRead, + &dwBytesWritten, NULL); + } + } while (dwBytesRead == BUFSIZE); + + + + // Close both files. if (0==CloseHandle(hFile)) { - Trace("Could not handle hFile\n"); - Fail ( "GetLastError returned %d\n", GetLastError()); + Trace("Could not handle hFile\n"); + Fail ( "GetLastError returned %d\n", GetLastError()); } if (0==CloseHandle(hTempfile)) { - Trace("Could not handle hTempFile\n"); - Fail ( "GetLastError returned %d\n", GetLastError()); + Trace("Could not handle hTempFile\n"); + Fail ( "GetLastError returned %d\n", GetLastError()); } //Delete the file that was created if (!DeleteFile(filename)) { - Trace("Could not delete temporary file %s\n", filename); - Fail ( "GetLastError returned %d\n", GetLastError()); - + Trace("Could not delete temporary file %s\n", filename); + Fail ( "GetLastError returned %d\n", GetLastError()); + } SwitchToThread(); @@ -612,42 +612,42 @@ readfile( LPVOID lpParam ) * Enter and Leave Nested Critical Sections */ DWORD -PALAPI +PALAPI enterandleave_cs( LPVOID lpParam ) { - + //Declare Local Variables - + CRITICAL_SECTION lcs; CRITICAL_SECTION lcsNested; DWORD dwWaitResult; - //Intialize Critical Section Structures + //Initialize Critical Section Structures InitializeCriticalSection ( &lcs); InitializeCriticalSection ( &lcsNested); - - //Wait for event to signal to start test + + //Wait for event to signal to start test dwWaitResult = WaitForSingleObject(g_hEvent,INFINITE); if (WAIT_OBJECT_0 != dwWaitResult) { Fail ("enterandleave_cs: Wait for Single Object (g_hEvent) failed. Failing test.\n" - "GetLastError returned %d\n", GetLastError()); + "GetLastError returned %d\n", GetLastError()); } - + //Trace("Critical Section Started\n"); - + while(TRUE) { EnterCriticalSection(&lcs); EnterCriticalSection(&lcsNested); - + incrementCounter(); LeaveCriticalSection(&lcsNested); - + LeaveCriticalSection(&lcs); SwitchToThread(); @@ -658,34 +658,34 @@ enterandleave_cs( LPVOID lpParam ) DeleteCriticalSection(&lcs); DeleteCriticalSection(&lcsNested); - - + + return 0; } -/* +/* * Allocate and Free Memory */ DWORD -PALAPI +PALAPI allocateandfree_memory( LPVOID lpParam ) { - + int i; char *textArrPtr[64]; DWORD dwWaitResult; - //Wait for event to signal to start test + //Wait for event to signal to start test dwWaitResult = WaitForSingleObject(g_hEvent,INFINITE); if (WAIT_OBJECT_0 != dwWaitResult) { Fail ("allocateandfree_memory: Wait for Single Object (g_hEvent) failed. Failing test.\n" - "GetLastError returned %d\n", GetLastError()); + "GetLastError returned %d\n", GetLastError()); } - - + + while(TRUE) { @@ -700,7 +700,7 @@ allocateandfree_memory( LPVOID lpParam ) testStatus = TEST_FAIL; } } - + for (i=0;i<64;i++) { free(textArrPtr[i]); @@ -710,31 +710,31 @@ allocateandfree_memory( LPVOID lpParam ) //g_allocatefreeoperation++; } - - - + + + return 0; } -/* +/* * Do work in a tight loop */ DWORD -PALAPI +PALAPI doworkintightloop_cs( LPVOID lpParam ) { - + unsigned int i; DWORD dwWaitResult; - - //Wait for event to signal to start test + + //Wait for event to signal to start test dwWaitResult = WaitForSingleObject(g_hEvent,INFINITE); if (WAIT_OBJECT_0 != dwWaitResult) { Fail ("doworkintightloop_cs: Wait for Single Object (g_hEvent) failed. Failing test.\n" - "GetLastError returned %d\n", GetLastError()); + "GetLastError returned %d\n", GetLastError()); } - + i= 0; while (TRUE) { @@ -751,14 +751,14 @@ doworkintightloop_cs( LPVOID lpParam ) } -/* +/* * Main Test Case worker thread which will suspend and resume all other worker threads */ DWORD -PALAPI +PALAPI suspendandresumethreads( LPVOID lpParam ) { - + unsigned int loopcount = REPEAT_COUNT; int Id=(int)lpParam; unsigned int i,j,k; @@ -768,7 +768,7 @@ suspendandresumethreads( LPVOID lpParam ) struct statistics stats; struct statistics* buffer; - + //Initialize the Statistics Structure stats.relationId = RELATION_ID; @@ -778,25 +778,25 @@ suspendandresumethreads( LPVOID lpParam ) stats.operationsTotal = 0; stats.operationTime = 0; - - - //Wait for event to signal to start test + + + //Wait for event to signal to start test WaitForSingleObject(g_hEvent,INFINITE); if (WAIT_OBJECT_0 != dwWaitResult) { Fail ("suspendandresumethreads: Wait for Single Object (g_hEvent) failed. Failing test.\n" - "GetLastError returned %d\n", GetLastError()); + "GetLastError returned %d\n", GetLastError()); } - - //Capture Start Import + + //Capture Start Import dwStart = GetTickCount(); for(i = 0; i < loopcount; i++) { failFlag = false; - + //Suspend Worker Threads for (k=0;kgetResultBuffer(Id); //Trace("\n%d,%d,%d,%lu\n", buffer->operationsFailed, buffer->operationsPassed, buffer->operationsTotal, buffer->operationTime ); - - + + return 0; } @@ -868,43 +868,43 @@ suspendandresumethreads( LPVOID lpParam ) int GetParameters( int argc, char **argv) { - if( (argc != 5) || ((argc == 1) && !strcmp(argv[1],"/?")) + if( (argc != 5) || ((argc == 1) && !strcmp(argv[1],"/?")) || !strcmp(argv[1],"/h") || !strcmp(argv[1],"/H")) { Trace("PAL -Composite Thread Suspension Test\n"); Trace("Usage:\n"); - Trace("\t[PROCESS_COUNT] Greater than or Equal to 1 \n"); - Trace("\t[WORKER_THREAD_MULTIPLIER_COUNT] Greater than or Equal to 1 and Less than or Equal to 64 \n"); + Trace("\t[PROCESS_COUNT] Greater than or Equal to 1 \n"); + Trace("\t[WORKER_THREAD_MULTIPLIER_COUNT] Greater than or Equal to 1 and Less than or Equal to 64 \n"); Trace("\t[REPEAT_COUNT] Greater than or Equal to 1\n"); - Trace("\t[RELATION_ID [greater than or Equal to 1]\n"); + Trace("\t[RELATION_ID [greater than or Equal to 1]\n"); return -1; } // Trace("Args 1 is [%s], Arg 2 is [%s], Arg 3 is [%s]\n", argv[1], argv[2], argv[3]); - + USE_PROCESS_COUNT = atoi(argv[1]); - if( USE_PROCESS_COUNT < 0) + if( USE_PROCESS_COUNT < 0) { Trace("\nPROCESS_COUNT to greater than or equal to 1\n"); return -1; } WORKER_THREAD_MULTIPLIER_COUNT = atoi(argv[2]); - if( WORKER_THREAD_MULTIPLIER_COUNT < 1 || WORKER_THREAD_MULTIPLIER_COUNT > 64) + if( WORKER_THREAD_MULTIPLIER_COUNT < 1 || WORKER_THREAD_MULTIPLIER_COUNT > 64) { Trace("\nWORKER_THREAD_MULTIPLIER_COUNT to be greater than or equal to 1 or less than or equal to 64\n"); return -1; } REPEAT_COUNT = atoi(argv[3]); - if( REPEAT_COUNT < 1) + if( REPEAT_COUNT < 1) { Trace("\nREPEAT_COUNT to greater than or equal to 1\n"); return -1; } RELATION_ID = atoi(argv[4]); - if( RELATION_ID < 1) + if( RELATION_ID < 1) { Trace("\nRELATION_ID to be greater than or equal to 1\n"); return -1; diff --git a/src/coreclr/pal/tests/palsuite/file_io/CopyFileA/test1/CopyFileA.cpp b/src/coreclr/pal/tests/palsuite/file_io/CopyFileA/test1/CopyFileA.cpp index 5f11729312f81..f6e7d11e0fd6d 100644 --- a/src/coreclr/pal/tests/palsuite/file_io/CopyFileA/test1/CopyFileA.cpp +++ b/src/coreclr/pal/tests/palsuite/file_io/CopyFileA/test1/CopyFileA.cpp @@ -13,12 +13,12 @@ /* 1. copy an existing file to existing with overwrite true 2. copy an existing file to existing with overwrite false - 3. copy an existing file to non-existant with overwrite true - 4. copy an existing file to non-existant with overwrite false - 5. copy non-existant file to existing with overwrite true - 6. copy non-existant file to existing with overwrite false - 7. copy non-existant file to non-existant with overwrite true - 8. copy non-existant file to non-existant with overwrite false + 3. copy an existing file to non-existent with overwrite true + 4. copy an existing file to non-existent with overwrite false + 5. copy non-existent file to existing with overwrite true + 6. copy non-existent file to existing with overwrite false + 7. copy non-existent file to non-existent with overwrite true + 8. copy non-existent file to non-existent with overwrite false */ #include @@ -34,9 +34,9 @@ struct TESTS{ PALTEST(file_io_CopyFileA_test1_paltest_copyfilea_test1, "file_io/CopyFileA/test1/paltest_copyfilea_test1") { char szSrcExisting[] = {"src_existing.tmp"}; - char szSrcNonExistant[] = {"src_non-existant.tmp"}; + char szSrcNonExistent[] = {"src_non-existent.tmp"}; char szDstExisting[] = {"dst_existing.tmp"}; - char szDstNonExistant[] = {"dst_non-existant.tmp"}; + char szDstNonExistent[] = {"dst_non-existent.tmp"}; BOOL bRc = TRUE; BOOL bSuccess = TRUE; FILE* tempFile = NULL; @@ -45,12 +45,12 @@ PALTEST(file_io_CopyFileA_test1_paltest_copyfilea_test1, "file_io/CopyFileA/test { {szSrcExisting, szDstExisting, FALSE, 1}, {szSrcExisting, szDstExisting, TRUE, 0}, - {szSrcExisting, szDstNonExistant, FALSE, 1}, - {szSrcExisting, szDstNonExistant, TRUE, 1}, - {szSrcNonExistant, szDstExisting, FALSE, 0}, - {szSrcNonExistant, szDstExisting, TRUE, 0}, - {szSrcNonExistant, szDstNonExistant, FALSE, 0}, - {szSrcNonExistant, szDstNonExistant, TRUE, 0} + {szSrcExisting, szDstNonExistent, FALSE, 1}, + {szSrcExisting, szDstNonExistent, TRUE, 1}, + {szSrcNonExistent, szDstExisting, FALSE, 0}, + {szSrcNonExistent, szDstExisting, TRUE, 0}, + {szSrcNonExistent, szDstNonExistent, FALSE, 0}, + {szSrcNonExistent, szDstNonExistent, TRUE, 0} }; @@ -136,7 +136,7 @@ PALTEST(file_io_CopyFileA_test1_paltest_copyfilea_test1, "file_io/CopyFileA/test } else { - /* verify attributes of destination file to source file*/ + /* verify attributes of destination file to source file*/ if(GetFileAttributes(testCase[i].lpSource) != GetFileAttributes(testCase[i].lpDestination)) { @@ -149,7 +149,7 @@ PALTEST(file_io_CopyFileA_test1_paltest_copyfilea_test1, "file_io/CopyFileA/test } } /* delete file file but don't worry if it fails */ - DeleteFileA(szDstNonExistant); + DeleteFileA(szDstNonExistent); } int exitCode = bSuccess ? PASS : FAIL; diff --git a/src/coreclr/pal/tests/palsuite/file_io/CopyFileW/test1/CopyFileW.cpp b/src/coreclr/pal/tests/palsuite/file_io/CopyFileW/test1/CopyFileW.cpp index 5a36b3d112606..27dc32921368e 100644 --- a/src/coreclr/pal/tests/palsuite/file_io/CopyFileW/test1/CopyFileW.cpp +++ b/src/coreclr/pal/tests/palsuite/file_io/CopyFileW/test1/CopyFileW.cpp @@ -11,22 +11,22 @@ **===================================================================*/ /* -1. copy an existing file to non-existant with overwrite true -2. copy an existing file to non-existant with overwrite false +1. copy an existing file to non-existent with overwrite true +2. copy an existing file to non-existent with overwrite false 3. copy an existing file to existing with overwrite true 4. copy an existing file to existing with overwrite false -5. copy non-existant file to non-existant with overwrite true -6. copy non-existant file to non-existant with overwrite false -7. copy non-existant file to existing with overwrite true -8. copy non-existant file to existing with overwrite false +5. copy non-existent file to non-existent with overwrite true +6. copy non-existent file to non-existent with overwrite false +7. copy non-existent file to existing with overwrite true +8. copy non-existent file to existing with overwrite false */ #include PALTEST(file_io_CopyFileW_test1_paltest_copyfilew_test1, "file_io/CopyFileW/test1/paltest_copyfilew_test1") { - LPSTR lpSource[2] = {"src_existing.tmp", "src_non-existant.tmp"}; - LPSTR lpDestination[2] = {"dst_existing.tmp", "dst_non-existant.tmp"}; + LPSTR lpSource[2] = {"src_existing.tmp", "src_non-existent.tmp"}; + LPSTR lpDestination[2] = {"dst_existing.tmp", "dst_non-existent.tmp"}; WCHAR* wcSource; WCHAR* wcDest; BOOL bFailIfExists[3] = {FALSE, TRUE}; @@ -112,7 +112,7 @@ PALTEST(file_io_CopyFileW_test1_paltest_copyfilew_test1, "file_io/CopyFileW/test /* verify the file was moved */ if (GetFileAttributesA(lpDestination[j]) == -1) { - Trace("CopyFileW: GetFileAttributes of destination" + Trace("CopyFileW: GetFileAttributes of destination" "file failed on test[%d][%d][%d] with error " "code %ld. \n",i,j,k,GetLastError()); bSuccess = FALSE; @@ -126,8 +126,8 @@ PALTEST(file_io_CopyFileW_test1_paltest_copyfilew_test1, "file_io/CopyFileW/test } else { - /* verify attributes of destination file to - source file*/ + /* verify attributes of destination file to + source file*/ if(GetFileAttributes(lpSource[i]) != GetFileAttributes(lpDestination[j])) { diff --git a/src/coreclr/pal/tests/palsuite/file_io/DeleteFileA/test1/DeleteFileA.cpp b/src/coreclr/pal/tests/palsuite/file_io/DeleteFileA/test1/DeleteFileA.cpp index 606a0f57a59e1..e87baa03bc683 100644 --- a/src/coreclr/pal/tests/palsuite/file_io/DeleteFileA/test1/DeleteFileA.cpp +++ b/src/coreclr/pal/tests/palsuite/file_io/DeleteFileA/test1/DeleteFileA.cpp @@ -11,7 +11,7 @@ **===================================================================*/ // delete an existing file -// delete a non-existant file +// delete a non-existent file // delete an open file // delete files using wild cards // delete a hidden file @@ -92,13 +92,13 @@ PALTEST(file_io_DeleteFileA_test1_paltest_deletefilea_test1, "file_io/DeleteFile // - // deleting a non-existant file : should fail + // deleting a non-existent file : should fail // bRc = DeleteFileA("testFile02.txt"); if (bRc != FALSE) { - Fail ("DeleteFileA: ERROR: Was able to delete the non-existant" + Fail ("DeleteFileA: ERROR: Was able to delete the non-existent" " file \"testFile02.txt\"\n"); } @@ -106,7 +106,7 @@ PALTEST(file_io_DeleteFileA_test1_paltest_deletefilea_test1, "file_io/DeleteFile // - // deleting an open file + // deleting an open file // tempFile = fopen("testFile03.txt", "w"); if (tempFile == NULL) @@ -119,7 +119,7 @@ PALTEST(file_io_DeleteFileA_test1_paltest_deletefilea_test1, "file_io/DeleteFile if (fclose(tempFile) != 0) { Fail ("DeleteFileA: ERROR: Couldn't close \"DeleteFileA's" - " testFile03.txt\"\n"); + " testFile03.txt\"\n"); } bRc = DeleteFileA("testFile03.txt"); @@ -149,7 +149,7 @@ PALTEST(file_io_DeleteFileA_test1_paltest_deletefilea_test1, "file_io/DeleteFile if (fclose(tempFile) != 0) { Fail ("DeleteFileA: ERROR: Couldn't close \"DeleteFileA's" - " testFile04.txt\"\n"); + " testFile04.txt\"\n"); } // delete using '?' @@ -176,6 +176,6 @@ PALTEST(file_io_DeleteFileA_test1_paltest_deletefilea_test1, "file_io/DeleteFile " Error is %d\n", GetLastError()); } - PAL_Terminate(); + PAL_Terminate(); return PASS; } diff --git a/src/coreclr/pal/tests/palsuite/file_io/DeleteFileW/test1/DeleteFileW.cpp b/src/coreclr/pal/tests/palsuite/file_io/DeleteFileW/test1/DeleteFileW.cpp index fa4652f8748b0..f7643a0b49f3d 100644 --- a/src/coreclr/pal/tests/palsuite/file_io/DeleteFileW/test1/DeleteFileW.cpp +++ b/src/coreclr/pal/tests/palsuite/file_io/DeleteFileW/test1/DeleteFileW.cpp @@ -11,7 +11,7 @@ **===================================================================*/ // delete an existing file -// delete a non-existant file +// delete a non-existent file // delete an open file // delete files using wild cards // delete a hidden file @@ -48,7 +48,7 @@ PALTEST(file_io_DeleteFileW_test1_paltest_deletefilew_test1, "file_io/DeleteFile if (fclose(tempFile) != 0) { Fail ("DeleteFileA: ERROR: Couldn't close \"DeleteFileW's" - " testFile01.tmp\"\n"); + " testFile01.tmp\"\n"); } pTemp = convert("testFile01.tmp"); @@ -63,7 +63,7 @@ PALTEST(file_io_DeleteFileW_test1_paltest_deletefilew_test1, "file_io/DeleteFile // - // deleting a non-existant file : should fail + // deleting a non-existent file : should fail // pTemp = convert("testFile02.tmp"); @@ -71,7 +71,7 @@ PALTEST(file_io_DeleteFileW_test1_paltest_deletefilew_test1, "file_io/DeleteFile free(pTemp); if (bRc != FALSE) { - Fail ("DeleteFileW: ERROR: Was able to delete the non-existant" + Fail ("DeleteFileW: ERROR: Was able to delete the non-existent" " file \"testFile02.tmp\"\n"); } @@ -92,7 +92,7 @@ PALTEST(file_io_DeleteFileW_test1_paltest_deletefilew_test1, "file_io/DeleteFile if (fclose(tempFile) != 0) { Fail ("DeleteFileA: ERROR: Couldn't close \"DeleteFileW's" - " testFile03.tmp\"\n"); + " testFile03.tmp\"\n"); } pTemp = convert("testFile03.tmp"); @@ -125,7 +125,7 @@ PALTEST(file_io_DeleteFileW_test1_paltest_deletefilew_test1, "file_io/DeleteFile if (fclose(tempFile) != 0) { Fail ("DeleteFileA: ERROR: Couldn't close \"DeleteFileW's" - " testFile04.tmp\"\n"); + " testFile04.tmp\"\n"); } // delete using '?' @@ -158,6 +158,6 @@ PALTEST(file_io_DeleteFileW_test1_paltest_deletefilew_test1, "file_io/DeleteFile " Error is %d\n", GetLastError()); } - PAL_Terminate(); + PAL_Terminate(); return PASS; } diff --git a/src/coreclr/pal/tests/palsuite/file_io/GetFileAttributesExW/test1/test1.cpp b/src/coreclr/pal/tests/palsuite/file_io/GetFileAttributesExW/test1/test1.cpp index 8cc392fc89128..bdcd2c4c49272 100644 --- a/src/coreclr/pal/tests/palsuite/file_io/GetFileAttributesExW/test1/test1.cpp +++ b/src/coreclr/pal/tests/palsuite/file_io/GetFileAttributesExW/test1/test1.cpp @@ -7,7 +7,7 @@ ** ** Purpose: Tests the PAL implementation of the GetFileAttributesExW function. ** Call the function on a normal directory and file and a read-only directory -** and file and a hidden file and directory. +** and file and a hidden file and directory. ** Ensure that the returned attributes and file sizes are correct. ** ** @@ -16,21 +16,21 @@ #define UNICODE #include -typedef enum Item +typedef enum Item { IS_DIR, IS_FILE }ItemType; -/* This function takes a structure and checks that the information - within the structure is correct. The 'Attribs' are the expected +/* This function takes a structure and checks that the information + within the structure is correct. The 'Attribs' are the expected file attributes, 'TheType' is IS_DIR or IS_FILE and the 'Name' is the name of the file/directory in question. */ -void VerifyInfo(WIN32_FILE_ATTRIBUTE_DATA InfoStruct, - DWORD Attribs, ItemType TheType, WCHAR* Name) +void VerifyInfo(WIN32_FILE_ATTRIBUTE_DATA InfoStruct, + DWORD Attribs, ItemType TheType, WCHAR* Name) { - HANDLE hFile; + HANDLE hFile; FILETIME CorrectCreation, CorrectAccess, CorrectModify; WCHAR CopyName[64]; @@ -41,55 +41,55 @@ void VerifyInfo(WIN32_FILE_ATTRIBUTE_DATA InfoStruct, if(InfoStruct.dwFileAttributes != Attribs) { Fail("ERROR: The file attributes on the file/directory were " - "recorded as being %d instead of %d.\n", - InfoStruct.dwFileAttributes, + "recorded as being %d instead of %d.\n", + InfoStruct.dwFileAttributes, Attribs); } - - /* Note: We can't open a handle to a directory in windows. This + + /* Note: We can't open a handle to a directory in windows. This block of tests will only be run on files. */ - if(TheType == IS_FILE) + if(TheType == IS_FILE) { /* Get a handle to the file */ - hFile = CreateFile(CopyName, - 0, - 0, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - NULL); - - if (hFile == INVALID_HANDLE_VALUE) - { + hFile = CreateFile(CopyName, + 0, + 0, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + NULL); + + if (hFile == INVALID_HANDLE_VALUE) + { Fail("ERROR: Could not open a handle to the file " - "'%S'. GetLastError() returned %d.",CopyName, - GetLastError()); + "'%S'. GetLastError() returned %d.",CopyName, + GetLastError()); } - + if(InfoStruct.nFileSizeLow != GetFileSize(hFile,NULL)) { Fail("ERROR: The file size reported by GetFileAttributesEx " "did not match the file size given by GetFileSize.\n"); } - + if(CloseHandle(hFile) == 0) { Fail("ERROR: Failed to properly close the handle to the " "file we're testing. GetLastError() returned %d.\n", GetLastError()); - + } } - + } /* Given a file/directory name, the expected attribs and whether or not it - is a file or directory, call GetFileAttributesEx and verify the + is a file or directory, call GetFileAttributesEx and verify the results are correct. */ @@ -100,9 +100,9 @@ void RunTest_GetFileAttributesExW_test1(char* Name, DWORD Attribs, ItemType TheT DWORD TheResult; TheName = convert(Name); - - TheResult = GetFileAttributesEx(TheName, - GetFileExInfoStandard, + + TheResult = GetFileAttributesEx(TheName, + GetFileExInfoStandard, &InfoStruct); if(TheResult == 0) { @@ -112,7 +112,7 @@ void RunTest_GetFileAttributesExW_test1(char* Name, DWORD Attribs, ItemType TheT } VerifyInfo(InfoStruct, Attribs, TheType, TheName); - + } PALTEST(file_io_GetFileAttributesExW_test1_paltest_getfileattributesexw_test1, "file_io/GetFileAttributesExW/test1/paltest_getfileattributesexw_test1") @@ -120,7 +120,7 @@ PALTEST(file_io_GetFileAttributesExW_test1_paltest_getfileattributesexw_test1, " DWORD TheResult; WCHAR* FileName; WIN32_FILE_ATTRIBUTE_DATA InfoStruct; - + if (0 != PAL_Initialize(argc,argv)) { return FAIL; @@ -129,14 +129,14 @@ PALTEST(file_io_GetFileAttributesExW_test1_paltest_getfileattributesexw_test1, " /* Test a Directroy */ RunTest_GetFileAttributesExW_test1("normal_test_directory", FILE_ATTRIBUTE_DIRECTORY, IS_DIR); - + /* Test a Normal File */ RunTest_GetFileAttributesExW_test1("normal_test_file", FILE_ATTRIBUTE_NORMAL, IS_FILE); - + /* Test a Read-Only Directroy */ - RunTest_GetFileAttributesExW_test1("ro_test_directory", + RunTest_GetFileAttributesExW_test1("ro_test_directory", FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_DIRECTORY, IS_DIR); /* Test a Read-Only File */ @@ -144,22 +144,22 @@ PALTEST(file_io_GetFileAttributesExW_test1_paltest_getfileattributesexw_test1, " RunTest_GetFileAttributesExW_test1("ro_test_file", FILE_ATTRIBUTE_READONLY, IS_FILE); /* Test a Hidden File */ - + RunTest_GetFileAttributesExW_test1(".hidden_file", FILE_ATTRIBUTE_HIDDEN, IS_FILE); /* Test a Hidden Directroy */ - RunTest_GetFileAttributesExW_test1(".hidden_directory", + RunTest_GetFileAttributesExW_test1(".hidden_directory", FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_DIRECTORY, IS_DIR); - /* Test a Non-Existant File */ - + /* Test a Non-Existent File */ + FileName = convert("nonexistent_test_file"); - + TheResult = GetFileAttributesEx(FileName, GetFileExInfoStandard, &InfoStruct); - + if(TheResult != 0) { free(FileName); diff --git a/src/coreclr/pal/tests/palsuite/file_io/MoveFileExA/test1/MoveFileExA.cpp b/src/coreclr/pal/tests/palsuite/file_io/MoveFileExA/test1/MoveFileExA.cpp index 26df141d997ca..ff99b864eded3 100644 --- a/src/coreclr/pal/tests/palsuite/file_io/MoveFileExA/test1/MoveFileExA.cpp +++ b/src/coreclr/pal/tests/palsuite/file_io/MoveFileExA/test1/MoveFileExA.cpp @@ -15,15 +15,15 @@ LPSTR lpSource_MoveFileExA_test1[4] = { "src_existing.tmp", - "src_non-existant.tmp", + "src_non-existent.tmp", "src_dir_existing", - "src_dir_non-existant" + "src_dir_non-existent" }; LPSTR lpDestination_MoveFileExA_test1[4]={ "dst_existing.tmp", - "dst_non-existant.tmp", + "dst_non-existent.tmp", "dst_dir_existing", - "dst_dir_non-existant" + "dst_dir_non-existent" }; LPSTR lpFiles_MoveFileExA_test1[14] ={ @@ -31,16 +31,16 @@ LPSTR lpFiles_MoveFileExA_test1[14] ={ "src_dir_existing\\test02.tmp", "dst_dir_existing\\test01.tmp", "dst_dir_existing\\test02.tmp", - "src_dir_non-existant\\test01.tmp", - "src_dir_non-existant\\test02.tmp", + "src_dir_non-existent\\test01.tmp", + "src_dir_non-existent\\test02.tmp", "dst_existing.tmp\\test01.tmp", "dst_existing.tmp\\test02.tmp", - "dst_non-existant.tmp\\test01.tmp", - "dst_non-existant.tmp\\test02.tmp", + "dst_non-existent.tmp\\test01.tmp", + "dst_non-existent.tmp\\test02.tmp", "dst_dir_existing\\test01.tmp", "dst_dir_existing\\test02.tmp", - "dst_dir_non-existant\\test01.tmp", - "dst_dir_non-existant\\test02.tmp" + "dst_dir_non-existent\\test01.tmp", + "dst_dir_non-existent\\test02.tmp" }; DWORD dwFlag_MoveFileExA_test1[2] = {MOVEFILE_COPY_ALLOWED, MOVEFILE_REPLACE_EXISTING}; diff --git a/src/coreclr/pal/tests/palsuite/file_io/MoveFileExW/test1/MoveFileExW.cpp b/src/coreclr/pal/tests/palsuite/file_io/MoveFileExW/test1/MoveFileExW.cpp index 70a6e29f12655..0144858733b89 100644 --- a/src/coreclr/pal/tests/palsuite/file_io/MoveFileExW/test1/MoveFileExW.cpp +++ b/src/coreclr/pal/tests/palsuite/file_io/MoveFileExW/test1/MoveFileExW.cpp @@ -27,7 +27,7 @@ int createExisting_MoveFileExW_test1(void) HANDLE tempFile2 = NULL; /* create the src_existing file and dst_existing file */ - tempFile = CreateFileW(lpSource_MoveFileExW_test1[0], GENERIC_WRITE, 0, 0, CREATE_ALWAYS, + tempFile = CreateFileW(lpSource_MoveFileExW_test1[0], GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); tempFile2 = CreateFileW(lpDestination_MoveFileExW_test1[0], GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); @@ -36,9 +36,9 @@ int createExisting_MoveFileExW_test1(void) if ((tempFile == NULL) || (tempFile2 == NULL)) { - Trace("ERROR: couldn't create %S or %S\n", lpSource_MoveFileExW_test1[0], + Trace("ERROR: couldn't create %S or %S\n", lpSource_MoveFileExW_test1[0], lpDestination_MoveFileExW_test1[0]); - return FAIL; + return FAIL; } /* create the src_dir_existing and dst_dir_existing directory and files */ @@ -74,7 +74,7 @@ int createExisting_MoveFileExW_test1(void) } void removeDirectoryHelper_MoveFileExW_test1(LPWSTR dir, int location) -{ +{ DWORD dwAtt = GetFileAttributesW(dir); // Trace(" Value of location[%d], and directorye [%S]\n", location, dir); @@ -82,13 +82,13 @@ void removeDirectoryHelper_MoveFileExW_test1(LPWSTR dir, int location) { if(!RemoveDirectoryW(dir)) { - Fail("ERROR: Failed to remove Directory [%S], Error Code [%d], location [%d]\n", dir, GetLastError(), location); + Fail("ERROR: Failed to remove Directory [%S], Error Code [%d], location [%d]\n", dir, GetLastError(), location); } } } void removeFileHelper_MoveFileExW_test1(LPWSTR wfile, int location) -{ +{ FILE *fp; char * pfile = convertC(wfile); @@ -99,20 +99,20 @@ void removeFileHelper_MoveFileExW_test1(LPWSTR wfile, int location) { if(fclose(fp)) { - Fail("ERROR: Failed to close the file [%S], Error Code [%d], location [%d]\n", wfile, GetLastError(), location); + Fail("ERROR: Failed to close the file [%S], Error Code [%d], location [%d]\n", wfile, GetLastError(), location); } if(!DeleteFileW(wfile)) { - Fail("ERROR: Failed to delete file [%S], Error Code [%d], location [%d]\n", wfile, GetLastError(), location); + Fail("ERROR: Failed to delete file [%S], Error Code [%d], location [%d]\n", wfile, GetLastError(), location); } else { - // Trace("Success: deleted file [%S], Error Code [%d], location [%d]\n", wfile, GetLastError(), location); + // Trace("Success: deleted file [%S], Error Code [%d], location [%d]\n", wfile, GetLastError(), location); } } - free(pfile); + free(pfile); } void removeAll_MoveFileExW_test1(void) @@ -121,10 +121,10 @@ void removeAll_MoveFileExW_test1(void) /* get rid of destination dirs and files */ removeFileHelper_MoveFileExW_test1(lpSource_MoveFileExW_test1[0], 11); // lpSource_MoveFileExW_test1[0] = convert("src_existing.tmp"); - + removeFileHelper_MoveFileExW_test1(lpSource_MoveFileExW_test1[1], 12); - //lpSource_MoveFileExW_test1[1] = convert("src_non-existant.tmp"); - + //lpSource_MoveFileExW_test1[1] = convert("src_non-existent.tmp"); + removeFileHelper_MoveFileExW_test1(lpFiles_MoveFileExW_test1[0], 13); // lpFiles_MoveFileExW_test1[0] = convert("src_dir_existing\\test01.tmp"); @@ -135,13 +135,13 @@ void removeAll_MoveFileExW_test1(void) // lpSource_MoveFileExW_test1[2] = convert("src_dir_existing"); removeFileHelper_MoveFileExW_test1(lpFiles_MoveFileExW_test1[4], 15); -// lpFiles_MoveFileExW_test1[4] = convert("src_dir_non-existant\\test01.tmp"); +// lpFiles_MoveFileExW_test1[4] = convert("src_dir_non-existent\\test01.tmp"); removeFileHelper_MoveFileExW_test1(lpFiles_MoveFileExW_test1[5], 16); -// lpFiles_MoveFileExW_test1[5] = convert("src_dir_non-existant\\test02.tmp"); +// lpFiles_MoveFileExW_test1[5] = convert("src_dir_non-existent\\test02.tmp"); removeDirectoryHelper_MoveFileExW_test1(lpSource_MoveFileExW_test1[3], 102); -// lpSource_MoveFileExW_test1[3] = convert("src_dir_non-existant"); +// lpSource_MoveFileExW_test1[3] = convert("src_dir_non-existent"); /* get rid of destination dirs and files */ dwAtt = GetFileAttributesW(lpDestination_MoveFileExW_test1[0]); @@ -165,33 +165,33 @@ void removeAll_MoveFileExW_test1(void) if (( dwAtt != INVALID_FILE_ATTRIBUTES ) && ( dwAtt & FILE_ATTRIBUTE_DIRECTORY) ) { removeFileHelper_MoveFileExW_test1(lpFiles_MoveFileExW_test1[8], 21); - // lpFiles_MoveFileExW_test1[8] = convert("dst_non-existant.tmp\\test01.tmp"); + // lpFiles_MoveFileExW_test1[8] = convert("dst_non-existent.tmp\\test01.tmp"); removeFileHelper_MoveFileExW_test1(lpFiles_MoveFileExW_test1[9], 22); - // lpFiles_MoveFileExW_test1[9] = convert("dst_non-existant.tmp\\test02.tmp"); + // lpFiles_MoveFileExW_test1[9] = convert("dst_non-existent.tmp\\test02.tmp"); removeDirectoryHelper_MoveFileExW_test1(lpDestination_MoveFileExW_test1[1], 104); - // lpDestination_MoveFileExW_test1[1] = convert("dst_non-existant.tmp"); + // lpDestination_MoveFileExW_test1[1] = convert("dst_non-existent.tmp"); } else { removeFileHelper_MoveFileExW_test1(lpDestination_MoveFileExW_test1[1], 19); - //lpDestination_MoveFileExW_test1[1] = convert("dst_non-existant.tmp"); + //lpDestination_MoveFileExW_test1[1] = convert("dst_non-existent.tmp"); } - + dwAtt = GetFileAttributesW(lpDestination_MoveFileExW_test1[2]); if (( dwAtt != INVALID_FILE_ATTRIBUTES ) && ( dwAtt & FILE_ATTRIBUTE_DIRECTORY) ) { removeFileHelper_MoveFileExW_test1(lpFiles_MoveFileExW_test1[10], 24); - // lpFiles_MoveFileExW_test1[10] = convert("dst_dir_existing\\test01.tmp"); + // lpFiles_MoveFileExW_test1[10] = convert("dst_dir_existing\\test01.tmp"); removeFileHelper_MoveFileExW_test1(lpFiles_MoveFileExW_test1[11], 25); - // lpFiles_MoveFileExW_test1[11] = convert("dst_dir_existing\\test02.tmp"); + // lpFiles_MoveFileExW_test1[11] = convert("dst_dir_existing\\test02.tmp"); removeDirectoryHelper_MoveFileExW_test1(lpDestination_MoveFileExW_test1[2], 105); // lpDestination_MoveFileExW_test1[2] = convert("dst_dir_existing"); - + } else { - removeFileHelper_MoveFileExW_test1(lpDestination_MoveFileExW_test1[2], 23); + removeFileHelper_MoveFileExW_test1(lpDestination_MoveFileExW_test1[2], 23); // lpDestination_MoveFileExW_test1[2] = convert("dst_dir_existing"); } @@ -200,17 +200,17 @@ void removeAll_MoveFileExW_test1(void) if (( dwAtt != INVALID_FILE_ATTRIBUTES ) && ( dwAtt & FILE_ATTRIBUTE_DIRECTORY) ) { removeFileHelper_MoveFileExW_test1(lpFiles_MoveFileExW_test1[12], 26); - // lpFiles_MoveFileExW_test1[12] = convert("dst_dir_non-existant\\test01.tmp"); + // lpFiles_MoveFileExW_test1[12] = convert("dst_dir_non-existent\\test01.tmp"); removeFileHelper_MoveFileExW_test1(lpFiles_MoveFileExW_test1[13], 27); - // lpFiles_MoveFileExW_test1[13] = convert("dst_dir_non-existant\\test02.tmp"); + // lpFiles_MoveFileExW_test1[13] = convert("dst_dir_non-existent\\test02.tmp"); removeDirectoryHelper_MoveFileExW_test1(lpDestination_MoveFileExW_test1[3], 106); - // lpDestination_MoveFileExW_test1[3] = convert("dst_dir_non-existant"); + // lpDestination_MoveFileExW_test1[3] = convert("dst_dir_non-existent"); } else { removeFileHelper_MoveFileExW_test1(lpDestination_MoveFileExW_test1[3], 107); - // lpDestination_MoveFileExW_test1[3] = convert("dst_dir_non-existant"); + // lpDestination_MoveFileExW_test1[3] = convert("dst_dir_non-existent"); } @@ -234,33 +234,33 @@ PALTEST(file_io_MoveFileExW_test1_paltest_movefileexw_test1, "file_io/MoveFileEx } lpSource_MoveFileExW_test1[0] = convert("src_existing.tmp"); - lpSource_MoveFileExW_test1[1] = convert("src_non-existant.tmp"); + lpSource_MoveFileExW_test1[1] = convert("src_non-existent.tmp"); lpSource_MoveFileExW_test1[2] = convert("src_dir_existing"); - lpSource_MoveFileExW_test1[3] = convert("src_dir_non-existant"); + lpSource_MoveFileExW_test1[3] = convert("src_dir_non-existent"); lpDestination_MoveFileExW_test1[0] = convert("dst_existing.tmp"); - lpDestination_MoveFileExW_test1[1] = convert("dst_non-existant.tmp"); + lpDestination_MoveFileExW_test1[1] = convert("dst_non-existent.tmp"); lpDestination_MoveFileExW_test1[2] = convert("dst_dir_existing"); - lpDestination_MoveFileExW_test1[3] = convert("dst_dir_non-existant"); + lpDestination_MoveFileExW_test1[3] = convert("dst_dir_non-existent"); lpFiles_MoveFileExW_test1[0] = convert("src_dir_existing\\test01.tmp"); lpFiles_MoveFileExW_test1[1] = convert("src_dir_existing\\test02.tmp"); lpFiles_MoveFileExW_test1[2] = convert("dst_dir_existing\\test01.tmp"); lpFiles_MoveFileExW_test1[3] = convert("dst_dir_existing\\test02.tmp"); - lpFiles_MoveFileExW_test1[4] = convert("src_dir_non-existant\\test01.tmp"); - lpFiles_MoveFileExW_test1[5] = convert("src_dir_non-existant\\test02.tmp"); + lpFiles_MoveFileExW_test1[4] = convert("src_dir_non-existent\\test01.tmp"); + lpFiles_MoveFileExW_test1[5] = convert("src_dir_non-existent\\test02.tmp"); lpFiles_MoveFileExW_test1[6] = convert("dst_existing.tmp\\test01.tmp"); lpFiles_MoveFileExW_test1[7] = convert("dst_existing.tmp\\test02.tmp"); - lpFiles_MoveFileExW_test1[8] = convert("dst_non-existant.tmp\\test01.tmp"); - lpFiles_MoveFileExW_test1[9] = convert("dst_non-existant.tmp\\test02.tmp"); + lpFiles_MoveFileExW_test1[8] = convert("dst_non-existent.tmp\\test01.tmp"); + lpFiles_MoveFileExW_test1[9] = convert("dst_non-existent.tmp\\test02.tmp"); - lpFiles_MoveFileExW_test1[10] = convert("dst_dir_existing\\test01.tmp"); + lpFiles_MoveFileExW_test1[10] = convert("dst_dir_existing\\test01.tmp"); lpFiles_MoveFileExW_test1[11] = convert("dst_dir_existing\\test02.tmp"); - lpFiles_MoveFileExW_test1[12] = convert("dst_dir_non-existant\\test01.tmp"); - lpFiles_MoveFileExW_test1[13] = convert("dst_dir_non-existant\\test02.tmp"); + lpFiles_MoveFileExW_test1[12] = convert("dst_dir_non-existent\\test01.tmp"); + lpFiles_MoveFileExW_test1[13] = convert("dst_dir_non-existent\\test02.tmp"); /* read in the expected results to compare with actual results */ memset (results, 0, 34); @@ -287,7 +287,7 @@ PALTEST(file_io_MoveFileExW_test1_paltest_movefileexw_test1, "file_io/MoveFileEx if (createExisting_MoveFileExW_test1() != PASS) { goto EXIT; - } + } /* lpSource_MoveFileExW_test1 loop */ for (i = 0; i < 4; i++) @@ -307,21 +307,21 @@ PALTEST(file_io_MoveFileExW_test1_paltest_movefileexw_test1, "file_io/MoveFileEx bRc = MoveFileExW(lpSource_MoveFileExW_test1[i], lpDestination_MoveFileExW_test1[j], dwFlag_MoveFileExW_test1[k]); if (!( - ((bRc == TRUE) && (results[nCounter] == '1')) - || + ((bRc == TRUE) && (results[nCounter] == '1')) + || ((bRc == FALSE ) && (results[nCounter] == '0')) ) ) { - Trace("MoveFileExW(%S, %S, %s): Values of i[%d], j[%d], k [%d] and results[%d]=%c LastError[%d]Flag[%d]FAILED\n", - lpSource_MoveFileExW_test1[i], lpDestination_MoveFileExW_test1[j], - k == 1 ? + Trace("MoveFileExW(%S, %S, %s): Values of i[%d], j[%d], k [%d] and results[%d]=%c LastError[%d]Flag[%d]FAILED\n", + lpSource_MoveFileExW_test1[i], lpDestination_MoveFileExW_test1[j], + k == 1 ? "MOVEFILE_REPLACE_EXISTING":"MOVEFILE_COPY_ALLOWED", i, j, k, nCounter, results[nCounter], GetLastError(), bRc); goto EXIT; } - //Trace("MoveFileExW(%S, %S, %s): Values of i[%d], j[%d], k [%d] and results[%d]=%c \n", - // lpSource_MoveFileExW_test1[i], lpDestination_MoveFileExW_test1[j], - // k == 1 ? + //Trace("MoveFileExW(%S, %S, %s): Values of i[%d], j[%d], k [%d] and results[%d]=%c \n", + // lpSource_MoveFileExW_test1[i], lpDestination_MoveFileExW_test1[j], + // k == 1 ? // "MOVEFILE_REPLACE_EXISTING":"MOVEFILE_COPY_ALLOWED", i, j, k, nCounter, results[nCounter]); @@ -338,7 +338,7 @@ PALTEST(file_io_MoveFileExW_test1_paltest_movefileexw_test1, "file_io/MoveFileEx } /* create the temp source file */ - hFile = CreateFileW(tempSource, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, + hFile = CreateFileW(tempSource, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); if( hFile == INVALID_HANDLE_VALUE ) @@ -347,7 +347,7 @@ PALTEST(file_io_MoveFileExW_test1_paltest_movefileexw_test1, "file_io/MoveFileEx "create the file correctly.\n"); goto EXIT; } - + bRc = CloseHandle(hFile); if(!bRc) { @@ -383,7 +383,7 @@ PALTEST(file_io_MoveFileExW_test1_paltest_movefileexw_test1, "file_io/MoveFileEx Trace("MoveFileExW: GetFileAttributes failed to get " "the file's attributes.\n"); goto EXIT; - } + } if((result & FILE_ATTRIBUTE_READONLY) != FILE_ATTRIBUTE_READONLY) { diff --git a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/createfilemapping.cpp b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/createfilemapping.cpp index 70c52936011dd..fe34754bf7319 100644 --- a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/createfilemapping.cpp +++ b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/CreateFileMappingW/test9/createfilemapping.cpp @@ -36,7 +36,7 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test9_paltest_createfilemappingw_t FILE_SHARE_READ, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, + FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) @@ -68,7 +68,7 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test9_paltest_createfilemappingw_t Fail(""); } - /* Attempt to create a unnamed file-mapping object to a zero lenght + /* Attempt to create a unnamed file-mapping object to a zero length * file. */ hFileMapping = CreateFileMapping( @@ -102,7 +102,7 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test9_paltest_createfilemappingw_t Fail(""); } - /* Attempt to create a file mapping that is larger than + /* Attempt to create a file mapping that is larger than * the file. */ hFileMapping = CreateFileMapping( @@ -143,7 +143,7 @@ PALTEST(filemapping_memmgt_CreateFileMappingW_test9_paltest_createfilemappingw_t } /* Terminate the PAL. - */ + */ PAL_Terminate(); return PASS; } diff --git a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/test1.cpp b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/test1.cpp index 97448fadaf962..7c2772857fa62 100644 --- a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/test1.cpp +++ b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/test1.cpp @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. /*===================================================================== -** +** ** Source: test1.c (FreeLibraryAndExitThread) ** ** Purpose: Tests the PAL implementation of the FreeLibraryAndExitThread -** function. FreeLibraryAndExitThread when run will exit the +** function. FreeLibraryAndExitThread when run will exit the ** process that it is called within, therefore we create a -** thread to run the API. Then test for the existance of the +** thread to run the API. Then test for the existence of the ** thread and access to the library. ** ** @@ -54,7 +54,7 @@ PALTEST(filemapping_memmgt_FreeLibraryAndExitThread_test1_paltest_freelibraryand BOOL PALAPI StartThreadTest_FreeLibraryAndExitThread_test1() { HMODULE hLib; - HANDLE hThread; + HANDLE hThread; DWORD dwThreadId; LPTHREAD_START_ROUTINE lpStartAddress = &CreateTestThread_FreeLibraryAndExitThread_test1; LPVOID lpParameter = (LPVOID)lpStartAddress; @@ -64,12 +64,12 @@ BOOL PALAPI StartThreadTest_FreeLibraryAndExitThread_test1() if(hLib == NULL) { Trace("ERROR: Unable to load library %s\n", LibraryName); - + return (FALSE); } /*Start the test thread*/ - hThread = CreateThread(NULL, + hThread = CreateThread(NULL, (DWORD)0, lpStartAddress, hLib, @@ -90,22 +90,22 @@ BOOL PALAPI StartThreadTest_FreeLibraryAndExitThread_test1() { Trace("ERROR:%u: hThread=0x%4.4lx not exited by " "FreeLibraryAndExitThread, RC[%d]\n", - GetLastError(), + GetLastError(), hThread, rc); -// There is a possibility that the other thread might +// There is a possibility that the other thread might // still be using the library VSW:337893 // FreeLibrary(hLib); CloseHandle(hThread); return (FALSE); } - + /*Test access to DLL.*/ if(!TestDll_FreeLibraryAndExitThread_test1(hLib, 0)) { Trace("ERROR: TestDll function returned FALSE " "expected TRUE\n."); - + CloseHandle(hThread); return (FALSE); } @@ -121,7 +121,7 @@ BOOL PALAPI TestDll_FreeLibraryAndExitThread_test1(HMODULE hLib, int testResult) { int RetVal; char FunctName[] = "DllTest"; - FARPROC DllAddr; + FARPROC DllAddr; /* Attempt to grab the proc address of the dll function. * This one should succeed.*/ @@ -130,12 +130,12 @@ BOOL PALAPI TestDll_FreeLibraryAndExitThread_test1(HMODULE hLib, int testResult) DllAddr = GetProcAddress(hLib, FunctName); if(DllAddr == NULL) { - Trace("ERROR: Unable to load function \"%s\" library \"%s\"\n", + Trace("ERROR: Unable to load function \"%s\" library \"%s\"\n", FunctName, LibraryName); return (FALSE); } - /* Run the function in the DLL, + /* Run the function in the DLL, * to ensure that the DLL was loaded properly.*/ RetVal = DllAddr(); if (RetVal != 1) @@ -155,8 +155,8 @@ BOOL PALAPI TestDll_FreeLibraryAndExitThread_test1(HMODULE hLib, int testResult) if(DllAddr != NULL) { Trace("ERROR: Able to load function \"%s\" from free'd" - " library \"%s\"\n", - FunctName, + " library \"%s\"\n", + FunctName, LibraryName); return (FALSE); } diff --git a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/VirtualFree.cpp b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/VirtualFree.cpp index 133f82c9f866a..50c5cfb0a7152 100644 --- a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/VirtualFree.cpp +++ b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/VirtualFree/test3/VirtualFree.cpp @@ -27,10 +27,10 @@ PALTEST(filemapping_memmgt_VirtualFree_test3_paltest_virtualfree_test3, "filemap { ExitProcess(FAIL); } - - //Allocate the physical storage in memory or in the paging file on disk + + //Allocate the physical storage in memory or in the paging file on disk lpVirtualAddress = VirtualAlloc(NULL,//system determine where to allocate the region - VIRTUALSIZE, //specify the size + VIRTUALSIZE, //specify the size MEM_RESERVE, //allocation type PAGE_NOACCESS); //access protection if(NULL == lpVirtualAddress) @@ -40,7 +40,7 @@ PALTEST(filemapping_memmgt_VirtualFree_test3_paltest_virtualfree_test3, "filemap //decommit and release the specified region err = VirtualFree(lpVirtualAddress, //base address - VIRTUALSIZE, //decommited size + VIRTUALSIZE, //decommitted size MEM_DECOMMIT|MEM_RELEASE);//free operation if(0 != err) { diff --git a/src/coreclr/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/test.cpp b/src/coreclr/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/test.cpp index 6798185796385..fabf8fda884a4 100644 --- a/src/coreclr/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/test.cpp +++ b/src/coreclr/pal/tests/palsuite/miscellaneous/FormatMessageW/test2/test.cpp @@ -17,7 +17,7 @@ WCHAR OutBuffer_FormatMessageW_test2[1024]; /* Pass this test the string "INSERT" and it will succeed */ -int test1(int num, ...) +int test1(int num, ...) { WCHAR * TheString = convert("Pal %1!s! Testing"); @@ -25,7 +25,7 @@ int test1(int num, ...) va_list TheList; va_start(TheList,num); memset( OutBuffer_FormatMessageW_test2, 0, 1024 * sizeof(OutBuffer_FormatMessageW_test2[0]) ); - + ReturnResult = FormatMessage( FORMAT_MESSAGE_FROM_STRING, /* source and processing options */ TheString, /* message source */ @@ -35,39 +35,39 @@ int test1(int num, ...) 1024, /* maximum size of message buffer */ &TheList /* array of message inserts */ ); - + va_end(TheList); - - if(ReturnResult == 0) + + if(ReturnResult == 0) { Fail("ERROR: The return value was 0, which indicates failure. " "The function failed when trying to Format a simple string," " with the 's' formatter."); - + } - + if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal INSERT Testing"), - wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) + wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) { - Fail("ERROR: The formated string should have been 'Pal INSERT " + Fail("ERROR: The formatted string should have been 'Pal INSERT " "Testing' but '%s' was returned.", convertC(OutBuffer_FormatMessageW_test2)); } - + return PASS; } /* Pass this test the int 40 and it will succeed */ -int test2(int num, ...) +int test2(int num, ...) { WCHAR * TheString = convert("Pal %1!i! Testing"); int ReturnResult; va_list TheList; va_start(TheList,num); - + memset( OutBuffer_FormatMessageW_test2, 0, 1024 * sizeof(OutBuffer_FormatMessageW_test2[0]) ); ReturnResult = FormatMessage( @@ -79,19 +79,19 @@ int test2(int num, ...) 1024, /* maximum size of message buffer */ &TheList /* array of message inserts */ ); - + va_end(TheList); - - if(ReturnResult == 0) + + if(ReturnResult == 0) { Fail("ERROR: The return value was 0, which indicates failure. " - "The function failed when trying to Format a simple string," - " with the 'i' formatter."); + "The function failed when trying to Format a simple string," + " with the 'i' formatter."); } - - if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal 40 Testing"),wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) + + if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal 40 Testing"),wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) { - Fail("ERROR: The formated string should have been 'Pal 40 Testing' " + Fail("ERROR: The formatted string should have been 'Pal 40 Testing' " "but '%s' was returned.", convertC(OutBuffer_FormatMessageW_test2)); } return PASS; @@ -115,23 +115,23 @@ int test3(int num, ...) { 1024, /* maximum size of message buffer */ &TheList /* array of message inserts */ ); - + va_end(TheList); - - if(ReturnResult == 0) + + if(ReturnResult == 0) { Fail("ERROR: The return value was 0, which indicates failure. " "The function failed when trying to Format a simple string," " with the 'c' formatter."); } - - if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal a Testing"),wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) + + if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal a Testing"),wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) { - Fail("ERROR: The formated string should have been 'Pal a Testing' " + Fail("ERROR: The formatted string should have been 'Pal a Testing' " "but '%s' was returned.", convertC(OutBuffer_FormatMessageW_test2)); - + } - + return PASS; } @@ -153,28 +153,28 @@ int test4(int num, ...) { 1024, /* maximum size of message buffer */ &TheList /* array of message inserts */ ); - + va_end(TheList); - - if(ReturnResult == 0) + + if(ReturnResult == 0) { Fail("ERROR: The return value was 0, which indicates failure. " "The function failed when trying to Format a simple string," - " with the 'C' formatter."); + " with the 'C' formatter."); } - - if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal a Testing"),wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) + + if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal a Testing"),wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) { - Fail("ERROR: The formated string should have been 'Pal a Testing' " + Fail("ERROR: The formatted string should have been 'Pal a Testing' " "but '%s' was returned.",convertC(OutBuffer_FormatMessageW_test2)); } - + return PASS; } /* Pass this test the number 57 and it will succeed */ -int test5(int num, ...) +int test5(int num, ...) { WCHAR * TheString = convert("Pal %1!d! Testing"); @@ -192,24 +192,24 @@ int test5(int num, ...) 1024, /* maximum size of message buffer */ &TheList /* array of message inserts */ ); - + va_end(TheList); - - if(ReturnResult == 0) + + if(ReturnResult == 0) { Fail("ERROR: The return value was 0, which indicates failure. " "The function failed when trying to Format a simple string, " "with the 'd' formatter."); - + } - + if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal 57 Testing"),wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) { - Fail("ERROR: The formated string should have been 'Pal 57 Testing' " + Fail("ERROR: The formatted string should have been 'Pal 57 Testing' " "but '%s' was returned.",convertC(OutBuffer_FormatMessageW_test2)); - + } - + return PASS; } @@ -232,25 +232,25 @@ int test6(int num, ...) { 1024, /* maximum size of message buffer */ &TheList /* array of message inserts */ ); - + va_end(TheList); - - if(ReturnResult == 0) + + if(ReturnResult == 0) { Fail("ERROR: The return value was 0, which indicates failure. " "The function failed when trying to Format a simple string, " "with the 'hc' and 'hC' formatters."); - + } - + if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal a and b Testing"), - wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) + wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) { - Fail("ERROR: The formated string should have been 'Pal a and b " + Fail("ERROR: The formatted string should have been 'Pal a and b " "Testing' but '%s' was returned.", convertC(OutBuffer_FormatMessageW_test2)); - + } - + return PASS; } @@ -274,25 +274,25 @@ int test7(int num, ...) 1024, /* maximum size of message buffer */ &TheList /* array of message inserts */ ); - + va_end(TheList); - - if(ReturnResult == 0) + + if(ReturnResult == 0) { Fail("ERROR: The return value was 0, which indicates failure. " "The function failed when trying to Format a simple string, " "with the 'hd', 'hs' and 'hS' formatters."); - + } - - if(memcmp(OutBuffer_FormatMessageW_test2, + + if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal 90 and foo and bar Testing"), - wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) + wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) { - Fail("ERROR: The formated string should have been 'Pal 90 and foo " + Fail("ERROR: The formatted string should have been 'Pal 90 and foo " "and bar Testing' but '%s' was returned.",convertC(OutBuffer_FormatMessageW_test2)); } - + return PASS; } @@ -301,7 +301,7 @@ int test7(int num, ...) int test8(int num, ...) { - WCHAR * TheString = + WCHAR * TheString = convert("Pal %1!lc! and %2!lC! and %3!ld! and %4!li! Testing"); int ReturnResult; va_list TheList; @@ -317,31 +317,31 @@ int test8(int num, ...) 1024, /* maximum size of message buffer */ &TheList /* array of message inserts */ ); - + va_end(TheList); - - if(ReturnResult == 0) + + if(ReturnResult == 0) { Fail("ERROR: The return value was 0, which indicates failure. " "The function failed when trying to Format a simple string, " "with the 'lc', 'lC', 'ld' and 'li' formatters."); - + } - - if(memcmp(OutBuffer_FormatMessageW_test2, + + if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal a and b and 50 and 100 Testing"), - wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) + wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) { - Fail("ERROR: The formated string should have been 'Pal a and b and 50" + Fail("ERROR: The formatted string should have been 'Pal a and b and 50" " and 100 Testing' but '%s' was returned.",convertC(OutBuffer_FormatMessageW_test2)); - + } - + return PASS; } -/* Pass this test the wide string 'foo' and 'bar' and the unsigned - int 56 to pass +/* Pass this test the wide string 'foo' and 'bar' and the unsigned + int 56 to pass */ int test9(int num, ...) { @@ -360,26 +360,26 @@ int test9(int num, ...) { 1024, /* maximum size of message buffer */ &TheList /* array of message inserts */ ); - + va_end(TheList); - - if(ReturnResult == 0) + + if(ReturnResult == 0) { Fail("ERROR: The return value was 0, which indicates failure. " - "The function failed when trying to Format a simple string," + "The function failed when trying to Format a simple string," " with the 'ls', 'lS' and 'lu' formatters."); - + } - - if(memcmp(OutBuffer_FormatMessageW_test2, + + if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal foo and bar and 56 Testing"), - wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) + wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) { - Fail("ERROR: The formated string should have been 'Pal foo and bar " + Fail("ERROR: The formatted string should have been 'Pal foo and bar " "and 56 Testing' but '%s' was returned.",convertC(OutBuffer_FormatMessageW_test2)); - + } - + return PASS; } @@ -402,26 +402,26 @@ int test10(int num, ...) 1024, /* maximum size of message buffer */ &TheList /* array of message inserts */ ); - + va_end(TheList); - - if(ReturnResult == 0) + + if(ReturnResult == 0) { Fail("ERROR: The return value was 0, which indicates failure. " "The function failed when trying to Format a simple string, " "with the 'lx' and 'lX' formatters."); - + } - - if(memcmp(OutBuffer_FormatMessageW_test2, + + if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal 123ab and 123CD Testing"), - wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) + wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) { - Fail("ERROR: The formated string should have been 'Pal 123ab and " + Fail("ERROR: The formatted string should have been 'Pal 123ab and " "123CD Testing' but '%s' was returned.", convertC(OutBuffer_FormatMessageW_test2)); - + } - + return PASS; } @@ -445,59 +445,59 @@ int test11(int num, ...) 1024, /* maximum size of message buffer */ &TheList /* array of message inserts */ ); - + va_end(TheList); - - if(ReturnResult == 0) + + if(ReturnResult == 0) { Fail("ERROR: The return value was 0, which indicates failure. " "The function failed when trying to Format a simple string, " "with the 'p' and 'S' formatters."); - + } - + /* ** Run only on 64 bit platforms */ #if defined(HOST_64BIT) Trace("Testing for 64 Bit Platforms \n"); - if(memcmp(OutBuffer_FormatMessageW_test2, + if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal 00000000000123AB and foo Testing"), - wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0 && + wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0 && /* BSD style */ memcmp( OutBuffer_FormatMessageW_test2, convert( "Pal 0x123ab and foo Testing" ), - wcslen(OutBuffer_FormatMessageW_test2)*2+2 ) != 0 ) + wcslen(OutBuffer_FormatMessageW_test2)*2+2 ) != 0 ) { - Fail("ERROR: The formated string should have been 'Pal 000123AB and " + Fail("ERROR: The formatted string should have been 'Pal 000123AB and " "foo Testing' but '%s' was returned.",convertC(OutBuffer_FormatMessageW_test2)); - + } #else Trace("Testing for Non 64 Bit Platforms \n"); - if(memcmp(OutBuffer_FormatMessageW_test2, + if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal 000123AB and foo Testing"), - wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0 && + wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0 && /* BSD style */ memcmp( OutBuffer_FormatMessageW_test2, convert( "Pal 0x123ab and foo Testing" ), - wcslen(OutBuffer_FormatMessageW_test2)*2+2 ) != 0 ) + wcslen(OutBuffer_FormatMessageW_test2)*2+2 ) != 0 ) { - Fail("ERROR: The formated string should have been 'Pal 000123AB and " + Fail("ERROR: The formatted string should have been 'Pal 000123AB and " "foo Testing' but '%s' was returned.",convertC(OutBuffer_FormatMessageW_test2)); - + } #endif - + return PASS; } -/* Pass this test the unsigned int 100 and the hex values 0x123ab and 0x123cd +/* Pass this test the unsigned int 100 and the hex values 0x123ab and 0x123cd to succeed */ -int test12(int num, ...) +int test12(int num, ...) { WCHAR * TheString = convert("Pal %1!u! and %2!x! and %3!X! Testing"); @@ -515,27 +515,27 @@ int test12(int num, ...) 1024, /* maximum size of message buffer */ &TheList /* array of message inserts */ ); - + va_end(TheList); - - if(ReturnResult == 0) + + if(ReturnResult == 0) { Fail("ERROR: The return value was 0, which indicates failure. " "The function failed when trying to Format a simple string, " "with the 'u', 'x' and 'X' formatters."); - + } - - if(memcmp(OutBuffer_FormatMessageW_test2, + + if(memcmp(OutBuffer_FormatMessageW_test2, convert("Pal 100 and 123ab and 123CD Testing"), - wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) + wcslen(OutBuffer_FormatMessageW_test2)*2+2) != 0) { - Fail("ERROR: The formated string should have been 'Pal 100 and " + Fail("ERROR: The formatted string should have been 'Pal 100 and " "123ab and 123CD Testing' but '%s' was returned.", convertC(OutBuffer_FormatMessageW_test2)); - + } - + return PASS; } @@ -555,7 +555,7 @@ PALTEST(miscellaneous_FormatMessageW_test2_paltest_formatmessagew_test2, "miscel } if(test1(0,szwInsert) || /* Test %s */ - test2(0,40) || /* Test %i */ + test2(0,40) || /* Test %i */ test3(0,'a') || /* Test %c */ test4(0,'a') || /* Test %C */ test5(0,57) || /* Test %d */ @@ -567,13 +567,13 @@ PALTEST(miscellaneous_FormatMessageW_test2_paltest_formatmessagew_test2, "miscel test11(0,(void *)0x123ab,"foo") || /* Test %p, %S */ test12(0,100,0x123ab,0x123cd)) /* Test %u,x,X */ { - - + + } - + PAL_Terminate(); return PASS; - + } diff --git a/src/coreclr/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test2_neg/reg_unreg_libraryw_neg.cpp b/src/coreclr/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test2_neg/reg_unreg_libraryw_neg.cpp index 07756ae4234ea..4d34414e72c26 100644 --- a/src/coreclr/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test2_neg/reg_unreg_libraryw_neg.cpp +++ b/src/coreclr/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test2_neg/reg_unreg_libraryw_neg.cpp @@ -6,7 +6,7 @@ ** Source: pal_registerlibraryw_unregisterlibraryw_neg.c ** ** Purpose: Negative test the PAL_RegisterLibrary API. -** Call PAL_RegisterLibrary to map a non-existant module +** Call PAL_RegisterLibrary to map a non-existent module ** into the calling process address space. ** ** diff --git a/src/coreclr/pal/tests/palsuite/threading/CreateEventW/test3/test3.cpp b/src/coreclr/pal/tests/palsuite/threading/CreateEventW/test3/test3.cpp index 023ccd1018ac3..559348727b723 100644 --- a/src/coreclr/pal/tests/palsuite/threading/CreateEventW/test3/test3.cpp +++ b/src/coreclr/pal/tests/palsuite/threading/CreateEventW/test3/test3.cpp @@ -3,12 +3,12 @@ /*============================================================ ** -** Source: test3.c +** Source: test3.c ** -** Purpose: Tests for CreateEvent. Create an unnamed event, create -** an event with an empty name, create an event with a name longer than -** MAX_PATH, MAX_PATH + 1, create an event with a name already taken -** by a non-event object, create an event with a name already taken +** Purpose: Tests for CreateEvent. Create an unnamed event, create +** an event with an empty name, create an event with a name longer than +** MAX_PATH, MAX_PATH + 1, create an event with a name already taken +** by a non-event object, create an event with a name already taken ** by an event object. ** ** @@ -17,13 +17,13 @@ #define SWAPPTR ((VOID *) (-1)) -struct testCase +struct testCase { LPSECURITY_ATTRIBUTES lpEventAttributes; BOOL bManualReset; BOOL bInitialState; WCHAR lpName[MAX_PATH + 2]; - DWORD dwNameLen; + DWORD dwNameLen; DWORD lastError; BOOL bResult; }; @@ -32,7 +32,7 @@ PALTEST(threading_CreateEventW_test3_paltest_createeventw_test3, "threading/Crea { struct testCase testCases[]= { - {0, TRUE, FALSE, {'\0'}, 0, ERROR_SUCCESS, PASS}, + {0, TRUE, FALSE, {'\0'}, 0, ERROR_SUCCESS, PASS}, {0, TRUE, FALSE, {'\0'}, 5, ERROR_SUCCESS, PASS}, {0, TRUE, FALSE, {'\0'}, 5, ERROR_ALREADY_EXISTS, PASS}, {0, TRUE, FALSE, {'\0'}, 6, ERROR_INVALID_HANDLE, PASS}, @@ -52,14 +52,14 @@ PALTEST(threading_CreateEventW_test3_paltest_createeventw_test3, "threading/Crea HANDLE hUnnamedEvent; DWORD dwRet; int i; - + if(0 != (PAL_Initialize(argc, argv))) { return ( FAIL ); } hUnnamedEvent = CreateEventW(0, TRUE, FALSE, NULL); - + if ( NULL == hUnnamedEvent ) { bRet = FALSE; @@ -73,23 +73,23 @@ PALTEST(threading_CreateEventW_test3_paltest_createeventw_test3, "threading/Crea { bRet = FALSE; Trace("PALSUITE ERROR: CreateEventW: CloseHandle(%lp); call " - "failed\nGetLastError returned '%u'.\n", hUnnamedEvent, + "failed\nGetLastError returned '%u'.\n", hUnnamedEvent, GetLastError()); } /* Create non-event with the same name as one of the testCases */ - hFMap = CreateFileMappingW( SWAPPTR, NULL, PAGE_READONLY, 0, 1, - nonEventName ); + hFMap = CreateFileMappingW( SWAPPTR, NULL, PAGE_READONLY, 0, 1, + nonEventName ); if ( NULL == hFMap ) { bRet = FALSE; Trace ( "PALSUITE ERROR: CreateFileMapping (%p, %p, %d, %d, %d, %S)" - " call returned NULL.\nGetLastError returned %u\n", - SWAPPTR, NULL, PAGE_READONLY, 0, 0, nonEventName, + " call returned NULL.\nGetLastError returned %u\n", + SWAPPTR, NULL, PAGE_READONLY, 0, 0, nonEventName, GetLastError()); } - + /* Create Events */ for (i = 0; i < sizeof(testCases)/sizeof(struct testCase); i++) { @@ -98,19 +98,19 @@ PALTEST(threading_CreateEventW_test3_paltest_createeventw_test3, "threading/Crea memset (name, 'a', testCases[i].dwNameLen ); wName = convert(name); - - wcsncpy(testCases[i].lpName, wName, + + wcsncpy(testCases[i].lpName, wName, testCases[i].dwNameLen); free(wName); SetLastError(ERROR_SUCCESS); - hEvent[i] = CreateEventW( testCases[i].lpEventAttributes, - testCases[i].bManualReset, - testCases[i].bInitialState, - testCases[i].lpName); - + hEvent[i] = CreateEventW( testCases[i].lpEventAttributes, + testCases[i].bManualReset, + testCases[i].bInitialState, + testCases[i].lpName); + if (hEvent[i] != INVALID_HANDLE_VALUE) { DWORD dwError = GetLastError(); @@ -121,7 +121,7 @@ PALTEST(threading_CreateEventW_test3_paltest_createeventw_test3, "threading/Crea Trace ("PALSUITE ERROR:\nCreateEvent(%lp, %d, %d, %S)" "\nGetLastError returned '%u', it should have returned" "'%d' at index '%d'.\n", testCases[i].lpEventAttributes, - testCases[i].bManualReset, testCases[i].bInitialState, + testCases[i].bManualReset, testCases[i].bInitialState, testCases[i].lpName, dwError, testCases[i].lastError, i); } @@ -133,7 +133,7 @@ PALTEST(threading_CreateEventW_test3_paltest_createeventw_test3, "threading/Crea { result [i] = 1; } - /* + /* * If we expected the testcase to FAIL and it passed, * report an error. */ @@ -142,14 +142,14 @@ PALTEST(threading_CreateEventW_test3_paltest_createeventw_test3, "threading/Crea bRet = FALSE; Trace ("PALSUITE ERROR:\nCreateEvent(%lp, %d, %d, %S)" "\nShould have returned INVALID_HANDLE_VALUE but " - "didn't at index '%d'.\n", - testCases[i].lpEventAttributes, - testCases[i].bManualReset, + "didn't at index '%d'.\n", + testCases[i].lpEventAttributes, + testCases[i].bManualReset, testCases[i].bInitialState, testCases[i].lpName, i); } - /* - * If result hasn't been set already set it to 0 so all the + /* + * If result hasn't been set already set it to 0 so all the * resources will be freed. */ if (!result[i]) @@ -157,20 +157,20 @@ PALTEST(threading_CreateEventW_test3_paltest_createeventw_test3, "threading/Crea result[i] = 0; } } - else + else { - /* - * If we get an INVALID_HANDLE_VALUE and we expected the + /* + * If we get an INVALID_HANDLE_VALUE and we expected the * test case to pass, report an error. */ result[i] = 1; - + if (testCases[i].bResult == PASS) { bRet = FALSE; Trace ("PALSUITE ERROR:\nCreateEvent(%lp, %d, %d, %S);" - "\nReturned INVALID_HANDLE_VALUE at index '%d'.\n", - testCases[i].lpEventAttributes, + "\nReturned INVALID_HANDLE_VALUE at index '%d'.\n", + testCases[i].lpEventAttributes, testCases[i].bManualReset, testCases[i].bInitialState, testCases[i].lpName, i); } @@ -185,7 +185,7 @@ PALTEST(threading_CreateEventW_test3_paltest_createeventw_test3, "threading/Crea continue; } dwRet = WaitForSingleObject ( hEvent[i], 0 ); - + if (dwRet != WAIT_TIMEOUT) { bRet = FALSE; @@ -193,12 +193,12 @@ PALTEST(threading_CreateEventW_test3_paltest_createeventw_test3, "threading/Crea "%d) call failed at index %d .\nGetLastError returned " "'%u'.\n", hEvent[i], 0, i, GetLastError()); } - + if (!CloseHandle(hEvent[i])) { bRet = FALSE; Trace("PALSUITE ERROR: CreateEventW: CloseHandle(%lp) call " - "failed at index %d\nGetLastError returned '%u'.\n", + "failed at index %d\nGetLastError returned '%u'.\n", hEvent[i], i, GetLastError()); } } @@ -208,7 +208,7 @@ PALTEST(threading_CreateEventW_test3_paltest_createeventw_test3, "threading/Crea { bRet = FALSE; Trace("PALSUITE ERROR: CreateEventW: CloseHandle(%p) call " - "failed\nGetLastError returned '%u'.\n", hFMap, + "failed\nGetLastError returned '%u'.\n", hFMap, GetLastError()); } @@ -216,15 +216,15 @@ PALTEST(threading_CreateEventW_test3_paltest_createeventw_test3, "threading/Crea { bRet = FAIL; } - else + else { bRet = PASS; } - + PAL_TerminateEx(bRet); - + return(bRet); - + } diff --git a/src/coreclr/pal/tests/palsuite/threading/WaitForMultipleObjects/test1/test1.cpp b/src/coreclr/pal/tests/palsuite/threading/WaitForMultipleObjects/test1/test1.cpp index 03a1849bdb613..df2e6d4b7ecf0 100644 --- a/src/coreclr/pal/tests/palsuite/threading/WaitForMultipleObjects/test1/test1.cpp +++ b/src/coreclr/pal/tests/palsuite/threading/WaitForMultipleObjects/test1/test1.cpp @@ -3,7 +3,7 @@ /*============================================================ ** -** Source: test1.c +** Source: test1.c ** ** Purpose: Test for WaitForMultipleObjects. Call the function ** on an array of 4 events, and ensure that it returns correct @@ -25,16 +25,16 @@ BOOL WaitForMultipleObjectsTest() DWORD i = 0, j = 0; LPSECURITY_ATTRIBUTES lpEventAttributes = NULL; - BOOL bManualReset = TRUE; + BOOL bManualReset = TRUE; BOOL bInitialState = TRUE; HANDLE hEvent[MAX_EVENTS]; - /* Run through this for loop and create 4 events */ + /* Run through this for loop and create 4 events */ for (i = 0; i < MAX_EVENTS; i++) { - hEvent[i] = CreateEvent( lpEventAttributes, - bManualReset, bInitialState, NULL); + hEvent[i] = CreateEvent( lpEventAttributes, + bManualReset, bInitialState, NULL); if (hEvent[i] == INVALID_HANDLE_VALUE) { @@ -42,7 +42,7 @@ BOOL WaitForMultipleObjectsTest() bRet = FALSE; break; } - + /* Set the current event */ bRet = SetEvent(hEvent[i]); @@ -52,7 +52,7 @@ BOOL WaitForMultipleObjectsTest() bRet = FALSE; break; } - + /* Ensure that this returns the correct value */ dwRet = WaitForSingleObject(hEvent[i],0); @@ -74,7 +74,7 @@ BOOL WaitForMultipleObjectsTest() bRet = FALSE; break; } - + dwRet = WaitForSingleObject(hEvent[i],0); if (dwRet != WAIT_TIMEOUT) @@ -84,24 +84,24 @@ BOOL WaitForMultipleObjectsTest() break; } } - - /* + + /* * If the first section of the test passed, move on to the - * second. + * second. */ if (bRet) { BOOL bWaitAll = TRUE; DWORD nCount = MAX_EVENTS; - CONST HANDLE *lpHandles = &hEvent[0]; + CONST HANDLE *lpHandles = &hEvent[0]; /* Call WaitForMultipleOjbects on all the events, the return should be WAIT_TIMEOUT */ - dwRet = WaitForMultipleObjects( nCount, - lpHandles, - bWaitAll, + dwRet = WaitForMultipleObjects( nCount, + lpHandles, + bWaitAll, 0); if (dwRet != WAIT_TIMEOUT) @@ -111,18 +111,18 @@ BOOL WaitForMultipleObjectsTest() else { /* Step through each event and one at a time, set the - currect test, while reseting all the other tests + currect test, while resetting all the other tests */ - + for (i = 0; i < MAX_EVENTS; i++) { for (j = 0; j < MAX_EVENTS; j++) { if (j == i) { - + bRet = SetEvent(hEvent[j]); - + if (!bRet) { Trace("WaitForMultipleObjectsTest:SetEvent %u failed (%x)\n", j, GetLastError()); @@ -132,20 +132,20 @@ BOOL WaitForMultipleObjectsTest() else { bRet = ResetEvent(hEvent[j]); - + if (!bRet) { Trace("WaitForMultipleObjectsTest:ResetEvent %u failed (%x)\n", j, GetLastError()); } } } - + bWaitAll = FALSE; - /* Check that WaitFor returns WAIT_OBJECT + i */ - dwRet = WaitForMultipleObjects( nCount, + /* Check that WaitFor returns WAIT_OBJECT + i */ + dwRet = WaitForMultipleObjects( nCount, lpHandles, bWaitAll, 0); - + if (dwRet != WAIT_OBJECT_0+i) { Trace("WaitForMultipleObjectsTest:WaitForMultipleObjects failed (%x)\n", GetLastError()); @@ -154,18 +154,18 @@ BOOL WaitForMultipleObjectsTest() } } } - + for (i = 0; i < MAX_EVENTS; i++) { bRet = CloseHandle(hEvent[i]); - + if (!bRet) { Trace("WaitForMultipleObjectsTest:CloseHandle %u failed (%x)\n", i, GetLastError()); } } } - + return bRet; } @@ -201,12 +201,12 @@ BOOL WaitMultipleDuplicateHandleTest_WFMO_test1() PALTEST(threading_WaitForMultipleObjects_test1_paltest_waitformultipleobjects_test1, "threading/WaitForMultipleObjects/test1/paltest_waitformultipleobjects_test1") { - + if(0 != (PAL_Initialize(argc, argv))) { return ( FAIL ); } - + if(!WaitForMultipleObjectsTest()) { Fail ("Test failed\n"); diff --git a/src/coreclr/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test1/test1.cpp b/src/coreclr/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test1/test1.cpp index a6248f6b519f1..e4a6c844decb2 100644 --- a/src/coreclr/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test1/test1.cpp +++ b/src/coreclr/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test1/test1.cpp @@ -3,7 +3,7 @@ /*============================================================ ** -** Source: test1.c +** Source: test1.c ** ** Purpose: Test for WaitForMultipleObjectsEx. Call the function ** on an array of 4 events, and ensure that it returns correct @@ -14,7 +14,7 @@ #include -/* Originally written as WaitForMultipleObjects/test1 */ +/* Originally written as WaitForMultipleObjects/test1 */ /* Number of events in array */ @@ -27,16 +27,16 @@ BOOL WaitForMultipleObjectsExTest() DWORD i = 0, j = 0; LPSECURITY_ATTRIBUTES lpEventAttributes = NULL; - BOOL bManualReset = TRUE; + BOOL bManualReset = TRUE; BOOL bInitialState = TRUE; HANDLE hEvent[MAX_EVENTS]; - /* Run through this for loop and create 4 events */ + /* Run through this for loop and create 4 events */ for (i = 0; i < MAX_EVENTS; i++) { - hEvent[i] = CreateEvent( lpEventAttributes, - bManualReset, bInitialState, NULL); + hEvent[i] = CreateEvent( lpEventAttributes, + bManualReset, bInitialState, NULL); if (hEvent[i] == INVALID_HANDLE_VALUE) { @@ -44,7 +44,7 @@ BOOL WaitForMultipleObjectsExTest() bRet = FALSE; break; } - + /* Set the current event */ bRet = SetEvent(hEvent[i]); @@ -54,7 +54,7 @@ BOOL WaitForMultipleObjectsExTest() bRet = FALSE; break; } - + /* Ensure that this returns the correct value */ dwRet = WaitForSingleObject(hEvent[i],0); @@ -76,7 +76,7 @@ BOOL WaitForMultipleObjectsExTest() bRet = FALSE; break; } - + dwRet = WaitForSingleObject(hEvent[i],0); if (dwRet != WAIT_TIMEOUT) @@ -86,24 +86,24 @@ BOOL WaitForMultipleObjectsExTest() break; } } - - /* + + /* * If the first section of the test passed, move on to the - * second. + * second. */ if (bRet) { BOOL bWaitAll = TRUE; DWORD nCount = MAX_EVENTS; - CONST HANDLE *lpHandles = &hEvent[0]; + CONST HANDLE *lpHandles = &hEvent[0]; /* Call WaitForMultipleObjectsEx on all the events, the return should be WAIT_TIMEOUT */ - dwRet = WaitForMultipleObjectsEx(nCount, - lpHandles, - bWaitAll, + dwRet = WaitForMultipleObjectsEx(nCount, + lpHandles, + bWaitAll, 0, FALSE); @@ -114,18 +114,18 @@ BOOL WaitForMultipleObjectsExTest() else { /* Step through each event and one at a time, set the - currect test, while reseting all the other tests + currect test, while resetting all the other tests */ - + for (i = 0; i < MAX_EVENTS; i++) { for (j = 0; j < MAX_EVENTS; j++) { if (j == i) { - + bRet = SetEvent(hEvent[j]); - + if (!bRet) { Trace("WaitForMultipleObjectsExTest:SetEvent %j failed (%x)\n", j, GetLastError()); @@ -135,20 +135,20 @@ BOOL WaitForMultipleObjectsExTest() else { bRet = ResetEvent(hEvent[j]); - + if (!bRet) { Trace("WaitForMultipleObjectsExTest:ResetEvent %u failed (%x)\n", j, GetLastError()); } } } - + bWaitAll = FALSE; - /* Check that WaitFor returns WAIT_OBJECT + i */ - dwRet = WaitForMultipleObjectsEx( nCount, + /* Check that WaitFor returns WAIT_OBJECT + i */ + dwRet = WaitForMultipleObjectsEx( nCount, lpHandles, bWaitAll, 0, FALSE); - + if (dwRet != WAIT_OBJECT_0+i) { Trace("WaitForMultipleObjectsExTest: WaitForMultipleObjectsEx failed (%x)\n", GetLastError()); @@ -157,18 +157,18 @@ BOOL WaitForMultipleObjectsExTest() } } } - + for (i = 0; i < MAX_EVENTS; i++) { bRet = CloseHandle(hEvent[i]); - + if (!bRet) { Trace("WaitForMultipleObjectsExTest:CloseHandle %u failed (%x)\n", i, GetLastError()); } } } - + return bRet; } @@ -204,12 +204,12 @@ BOOL WaitMultipleDuplicateHandleTest_WFMOEx_test1() PALTEST(threading_WaitForMultipleObjectsEx_test1_paltest_waitformultipleobjectsex_test1, "threading/WaitForMultipleObjectsEx/test1/paltest_waitformultipleobjectsex_test1") { - + if(0 != (PAL_Initialize(argc, argv))) { return ( FAIL ); } - + if(!WaitForMultipleObjectsExTest()) { Fail ("Test failed\n"); diff --git a/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.cs b/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.cs index 0f9bc5952ea5e..6d115bf5b48bd 100644 --- a/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.cs +++ b/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.cs @@ -243,7 +243,7 @@ private EcmaModule AddModule(string filePath, string expectedSimpleName, bool us return actualModuleData.Module; } } - mappedViewAccessor = null; // Ownership has been transfered + mappedViewAccessor = null; // Ownership has been transferred pdbReader = null; // Ownership has been transferred _moduleHashtable.AddOrGetExisting(moduleData); @@ -342,7 +342,7 @@ private PdbSymbolReader OpenAssociatedSymbolFile(string peFilePath, PEReader peR if (!File.Exists(candidatePath)) continue; } - + pdbFileName = candidatePath; pdbContentId = new BlobContentId(debugDirectoryData.Guid, debugEntry.Stamp); break; diff --git a/src/coreclr/tools/Common/Compiler/DevirtualizationManager.cs b/src/coreclr/tools/Common/Compiler/DevirtualizationManager.cs index c31642657666e..939b2abfe2959 100644 --- a/src/coreclr/tools/Common/Compiler/DevirtualizationManager.cs +++ b/src/coreclr/tools/Common/Compiler/DevirtualizationManager.cs @@ -38,7 +38,7 @@ public virtual bool IsEffectivelySealed(TypeDesc type) } /// - /// Returns true if cannot be overriden by any other method. + /// Returns true if cannot be overridden by any other method. /// public virtual bool IsEffectivelySealed(MethodDesc method) { @@ -111,7 +111,7 @@ protected virtual MethodDesc ResolveVirtualMethod(MethodDesc declMethod, DefType // This isn't the correct lookup algorithm for variant default interface methods // but as we will drop any results we find in any case, it doesn't matter much. // Non-variant dispatch can simply use ResolveInterfaceMethodToDefaultImplementationOnType - // but that implemenation currently cannot handle variance. + // but that implementation currently cannot handle variance. MethodDesc defaultInterfaceDispatchDeclMethod = null; foreach (TypeDesc iface in implType.RuntimeInterfaces) diff --git a/src/coreclr/tools/Common/Compiler/MethodExtensions.cs b/src/coreclr/tools/Common/Compiler/MethodExtensions.cs index b8a92a276f859..7e22fe2c4a7b8 100644 --- a/src/coreclr/tools/Common/Compiler/MethodExtensions.cs +++ b/src/coreclr/tools/Common/Compiler/MethodExtensions.cs @@ -77,12 +77,12 @@ public static string GetUnmanagedCallersOnlyExportName(this EcmaMethod This) } /// - /// Determine whether a method can go into the sealed vtable of a type. Such method must be a sealed virtual - /// method that is not overriding any method on a base type. - /// Given that such methods can never be overridden in any derived type, we can - /// save space in the vtable of a type, and all of its derived types by not emitting these methods in their vtables, + /// Determine whether a method can go into the sealed vtable of a type. Such method must be a sealed virtual + /// method that is not overriding any method on a base type. + /// Given that such methods can never be overridden in any derived type, we can + /// save space in the vtable of a type, and all of its derived types by not emitting these methods in their vtables, /// and storing them in a separate table on the side. This is especially beneficial for all array types, - /// since all of their collection interface methods are sealed and implemented on the System.Array and + /// since all of their collection interface methods are sealed and implemented on the System.Array and /// System.Array<T> base types, and therefore we can minimize the vtable sizes of all derived array types. /// public static bool CanMethodBeInSealedVTable(this MethodDesc method) @@ -91,7 +91,7 @@ public static bool CanMethodBeInSealedVTable(this MethodDesc method) // Methods on interfaces never go into sealed vtable // We would hit this code path for default implementations of interface methods (they are newslot+final). - // Inteface types don't get physical slots, but they have logical slot numbers and that logic shouldn't + // Interface types don't get physical slots, but they have logical slot numbers and that logic shouldn't // attempt to place final+newslot methods differently. if (method.IsFinal && method.IsNewSlot && !isInterfaceMethod) return true; diff --git a/src/coreclr/tools/Common/Compiler/NativeAotNameMangler.cs b/src/coreclr/tools/Common/Compiler/NativeAotNameMangler.cs index f0ca74dde53e5..65e58642acaf4 100644 --- a/src/coreclr/tools/Common/Compiler/NativeAotNameMangler.cs +++ b/src/coreclr/tools/Common/Compiler/NativeAotNameMangler.cs @@ -89,7 +89,7 @@ public override string SanitizeName(string s, bool typeName = false) string sanitizedName = (sb != null) ? sb.ToString() : s; // The character sequences denoting generic instantiations, arrays, byrefs, or pointers must be - // restricted to that use only. Replace them if they happened to be used in any identifiers in + // restricted to that use only. Replace them if they happened to be used in any identifiers in // the compilation input. return _mangleForCplusPlus ? sanitizedName.Replace(EnterNameScopeSequence, "_AA_").Replace(ExitNameScopeSequence, "_VV_") @@ -132,7 +132,7 @@ private string SanitizeNameWithHash(string literal) hash = _sha256.ComputeHash(GetBytesFromString(literal)); } - + mangledName += "_" + BitConverter.ToString(hash).Replace("-", ""); } @@ -199,7 +199,7 @@ private string ComputeMangledTypeName(TypeDesc type) string assemblyName = ((EcmaAssembly)ecmaType.EcmaModule).GetName().Name; bool isSystemPrivate = assemblyName.StartsWith("System.Private."); - + // Abbreviate System.Private to S.P. This might conflict with user defined assembly names, // but we already have a problem due to running SanitizeName without disambiguating the result // This problem needs a better fix. @@ -286,11 +286,11 @@ private string ComputeMangledTypeName(TypeDesc type) switch (type.Category) { case TypeFlags.Array: - mangledName = "__MDArray" + - EnterNameScopeSequence + - GetMangledTypeName(((ArrayType)type).ElementType) + - DelimitNameScopeSequence + - ((ArrayType)type).Rank.ToStringInvariant() + + mangledName = "__MDArray" + + EnterNameScopeSequence + + GetMangledTypeName(((ArrayType)type).ElementType) + + DelimitNameScopeSequence + + ((ArrayType)type).Rank.ToStringInvariant() + ExitNameScopeSequence; break; case TypeFlags.SzArray: @@ -467,19 +467,19 @@ private Utf8String GetPrefixMangledSignatureName(IPrefixMangledSignature prefixM return sb.ToUtf8String(); } - private Utf8String GetPrefixMangledMethodName(IPrefixMangledMethod prefixMangledMetod) + private Utf8String GetPrefixMangledMethodName(IPrefixMangledMethod prefixMangledMethod) { Utf8StringBuilder sb = new Utf8StringBuilder(); - sb.Append(EnterNameScopeSequence).Append(prefixMangledMetod.Prefix).Append(ExitNameScopeSequence); + sb.Append(EnterNameScopeSequence).Append(prefixMangledMethod.Prefix).Append(ExitNameScopeSequence); if (_mangleForCplusPlus) { - string name = GetMangledMethodName(prefixMangledMetod.BaseMethod).ToString().Replace("::", "_"); + string name = GetMangledMethodName(prefixMangledMethod.BaseMethod).ToString().Replace("::", "_"); sb.Append(name); } else { - sb.Append(GetMangledMethodName(prefixMangledMetod.BaseMethod)); + sb.Append(GetMangledMethodName(prefixMangledMethod.BaseMethod)); } return sb.ToUtf8String(); diff --git a/src/coreclr/tools/Common/Internal/NativeFormat/NativeFormatWriter.cs b/src/coreclr/tools/Common/Internal/NativeFormat/NativeFormatWriter.cs index 8abb41a8f8246..9ce8aef8bcd48 100644 --- a/src/coreclr/tools/Common/Internal/NativeFormat/NativeFormatWriter.cs +++ b/src/coreclr/tools/Common/Internal/NativeFormat/NativeFormatWriter.cs @@ -235,24 +235,24 @@ public void WriteRelativeOffset(Vertex val) _encoder.WriteSigned(offset - GetCurrentOffset()); } - + public int GetExpectedOffset(Vertex val) { Debug.Assert(val._offset != Vertex.NotPlaced); - + if (val._iteration == -1) { // If the offsets are not determined yet, use the maximum possible encoding return 0x7FFFFFFF; } - + int offset = val._offset; - + // If the offset was not update in this iteration yet, adjust it by delta we have accumulated in this iteration so far. // This adjustment allows the offsets to converge faster. if (val._iteration < _iteration) offset += _offsetAdjustment; - + return offset; } @@ -1543,7 +1543,7 @@ public override bool Equals(object obj) return true; } } - + #if NATIVEFORMAT_PUBLICWRITER public #else @@ -1552,17 +1552,17 @@ public override bool Equals(object obj) class BlobVertex : Vertex { private byte[] _data; - + public BlobVertex(byte[] data) { _data = data; } - + public int GetSize() { return _data.Length; } - + internal override void Save(NativeWriter writer) { foreach (byte b in _data) @@ -1582,13 +1582,13 @@ class EntryPointVertex : Vertex private uint _methodIndex; private BlobVertex _fixups; - + public EntryPointVertex(uint methodIndex, BlobVertex fixups) { _methodIndex = methodIndex; _fixups = fixups; } - + internal override void Save(NativeWriter writer) { if (_fixups != null) @@ -1621,13 +1621,13 @@ internal override void Save(NativeWriter writer) class EntryPointWithBlobVertex : EntryPointVertex { private BlobVertex _blob; - + public EntryPointWithBlobVertex(uint methodIndex, BlobVertex fixups, BlobVertex blob) : base(methodIndex, fixups) { _blob = blob; } - + internal override void Save(NativeWriter writer) { _blob.Save(writer); @@ -1745,7 +1745,7 @@ class VertexLeaf : Vertex { private Vertex _vertex; private int _leafIndex; - + public VertexLeaf(Vertex vertex, int leafIndex) { _vertex = vertex; @@ -1755,7 +1755,7 @@ public VertexLeaf(Vertex vertex, int leafIndex) internal override void Save(NativeWriter writer) { writer.WriteUnsigned((uint)_leafIndex << 2); - + if (_vertex != null) { _vertex.Save(writer); @@ -1789,18 +1789,18 @@ public void Update(Vertex first, Vertex second) internal override void Save(NativeWriter writer) { uint value = (_first != null ? 1u : 0u); - + if (_second != null) { value |= 2; - + int delta = writer.GetExpectedOffset(_second) - writer.GetCurrentOffset(); Debug.Assert(delta >= 0); value |= ((uint)delta << 2); } - + writer.WriteUnsigned(value); - + if (_first != null) _first.Save(writer); } @@ -1820,19 +1820,19 @@ private Vertex ExpandBlock(int index, int depth, bool place, out bool isLeaf) { Vertex first = (index < _entries.Count ? _entries[index] : null); Vertex second = (index + 1 < _entries.Count ? _entries[index + 1] : null); - + if (first == null && second == null) { isLeaf = true; return null; } - + if (first == null || second == null) { VertexLeaf leaf = new VertexLeaf( first == null ? second : first, (first == null ? index + 1 : index) & (BlockSize - 1)); - + if (place) { _section.Place(leaf); @@ -1841,13 +1841,13 @@ private Vertex ExpandBlock(int index, int depth, bool place, out bool isLeaf) isLeaf = true; return leaf; } - + VertexTree tree = new VertexTree(first, second); if (place) _section.Place(tree); - + _section.Place(second); - + isLeaf = false; return tree; } @@ -1862,7 +1862,7 @@ private Vertex ExpandBlock(int index, int depth, bool place, out bool isLeaf) bool secondIsLeaf; Vertex second = ExpandBlock(index + (1 << (depth - 1)), depth - 1, true, out secondIsLeaf); - + if (first == null && second == null) { if (place) @@ -1873,7 +1873,7 @@ private Vertex ExpandBlock(int index, int depth, bool place, out bool isLeaf) isLeaf = true; return null; } - + if (first == null && secondIsLeaf) { Vertex pop = _section.Pop(); @@ -1884,11 +1884,11 @@ private Vertex ExpandBlock(int index, int depth, bool place, out bool isLeaf) Debug.Assert(pop == tree); _section.Place(second); } - + isLeaf = true; return second; } - + if (second == null && firstIsLeaf) { if (place) @@ -1897,17 +1897,17 @@ private Vertex ExpandBlock(int index, int depth, bool place, out bool isLeaf) Debug.Assert(pop == tree); _section.Place(first); } - + isLeaf = true; return first; } - + tree.Update(first, second); isLeaf = false; return tree; } } - + public void Set(int index, Vertex element) { while (index >= _entries.Count) @@ -1923,7 +1923,7 @@ public void ExpandLayout() { bool isLeaf; Vertex block = ExpandBlock(i, 4, true, out isLeaf); - + if (block == null) { if (nullBlock == null) @@ -1933,29 +1933,29 @@ public void ExpandLayout() } block = nullBlock; } - + _blocks.Add(block); } - + // Start with maximum size entries _entryIndexSize = 2; } - + internal override void Save(NativeWriter writer) { // Lowest two bits are entry index size, the rest is number of elements writer.WriteUnsigned(((uint)_entries.Count << 2) | _entryIndexSize); - + int blocksOffset = writer.GetCurrentOffset(); int maxOffset = 0; - + foreach (Vertex block in _blocks) { int offset = writer.GetExpectedOffset(block) - blocksOffset; Debug.Assert(offset >= 0); - + maxOffset = Math.Max(offset, maxOffset); - + if (_entryIndexSize == 0) { writer.WriteByte((byte)offset); @@ -1970,7 +1970,7 @@ internal override void Save(NativeWriter writer) writer.WriteUInt32((uint)offset); } } - + uint newEntryIndexSize = 0; if (maxOffset > 0xFF) { @@ -1978,14 +1978,14 @@ internal override void Save(NativeWriter writer) if (maxOffset > 0xFFFF) newEntryIndexSize++; } - + if (writer.IsGrowing()) { if (newEntryIndexSize > _entryIndexSize) { // Ensure that the table will be redone with new entry index size writer.UpdateOffsetAdjustment(1); - + _entryIndexSize = newEntryIndexSize; } } @@ -1995,7 +1995,7 @@ internal override void Save(NativeWriter writer) { // Ensure that the table will be redone with new entry index size writer.UpdateOffsetAdjustment(-1); - + _entryIndexSize = newEntryIndexSize; } } @@ -2025,7 +2025,7 @@ public Entry(uint hashcode, Vertex vertex) public static int Comparison(Entry a, Entry b) { - return (int)(a.Hashcode /*& mask*/) - (int)(b.Hashcode /*& mask*/); + return (int)(a.Hashcode /*& mask*/) - (int)(b.Hashcode /*& mask*/); } } @@ -2034,7 +2034,7 @@ public static int Comparison(Entry a, Entry b) // How many entries to target per bucket. Higher fill factor means smaller size, but worse runtime perf. private int _nFillFactor; - // Number of buckets choosen for the table. Must be power of two. 0 means that the table is still open for mutation. + // Number of buckets chosen for the table. Must be power of two. 0 means that the table is still open for mutation. private uint _nBuckets; // Current size of index entry @@ -2120,7 +2120,7 @@ internal override void Save(NativeWriter writer) int startOffset = writer.GetCurrentOffset(); uint bucketMask = (_nBuckets - 1); - // Lowest two bits are entry index size, the rest is log2 number of buckets + // Lowest two bits are entry index size, the rest is log2 number of buckets int numberOfBucketsShift = HighestBit(_nBuckets) - 1; writer.WriteByte((byte)((numberOfBucketsShift << 2) | _entryIndexSize)); @@ -2128,7 +2128,7 @@ internal override void Save(NativeWriter writer) writer.WritePad((int)((_nBuckets + 1) << _entryIndexSize)); - // For faster lookup at runtime, we store the first entry index even though it is redundant (the + // For faster lookup at runtime, we store the first entry index even though it is redundant (the // value can be inferred from number of buckets) PatchEntryIndex(writer, bucketsOffset, _entryIndexSize, writer.GetCurrentOffset() - bucketsOffset); diff --git a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunConstants.cs b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunConstants.cs index 1a14ebfaf75d0..2e63e5baf40d3 100644 --- a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunConstants.cs +++ b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunConstants.cs @@ -76,7 +76,7 @@ public enum ReadyToRunTypeLayoutFlags : byte public enum ReadyToRunVirtualFunctionOverrideFlags : uint { None = 0x00, - VirtualFunctionOverriden = 0x01, + VirtualFunctionOverridden = 0x01, } [Flags] diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs index 3360016bba1f1..cdcb74e5a6b0e 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs @@ -1247,7 +1247,7 @@ private bool resolveVirtualMethod(CORINFO_DEVIRTUALIZATION_INFO* info) #if DEBUG if (info->detail == CORINFO_DEVIRTUALIZATION_DETAIL.CORINFO_DEVIRTUALIZATION_UNKNOWN) { - Console.Error.WriteLine($"Failed devirtualization with unexpected unknown failure while compiling {MethodBeingCompiled} with decl {decl} targetting type {objType}"); + Console.Error.WriteLine($"Failed devirtualization with unexpected unknown failure while compiling {MethodBeingCompiled} with decl {decl} targeting type {objType}"); Debug.Assert(info->detail != CORINFO_DEVIRTUALIZATION_DETAIL.CORINFO_DEVIRTUALIZATION_UNKNOWN); } #endif @@ -3674,7 +3674,7 @@ private bool doesFieldBelongToClass(CORINFO_FIELD_STRUCT_* fld, CORINFO_CLASS_ST // and logical field pair then return true. This is needed as the field handle here // is used as a key into a hashtable mapping writes to fields to value numbers. // - // In this implmentation this is made more complex as the JIT is exposed to CORINFO_FIELD_STRUCT + // In this implementation this is made more complex as the JIT is exposed to CORINFO_FIELD_STRUCT // pointers which represent exact instantions, so performing exact matching is the necessary approach // BaseType._field, BaseType -> true diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs b/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs index 17d36280c02ac..aa1e9f4406f54 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs @@ -1291,7 +1291,7 @@ public enum ILNum UNKNOWN_ILNUM = -4, // Unknown variable - MAX_ILNUM = -4 // Sentinal value. This should be set to the largest magnitude value in the enum + MAX_ILNUM = -4 // Sentinel value. This should be set to the largest magnitude value in the enum // so that the compression routines know the enum's range. }; diff --git a/src/coreclr/tools/Common/TypeSystem/Canon/CanonTypes.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/Canon/CanonTypes.Sorting.cs index 8f5385d2974f7..8646ad432b446 100644 --- a/src/coreclr/tools/Common/TypeSystem/Canon/CanonTypes.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/Canon/CanonTypes.Sorting.cs @@ -5,7 +5,7 @@ namespace Internal.TypeSystem { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class CanonBaseType { protected internal sealed override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer) diff --git a/src/coreclr/tools/Common/TypeSystem/Common/ArrayMethod.Diagnostic.cs b/src/coreclr/tools/Common/TypeSystem/Common/ArrayMethod.Diagnostic.cs index 1f6e06709ae41..571c6cecb8a1b 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/ArrayMethod.Diagnostic.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/ArrayMethod.Diagnostic.cs @@ -9,7 +9,7 @@ public override string DiagnosticName { get { - // The ArrayMethod.Name property is gauranteed to not throw + // The ArrayMethod.Name property is guaranteed to not throw return Name; } } diff --git a/src/coreclr/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs b/src/coreclr/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs index daeb4d1be86e6..cec25e3a406f4 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs @@ -459,7 +459,7 @@ private static void FindBaseUnificationGroup(MetadataType currentType, Unificati foreach (MethodDesc memberMethod in unificationGroup.Members) { - // If a method is both overriden via MethodImpl and name/sig, we don't remove it from the unification list + // If a method is both overridden via MethodImpl and name/sig, we don't remove it from the unification list // as the local MethodImpl takes priority over the name/sig match, and prevents the slot disunification. if (FindSlotDefiningMethodForVirtualMethod(memberMethod) == FindSlotDefiningMethodForVirtualMethod(originalDefiningMethod)) continue; diff --git a/src/coreclr/tools/Common/TypeSystem/Common/MethodDesc.cs b/src/coreclr/tools/Common/TypeSystem/Common/MethodDesc.cs index 1a736b7f98f96..fb556f648337c 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/MethodDesc.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/MethodDesc.cs @@ -428,7 +428,7 @@ private int AcquireHashCode() } /// - /// Compute HashCode. Should only be overriden by a MethodDesc that represents an instantiated method. + /// Compute HashCode. Should only be overridden by a MethodDesc that represents an instantiated method. /// protected virtual int ComputeHashCode() { @@ -555,7 +555,7 @@ public virtual bool IsNewSlot } /// - /// Gets a value indicating whether this virtual method needs to be overriden + /// Gets a value indicating whether this virtual method needs to be overridden /// by all non-abstract classes deriving from the method's owning type. /// public virtual bool IsAbstract @@ -567,7 +567,7 @@ public virtual bool IsAbstract } /// - /// Gets a value indicating that this method cannot be overriden. + /// Gets a value indicating that this method cannot be overridden. /// public virtual bool IsFinal { diff --git a/src/coreclr/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtableOfPointers.cs b/src/coreclr/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtableOfPointers.cs index 075d39429bbf3..87d0c5c82ff81 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtableOfPointers.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtableOfPointers.cs @@ -14,7 +14,7 @@ namespace Internal.TypeSystem /// /// A hash table which is lock free for readers and up to 1 writer at a time. /// It must be possible to compute the key's hashcode from a value. - /// All values must convertable to/from an IntPtr. + /// All values must convertible to/from an IntPtr. /// It must be possible to perform an equality check between a key and a value. /// It must be possible to perform an equality check between a value and a value. /// A LockFreeReaderKeyValueComparer must be provided to perform these operations. diff --git a/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.Sorting.cs index eb19d5f60107d..cc74c3ba5e6c4 100644 --- a/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaGenericParameter.Sorting.cs @@ -5,7 +5,7 @@ namespace Internal.TypeSystem.Ecma { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class EcmaGenericParameter { protected internal override int ClassCode => -1548417824; diff --git a/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.Sorting.cs index 757604dbe6770..2f0aefcab743b 100644 --- a/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.Sorting.cs @@ -5,7 +5,7 @@ namespace Internal.TypeSystem.Ecma { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class EcmaType { protected internal override int ClassCode => 1340416537; diff --git a/src/coreclr/tools/Common/TypeSystem/IL/Stubs/DynamicInvokeMethodThunk.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/IL/Stubs/DynamicInvokeMethodThunk.Sorting.cs index 29976d1a659c4..7ae9157c025e7 100644 --- a/src/coreclr/tools/Common/TypeSystem/IL/Stubs/DynamicInvokeMethodThunk.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/IL/Stubs/DynamicInvokeMethodThunk.Sorting.cs @@ -8,7 +8,7 @@ namespace Internal.IL.Stubs { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class DynamicInvokeMethodThunk { protected override int ClassCode => -1980933220; diff --git a/src/coreclr/tools/Common/TypeSystem/Interop/IL/InlineArrayType.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/Interop/IL/InlineArrayType.Sorting.cs index c865524171138..a6d57faa45a4e 100644 --- a/src/coreclr/tools/Common/TypeSystem/Interop/IL/InlineArrayType.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/Interop/IL/InlineArrayType.Sorting.cs @@ -3,7 +3,7 @@ namespace Internal.TypeSystem.Interop { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class InlineArrayType { protected override int ClassCode => 226817075; diff --git a/src/coreclr/tools/Common/TypeSystem/Interop/IL/NativeStructType.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/Interop/IL/NativeStructType.Sorting.cs index bcd97084e5671..e66dc55d975c0 100644 --- a/src/coreclr/tools/Common/TypeSystem/Interop/IL/NativeStructType.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/Interop/IL/NativeStructType.Sorting.cs @@ -3,7 +3,7 @@ namespace Internal.TypeSystem.Interop { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class NativeStructType { protected override int ClassCode => -377751537; diff --git a/src/coreclr/tools/Common/TypeSystem/Interop/IL/PInvokeDelegateWrapper.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/Interop/IL/PInvokeDelegateWrapper.Sorting.cs index 7294826846660..c62bc7675e5af 100644 --- a/src/coreclr/tools/Common/TypeSystem/Interop/IL/PInvokeDelegateWrapper.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/Interop/IL/PInvokeDelegateWrapper.Sorting.cs @@ -3,7 +3,7 @@ namespace Internal.TypeSystem.Interop { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class PInvokeDelegateWrapper { protected override int ClassCode => -262930217; diff --git a/src/coreclr/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.Sorting.cs index e2d0428631b82..70d1d7e7348a2 100644 --- a/src/coreclr/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.Sorting.cs @@ -3,7 +3,7 @@ namespace Internal.TypeSystem { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class RuntimeDeterminedType { protected internal override int ClassCode => 351938209; diff --git a/src/coreclr/tools/Common/TypeSystem/Sorting/ArrayType.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/Sorting/ArrayType.Sorting.cs index 661fdad276066..30993214e5d68 100644 --- a/src/coreclr/tools/Common/TypeSystem/Sorting/ArrayType.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/Sorting/ArrayType.Sorting.cs @@ -3,7 +3,7 @@ namespace Internal.TypeSystem { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class ArrayType { protected internal override int ClassCode => -1274559616; diff --git a/src/coreclr/tools/Common/TypeSystem/Sorting/ByRefType.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/Sorting/ByRefType.Sorting.cs index 4aa2ca4b8d598..031e675c68428 100644 --- a/src/coreclr/tools/Common/TypeSystem/Sorting/ByRefType.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/Sorting/ByRefType.Sorting.cs @@ -3,7 +3,7 @@ namespace Internal.TypeSystem { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class ByRefType { protected internal override int ClassCode => -959602231; diff --git a/src/coreclr/tools/Common/TypeSystem/Sorting/FunctionPointerType.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/Sorting/FunctionPointerType.Sorting.cs index fdb61b3d6c562..e833b9557fa7e 100644 --- a/src/coreclr/tools/Common/TypeSystem/Sorting/FunctionPointerType.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/Sorting/FunctionPointerType.Sorting.cs @@ -3,7 +3,7 @@ namespace Internal.TypeSystem { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class FunctionPointerType { protected internal override int ClassCode => -914739489; diff --git a/src/coreclr/tools/Common/TypeSystem/Sorting/InstantiatedType.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/Sorting/InstantiatedType.Sorting.cs index a761cf0b345f9..887effee9706d 100644 --- a/src/coreclr/tools/Common/TypeSystem/Sorting/InstantiatedType.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/Sorting/InstantiatedType.Sorting.cs @@ -5,7 +5,7 @@ namespace Internal.TypeSystem { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class InstantiatedType { protected internal override int ClassCode => 1150020412; @@ -18,7 +18,7 @@ protected internal override int CompareToImpl(TypeDesc other, TypeSystemComparer // to each other. This is a better heuristic than sorting by method definition // then by instantiation. // - // The goal is to sort classes like SomeClass, + // The goal is to sort classes like SomeClass, // near SomeOtherClass int result = 0; diff --git a/src/coreclr/tools/Common/TypeSystem/Sorting/MethodSignature.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/Sorting/MethodSignature.Sorting.cs index 56d37f5a17a53..33e62daefc53c 100644 --- a/src/coreclr/tools/Common/TypeSystem/Sorting/MethodSignature.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/Sorting/MethodSignature.Sorting.cs @@ -3,7 +3,7 @@ namespace Internal.TypeSystem { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class MethodSignature { internal int CompareTo(MethodSignature other, TypeSystemComparer comparer) @@ -25,7 +25,7 @@ internal int CompareTo(MethodSignature other, TypeSystemComparer comparer) result = comparer.Compare(_returnType, other._returnType); if (result != 0) return result; - + for (int i = 0; i < _parameters.Length; i++) { result = comparer.Compare(_parameters[i], other._parameters[i]); diff --git a/src/coreclr/tools/Common/TypeSystem/Sorting/PointerType.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/Sorting/PointerType.Sorting.cs index 7ead358363710..6d2a13ebe305e 100644 --- a/src/coreclr/tools/Common/TypeSystem/Sorting/PointerType.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/Sorting/PointerType.Sorting.cs @@ -3,7 +3,7 @@ namespace Internal.TypeSystem { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class PointerType { protected internal override int ClassCode => -2124247792; diff --git a/src/coreclr/tools/Common/TypeSystem/Sorting/SignatureVariable.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/Sorting/SignatureVariable.Sorting.cs index a3104ff842da0..ddfdbb065da1c 100644 --- a/src/coreclr/tools/Common/TypeSystem/Sorting/SignatureVariable.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/Sorting/SignatureVariable.Sorting.cs @@ -5,7 +5,7 @@ namespace Internal.TypeSystem { - // Functionality related to determinstic ordering of types + // Functionality related to deterministic ordering of types partial class SignatureVariable { protected internal sealed override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer) diff --git a/src/coreclr/tools/Common/TypeSystem/Sorting/TypeDesc.Sorting.cs b/src/coreclr/tools/Common/TypeSystem/Sorting/TypeDesc.Sorting.cs index 6e676244d5894..7c75359d7cb93 100644 --- a/src/coreclr/tools/Common/TypeSystem/Sorting/TypeDesc.Sorting.cs +++ b/src/coreclr/tools/Common/TypeSystem/Sorting/TypeDesc.Sorting.cs @@ -3,7 +3,7 @@ namespace Internal.TypeSystem { - // Functionality related to determinstic ordering of types and members + // Functionality related to deterministic ordering of types and members partial class TypeDesc { /// diff --git a/src/coreclr/tools/Common/TypeSystem/Sorting/TypeSystemComparer.cs b/src/coreclr/tools/Common/TypeSystem/Sorting/TypeSystemComparer.cs index add498968abb1..39f795683d6cc 100644 --- a/src/coreclr/tools/Common/TypeSystem/Sorting/TypeSystemComparer.cs +++ b/src/coreclr/tools/Common/TypeSystem/Sorting/TypeSystemComparer.cs @@ -7,7 +7,7 @@ namespace Internal.TypeSystem { - // Functionality related to determinstic ordering of types and members + // Functionality related to deterministic ordering of types and members // // Many places within a compiler need a way to generate deterministically ordered lists // that may be a result of non-deterministic processes. Multi-threaded compilation is a good @@ -20,7 +20,7 @@ namespace Internal.TypeSystem // how to compare itself to other categories (does "array of pointers to uint" sort before a "byref // to an object"?). The nature of the type system potentially allows for an unlimited number of TypeDesc // descendants. - // + // // We solve this problem by only requiring each TypeDesc or MethodDesc descendant to know how // to sort itself with respect to other instances of the same type. // Comparisons between different categories of types are centralized to a single location that @@ -64,7 +64,7 @@ internal int CompareWithinClass(T x, T y) where T : TypeDesc return 0; int result = x.CompareToImpl(y, this); - + // We did a reference equality check above so an "Equal" result is not expected Debug.Assert(result != 0); diff --git a/src/coreclr/tools/ILVerification/ILImporter.Verify.cs b/src/coreclr/tools/ILVerification/ILImporter.Verify.cs index dd7e9d86642ba..efa2b1018688e 100644 --- a/src/coreclr/tools/ILVerification/ILImporter.Verify.cs +++ b/src/coreclr/tools/ILVerification/ILImporter.Verify.cs @@ -279,7 +279,7 @@ private void FindEnclosingExceptionRegions() } /// - /// Checks whether the metod's il modifies the this pointer and builds up the + /// Checks whether the method's il modifies the this pointer and builds up the /// array of valid target offsets. /// private void InitialPass() diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Compilation.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Compilation.cs index 53e443db74447..e23440141bbbf 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Compilation.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Compilation.cs @@ -114,7 +114,7 @@ public bool CanConstructType(TypeDesc type) public DelegateCreationInfo GetDelegateCtor(TypeDesc delegateType, MethodDesc target, TypeDesc constrainedType, bool followVirtualDispatch) { - // If we're creating a delegate to a virtual method that cannot be overriden, devirtualize. + // If we're creating a delegate to a virtual method that cannot be overridden, devirtualize. // This is not just an optimization - it's required for correctness in the presence of sealed // vtable slots. if (followVirtualDispatch && (target.IsFinal || target.OwningType.IsSealed())) diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.GeneratedAssembly.Sorting.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.GeneratedAssembly.Sorting.cs index 41254150763cf..1fc7bd2414e33 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.GeneratedAssembly.Sorting.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.GeneratedAssembly.Sorting.cs @@ -9,7 +9,7 @@ namespace ILCompiler { partial class CompilerTypeSystemContext { - // Functionality related to determinstic ordering of types and members + // Functionality related to deterministic ordering of types and members partial class CompilerGeneratedType : MetadataType { protected override int ClassCode => -1036681447; diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.IntefaceThunks.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.InterfaceThunks.cs similarity index 99% rename from src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.IntefaceThunks.cs rename to src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.InterfaceThunks.cs index adc509298c0bb..f91414132f609 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.IntefaceThunks.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.InterfaceThunks.cs @@ -53,7 +53,7 @@ // Notice the thunk now has the expected signature, and some code to compute the context. // // The GetOrdinalInterface method retrieves the specified interface MethodTable off the MethodTable's interface list. -// The thunks are per-type (since the position in the inteface list is different). +// The thunks are per-type (since the position in the interface list is different). // // We hardcode the position in the interface list instead of just hardcoding the interface type // itself so that we don't require runtime code generation when a new type is loaded @@ -94,7 +94,7 @@ public MethodDesc GetDefaultInterfaceMethodImplementationThunk(MethodDesc target // target default interface method. var methodKey = new DefaultInterfaceMethodImplementationInstantiationThunkHashtableKey(targetMethod, interfaceIndex); MethodDesc thunk = _dimThunkHashtable.GetOrCreateValue(methodKey); - + return thunk; } diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.Sorting.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.Sorting.cs index 26226baab4e72..62666ae4da581 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.Sorting.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.Sorting.cs @@ -5,7 +5,7 @@ namespace ILCompiler { - // Functionality related to determinstic ordering of types and members + // Functionality related to deterministic ordering of types and members partial class CompilerTypeSystemContext { partial class BoxedValueType diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/DiagnosticUtilities.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/DiagnosticUtilities.cs index 5cf498bcfc69b..08e9ce14177f2 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/DiagnosticUtilities.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/DiagnosticUtilities.cs @@ -135,7 +135,7 @@ internal static bool IsInRequiresScope(this MethodDesc method, string requiresAt /// Doesn't check the associated symbol for overrides and virtual methods because we should warn on mismatched between the property AND the accessors /// /// - /// MethodDesc that is either an overriding member or an overriden/virtual member + /// MethodDesc that is either an overriding member or an overridden/virtual member /// internal static bool IsOverrideInRequiresScope(this MethodDesc method, string requiresAttribute) => method.IsInRequiresScope(requiresAttribute, false); @@ -187,7 +187,7 @@ internal static bool DoesPropertyRequire(this PropertyPseudoDesc property, strin /// /// Determines if member requires (and thus any usage of such method should be warned about). /// - /// Unlike only static methods + /// Unlike only static methods /// and .ctors are reported as requires when the declaring type has Requires on it. internal static bool DoesMemberRequire(this TypeSystemEntity member, string requiresAttribute, [NotNullWhen(returnValue: true)] out CustomAttributeValue? attribute) { diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs index 6fb278df183cb..da90de02131c3 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs @@ -882,7 +882,7 @@ private void OutputVirtualSlots(NodeFactory factory, ref ObjectDataBuilder objDa if (relocsOnly && !declVTable.HasFixedSlots) return; - // Inteface types don't place anything else in their physical vtable. + // Interface types don't place anything else in their physical vtable. // Interfaces have logical slots for their methods but since they're all abstract, they would be zero. // We place default implementations of interface methods into the vtable of the interface-implementing // type, pretending there was an extra virtual slot. diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericVirtualMethodTableNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericVirtualMethodTableNode.cs index 207af80ae9beb..d7d54579f26b7 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericVirtualMethodTableNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericVirtualMethodTableNode.cs @@ -18,13 +18,13 @@ public sealed class GenericVirtualMethodTableNode : ObjectNode, ISymbolDefinitio { private ObjectAndOffsetSymbolNode _endSymbol; private ExternalReferencesTableNode _externalReferences; - private Dictionary> _gvmImplemenations; + private Dictionary> _gvmImplementations; public GenericVirtualMethodTableNode(ExternalReferencesTableNode externalReferences) { _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__gvm_table_End", true); _externalReferences = externalReferences; - _gvmImplemenations = new Dictionary>(); + _gvmImplementations = new Dictionary>(); } public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb) @@ -41,7 +41,7 @@ public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb) /// /// Helper method to compute the dependencies that would be needed by a hashtable entry for a GVM call. - /// This helper is used by the TypeGVMEntriesNode, which is used by the dependency analysis to compute the + /// This helper is used by the TypeGVMEntriesNode, which is used by the dependency analysis to compute the /// GVM hashtable entries for the compiled types. /// The dependencies returned from this function will be reported as static dependencies of the TypeGVMEntriesNode, /// which we create for each type that has generic virtual methods. @@ -70,10 +70,10 @@ private void AddGenericVirtualMethodImplementation(NodeFactory factory, MethodDe MethodDesc openImplementationMethod = implementationMethod.GetTypicalMethodDefinition(); // Insert open method signatures into the GVM map - if (!_gvmImplemenations.ContainsKey(openCallingMethod)) - _gvmImplemenations[openCallingMethod] = new Dictionary(); + if (!_gvmImplementations.ContainsKey(openCallingMethod)) + _gvmImplementations[openCallingMethod] = new Dictionary(); - _gvmImplemenations[openCallingMethod][openImplementationMethod.OwningType] = openImplementationMethod; + _gvmImplementations[openCallingMethod][openImplementationMethod.OwningType] = openImplementationMethod; } public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) @@ -101,7 +101,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) gvmHashtableSection.Place(gvmHashtable); // Emit the GVM target information entries - foreach (var gvmEntry in _gvmImplemenations) + foreach (var gvmEntry in _gvmImplementations) { Debug.Assert(!gvmEntry.Key.OwningType.IsInterface); @@ -131,7 +131,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) } // Zero out the dictionary so that we AV if someone tries to insert after we're done. - _gvmImplemenations = null; + _gvmImplementations = null; byte[] streamBytes = nativeFormatWriter.Save(); diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/VariantInterfaceMethodUseNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/VariantInterfaceMethodUseNode.cs index c5e1d27a53c13..06135a1dfca12 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/VariantInterfaceMethodUseNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/VariantInterfaceMethodUseNode.cs @@ -13,7 +13,7 @@ namespace ILCompiler.DependencyAnalysis { // This node represents the concept of a variant interface method being used. - // It has no direct depedencies, but may be referred to by conditional static + // It has no direct dependencies, but may be referred to by conditional static // dependencies, or static dependencies from elsewhere. // // We only track the generic definition of the interface method being used. diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/VirtualMethodUseNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/VirtualMethodUseNode.cs index 7ca2bb591ad16..b9f9e63a7d4be 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/VirtualMethodUseNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/VirtualMethodUseNode.cs @@ -13,7 +13,7 @@ namespace ILCompiler.DependencyAnalysis { // This node represents the concept of a virtual method being used. - // It has no direct depedencies, but may be referred to by conditional static + // It has no direct dependencies, but may be referred to by conditional static // dependencies, or static dependencies from elsewhere. // // It is used to keep track of uses of virtual methods to ensure that the diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ILScanner.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ILScanner.cs index f0f7aad1e026e..675ba5523147d 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ILScanner.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ILScanner.cs @@ -366,7 +366,7 @@ private class ScannedDevirtualizationManager : DevirtualizationManager { private HashSet _constructedTypes = new HashSet(); private HashSet _unsealedTypes = new HashSet(); - private HashSet _abstractButNonabstractlyOverridenTypes = new HashSet(); + private HashSet _abstractButNonabstractlyOverriddenTypes = new HashSet(); public ScannedDevirtualizationManager(ImmutableArray> markedNodes) { @@ -405,7 +405,7 @@ public ScannedDevirtualizationManager(ImmutableArray _instanceBytes.Length - _offset) diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj b/src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj index c66b8d3b58edb..2909446593dbb 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj @@ -311,7 +311,7 @@ - + diff --git a/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs b/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs index ddde51c53f0d1..d81c5e5c66a72 100644 --- a/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs +++ b/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs @@ -276,7 +276,7 @@ private void ProcessMarkStack() } } - // Find new dependencies introduced by dynamic depedencies + // Find new dependencies introduced by dynamic dependencies if (_newDynamicDependenciesMayHaveAppeared) { _newDynamicDependenciesMayHaveAppeared = false; diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ReadyToRunInstructionSetSupportSignature.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ReadyToRunInstructionSetSupportSignature.cs index 770b4e002a130..c889c0b44384a 100644 --- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ReadyToRunInstructionSetSupportSignature.cs +++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ReadyToRunInstructionSetSupportSignature.cs @@ -23,7 +23,7 @@ public static string ToInstructionSetSupportString(InstructionSetSupport instruc InstructionSet[] explicitlyUnsupportedInstructionSets = instructionSetSupport.ExplicitlyUnsupportedFlags.ToArray(); Array.Sort(explicitlyUnsupportedInstructionSets); - bool addDelimeter = false; + bool addDelimiter = false; var r2rAlreadyEmitted = new HashSet(); foreach (var instructionSetSupported in supportedInstructionSets) { @@ -33,9 +33,9 @@ public static string ToInstructionSetSupportString(InstructionSetSupport instruc if (r2rAlreadyEmitted.Add(r2rInstructionSet.Value)) { - if (addDelimeter) + if (addDelimiter) builder.Append('+'); - addDelimeter = true; + addDelimiter = true; builder.Append(r2rInstructionSet.Value.ToString()); } } @@ -43,18 +43,18 @@ public static string ToInstructionSetSupportString(InstructionSetSupport instruc builder.Append(','); r2rAlreadyEmitted.Clear(); - addDelimeter = false; + addDelimiter = false; foreach (var instructionSetUnsupported in explicitlyUnsupportedInstructionSets) { var r2rInstructionSet = instructionSetUnsupported.R2RInstructionSet(instructionSetSupport.Architecture); if (r2rInstructionSet == null) continue; - + if (r2rAlreadyEmitted.Add(r2rInstructionSet.Value)) { - if (addDelimeter) + if (addDelimiter) builder.Append('-'); - addDelimeter = true; + addDelimiter = true; builder.Append(r2rInstructionSet.Value.ToString()); } } diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureBuilder.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureBuilder.cs index 3f4345a31bf7f..6632e7439655f 100644 --- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureBuilder.cs +++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/SignatureBuilder.cs @@ -136,7 +136,7 @@ public void EmitInt(int data) uint isSigned = (data < 0 ? 1u : 0u); uint udata = unchecked((uint)data); - // Note that we cannot use CompressData to pack the data value, because of negative values + // Note that we cannot use CompressData to pack the data value, because of negative values // like: 0xffffe000 (-8192) which has to be encoded as 1 in 2 bytes, i.e. 0x81 0x00 // However CompressData would store value 1 as 1 byte: 0x01 if ((udata & SignMask.ONEBYTE) == 0 || (udata & SignMask.ONEBYTE) == SignMask.ONEBYTE) @@ -167,7 +167,7 @@ public void EmitInt(int data) return; } - // Out of compressable range + // Out of compressible range throw new NotImplementedException(); } @@ -393,7 +393,7 @@ private void EmitArrayTypeSignature(ArrayType type, SignatureContext context) } public void EmitMethodSignature( - MethodWithToken method, + MethodWithToken method, bool enforceDefEncoding, bool enforceOwningType, SignatureContext context, @@ -437,7 +437,7 @@ public void EmitMethodRefToken(ModuleToken memberRefToken) EmitUInt(RidFromToken(memberRefToken.Token)); } - private void EmitMethodSpecificationSignature(MethodWithToken method, + private void EmitMethodSpecificationSignature(MethodWithToken method, uint flags, bool enforceDefEncoding, bool enforceOwningType, SignatureContext context) { ModuleToken methodToken = method.Token; diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/VirtualResolutionFixupSignature.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/VirtualResolutionFixupSignature.cs index 20a428e393110..0c2588b2e1de1 100644 --- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/VirtualResolutionFixupSignature.cs +++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/VirtualResolutionFixupSignature.cs @@ -48,7 +48,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) dataBuilder.AddSymbol(this); SignatureContext innerContext = dataBuilder.EmitFixup(factory, _fixupKind, _declMethod.Token.Module, factory.SignatureContext); - dataBuilder.EmitUInt((uint)(_implMethod != null ? ReadyToRunVirtualFunctionOverrideFlags.VirtualFunctionOverriden : ReadyToRunVirtualFunctionOverrideFlags.None)); + dataBuilder.EmitUInt((uint)(_implMethod != null ? ReadyToRunVirtualFunctionOverrideFlags.VirtualFunctionOverridden : ReadyToRunVirtualFunctionOverrideFlags.None)); dataBuilder.EmitMethodSignature(_declMethod, enforceDefEncoding: false, enforceOwningType: false, innerContext, isInstantiatingStub: false); dataBuilder.EmitTypeSignature(_implType, innerContext); if (_implMethod != null) diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/SystemObjectFieldLayoutAlgorithm.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/SystemObjectFieldLayoutAlgorithm.cs index 54fc9477b35fc..d7d8c047d3c05 100644 --- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/SystemObjectFieldLayoutAlgorithm.cs +++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/SystemObjectFieldLayoutAlgorithm.cs @@ -8,7 +8,7 @@ namespace ILCompiler { /// - /// Represents an algorithm that adds a target pointer of space at the beggining of all types + /// Represents an algorithm that adds a target pointer of space at the beginning of all types /// deriving from System.Object used for the MethodTable pointer in the CoreCLR runtime. /// internal class SystemObjectFieldLayoutAlgorithm : FieldLayoutAlgorithm diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/IBC/IBCDataModel.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/IBC/IBCDataModel.cs index 85a1df1fb402b..ac5dfed20e738 100644 --- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/IBC/IBCDataModel.cs +++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/IBC/IBCDataModel.cs @@ -40,7 +40,7 @@ public SectionTypeInfo(TokenType tokenType, SectionFormat section) } // - // Class constuctor for class IBCData + // Class constructor for class IBCData // private static SectionTypeInfo[] ComputeSectionTypeInfos() { diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/TypeSystem/Mutable/MutableModule.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/TypeSystem/Mutable/MutableModule.cs index 3fdb0d56d0942..8b72c5745aa88 100644 --- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/TypeSystem/Mutable/MutableModule.cs +++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/TypeSystem/Mutable/MutableModule.cs @@ -22,7 +22,7 @@ private class ManagedBinaryEmitterForInternalUse : TypeSystemMetadataEmitter Dictionary _moduleRefs = new Dictionary(); List _moduleRefStrings = new List(); readonly Func _moduleToIndex; - + MutableModule _mutableModule; protected override EntityHandle GetNonNestedResolutionScope(MetadataType metadataType) @@ -56,7 +56,7 @@ protected override EntityHandle GetNonNestedResolutionScope(MetadataType metadat } else { - // Further depedencies are handled by specifying a module which has a further assembly dependency on the correct module + // Further dependencies are handled by specifying a module which has a further assembly dependency on the correct module string asmReferenceName = GetNameOfAssemblyRefWhichResolvesToType(_mutableModule.ModuleThatIsCurrentlyTheSourceOfNewReferences, metadataType); int index = _moduleToIndex(_mutableModule.ModuleThatIsCurrentlyTheSourceOfNewReferences); Debug.Assert(index != -1); diff --git a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcInfo.cs b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcInfo.cs index ae112e4c7d0d6..58b7df937d667 100644 --- a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcInfo.cs +++ b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcInfo.cs @@ -547,7 +547,7 @@ private Dictionary> GetTransitions(byte[] image, ref int finalStateOffset = bitOffset; // points to the finalState bit array (array of bits indicating if the slot is live at the end of the chunk) bitOffset += (int)numCouldBeLiveSlots; // points to the array of code offsets - int normChunkBaseCodeOffset = currentChunk * _gcInfoTypes.NUM_NORM_CODE_OFFSETS_PER_CHUNK; // the sum of the sizes of all preceeding chunks + int normChunkBaseCodeOffset = currentChunk * _gcInfoTypes.NUM_NORM_CODE_OFFSETS_PER_CHUNK; // the sum of the sizes of all preceding chunks for (int i = 0; i < numCouldBeLiveSlots; i++) { // get the index of the next couldBeLive slot @@ -646,7 +646,7 @@ private int GetNextSlotId(byte[] image, bool fSimple, bool fSkipFirst, int slotI private Dictionary> UpdateTransitionCodeOffset(List transitions) { Dictionary> updatedTransitions = new Dictionary>(); - int cumInterruptibleLength = 0; // the sum of the lengths of all preceeding interruptible ranges + int cumInterruptibleLength = 0; // the sum of the lengths of all preceding interruptible ranges using (IEnumerator interruptibleRangesIter = InterruptibleRanges.GetEnumerator()) { interruptibleRangesIter.MoveNext(); diff --git a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSignature.cs b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSignature.cs index f90f68b683d12..daf9c194e517c 100644 --- a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSignature.cs +++ b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSignature.cs @@ -1393,14 +1393,14 @@ private ReadyToRunSignature ParseSignature(ReadyToRunFixupKind fixupType, String ParseMethod(builder); builder.Append($" ImplType :"); ParseType(builder); - if (flags.HasFlag(ReadyToRunVirtualFunctionOverrideFlags.VirtualFunctionOverriden)) + if (flags.HasFlag(ReadyToRunVirtualFunctionOverrideFlags.VirtualFunctionOverridden)) { builder.Append($" ImplMethod :"); ParseMethod(builder); } else { - builder.Append("Not Overriden"); + builder.Append("Not Overridden"); } if (fixupType == ReadyToRunFixupKind.Check_TypeLayout) diff --git a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/InterfacesTests.cs b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/InterfacesTests.cs index 683138a882350..8e6d96f2cffd6 100644 --- a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/InterfacesTests.cs +++ b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/InterfacesTests.cs @@ -112,7 +112,7 @@ public void TestOverlappingGenericInterfaces() } [Fact] - public void TestInterfaceRequiresImplmentation() + public void TestInterfaceRequiresImplementation() { MetadataType i1Type = _testModule.GetType("InterfaceArrangements", "I1"); MetadataType i2Type = _testModule.GetType("InterfaceArrangements", "I2"); diff --git a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/StaticFieldLayoutTests.cs b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/StaticFieldLayoutTests.cs index 421313c8dc657..2133c7429cc1b 100644 --- a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/StaticFieldLayoutTests.cs +++ b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/StaticFieldLayoutTests.cs @@ -57,7 +57,7 @@ public void TestNoPointers() public void TestStillNoPointers() { // - // Test that static offsets ignore instance fields preceeding them + // Test that static offsets ignore instance fields preceding them // MetadataType t = _testModule.GetType("StaticFieldLayout", "StillNoPointers"); diff --git a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/SyntheticVirtualOverrideTests.cs b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/SyntheticVirtualOverrideTests.cs index 46aa71cc6ac94..25be615490fbc 100644 --- a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/SyntheticVirtualOverrideTests.cs +++ b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/SyntheticVirtualOverrideTests.cs @@ -59,7 +59,7 @@ public void TestStructEqualsAndGetHashCode() } [Fact] - public void TestUnoverridenSyntheticEqualsAndGetHashCode() + public void TestUnoverriddenSyntheticEqualsAndGetHashCode() { // // Tests that the synthetic implementation on a base class is propagated to @@ -82,10 +82,10 @@ public void TestUnoverridenSyntheticEqualsAndGetHashCode() } [Fact] - public void TestOverridenSyntheticEqualsAndGetHashCode() + public void TestOverriddenSyntheticEqualsAndGetHashCode() { // - // Tests that the synthetic implementation on a base class can be overriden by + // Tests that the synthetic implementation on a base class can be overridden by // derived classes. // @@ -97,7 +97,7 @@ public void TestOverridenSyntheticEqualsAndGetHashCode() Assert.Equal(4, virtualSlots.Count); List vtable = virtualSlots.Select(s => t.FindVirtualFunctionTargetMethodOnObjectType(s)).ToList(); - + Assert.Contains(vtable, m => m.Name == "Equals" && m.OwningType == t); Assert.Contains(vtable, m => m.Name == "GetHashCode" && m.OwningType == t); Assert.Contains(vtable, m => m.Name == "Finalize" && m.OwningType.IsObject); diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs index cac049b732ebb..f84265206067a 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs +++ b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs @@ -679,13 +679,13 @@ protected virtual void VerifySecurityAttributes (ICustomAttributeProvider src, I protected virtual void VerifyArrayInitializers (MethodDefinition src, MethodDefinition linked) { - var expectedIndicies = GetCustomAttributeCtorValues (src, nameof (KeptInitializerData)) + var expectedIndices = GetCustomAttributeCtorValues (src, nameof (KeptInitializerData)) .Cast () .ToArray (); var expectKeptAll = src.CustomAttributes.Any (attr => attr.AttributeType.Name == nameof (KeptInitializerData) && !attr.HasConstructorArguments); - if (expectedIndicies.Length == 0 && !expectKeptAll) + if (expectedIndices.Length == 0 && !expectKeptAll) return; if (!src.HasBody) @@ -719,9 +719,9 @@ protected virtual void VerifyArrayInitializers (MethodDefinition src, MethodDefi VerifyInitializerField (srcField, linkedField); } } else { - foreach (var index in expectedIndicies) { + foreach (var index in expectedIndices) { if (index < 0 || index > possibleInitializerFields.Length) - Assert.True (false, $"Invalid expected index `{index}` in {src}. Value must be between 0 and {expectedIndicies.Length}"); + Assert.True (false, $"Invalid expected index `{index}` in {src}. Value must be between 0 and {expectedIndices.Length}"); var srcField = possibleInitializerFields[index]; var linkedField = linkedImplementationDetails.Fields.FirstOrDefault (f => f.InitialValue.SequenceEqual (srcField.InitialValue)); diff --git a/src/coreclr/tools/dotnet-pgo/SPGO/FlowSmoothing.cs b/src/coreclr/tools/dotnet-pgo/SPGO/FlowSmoothing.cs index 9c5613c71e5be..55524d2ac890c 100644 --- a/src/coreclr/tools/dotnet-pgo/SPGO/FlowSmoothing.cs +++ b/src/coreclr/tools/dotnet-pgo/SPGO/FlowSmoothing.cs @@ -3,15 +3,15 @@ /******** * This class handles smoothing over a circulation graph to be consistent and cost-minimal. - * + * * A circulation graph consists of nodes v, directed edges e, and two functions on the edges: - * + * * cost(e) = the cost of each positive unit of flow on the edge * capacity(e) = the range of possible values of flow on the edge - * + * * where flow is a function on the edges such that, for every node, the flow on in-edges adds up * to the flow on out-edges. - * + * * The objective of this class's main function (SmoothFlowGraph) is to take an inconsistent count of * each node's net flow and map it onto a consistent circulation. This circulation is constructed to map * back onto a consistent flow, and when a minimum cost circulation is found (by using a call to @@ -20,7 +20,7 @@ * node T a cost to increasing its net flow (when the bool is true) and a cost to decreasing its * net flow (when the bool is false.) SmoothFlowGraph then constructs a consistent circulation whose * cost will be minimized exactly when the cost of changing the net flows of the blocks is minimized. - * + * * The translation is outlined in detail in Section 4 of "Complementing Incomplete Edge Profile by applying * Minimum Cost Circulation Algorithms" (Levin 2007) ********/ @@ -148,7 +148,7 @@ public void Perform(int smoothingIterations = -1) CheckGraphConsistency(); } - // Helper function to perform parametric mapping on the NodeResults dictionary. + // Helper function to perform parameteric mapping on the NodeResults dictionary. public Dictionary MapNodes(Func transformation) { Dictionary results = new Dictionary(); @@ -161,7 +161,7 @@ public Dictionary MapNodes(Func transformation) return results; } - // Helper function to perform parametric mapping on the EdgeResults dictionary. + // Helper function to perform parameteric mapping on the EdgeResults dictionary. public Dictionary<(T, T), S> MapEdges(Func<(T, T), long, S> transformation) { Dictionary<(T, T), S> results = new Dictionary<(T, T), S>(); diff --git a/src/coreclr/tools/dotnet-pgo/TraceTypeSystemContext.cs b/src/coreclr/tools/dotnet-pgo/TraceTypeSystemContext.cs index d05f41bf81035..69fea4e6383c1 100644 --- a/src/coreclr/tools/dotnet-pgo/TraceTypeSystemContext.cs +++ b/src/coreclr/tools/dotnet-pgo/TraceTypeSystemContext.cs @@ -333,7 +333,7 @@ private EcmaModule AddModule(string filePath, string expectedSimpleName, byte[] return actualModuleData.Module; } } - mappedViewAccessor = null; // Ownership has been transfered + mappedViewAccessor = null; // Ownership has been transferred pdbReader = null; // Ownership has been transferred _moduleHashtable.AddOrGetExisting(moduleData); diff --git a/src/coreclr/tools/metainfo/mdinfo.cpp b/src/coreclr/tools/metainfo/mdinfo.cpp index 6c504c0b72271..a6feb24dedbfd 100644 --- a/src/coreclr/tools/metainfo/mdinfo.cpp +++ b/src/coreclr/tools/metainfo/mdinfo.cpp @@ -2608,7 +2608,7 @@ void MDInfo::DisplaySignature(PCCOR_SIGNATURE pbSigBlob, ULONG ulSigBlob, const { ULONG ulDataTemp; - // Handle the sentinal for varargs because it isn't counted in the args. + // Handle the sentinel for varargs because it isn't counted in the args. CorSigUncompressData(&pbSigBlob[cbCur], &ulDataTemp); ++i; diff --git a/src/coreclr/tools/r2rdump/README.md b/src/coreclr/tools/r2rdump/README.md index 6d6bbcc15505c..6d9c8a3a48d54 100644 --- a/src/coreclr/tools/r2rdump/README.md +++ b/src/coreclr/tools/r2rdump/README.md @@ -126,7 +126,7 @@ In x64/Arm/Arm64, GcTransitions are grouped into chunks where each chunk covers >> Array of bits indicating if each slot is live at the end of the chunk >> For each slot that changed state in the chunk: ->>> Array of elements consisting of a bit set to 1 and the normCodeOffsetDelta indicating all the code offsets where the slot changed state in the chunk. CodeOffset = normCodeOffsetDelta + normChunkBaseCodeOffset + currentRangeStartOffset - cumInterruptibleLength, where normChunkBaseCodeOffset is the sum of the sizes of all preceeding chunks, currentRangeStartOffset is the start offset of the interruptible range that the transition falls under and cumInterruptibleLength is the sum of the lengths of interruptible ranges that came before it +>>> Array of elements consisting of a bit set to 1 and the normCodeOffsetDelta indicating all the code offsets where the slot changed state in the chunk. CodeOffset = normCodeOffsetDelta + normChunkBaseCodeOffset + currentRangeStartOffset - cumInterruptibleLength, where normChunkBaseCodeOffset is the sum of the sizes of all preceding chunks, currentRangeStartOffset is the start offset of the interruptible range that the transition falls under and cumInterruptibleLength is the sum of the lengths of interruptible ranges that came before it ## Todo diff --git a/src/coreclr/tools/superpmi/superpmi-shared/compileresult.cpp b/src/coreclr/tools/superpmi/superpmi-shared/compileresult.cpp index 5e47e83f4a947..b5d7e9dfa60ae 100644 --- a/src/coreclr/tools/superpmi/superpmi-shared/compileresult.cpp +++ b/src/coreclr/tools/superpmi/superpmi-shared/compileresult.cpp @@ -220,7 +220,7 @@ void CompileResult::repAllocMem(ULONG* hotCodeSize, *orig_roDataBlock = (void*)value.roDataBlock; } -// Note - Ownership of pMap is transfered with this call. In replay icorjitinfo we should free it. +// Note - Ownership of pMap is transferred with this call. In replay icorjitinfo we should free it. void CompileResult::recSetBoundaries(CORINFO_METHOD_HANDLE ftn, ULONG32 cMap, ICorDebugInfo::OffsetMapping* pMap) { if (SetBoundaries == nullptr) @@ -267,7 +267,7 @@ bool CompileResult::repSetBoundaries(CORINFO_METHOD_HANDLE* ftn, ULONG32* cMap, return true; } -// Note - Ownership of vars is transfered with this call. In replay icorjitinfo we should free it. +// Note - Ownership of vars is transferred with this call. In replay icorjitinfo we should free it. void CompileResult::recSetVars(CORINFO_METHOD_HANDLE ftn, ULONG32 cVars, ICorDebugInfo::NativeVarInfo* vars) { if (SetVars == nullptr) @@ -317,7 +317,7 @@ bool CompileResult::repSetVars(CORINFO_METHOD_HANDLE* ftn, ULONG32* cVars, ICorD return true; } -// Note - Ownership of patchpointInfo is transfered with this call. In replay icorjitinfo we should free it. +// Note - Ownership of patchpointInfo is transferred with this call. In replay icorjitinfo we should free it. void CompileResult::recSetPatchpointInfo(PatchpointInfo* patchpointInfo) { if (SetPatchpointInfo == nullptr) diff --git a/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp b/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp index 9692140086a5f..87582b819312e 100644 --- a/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp +++ b/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp @@ -1117,7 +1117,7 @@ void interceptor_ICJI::getBoundaries(CORINFO_METHOD_HANDLE ftn, // [IN] m // Note that debugger (and profiler) is assuming that all of the // offsets form a contiguous block of memory, and that the // OffsetMapping is sorted in order of increasing native offset. -// Note - Ownership of pMap is transfered with this call. We need to record it before its passed on to the EE. +// Note - Ownership of pMap is transferred with this call. We need to record it before its passed on to the EE. void interceptor_ICJI::setBoundaries(CORINFO_METHOD_HANDLE ftn, // [IN] method of interest ULONG32 cMap, // [IN] size of pMap ICorDebugInfo::OffsetMapping* pMap // [IN] map including all points of interest. @@ -1154,7 +1154,7 @@ void interceptor_ICJI::getVars(CORINFO_METHOD_HANDLE ftn, // [IN] method // Report back to the EE the location of every variable. // note that the JIT might split lifetimes into different // locations etc. -// Note - Ownership of vars is transfered with this call. We need to record it before its passed on to the EE. +// Note - Ownership of vars is transferred with this call. We need to record it before its passed on to the EE. void interceptor_ICJI::setVars(CORINFO_METHOD_HANDLE ftn, // [IN] method of interest ULONG32 cVars, // [IN] size of 'vars' ICorDebugInfo::NativeVarInfo* vars // [IN] map telling where local vars are stored at diff --git a/src/coreclr/tools/tieringtest/tieringtest.cs b/src/coreclr/tools/tieringtest/tieringtest.cs index 864af7536b6d0..31c204595db63 100644 --- a/src/coreclr/tools/tieringtest/tieringtest.cs +++ b/src/coreclr/tools/tieringtest/tieringtest.cs @@ -197,7 +197,7 @@ static int Main(string[] args) { if (verbose) { - Console.WriteLine($"[tieringtest] ran {total} test iterations sucessfully"); + Console.WriteLine($"[tieringtest] ran {total} test iterations successfully"); } } } diff --git a/src/coreclr/tools/util/consoleargs.cpp b/src/coreclr/tools/util/consoleargs.cpp index 6fba56ad69c2d..02640bbea9e10 100644 --- a/src/coreclr/tools/util/consoleargs.cpp +++ b/src/coreclr/tools/util/consoleargs.cpp @@ -846,7 +846,7 @@ bool ConsoleArgs::ReadTextFile(LPCWSTR pwzFilename, _Outptr_ LPWSTR *ppwzTextBuf else { // - // File is formated as ANSI or UTF-8 and needs converting to UTF-16 + // File is formatted as ANSI or UTF-8 and needs converting to UTF-16 // int requiredSize = MultiByteToWideChar(CP_UTF8, 0, postByteOrderMarks, size, nullptr, 0); bufW = new WCHAR[requiredSize + 1]; diff --git a/src/coreclr/utilcode/clrconfig.cpp b/src/coreclr/utilcode/clrconfig.cpp index 5df6748739ccb..702d1759f5d2f 100644 --- a/src/coreclr/utilcode/clrconfig.cpp +++ b/src/coreclr/utilcode/clrconfig.cpp @@ -370,13 +370,13 @@ namespace // Creating structs using the macro table in CLRConfigValues.h // -// These macros intialize ConfigDWORDInfo structs. +// These macros initialize ConfigDWORDInfo structs. #define RETAIL_CONFIG_DWORD_INFO(symbol, name, defaultValue, description) \ const CLRConfig::ConfigDWORDInfo CLRConfig::symbol = {name, defaultValue, CLRConfig::LookupOptions::Default}; #define RETAIL_CONFIG_DWORD_INFO_EX(symbol, name, defaultValue, description, lookupOptions) \ const CLRConfig::ConfigDWORDInfo CLRConfig::symbol = {name, defaultValue, lookupOptions}; -// These macros intialize ConfigStringInfo structs. +// These macros initialize ConfigStringInfo structs. #define RETAIL_CONFIG_STRING_INFO(symbol, name, description) \ const CLRConfig::ConfigStringInfo CLRConfig::symbol = {name, CLRConfig::LookupOptions::Default}; #define RETAIL_CONFIG_STRING_INFO_EX(symbol, name, description, lookupOptions) \ diff --git a/src/coreclr/utilcode/loaderheap.cpp b/src/coreclr/utilcode/loaderheap.cpp index 6cc21137b2e29..00a1f06a17fbe 100644 --- a/src/coreclr/utilcode/loaderheap.cpp +++ b/src/coreclr/utilcode/loaderheap.cpp @@ -741,7 +741,7 @@ struct LoaderHeapFreeBlock { memset((BYTE*)pMem + GetOsPageSize(), 0xcc, dwTotalSize); } -#endif // DEBUG +#endif // DEBUG LoaderHeapFreeBlock *pNewBlock = new (nothrow) LoaderHeapFreeBlock; // If we fail allocating the LoaderHeapFreeBlock, ignore the failure and don't insert the free block at all. @@ -1280,7 +1280,7 @@ BOOL UnlockedLoaderHeap::GetMoreCommittedPages(size_t dwMinSize) if (IsInterleaved()) { - // The end of commited region for interleaved heaps points to the end of the executable + // The end of committed region for interleaved heaps points to the end of the executable // page and the data pages goes right after that. So we skip the data page here. m_pPtrToEndOfCommittedRegion += GetOsPageSize(); } diff --git a/src/coreclr/utilcode/pedecoder.cpp b/src/coreclr/utilcode/pedecoder.cpp index 209db00f9e40b..ec8444715f0f8 100644 --- a/src/coreclr/utilcode/pedecoder.cpp +++ b/src/coreclr/utilcode/pedecoder.cpp @@ -2462,11 +2462,11 @@ CHECK PEDecoder::CheckWillCreateGuardPage() const if (!IsDll()) { SIZE_T sizeReservedStack = 0; - SIZE_T sizeCommitedStack = 0; + SIZE_T sizeCommittedStack = 0; - GetEXEStackSizes(&sizeReservedStack, &sizeCommitedStack); + GetEXEStackSizes(&sizeReservedStack, &sizeCommittedStack); - CHECK(ThreadWillCreateGuardPage(sizeReservedStack, sizeCommitedStack)); + CHECK(ThreadWillCreateGuardPage(sizeReservedStack, sizeCommittedStack)); } diff --git a/src/coreclr/utilcode/stgpool.cpp b/src/coreclr/utilcode/stgpool.cpp index cba533eeebcbb..5bc577083f036 100644 --- a/src/coreclr/utilcode/stgpool.cpp +++ b/src/coreclr/utilcode/stgpool.cpp @@ -765,7 +765,7 @@ StgStringPool::InitNew( HRESULT hr; UINT32 nEmptyStringOffset; - // Let base class intialize. + // Let base class initialize. IfFailRet(StgPool::InitNew()); // Set initial table sizes, if specified. @@ -1399,7 +1399,7 @@ StgBlobPool::InitNew( HRESULT hr; - // Let base class intialize. + // Let base class initialize. IfFailRet(StgPool::InitNew()); // Set initial table sizes, if specified. diff --git a/src/coreclr/utilcode/util_nodependencies.cpp b/src/coreclr/utilcode/util_nodependencies.cpp index 45874f0df86eb..50973d4d06064 100644 --- a/src/coreclr/utilcode/util_nodependencies.cpp +++ b/src/coreclr/utilcode/util_nodependencies.cpp @@ -758,7 +758,7 @@ void OutputDebugStringUtf8(LPCUTF8 utf8DebugMsg) #endif // !TARGET_UNIX } -BOOL ThreadWillCreateGuardPage(SIZE_T sizeReservedStack, SIZE_T sizeCommitedStack) +BOOL ThreadWillCreateGuardPage(SIZE_T sizeReservedStack, SIZE_T sizeCommittedStack) { // We need to make sure there will be a reserved but never committed page at the end // of the stack. We do here the check NT does when it creates the user stack to decide @@ -769,7 +769,7 @@ BOOL ThreadWillCreateGuardPage(SIZE_T sizeReservedStack, SIZE_T sizeCommitedStac // If we are not it will bomb out. We will also bomb out if we touch the hard guard // page. // - // For situation B, teb->StackLimit is at the beggining of the user stack (ie + // For situation B, teb->StackLimit is at the beginning of the user stack (ie // before updating StackLimit it checks if it was able to create a new guard page, // in this case, it can't), which makes the check fail in RtlUnwind. // @@ -790,12 +790,12 @@ BOOL ThreadWillCreateGuardPage(SIZE_T sizeReservedStack, SIZE_T sizeCommitedStac // OS rounds up sizes the following way to decide if it marks a guard page sizeReservedStack = ALIGN(sizeReservedStack, ((size_t)sysInfo.dwAllocationGranularity)); // Allocation granularity - sizeCommitedStack = ALIGN(sizeCommitedStack, ((size_t)sysInfo.dwPageSize)); // Page Size + sizeCommittedStack = ALIGN(sizeCommittedStack, ((size_t)sysInfo.dwPageSize)); // Page Size // OS wont create guard page, we can't execute managed code safely. // We also have to make sure we have a 'hard' guard, thus we add another // page to the memory we would need comitted. // That is, the following code will check if sizeReservedStack is at least 2 pages - // more than sizeCommitedStack. - return (sizeReservedStack > sizeCommitedStack + ((size_t)sysInfo.dwPageSize)); + // more than sizeCommittedStack. + return (sizeReservedStack > sizeCommittedStack + ((size_t)sysInfo.dwPageSize)); } // ThreadWillCreateGuardPage diff --git a/src/coreclr/vm/amd64/JitHelpers_Fast.asm b/src/coreclr/vm/amd64/JitHelpers_Fast.asm index 911ebcc7a7c6e..9ec3a8617dac3 100644 --- a/src/coreclr/vm/amd64/JitHelpers_Fast.asm +++ b/src/coreclr/vm/amd64/JitHelpers_Fast.asm @@ -204,7 +204,7 @@ LEAF_ENTRY JIT_PatchedCodeLast, _TEXT ret LEAF_END JIT_PatchedCodeLast, _TEXT -; JIT_ByRefWriteBarrier has weird symantics, see usage in StubLinkerX86.cpp +; JIT_ByRefWriteBarrier has weird semantics, see usage in StubLinkerX86.cpp ; ; Entry: ; RDI - address of ref-field (assigned to) diff --git a/src/coreclr/vm/amd64/excepamd64.cpp b/src/coreclr/vm/amd64/excepamd64.cpp index a50ddedc2ff49..59146c9030b5b 100644 --- a/src/coreclr/vm/amd64/excepamd64.cpp +++ b/src/coreclr/vm/amd64/excepamd64.cpp @@ -432,7 +432,7 @@ RtlVirtualUnwind_Worker ( // It is of note that we are significantly pruning the funtion here in making the fake // code buffer, all that we are making room for is 1 byte for the prologue, 1 byte for // function code and what is left of the epilogue to be executed. This is _very_ closely - // tied to the implmentation of RtlVirtualUnwind and the knowledge that by passing the + // tied to the implementation of RtlVirtualUnwind and the knowledge that by passing the // the test above and having InEpilogue==TRUE then the code path which will be followed // through RtlVirtualUnwind is known. // diff --git a/src/coreclr/vm/amd64/jithelpers_fast.S b/src/coreclr/vm/amd64/jithelpers_fast.S index 63167ae2ae0d8..5d7cb379ce96d 100644 --- a/src/coreclr/vm/amd64/jithelpers_fast.S +++ b/src/coreclr/vm/amd64/jithelpers_fast.S @@ -209,7 +209,7 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT REPRET #endif - // make sure this is bigger than any of the others + // make sure this is bigger than any of the others .balign 16 nop LEAF_END_MARKED JIT_WriteBarrier, _TEXT @@ -219,7 +219,7 @@ LEAF_ENTRY JIT_PatchedCodeLast, _TEXT ret LEAF_END JIT_PatchedCodeLast, _TEXT -// JIT_ByRefWriteBarrier has weird symantics, see usage in StubLinkerX86.cpp +// JIT_ByRefWriteBarrier has weird semantics, see usage in StubLinkerX86.cpp // // Entry: // RDI - address of ref-field (assigned to) diff --git a/src/coreclr/vm/amd64/virtualcallstubcpu.hpp b/src/coreclr/vm/amd64/virtualcallstubcpu.hpp index e20dc31076440..8875afb7e8981 100644 --- a/src/coreclr/vm/amd64/virtualcallstubcpu.hpp +++ b/src/coreclr/vm/amd64/virtualcallstubcpu.hpp @@ -204,8 +204,8 @@ inline BOOL DispatchStubLong::isLongStub(LPCBYTE pCode) Monomorphic and mostly monomorphic call sites eventually point to DispatchStubs. A dispatch stub has an expected type (expectedMT), target address (target) and fail address (failure). If the calling frame does in fact have the type be of the expected type, then -control is transfered to the target address, the method implementation. If not, -then control is transfered to the fail address, a fail stub (see below) where a polymorphic +control is transferred to the target address, the method implementation. If not, +then control is transferred to the fail address, a fail stub (see below) where a polymorphic lookup is done to find the correct address to go to. implementation note: Order, choice of instructions, and branch directions @@ -362,7 +362,7 @@ transfers to the resolve piece (see ResolveStub). The failEntryPoint decrements every time it is entered. The ee at various times will add a large chunk to the counter. ResolveEntry - does a lookup via in a cache by hashing the actual type of the calling frame s - and the token identifying the (contract,method) pair desired. If found, control is transfered + and the token identifying the (contract,method) pair desired. If found, control is transferred to the method implementation. If not found in the cache, the token is pushed and the ee is entered via the ResolveWorkerStub to do a full lookup and eventual transfer to the correct method implementation. Since there is a different resolve stub for every token, the token can be inlined and the token can be pre-hashed. @@ -454,7 +454,7 @@ struct ResolveHolder { static void InitializeStatic(); - void Initialize(ResolveHolder* pResolveHolderRX, + void Initialize(ResolveHolder* pResolveHolderRX, PCODE resolveWorkerTarget, PCODE patcherTarget, size_t dispatchToken, UINT32 hashedToken, void * cacheAddr, INT32* counterAddr); @@ -772,7 +772,7 @@ void ResolveHolder::InitializeStatic() resolveInit.part10 [1] = 0xE0; }; -void ResolveHolder::Initialize(ResolveHolder* pResolveHolderRX, +void ResolveHolder::Initialize(ResolveHolder* pResolveHolderRX, PCODE resolveWorkerTarget, PCODE patcherTarget, size_t dispatchToken, UINT32 hashedToken, void * cacheAddr, INT32* counterAddr) diff --git a/src/coreclr/vm/appdomain.cpp b/src/coreclr/vm/appdomain.cpp index 0cc13f6836e1b..4ac426434b033 100644 --- a/src/coreclr/vm/appdomain.cpp +++ b/src/coreclr/vm/appdomain.cpp @@ -190,12 +190,12 @@ OBJECTREF *PinnedHeapHandleBucket::TryAllocateEmbeddedFreeHandle() } CONTRACTL_END; - OBJECTREF pPreallocatedSentinalObject = ObjectFromHandle(g_pPreallocatedSentinelObject); - _ASSERTE(pPreallocatedSentinalObject != NULL); + OBJECTREF pPreallocatedSentinelObject = ObjectFromHandle(g_pPreallocatedSentinelObject); + _ASSERTE(pPreallocatedSentinelObject != NULL); for (int i = m_CurrentEmbeddedFreePos; i < m_CurrentPos; i++) { - if (m_pArrayDataPtr[i] == pPreallocatedSentinalObject) + if (m_pArrayDataPtr[i] == pPreallocatedSentinelObject) { m_CurrentEmbeddedFreePos = i; m_pArrayDataPtr[i] = NULL; @@ -462,14 +462,14 @@ void PinnedHeapHandleTable::ReleaseHandles(OBJECTREF *pObjRef, DWORD nReleased) _ASSERTE(m_pCrstDebug->OwnedByCurrentThread()); #endif - OBJECTREF pPreallocatedSentinalObject = ObjectFromHandle(g_pPreallocatedSentinelObject); - _ASSERTE(pPreallocatedSentinalObject != NULL); + OBJECTREF pPreallocatedSentinelObject = ObjectFromHandle(g_pPreallocatedSentinelObject); + _ASSERTE(pPreallocatedSentinelObject != NULL); // Add the released handles to the list of available handles. for (DWORD i = 0; i < nReleased; i++) { - SetObjectReference(&pObjRef[i], pPreallocatedSentinalObject); + SetObjectReference(&pObjRef[i], pPreallocatedSentinelObject); } m_cEmbeddedFree += nReleased; @@ -1105,8 +1105,8 @@ void SystemDomain::PreallocateSpecialObjects() _ASSERTE(g_pPreallocatedSentinelObject == NULL); - OBJECTREF pPreallocatedSentinalObject = AllocateObject(g_pObjectClass); - g_pPreallocatedSentinelObject = CreatePinningHandle( pPreallocatedSentinalObject ); + OBJECTREF pPreallocatedSentinelObject = AllocateObject(g_pObjectClass); + g_pPreallocatedSentinelObject = CreatePinningHandle( pPreallocatedSentinelObject ); } void SystemDomain::CreatePreallocatedExceptions() diff --git a/src/coreclr/vm/argslot.h b/src/coreclr/vm/argslot.h index 757f4ef0b6574..d24fe656d6296 100644 --- a/src/coreclr/vm/argslot.h +++ b/src/coreclr/vm/argslot.h @@ -18,7 +18,7 @@ typedef unsigned __int64 ARG_SLOT; #if BIGENDIAN // Returns the address of the payload inside the argslot -inline BYTE* ArgSlotEndianessFixup(ARG_SLOT* pArg, UINT cbSize) { +inline BYTE* ArgSlotEndiannessFixup(ARG_SLOT* pArg, UINT cbSize) { LIMITED_METHOD_CONTRACT; BYTE* pBuf = (BYTE*)pArg; @@ -36,7 +36,7 @@ inline BYTE* ArgSlotEndianessFixup(ARG_SLOT* pArg, UINT cbSize) { return pBuf; } #else -#define ArgSlotEndianessFixup(pArg, cbSize) ((BYTE *)(pArg)) +#define ArgSlotEndiannessFixup(pArg, cbSize) ((BYTE *)(pArg)) #endif #endif // __ARG_SLOT_H__ diff --git a/src/coreclr/vm/arm/stubs.cpp b/src/coreclr/vm/arm/stubs.cpp index 4c0d7cc456a3d..6c02140229a10 100644 --- a/src/coreclr/vm/arm/stubs.cpp +++ b/src/coreclr/vm/arm/stubs.cpp @@ -361,7 +361,7 @@ void CopyWriteBarrier(PCODE dstCode, PCODE srcCode, PCODE endCode) #if _DEBUG void ValidateWriteBarriers() { - // Post-grow WB are bigger than pre-grow so validating that target WB has space to accomodate those + // Post-grow WB are bigger than pre-grow so validating that target WB has space to accommodate those _ASSERTE( ((PBYTE)JIT_WriteBarrier_End - (PBYTE)JIT_WriteBarrier) >= ((PBYTE)JIT_WriteBarrier_MP_Post_End - (PBYTE)JIT_WriteBarrier_MP_Post)); _ASSERTE( ((PBYTE)JIT_WriteBarrier_End - (PBYTE)JIT_WriteBarrier) >= ((PBYTE)JIT_WriteBarrier_SP_Post_End - (PBYTE)JIT_WriteBarrier_SP_Post)); diff --git a/src/coreclr/vm/arm/virtualcallstubcpu.hpp b/src/coreclr/vm/arm/virtualcallstubcpu.hpp index 041c8267d1812..b9f54968f3f4c 100644 --- a/src/coreclr/vm/arm/virtualcallstubcpu.hpp +++ b/src/coreclr/vm/arm/virtualcallstubcpu.hpp @@ -93,8 +93,8 @@ struct DispatchHolder; Monomorphic and mostly monomorphic call sites eventually point to DispatchStubs. A dispatch stub has an expected type (expectedMT), target address (target) and fail address (failure). If the calling frame does in fact have the type be of the expected type, then -control is transfered to the target address, the method implementation. If not, -then control is transfered to the fail address, a fail stub (see below) where a polymorphic +control is transferred to the target address, the method implementation. If not, +then control is transferred to the fail address, a fail stub (see below) where a polymorphic lookup is done to find the correct address to go to. implementation note: Order, choice of instructions, and branch directions @@ -198,7 +198,7 @@ transfers to the resolve piece (see ResolveStub). The failEntryPoint decrements every time it is entered. The ee at various times will add a large chunk to the counter. ResolveEntry - does a lookup via in a cache by hashing the actual type of the calling frame s - and the token identifying the (contract,method) pair desired. If found, control is transfered + and the token identifying the (contract,method) pair desired. If found, control is transferred to the method implementation. If not found in the cache, the token is pushed and the ee is entered via the ResolveWorkerStub to do a full lookup and eventual transfer to the correct method implementation. Since there is a different resolve stub for every token, the token can be inlined and the token can be pre-hashed. diff --git a/src/coreclr/vm/arm64/asmhelpers.S b/src/coreclr/vm/arm64/asmhelpers.S index 6baca17be8bb6..0597d41296736 100644 --- a/src/coreclr/vm/arm64/asmhelpers.S +++ b/src/coreclr/vm/arm64/asmhelpers.S @@ -213,7 +213,7 @@ WRITE_BARRIER_ENTRY JIT_UpdateWriteBarrierState // x12 will be used for pointers mov x8, x0 - mov x9, x1 + mov x9, x1 PREPARE_EXTERNAL_VAR g_card_table, x12 ldr x0, [x12] @@ -754,7 +754,7 @@ LOCAL_LABEL(Success): blt LOCAL_LABEL(Promote) ldr x16, [x9, #ResolveCacheElem__target] // get the ImplTarget - br x16 // branch to interface implemenation target + br x16 // branch to interface implementation target LOCAL_LABEL(Promote): // Move this entry to head postion of the chain diff --git a/src/coreclr/vm/arm64/asmhelpers.asm b/src/coreclr/vm/arm64/asmhelpers.asm index 371790376b5a9..b706ba3d39b46 100644 --- a/src/coreclr/vm/arm64/asmhelpers.asm +++ b/src/coreclr/vm/arm64/asmhelpers.asm @@ -1085,7 +1085,7 @@ Success blt Promote ldr x16, [x9, #ResolveCacheElem__target] ; get the ImplTarget - br x16 ; branch to interface implemenation target + br x16 ; branch to interface implementation target Promote ; Move this entry to head postion of the chain diff --git a/src/coreclr/vm/assembly.cpp b/src/coreclr/vm/assembly.cpp index 700f85d9da29b..97f1d26d1c281 100644 --- a/src/coreclr/vm/assembly.cpp +++ b/src/coreclr/vm/assembly.cpp @@ -475,7 +475,7 @@ Assembly *Assembly::CreateDynamic(AssemblyBinder* pBinder, NativeAssemblyNamePar // Setup the managed proxy now, but do not actually transfer ownership to it. // Once everything is setup and nothing can fail anymore, the ownership will be - // atomically transfered by call to LoaderAllocator::ActivateManagedTracking(). + // atomically transferred by call to LoaderAllocator::ActivateManagedTracking(). pCollectibleLoaderAllocator->SetupManagedTracking(pKeepAlive); createdNewAssemblyLoaderAllocator = TRUE; diff --git a/src/coreclr/vm/assemblynative.cpp b/src/coreclr/vm/assemblynative.cpp index fa30855cbbc3c..1e9d0305f24af 100644 --- a/src/coreclr/vm/assemblynative.cpp +++ b/src/coreclr/vm/assemblynative.cpp @@ -1150,7 +1150,7 @@ extern "C" INT_PTR QCALLTYPE AssemblyNative_InitializeAssemblyLoadContext(INT_PT // Setup the managed proxy now, but do not actually transfer ownership to it. // Once everything is setup and nothing can fail anymore, the ownership will be - // atomically transfered by call to LoaderAllocator::ActivateManagedTracking(). + // atomically transferred by call to LoaderAllocator::ActivateManagedTracking(). loaderAllocator->SetupManagedTracking(&pManagedLoaderAllocator); } diff --git a/src/coreclr/vm/binder.cpp b/src/coreclr/vm/binder.cpp index 18f0f0b700901..71e57c9d5b474 100644 --- a/src/coreclr/vm/binder.cpp +++ b/src/coreclr/vm/binder.cpp @@ -502,7 +502,7 @@ void CoreLibBinder::TriggerGCUnderStress() #ifndef DACCESS_COMPILE _ASSERTE (GetThreadNULLOk()); TRIGGERSGC (); - // Force a GC here because GetClass could trigger GC nondeterminsticly + // Force a GC here because GetClass could trigger GC nondeterministicly if (g_pConfig->GetGCStressLevel() != 0) { DEBUG_ONLY_REGION(); @@ -586,7 +586,7 @@ void CoreLibBinder::Check() else if (p->fieldName != NULL) { - // This assert will fire if there is DEFINE_FIELD_U macro without preceeding DEFINE_CLASS_U macro in corelib.h + // This assert will fire if there is DEFINE_FIELD_U macro without preceding DEFINE_CLASS_U macro in corelib.h _ASSERTE(pMT != NULL); FieldDesc * pFD = MemberLoader::FindField(pMT, p->fieldName, NULL, 0, NULL); diff --git a/src/coreclr/vm/binder.h b/src/coreclr/vm/binder.h index 85dc575cbdb58..ed697a337ffe8 100644 --- a/src/coreclr/vm/binder.h +++ b/src/coreclr/vm/binder.h @@ -21,7 +21,7 @@ typedef DPTR(const struct HardCodedMetaSig) PTR_HARDCODEDMETASIG; struct HardCodedMetaSig { const BYTE* m_pMetaSig; // metasig prefixed with INT8 length: - // length > 0 - resolved, lenght < 0 - has unresolved type references + // length > 0 - resolved, length < 0 - has unresolved type references }; #define DEFINE_METASIG(body) extern const body @@ -333,7 +333,7 @@ FORCEINLINE PTR_MethodTable CoreLibBinder::GetClass(BinderClassID id) } CONTRACTL_END; - // Force a GC here under stress because type loading could trigger GC nondeterminsticly + // Force a GC here under stress because type loading could trigger GC nondeterministicly INDEBUG(TriggerGCUnderStress()); PTR_MethodTable pMT = VolatileLoad(&((&g_CoreLib)->m_pClasses[id])); @@ -355,7 +355,7 @@ FORCEINLINE MethodDesc * CoreLibBinder::GetMethod(BinderMethodID id) } CONTRACTL_END; - // Force a GC here under stress because type loading could trigger GC nondeterminsticly + // Force a GC here under stress because type loading could trigger GC nondeterministicly INDEBUG(TriggerGCUnderStress()); MethodDesc * pMD = VolatileLoad(&((&g_CoreLib)->m_pMethods[id])); @@ -377,7 +377,7 @@ FORCEINLINE FieldDesc * CoreLibBinder::GetField(BinderFieldID id) } CONTRACTL_END; - // Force a GC here under stress because type loading could trigger GC nondeterminsticly + // Force a GC here under stress because type loading could trigger GC nondeterministicly INDEBUG(TriggerGCUnderStress()); FieldDesc * pFD = VolatileLoad(&((&g_CoreLib)->m_pFields[id])); diff --git a/src/coreclr/vm/callhelpers.cpp b/src/coreclr/vm/callhelpers.cpp index da342a1b1f01b..a439136cd704c 100644 --- a/src/coreclr/vm/callhelpers.cpp +++ b/src/coreclr/vm/callhelpers.cpp @@ -448,7 +448,7 @@ void MethodDescCallSite::CallTargetWorker(const ARG_SLOT *pArguments, ARG_SLOT * UINT32 stackSize = m_argIt.GetArgSize(); // We need to pass in a pointer, but be careful of the ARG_SLOT calling convention. We might already have a pointer in the ARG_SLOT. - PVOID pSrc = stackSize > sizeof(ARG_SLOT) ? (LPVOID)ArgSlotToPtr(pArguments[arg]) : (LPVOID)ArgSlotEndianessFixup((ARG_SLOT*)&pArguments[arg], stackSize); + PVOID pSrc = stackSize > sizeof(ARG_SLOT) ? (LPVOID)ArgSlotToPtr(pArguments[arg]) : (LPVOID)ArgSlotEndiannessFixup((ARG_SLOT*)&pArguments[arg], stackSize); #if defined(UNIX_AMD64_ABI) if (argDest.IsStructPassedInRegs()) diff --git a/src/coreclr/vm/callhelpers.h b/src/coreclr/vm/callhelpers.h index 5a7b338e2980f..a2a4f7dd5ad3d 100644 --- a/src/coreclr/vm/callhelpers.h +++ b/src/coreclr/vm/callhelpers.h @@ -346,7 +346,7 @@ class MethodDescCallSite } \ ARG_SLOT retval; \ CallTargetWorker(pArguments, &retval, sizeof(retval)); \ - return *(rettype *)ArgSlotEndianessFixup(&retval, sizeof(rettype)); \ + return *(rettype *)ArgSlotEndiannessFixup(&retval, sizeof(rettype)); \ } #define MDCALLDEF_ARGSLOT(wrappedmethod, ext) \ @@ -362,7 +362,7 @@ class MethodDescCallSite ARG_SLOT retval; \ CallTargetWorker(pArguments, &retval, sizeof(retval)); \ return ObjectTo##reftype(*(ptrtype *) \ - ArgSlotEndianessFixup(&retval, sizeof(ptrtype))); \ + ArgSlotEndiannessFixup(&retval, sizeof(ptrtype))); \ } diff --git a/src/coreclr/vm/callsiteinspect.cpp b/src/coreclr/vm/callsiteinspect.cpp index 3773580bd0a5c..00725cd82ec36 100644 --- a/src/coreclr/vm/callsiteinspect.cpp +++ b/src/coreclr/vm/callsiteinspect.cpp @@ -39,7 +39,7 @@ namespace PVOID* pVal = (PVOID *)val; if (!fIsByRef) { - val = StackElemEndianessFixup(val, pMT->GetNumInstanceFieldBytes()); + val = StackElemEndiannessFixup(val, pMT->GetNumInstanceFieldBytes()); pVal = &val; } @@ -62,7 +62,7 @@ namespace } else { - val = StackElemEndianessFixup(val, CorTypeInfo::Size(eType)); + val = StackElemEndiannessFixup(val, CorTypeInfo::Size(eType)); } void *pDest = pObj->UnBox(); @@ -268,28 +268,28 @@ namespace memcpyNoGCRefs(pvDest, srcData, cbsize); // need to sign-extend signed types - bool fEndianessFixup = false; + bool fEndiannessFixup = false; switch (typ) { case ELEMENT_TYPE_I1: ret = *(INT8*)srcData; - fEndianessFixup = true; + fEndiannessFixup = true; break; case ELEMENT_TYPE_I2: ret = *(INT16*)srcData; - fEndianessFixup = true; + fEndiannessFixup = true; break; case ELEMENT_TYPE_I4: ret = *(INT32*)srcData; - fEndianessFixup = true; + fEndiannessFixup = true; break; default: - memcpyNoGCRefs(StackElemEndianessFixup(&ret, cbsize), srcData, cbsize); + memcpyNoGCRefs(StackElemEndiannessFixup(&ret, cbsize), srcData, cbsize); break; } #if !defined(HOST_64BIT) && BIGENDIAN - if (fEndianessFixup) + if (fEndiannessFixup) ret <<= 32; #endif } diff --git a/src/coreclr/vm/ceeload.cpp b/src/coreclr/vm/ceeload.cpp index c240b68a43efa..0589597261920 100644 --- a/src/coreclr/vm/ceeload.cpp +++ b/src/coreclr/vm/ceeload.cpp @@ -1718,7 +1718,7 @@ BOOL Module::IsStaticStoragePrepared(mdTypeDef tkType) // Right now the design is that we do one static allocation pass during NGEN, // and a 2nd pass for it at module init time for modules that weren't NGENed or the NGEN - // pass was unsucessful. If we are loading types after that then we must use dynamic + // pass was unsuccessful. If we are loading types after that then we must use dynamic // static storage. These dynamic statics require an additional indirection so they // don't perform quite as well. // @@ -2130,7 +2130,7 @@ BOOL Module::IsInSameVersionBubble(Module *target) IMDInternalImport* pMdImport = GetReadyToRunInfo()->GetNativeManifestModule()->GetMDImport(); if (pMdImport == NULL) return FALSE; - + LPCUTF8 targetName = target->GetAssembly()->GetSimpleName(); HENUMInternal assemblyEnum; diff --git a/src/coreclr/vm/ceeload.h b/src/coreclr/vm/ceeload.h index 3aa398ee1b50b..94fda0db72b0b 100644 --- a/src/coreclr/vm/ceeload.h +++ b/src/coreclr/vm/ceeload.h @@ -1633,7 +1633,7 @@ class Module : public ModuleBase InstrumentedILOffsetMapping GetInstrumentedILOffsetMapping(mdMethodDef token); public: - // This helper returns to offsets for the slots/bytes/handles. They return the offset in bytes from the beggining + // This helper returns to offsets for the slots/bytes/handles. They return the offset in bytes from the beginning // of the 1st GC pointer in the statics block for the module. void GetOffsetsForRegularStaticData( mdTypeDef cl, @@ -1826,7 +1826,7 @@ class Module : public ModuleBase // this map *always* overrides the Metadata RVA PTR_DynamicILBlobTable m_pDynamicILBlobTable; - // maps tokens for to their corresponding overriden IL blobs + // maps tokens for to their corresponding overridden IL blobs // this map conditionally overrides the Metadata RVA and the DynamicILBlobTable PTR_DynamicILBlobTable m_pTemporaryILBlobTable; diff --git a/src/coreclr/vm/ceemain.cpp b/src/coreclr/vm/ceemain.cpp index aada53cd7e565..aae213736db89 100644 --- a/src/coreclr/vm/ceemain.cpp +++ b/src/coreclr/vm/ceemain.cpp @@ -19,7 +19,7 @@ // http://mswikis/clr/dev/Pages/CLR%20Team%20Commenting.aspx for more information // // There is a bug associated with Visual Studio where it does not recognise the hyperlink if there is a :: -// preceeding it on the same line. Since C++ uses :: as a namespace separator, this can often mean that the +// preceding it on the same line. Since C++ uses :: as a namespace separator, this can often mean that the // second hyperlink on a line does not work. To work around this it is better to use '.' instead of :: as // the namespace separators in code: hyperlinks. // @@ -814,7 +814,7 @@ void EEStartupHelper() BaseDomain::Attach(); SystemDomain::Attach(); - // Start up the EE intializing all the global variables + // Start up the EE initializing all the global variables ECall::Init(); COMDelegate::Init(); @@ -1047,7 +1047,7 @@ LONG FilterStartupException(PEXCEPTION_POINTERS p, PVOID pv) return EXCEPTION_CONTINUE_SEARCH; } -// EEStartup is responsible for all the one time intialization of the runtime. Some of the highlights of +// EEStartup is responsible for all the one time initialization of the runtime. Some of the highlights of // what it does include // * Creates the default and shared, appdomains. // * Loads System.Private.CoreLib and loads up the fundamental types (System.Object ...) diff --git a/src/coreclr/vm/class.cpp b/src/coreclr/vm/class.cpp index a82a80f372902..f9094b4860ab8 100644 --- a/src/coreclr/vm/class.cpp +++ b/src/coreclr/vm/class.cpp @@ -428,7 +428,7 @@ VOID EEClass::FixupFieldDescForEnC(MethodTable * pMT, EnCFieldDesc *pFD, mdField // AddField - called when a new field is added by EnC // // Since instances of this class may already exist on the heap, we can't change the -// runtime layout of the object to accomodate the new field. Instead we hang the field +// runtime layout of the object to accommodate the new field. Instead we hang the field // off the syncblock (for instance fields) or in the FieldDesc for static fields. // // Here we just create the FieldDesc and link it to the class. The actual storage will @@ -2503,7 +2503,7 @@ CorClassIfaceAttr MethodTable::GetComClassInterfaceType() return clsIfNone; // If the class does not support IClassX, - // then it is considered ClassInterfaceType.None unless explicitly overriden by the CA + // then it is considered ClassInterfaceType.None unless explicitly overridden by the CA if (!ClassSupportsIClassX(this)) return clsIfNone; diff --git a/src/coreclr/vm/classcompat.cpp b/src/coreclr/vm/classcompat.cpp index 416f9455840e1..a72a81a48e92b 100644 --- a/src/coreclr/vm/classcompat.cpp +++ b/src/coreclr/vm/classcompat.cpp @@ -1424,8 +1424,8 @@ VOID MethodTableBuilder::BuildInteropVTable_PlaceVtableMethods( } else { - // We will use the interface implemenation if we do not find one in the - // parent. It will have to be overriden by the a method impl unless the + // We will use the interface implementation if we do not find one in the + // parent. It will have to be overridden by the a method impl unless the // class is abstract or it is a special COM type class. MethodDesc* pParentMD = NULL; @@ -1716,7 +1716,7 @@ VOID MethodTableBuilder::BuildInteropVTable_PlaceInterfaceDeclaration( BOOL fInterfaceFound = FALSE; // Check our vtable for entries that we are suppose to override. - // Since this is an external method we must also check the inteface map. + // Since this is an external method we must also check the interface map. // We want to replace any interface methods even if they have been replaced // by a base class. for(USHORT i = 0; i < bmtInterface->wInterfaceMapSize; i++) diff --git a/src/coreclr/vm/classlayoutinfo.cpp b/src/coreclr/vm/classlayoutinfo.cpp index eaade096e8fe0..34b04dcd6f7ab 100644 --- a/src/coreclr/vm/classlayoutinfo.cpp +++ b/src/coreclr/vm/classlayoutinfo.cpp @@ -196,7 +196,7 @@ namespace if (!ClrSafeInt::addition(classSizeInMetadata, (ULONG)parentSize, classSize)) COMPlusThrowOM(); - // size must be large enough to accomodate layout. If not, we use the layout size instead. + // size must be large enough to accommodate layout. If not, we use the layout size instead. calcTotalSize = max(classSize, calcTotalSize); } else diff --git a/src/coreclr/vm/clrtocomcall.cpp b/src/coreclr/vm/clrtocomcall.cpp index b161c10404dd9..19a6dca4834bc 100644 --- a/src/coreclr/vm/clrtocomcall.cpp +++ b/src/coreclr/vm/clrtocomcall.cpp @@ -116,7 +116,7 @@ ComPlusCallInfo *ComPlusCall::PopulateComPlusCallMethodDesc(MethodDesc* pMD, DWO // Determine if this is a special COM event call. BOOL fComEventCall = pItfMT->IsComEventItfType(); - // Determine if the call needs to do early bound to late bound convertion. + // Determine if the call needs to do early bound to late bound conversion. BOOL fLateBound = !fComEventCall && pItfMT->IsInterface() && pItfMT->GetComInterfaceType() == ifDispatch; if (fLateBound) diff --git a/src/coreclr/vm/clsload.cpp b/src/coreclr/vm/clsload.cpp index 1ca24e7fbfc09..4bca61bd62306 100644 --- a/src/coreclr/vm/clsload.cpp +++ b/src/coreclr/vm/clsload.cpp @@ -3022,7 +3022,7 @@ TypeHandle ClassLoader::CreateTypeHandleForTypeKey(TypeKey* pKey, AllocMemTracke ThrowTypeLoadException(pKey, IDS_CLASSLOAD_GENERAL); } - // We do allow parametrized types of ByRefLike types. Languages may restrict them to produce safe or verifiable code, + // We do allow parameterized types of ByRefLike types. Languages may restrict them to produce safe or verifiable code, // but there is not a good reason for restricting them in the runtime. BYTE* mem = (BYTE*) pamTracker->Track(pLoaderModule->GetAssembly()->GetLowFrequencyHeap()->AllocMem(S_SIZE_T(sizeof(ParamTypeDesc)))); diff --git a/src/coreclr/vm/codeman.cpp b/src/coreclr/vm/codeman.cpp index a61ec6a3a4b85..8609563446d1c 100644 --- a/src/coreclr/vm/codeman.cpp +++ b/src/coreclr/vm/codeman.cpp @@ -3586,7 +3586,7 @@ void EEJitManager::RemoveJitData (CodeHeader * pCHdr, size_t GCinfo_len, size_t // code buffer itself. As a result, we might leak the CodeHeap if jitting fails after // the code buffer is allocated. // - // However, it appears non-trival to fix this. + // However, it appears non-trivial to fix this. // Here are some of the reasons: // (1) AllocCode calls in AllocCodeRaw to alloc code buffer in the CodeHeap. The exact size // of the code buffer is not known until the alignment is calculated deep on the stack. @@ -5707,8 +5707,8 @@ DWORD NativeExceptionInfoLookupTable::LookupExceptionInfoRVAForMethod(PTR_CORCOM COUNT_T start = 0; COUNT_T end = numLookupEntries - 2; - // The last entry in the lookup table (end-1) points to a sentinal entry. - // The sentinal entry helps to determine the number of EH clauses for the last table entry. + // The last entry in the lookup table (end-1) points to a sentinel entry. + // The sentinel entry helps to determine the number of EH clauses for the last table entry. _ASSERTE(pExceptionLookupTable->ExceptionLookupEntry(numLookupEntries-1)->MethodStartRVA == (DWORD)-1); // Binary search the lookup table @@ -5909,7 +5909,7 @@ unsigned ReadyToRunJitManager::InitializeEHEnumeration(const METHODTOKEN& Method PTR_CORCOMPILE_EXCEPTION_LOOKUP_TABLE pExceptionLookupTable = dac_cast(pLayout->GetRvaData(pExceptionInfoDir->VirtualAddress)); COUNT_T numLookupTableEntries = (COUNT_T)(pExceptionInfoDir->Size / sizeof(CORCOMPILE_EXCEPTION_LOOKUP_TABLE_ENTRY)); - // at least 2 entries (1 valid entry + 1 sentinal entry) + // at least 2 entries (1 valid entry + 1 sentinel entry) _ASSERTE(numLookupTableEntries >= 2); DWORD methodStartRVA = (DWORD)(JitTokenToStartAddress(MethodToken) - JitTokenToModuleBase(MethodToken)); diff --git a/src/coreclr/vm/codeman.h b/src/coreclr/vm/codeman.h index f20af56ed1feb..71a09a930344f 100644 --- a/src/coreclr/vm/codeman.h +++ b/src/coreclr/vm/codeman.h @@ -1339,7 +1339,7 @@ class ExecutionManager #endif static CrstStatic m_JumpStubCrst; - static CrstStatic m_RangeCrst; // Aquire before writing into m_CodeRangeList and m_DataRangeList + static CrstStatic m_RangeCrst; // Acquire before writing into m_CodeRangeList and m_DataRangeList // infrastructure to manage readers so we can lock them out and delete domain data // make ReaderCount volatile because we have order dependency in READER_INCREMENT diff --git a/src/coreclr/vm/codeversion.h b/src/coreclr/vm/codeversion.h index bacc5305d9bb6..d83bfa29c2ea6 100644 --- a/src/coreclr/vm/codeversion.h +++ b/src/coreclr/vm/codeversion.h @@ -174,7 +174,7 @@ class ILCodeVersion void SetIL(COR_ILMETHOD* pIL); void SetJitFlags(DWORD flags); void SetInstrumentedILMap(SIZE_T cMap, COR_IL_MAP * rgMap); - HRESULT AddNativeCodeVersion(MethodDesc* pClosedMethodDesc, NativeCodeVersion::OptimizationTier optimizationTier, + HRESULT AddNativeCodeVersion(MethodDesc* pClosedMethodDesc, NativeCodeVersion::OptimizationTier optimizationTier, NativeCodeVersion* pNativeCodeVersion, PatchpointInfo* patchpointInfo = NULL, unsigned ilOffset = 0); HRESULT GetOrCreateActiveNativeCodeVersion(MethodDesc* pClosedMethodDesc, NativeCodeVersion* pNativeCodeVersion); HRESULT SetActiveNativeCodeVersion(NativeCodeVersion activeNativeCodeVersion); @@ -190,7 +190,7 @@ class ILCodeVersion // The CLR has initiated the call to the profiler's GetReJITParameters() callback // but it hasn't completed yet. At this point we have to assume the profiler has - // commited to a specific IL body, even if the CLR doesn't know what it is yet. + // committed to a specific IL body, even if the CLR doesn't know what it is yet. // If the profiler calls RequestRejit we need to allocate a new ILCodeVersion // and call GetReJITParameters() again. kStateGettingReJITParameters = 0x00000001, @@ -254,7 +254,7 @@ class NativeCodeVersionNode public: #ifndef DACCESS_COMPILE - NativeCodeVersionNode(NativeCodeVersionId id, MethodDesc* pMethod, ReJITID parentId, NativeCodeVersion::OptimizationTier optimizationTier, + NativeCodeVersionNode(NativeCodeVersionId id, MethodDesc* pMethod, ReJITID parentId, NativeCodeVersion::OptimizationTier optimizationTier, PatchpointInfo* patchpointInfo, unsigned ilOffset); #endif diff --git a/src/coreclr/vm/comcallablewrapper.cpp b/src/coreclr/vm/comcallablewrapper.cpp index 724a72ec50134..e1e9928fbc5b8 100644 --- a/src/coreclr/vm/comcallablewrapper.cpp +++ b/src/coreclr/vm/comcallablewrapper.cpp @@ -1110,7 +1110,7 @@ void SimpleComCallWrapper::SetUpCPListHelper(MethodTable **apSrcItfMTs, int cSrc // Finally, we set the connection point list in the simple wrapper. If // no other thread already set it, we set pCPList to NULL to indicate - // that ownership has been transfered to the simple wrapper. + // that ownership has been transferred to the simple wrapper. if (InterlockedCompareExchangeT(&m_pCPList, pCPList.GetValue(), NULL) == NULL) pCPList.SuppressRelease(); } @@ -3626,7 +3626,7 @@ BOOL ComMethodTable::LayOutInterfaceMethodTable(MethodTable* pClsMT) else { // We need to set the entry points to the Dispatch versions which determine - // which implmentation to use at runtime based on the class that implements + // which implementation to use at runtime based on the class that implements // the interface. pDispVtable->m_GetIDsOfNames = (SLOT)Dispatch_GetIDsOfNames_Wrapper; pDispVtable->m_Invoke = (SLOT)Dispatch_Invoke_Wrapper; diff --git a/src/coreclr/vm/comtoclrcall.cpp b/src/coreclr/vm/comtoclrcall.cpp index 7f669709d3197..b94ec6db2966c 100644 --- a/src/coreclr/vm/comtoclrcall.cpp +++ b/src/coreclr/vm/comtoclrcall.cpp @@ -556,7 +556,7 @@ extern "C" UINT64 __stdcall COMToCLRWorker(Thread *pThread, ComMethodFrame* pFra } #ifndef TARGET_X86 - // Note: the EH subsystem will handle reseting the frame chain and setting + // Note: the EH subsystem will handle resetting the frame chain and setting // the correct GC mode on exception. pFrame->Pop(pThread); pThread->EnablePreemptiveGC(); diff --git a/src/coreclr/vm/customattribute.cpp b/src/coreclr/vm/customattribute.cpp index ea18d499577a8..e8495adbdc49e 100644 --- a/src/coreclr/vm/customattribute.cpp +++ b/src/coreclr/vm/customattribute.cpp @@ -971,7 +971,7 @@ FCIMPL7(void, COMCustomAttribute::GetPropertyOrFieldData, ReflectModuleBaseObjec ARG_SLOT val = GetDataFromBlob(pCtorAssembly, fieldType, nullTH, &pBlob, pBlobEnd, pModule, &bObjectCreated); _ASSERTE(!bObjectCreated); - *value = pMTValue->Box((void*)ArgSlotEndianessFixup(&val, pMTValue->GetNumInstanceFieldBytes())); + *value = pMTValue->Box((void*)ArgSlotEndiannessFixup(&val, pMTValue->GetNumInstanceFieldBytes())); } *ppBlobStart = pBlob; diff --git a/src/coreclr/vm/debuginfostore.cpp b/src/coreclr/vm/debuginfostore.cpp index 5f1222ce702f2..007ec436c0ea3 100644 --- a/src/coreclr/vm/debuginfostore.cpp +++ b/src/coreclr/vm/debuginfostore.cpp @@ -68,7 +68,7 @@ class TransferWriter } - // Some U32 may have a few sentinal negative values . + // Some U32 may have a few sentinel negative values . // We adjust it to be a real U32 and then encode that. // dwAdjust should be the lower bound on the enum. void DoEncodedAdjustedU32(uint32_t dw, uint32_t dwAdjust) diff --git a/src/coreclr/vm/dispatchinfo.cpp b/src/coreclr/vm/dispatchinfo.cpp index 676162b2ebccd..c44303453b10d 100644 --- a/src/coreclr/vm/dispatchinfo.cpp +++ b/src/coreclr/vm/dispatchinfo.cpp @@ -60,7 +60,7 @@ inline UPTR DispID2HashKey(DISPID DispID) return DispID + 2; } -// Typedef for string comparition functions. +// Typedef for string comparison functions. typedef int (__cdecl *UnicodeStringCompareFuncPtr)(const WCHAR *, const WCHAR *); //-------------------------------------------------------------------------------- diff --git a/src/coreclr/vm/dispatchinfo.h b/src/coreclr/vm/dispatchinfo.h index 623a56c7ab0c5..432994862723d 100644 --- a/src/coreclr/vm/dispatchinfo.h +++ b/src/coreclr/vm/dispatchinfo.h @@ -308,7 +308,7 @@ class DispatchInfo void MarshalReturnValueManagedToNative(DispatchMemberInfo *pMemberInfo, OBJECTREF *pSrcObj, VARIANT *pDestVar); void CleanUpNativeParam(DispatchMemberInfo *pDispMemberInfo, int iParam, OBJECTREF *pBackupStaticArray, VARIANT *pArgVariant); - // DISPID to named argument convertion helper. + // DISPID to named argument conversion helper. void SetUpNamedParamArray(DispatchMemberInfo *pMemberInfo, DISPID *pSrcArgNames, int NumNamedArgs, PTRARRAYREF *pNamedParamArray); // Helper method to retrieve the source VARIANT from the VARIANT contained in the disp params. diff --git a/src/coreclr/vm/dwbucketmanager.hpp b/src/coreclr/vm/dwbucketmanager.hpp index 2bbd0af0ccbf9..cf7af5dee2007 100644 --- a/src/coreclr/vm/dwbucketmanager.hpp +++ b/src/coreclr/vm/dwbucketmanager.hpp @@ -329,7 +329,7 @@ class BaseBucketParamsManager public: BaseBucketParamsManager(GenericModeBlock* pGenericModeBlock, TypeOfReportedError typeOfError, PCODE initialFaultingPc, Thread* pFaultingThread, OBJECTREF* pThrownException); - static int CopyStringToBucket(_Out_writes_(targetMaxLength) LPWSTR pTargetParam, int targetMaxLength, _In_z_ LPCWSTR pSource, bool cannonicalize = false); + static int CopyStringToBucket(_Out_writes_(targetMaxLength) LPWSTR pTargetParam, int targetMaxLength, _In_z_ LPCWSTR pSource, bool canonicalize = false); // function that consumers should call to populate the GMB virtual void PopulateBucketParameters() = 0; }; @@ -1049,7 +1049,7 @@ OBJECTREF BaseBucketParamsManager::GetRealExceptionObject() // pTargetParam -- the destination buffer. // targetMaxLength -- the max length of the parameter. // pSource -- the input string. -// cannonicalize -- if true, cannonicalize the filename (tolower) +// canonicalize -- if true, canonicalize the filename (tolower) // // Returns // the number of characters copied to the output buffer. zero indicates an @@ -1068,7 +1068,7 @@ OBJECTREF BaseBucketParamsManager::GetRealExceptionObject() // because that is what a SHA1 hash coded in base32 will require. // - the maxlen does not include the terminating nul. //------------------------------------------------------------------------------ -int BaseBucketParamsManager::CopyStringToBucket(_Out_writes_(targetMaxLength) LPWSTR pTargetParam, int targetMaxLength, _In_z_ LPCWSTR pSource, bool cannonicalize) +int BaseBucketParamsManager::CopyStringToBucket(_Out_writes_(targetMaxLength) LPWSTR pTargetParam, int targetMaxLength, _In_z_ LPCWSTR pSource, bool canonicalize) { CONTRACTL { @@ -1120,9 +1120,9 @@ int BaseBucketParamsManager::CopyStringToBucket(_Out_writes_(targetMaxLength) LP { wcsncpy_s(pTargetParam, DW_MAX_BUCKETPARAM_CWC, pSource, srcLen); - if (cannonicalize) + if (canonicalize) { - // cannonicalize filenames so that the same exceptions tend to the same buckets. + // canonicalize filenames so that the same exceptions tend to the same buckets. _wcslwr_s(pTargetParam, DW_MAX_BUCKETPARAM_CWC); } return srcLen; diff --git a/src/coreclr/vm/ecall.cpp b/src/coreclr/vm/ecall.cpp index ad93743a9cbfa..982690c28776b 100644 --- a/src/coreclr/vm/ecall.cpp +++ b/src/coreclr/vm/ecall.cpp @@ -695,7 +695,7 @@ void FCallAssert(void*& cache, void* target) } } - _ASSERTE(!"Could not find FCall implemenation in ECall.cpp"); + _ASSERTE(!"Could not find FCall implementation in ECall.cpp"); } void HCallAssert(void*& cache, void* target) diff --git a/src/coreclr/vm/eehash.cpp b/src/coreclr/vm/eehash.cpp index 280c2731135bc..2ad96644531b8 100644 --- a/src/coreclr/vm/eehash.cpp +++ b/src/coreclr/vm/eehash.cpp @@ -396,7 +396,7 @@ BOOL EEClassFactoryInfoHashTableHelper::CompareKeys(EEHashEntry_t *pEntry, Class if (((ClassFactoryInfo*)pEntry->Key)->m_clsid != pKey->m_clsid) return FALSE; - // Next do a trivial comparition on the server name pointer values. + // Next do a trivial comparison on the server name pointer values. if (((ClassFactoryInfo*)pEntry->Key)->m_strServerName == pKey->m_strServerName) return TRUE; @@ -404,7 +404,7 @@ BOOL EEClassFactoryInfoHashTableHelper::CompareKeys(EEHashEntry_t *pEntry, Class if (!((ClassFactoryInfo*)pEntry->Key)->m_strServerName || !pKey->m_strServerName) return FALSE; - // Finally do a string comparition of the server names. + // Finally do a string comparison of the server names. return wcscmp(((ClassFactoryInfo*)pEntry->Key)->m_strServerName, pKey->m_strServerName) == 0; } diff --git a/src/coreclr/vm/eetwain.cpp b/src/coreclr/vm/eetwain.cpp index 06ede87f73104..e70824ec7e42c 100644 --- a/src/coreclr/vm/eetwain.cpp +++ b/src/coreclr/vm/eetwain.cpp @@ -1944,7 +1944,7 @@ unsigned scanArgRegTable(PTR_CBYTE table, S indicates that register ESI is an interior pointer D indicates that register EDI is an interior pointer the list count is the number of entries in the list - the list size gives the byte-lenght of the list + the list size gives the byte-length of the list the offsets in the list are variable-length */ while (scanOffs < curOffs) diff --git a/src/coreclr/vm/encee.cpp b/src/coreclr/vm/encee.cpp index 678f8e72e72cf..f81ade62be7ae 100644 --- a/src/coreclr/vm/encee.cpp +++ b/src/coreclr/vm/encee.cpp @@ -733,7 +733,7 @@ HRESULT EditAndContinueModule::ResumeInUpdatedFunction( // WARNING: This method cannot access any stack-data below its frame on the stack // (i.e. anything allocated in a caller frame), so all stack-based arguments must // EXPLICITLY be copied by value and this method cannot be inlined. We may need to expand -// the stack frame to accomodate the new method, and so extra buffer space must have +// the stack frame to accommodate the new method, and so extra buffer space must have // been allocated on the stack. Note that passing a struct by value (via C++) is not // enough to ensure its data is really copied (on x64, large structs may internally be // passed by reference). Thus we explicitly make copies of structs passed in, at the diff --git a/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h b/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h index 9b940adc091bf..620fe62f30268 100644 --- a/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h +++ b/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h @@ -1343,10 +1343,10 @@ ep_rt_shutdown (void) static inline bool -ep_rt_config_aquire (void) +ep_rt_config_acquire (void) { STATIC_CONTRACT_NOTHROW; - return ep_rt_lock_aquire (ep_rt_coreclr_config_lock_get ()); + return ep_rt_lock_acquire (ep_rt_coreclr_config_lock_get ()); } static @@ -2322,7 +2322,7 @@ ep_rt_os_environment_get_utf16 (ep_rt_env_array_utf16_t *env_array) static bool -ep_rt_lock_aquire (ep_rt_lock_handle_t *lock) +ep_rt_lock_acquire (ep_rt_lock_handle_t *lock) { STATIC_CONTRACT_NOTHROW; @@ -2421,7 +2421,7 @@ ep_rt_spin_lock_free (ep_rt_spin_lock_handle_t *spin_lock) static inline bool -ep_rt_spin_lock_aquire (ep_rt_spin_lock_handle_t *spin_lock) +ep_rt_spin_lock_acquire (ep_rt_spin_lock_handle_t *spin_lock) { STATIC_CONTRACT_NOTHROW; EP_ASSERT (ep_rt_spin_lock_is_valid (spin_lock)); @@ -2745,7 +2745,7 @@ ep_rt_diagnostics_command_line_get (void) // The host initializes the runtime in two phases, init and exec assembly. On non-Windows platforms the commandline returned by the runtime // is different during each phase. We suspend during init where the runtime has populated the commandline with a // mock value (the full path of the executing assembly) and the actual value isn't populated till the exec assembly phase. - // On Windows this does not apply as the value is retrieved directly from the OS any time it is requested. + // On Windows this does not apply as the value is retrieved directly from the OS any time it is requested. // As a result, we cannot actually cache this value. We need to return the _current_ value. // This function needs to handle freeing the string in order to make it consistent with Mono's version. // There is a rare chance this may be called on multiple threads, so we attempt to always return the newest value diff --git a/src/coreclr/vm/eventreporter.cpp b/src/coreclr/vm/eventreporter.cpp index 56d6519d5ca22..7732ad06941c3 100644 --- a/src/coreclr/vm/eventreporter.cpp +++ b/src/coreclr/vm/eventreporter.cpp @@ -303,7 +303,7 @@ void EventReporter::AddStackTrace(SString& s) COUNT_T truncCount = truncate.GetCount(); // Go back "truncCount" characters from the end of the string. - // The "-1" in end is to accomodate null termination. + // The "-1" in end is to accommodate null termination. ext = m_Description.Begin() + dwMaxSizeLimit - truncCount - 1; // Now look for a "\n" from the last position we got diff --git a/src/coreclr/vm/excep.cpp b/src/coreclr/vm/excep.cpp index 31e6061d6d468..78909660d37be 100644 --- a/src/coreclr/vm/excep.cpp +++ b/src/coreclr/vm/excep.cpp @@ -8246,7 +8246,7 @@ BOOL ExceptionTypeOverridesStackTraceGetter(PTR_MethodTable pMT) if (name != NULL && strcmp(name, "get_StackTrace") == 0) { - // see if the slot is overriden by pMT + // see if the slot is overridden by pMT MethodDesc *pDerivedMD = pMT->GetMethodDescForSlot(slot); return (pDerivedMD != pMD); } diff --git a/src/coreclr/vm/exceptionhandling.cpp b/src/coreclr/vm/exceptionhandling.cpp index 0832e7b548dff..c37a782fdda03 100644 --- a/src/coreclr/vm/exceptionhandling.cpp +++ b/src/coreclr/vm/exceptionhandling.cpp @@ -4559,7 +4559,7 @@ VOID DECLSPEC_NORETURN UnwindManagedExceptionPass1(PAL_SEHException& ex, CONTEXT // the exception to be thrown *ex.GetContextRecord() = *frameContext; - // Move the exception address to the first managed frame on the stack except for the hardware exceptions + // Move the exception address to the first managed frame on the stack except for the hardware exceptions // stemming from from a native code out of the well known runtime helpers if (!ex.IsExternal) { @@ -4846,7 +4846,7 @@ Function : UINT index : index of the register (Rax=0 .. R15=15) Return value : - Pointer to the context member represeting the register + Pointer to the context member represetting the register --*/ VOID* GetRegisterAddressByIndex(PCONTEXT pContext, UINT index) { @@ -4864,7 +4864,7 @@ Function : UINT index : index of the register (Rax=0 .. R15=15) Return value : - Value of the context member represeting the register + Value of the context member represetting the register --*/ DWORD64 GetRegisterValueByIndex(PCONTEXT pContext, UINT index) { @@ -4886,7 +4886,7 @@ Function : bool hasOpSizePrefix : true if the instruction has op size prefix (0x66) Return value : - Value of the context member represeting the register + Value of the context member represetting the register --*/ DWORD64 GetModRMOperandValue(BYTE rex, BYTE* ip, PCONTEXT pContext, bool is8Bit, bool hasOpSizePrefix) { diff --git a/src/coreclr/vm/fcall.h b/src/coreclr/vm/fcall.h index 0c65542f2e446..8d10efd47cab3 100644 --- a/src/coreclr/vm/fcall.h +++ b/src/coreclr/vm/fcall.h @@ -242,7 +242,7 @@ #ifdef _DEBUG // -// Linked list of unmanaged methods preceeding a HelperMethodFrame push. This +// Linked list of unmanaged methods preceding a HelperMethodFrame push. This // is linked onto the current Thread. Each list entry is stack-allocated so it // can be associated with an unmanaged frame. Each unmanaged frame needs to be // associated with at least one list entry. diff --git a/src/coreclr/vm/field.cpp b/src/coreclr/vm/field.cpp index dd472e41cda98..0208363aa72b1 100644 --- a/src/coreclr/vm/field.cpp +++ b/src/coreclr/vm/field.cpp @@ -367,7 +367,7 @@ void FieldDesc::SetInstanceField(OBJECTREF o, const VOID * pInVal) // // assert that o is derived from MT of enclosing class // - // walk up o's inheritence chain to make sure m_pMTOfEnclosingClass is along it + // walk up o's inheritance chain to make sure m_pMTOfEnclosingClass is along it // MethodTable* pCursor = o->GetMethodTable(); diff --git a/src/coreclr/vm/frames.h b/src/coreclr/vm/frames.h index 8b2a3d93eb48f..038c76780ba7d 100644 --- a/src/coreclr/vm/frames.h +++ b/src/coreclr/vm/frames.h @@ -3112,7 +3112,7 @@ class AssumeByrefFromJITStack : public Frame //----------------------------------------------------------------------------- // FrameWithCookie is used to declare a Frame in source code with a cookie -// immediately preceeding it. +// immediately preceding it. // This is just a specialized version of GSCookieFor // // For Frames that are set up by stubs, the stub is responsible for setting up diff --git a/src/coreclr/vm/gcstress.h b/src/coreclr/vm/gcstress.h index 7980a436fd008..d46ef841f7671 100644 --- a/src/coreclr/vm/gcstress.h +++ b/src/coreclr/vm/gcstress.h @@ -74,11 +74,11 @@ namespace GCStressPolicy // controls when GCs may occur. static Volatile s_nGcStressDisabled; - bool m_bAquired; + bool m_bAcquired; public: InhibitHolder() - { LIMITED_METHOD_CONTRACT; ++s_nGcStressDisabled; m_bAquired = true; } + { LIMITED_METHOD_CONTRACT; ++s_nGcStressDisabled; m_bAcquired = true; } ~InhibitHolder() { LIMITED_METHOD_CONTRACT; Release(); } @@ -86,10 +86,10 @@ namespace GCStressPolicy void Release() { LIMITED_METHOD_CONTRACT; - if (m_bAquired) + if (m_bAcquired) { --s_nGcStressDisabled; - m_bAquired = false; + m_bAcquired = false; } } diff --git a/src/coreclr/vm/gdbjit.h b/src/coreclr/vm/gdbjit.h index 95f7abe79eeac..d0adbc9cee8c5 100644 --- a/src/coreclr/vm/gdbjit.h +++ b/src/coreclr/vm/gdbjit.h @@ -5,7 +5,7 @@ // // -// Header file for GDB JIT interface implemenation. +// Header file for GDB JIT interface implementation. // //***************************************************************************** diff --git a/src/coreclr/vm/gdbjithelpers.h b/src/coreclr/vm/gdbjithelpers.h index 51e59d0036848..b2e965f11fe19 100644 --- a/src/coreclr/vm/gdbjithelpers.h +++ b/src/coreclr/vm/gdbjithelpers.h @@ -4,7 +4,7 @@ // File: gdbjithelpers.h // // -// Helper file with managed delegate for GDB JIT interface implemenation. +// Helper file with managed delegate for GDB JIT interface implementation. // //***************************************************************************** diff --git a/src/coreclr/vm/hash.h b/src/coreclr/vm/hash.h index 0ecaa7a0181dc..94f7e39417bc2 100644 --- a/src/coreclr/vm/hash.h +++ b/src/coreclr/vm/hash.h @@ -214,7 +214,7 @@ class ComparePtr : public Compare // the hash function is re-applied. // // Inserts choose an empty slot in the current bucket for new entries, if the current bucket -// is full, then the seed is refined and a new bucket is choosen, if an empty slot is not found +// is full, then the seed is refined and a new bucket is chosen, if an empty slot is not found // after 8 retries, the hash table is expanded, this causes the current array of buckets to // be put in a free list and a new array of buckets is allocated and all non-deleted entries // from the old hash table are rehashed to the new array diff --git a/src/coreclr/vm/i386/virtualcallstubcpu.hpp b/src/coreclr/vm/i386/virtualcallstubcpu.hpp index 38a5a9baafe4b..d287ef80a56b0 100644 --- a/src/coreclr/vm/i386/virtualcallstubcpu.hpp +++ b/src/coreclr/vm/i386/virtualcallstubcpu.hpp @@ -115,8 +115,8 @@ struct DispatchHolder; Monomorphic and mostly monomorphic call sites eventually point to DispatchStubs. A dispatch stub has an expected type (expectedMT), target address (target) and fail address (failure). If the calling frame does in fact have the type be of the expected type, then -control is transfered to the target address, the method implementation. If not, -then control is transfered to the fail address, a fail stub (see below) where a polymorphic +control is transferred to the target address, the method implementation. If not, +then control is transferred to the fail address, a fail stub (see below) where a polymorphic lookup is done to find the correct address to go to. implementation note: Order, choice of instructions, and branch directions @@ -233,7 +233,7 @@ transfers to the resolve piece (see ResolveStub). The failEntryPoint decrements every time it is entered. The ee at various times will add a large chunk to the counter. ResolveEntry - does a lookup via in a cache by hashing the actual type of the calling frame s - and the token identifying the (contract,method) pair desired. If found, control is transfered + and the token identifying the (contract,method) pair desired. If found, control is transferred to the method implementation. If not found in the cache, the token is pushed and the ee is entered via the ResolveWorkerStub to do a full lookup and eventual transfer to the correct method implementation. Since there is a different resolve stub for every token, the token can be inlined and the token can be pre-hashed. @@ -944,7 +944,7 @@ void ResolveHolder::InitializeStatic() resolveInit.toResolveStub = (offsetof(ResolveStub, _resolveEntryPoint) - (offsetof(ResolveStub, toResolveStub) + 1)) & 0xFF; }; -void ResolveHolder::Initialize(ResolveHolder* pResolveHolderRX, +void ResolveHolder::Initialize(ResolveHolder* pResolveHolderRX, PCODE resolveWorkerTarget, PCODE patcherTarget, size_t dispatchToken, UINT32 hashedToken, void * cacheAddr, INT32 * counterAddr diff --git a/src/coreclr/vm/ilmarshalers.cpp b/src/coreclr/vm/ilmarshalers.cpp index 66cf2137b3c9c..3aff514475681 100644 --- a/src/coreclr/vm/ilmarshalers.cpp +++ b/src/coreclr/vm/ilmarshalers.cpp @@ -1586,7 +1586,7 @@ void ILVBByValStrWMarshaler::EmitConvertContentsCLRToNative(ILCodeStream* pslILE pslILEmit->EmitDUP(); pslILEmit->EmitADD(); // (length+1) * sizeof(WCHAR) pslILEmit->EmitDUP(); - pslILEmit->EmitSTLOC(dwNumBytesLocal); // len <- doesn't include size of the DWORD preceeding the string + pslILEmit->EmitSTLOC(dwNumBytesLocal); // len <- doesn't include size of the DWORD preceding the string pslILEmit->EmitLDC(sizeof(DWORD)); pslILEmit->EmitADD(); // (length+1) * sizeof(WCHAR) + sizeof(DWORD) @@ -1615,7 +1615,7 @@ void ILVBByValStrWMarshaler::EmitConvertContentsCLRToNative(ILCodeStream* pslILE pslILEmit->EmitADD(); EmitStoreNativeValue(pslILEmit); - // + // EmitLoadManagedValue(pslILEmit); // src EmitLoadNativeValue(pslILEmit); // dest @@ -3838,7 +3838,7 @@ void ILAsAnyMarshalerBase::EmitClearNativeTemp(ILCodeStream* pslILEmit) // we can get away with putting the GetManagedType and GetNativeType on ILMngdMarshaler because // currently it is only used for reference marshaling where this is appropriate. If it became -// used for something else, we would want to move this down in the inheritence tree.. +// used for something else, we would want to move this down in the inheritance tree.. LocalDesc ILMngdMarshaler::GetNativeType() { LIMITED_METHOD_CONTRACT; diff --git a/src/coreclr/vm/interoputil.cpp b/src/coreclr/vm/interoputil.cpp index a37639bb4526e..134f1d8121dfa 100644 --- a/src/coreclr/vm/interoputil.cpp +++ b/src/coreclr/vm/interoputil.cpp @@ -51,7 +51,7 @@ #define GET_ENUMERATOR_METHOD_NAME W("GetEnumerator") #ifdef _DEBUG - VOID IntializeInteropLogging(); + VOID InitializeInteropLogging(); #endif struct ByrefArgumentInfo @@ -3753,7 +3753,7 @@ void InitializeComInterop() CtxEntryCache::Init(); ComCallWrapperTemplate::Init(); #ifdef _DEBUG - IntializeInteropLogging(); + InitializeInteropLogging(); #endif //_DEBUG } @@ -3766,7 +3766,7 @@ void InitializeComInterop() static int g_TraceCount = 0; static IUnknown* g_pTraceIUnknown = NULL; -VOID IntializeInteropLogging() +VOID InitializeInteropLogging() { WRAPPER_NO_CONTRACT; diff --git a/src/coreclr/vm/interpreter.cpp b/src/coreclr/vm/interpreter.cpp index 62fc0e39b952c..5a38db732a6b1 100644 --- a/src/coreclr/vm/interpreter.cpp +++ b/src/coreclr/vm/interpreter.cpp @@ -285,7 +285,7 @@ void InterpreterMethodInfo::InitArgInfo(CEEInfo* comp, CORINFO_METHOD_INFO* meth } m_argDescs[k].m_typeStackNormal = m_argDescs[k].m_type; m_argDescs[k].m_nativeOffset = argOffsets_[k]; - m_argDescs[k].m_directOffset = static_cast(reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*)))); + m_argDescs[k].m_directOffset = static_cast(reinterpret_cast(ArgSlotEndiannessFixup(directOffset, sizeof(void*)))); directOffset++; k++; } @@ -308,18 +308,18 @@ void InterpreterMethodInfo::InitArgInfo(CEEInfo* comp, CORINFO_METHOD_INFO* meth #endif // defined(HOST_ARM) ) { - directRetBuffOffset = static_cast(reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*)))); + directRetBuffOffset = static_cast(reinterpret_cast(ArgSlotEndiannessFixup(directOffset, sizeof(void*)))); directOffset++; } #if defined(HOST_AMD64) if (GetFlag()) { - directVarArgOffset = static_cast(reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*)))); + directVarArgOffset = static_cast(reinterpret_cast(ArgSlotEndiannessFixup(directOffset, sizeof(void*)))); directOffset++; } if (GetFlag()) { - directTypeParamOffset = static_cast(reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*)))); + directTypeParamOffset = static_cast(reinterpret_cast(ArgSlotEndiannessFixup(directOffset, sizeof(void*)))); directOffset++; } #endif @@ -349,11 +349,11 @@ void InterpreterMethodInfo::InitArgInfo(CEEInfo* comp, CORINFO_METHOD_INFO* meth // When invoking the interpreter directly, large value types are always passed by reference. if (it.IsLargeStruct(comp)) { - m_argDescs[k].m_directOffset = static_cast(reinterpret_cast(ArgSlotEndianessFixup(directOffset, sizeof(void*)))); + m_argDescs[k].m_directOffset = static_cast(reinterpret_cast(ArgSlotEndiannessFixup(directOffset, sizeof(void*)))); } else { - m_argDescs[k].m_directOffset = static_cast(reinterpret_cast(ArgSlotEndianessFixup(directOffset, it.Size(comp)))); + m_argDescs[k].m_directOffset = static_cast(reinterpret_cast(ArgSlotEndiannessFixup(directOffset, it.Size(comp)))); } argPtr = comp->getArgNext(argPtr); directOffset++; @@ -1830,7 +1830,7 @@ HCIMPL3(float, InterpretMethodFloat, struct InterpreterMethodInfo* interpMethInf retVal = (ARG_SLOT)Interpreter::InterpretMethodBody(interpMethInfo, false, ilArgs, stubContext); HELPER_METHOD_FRAME_END(); - return *reinterpret_cast(ArgSlotEndianessFixup(&retVal, sizeof(float))); + return *reinterpret_cast(ArgSlotEndiannessFixup(&retVal, sizeof(float))); } HCIMPLEND @@ -1845,7 +1845,7 @@ HCIMPL3(double, InterpretMethodDouble, struct InterpreterMethodInfo* interpMethI retVal = Interpreter::InterpretMethodBody(interpMethInfo, false, ilArgs, stubContext); HELPER_METHOD_FRAME_END(); - return *reinterpret_cast(ArgSlotEndianessFixup(&retVal, sizeof(double))); + return *reinterpret_cast(ArgSlotEndiannessFixup(&retVal, sizeof(double))); } HCIMPLEND @@ -3784,12 +3784,12 @@ void Interpreter::GCScanRoots(promote_func* pf, ScanContext* sc) void* localPtr = NULL; if (it.IsLargeStruct(&m_interpCeeInfo)) { - void* structPtr = ArgSlotEndianessFixup(reinterpret_cast(FixedSizeLocalSlot(i)), sizeof(void**)); + void* structPtr = ArgSlotEndiannessFixup(reinterpret_cast(FixedSizeLocalSlot(i)), sizeof(void**)); localPtr = *reinterpret_cast(structPtr); } else { - localPtr = ArgSlotEndianessFixup(reinterpret_cast(FixedSizeLocalSlot(i)), it.Size(&m_interpCeeInfo)); + localPtr = ArgSlotEndiannessFixup(reinterpret_cast(FixedSizeLocalSlot(i)), it.Size(&m_interpCeeInfo)); } GCScanRootAtLoc(reinterpret_cast(localPtr), it, pf, sc, m_methInfo->GetPinningBit(i)); } @@ -3824,7 +3824,7 @@ void Interpreter::GCScanRoots(promote_func* pf, ScanContext* sc) InterpreterType it = m_argTypes[i]; if (it != undef && !it.IsLargeStruct(&m_interpCeeInfo)) { - BYTE* argPtr = ArgSlotEndianessFixup(&m_args[i], it.Size(&m_interpCeeInfo)); + BYTE* argPtr = ArgSlotEndiannessFixup(&m_args[i], it.Size(&m_interpCeeInfo)); GCScanRootAtLoc(reinterpret_cast(argPtr), it, pf, sc); } } @@ -4253,12 +4253,12 @@ void Interpreter::LdLocA(int locNum) void* addr; if (tp.IsLargeStruct(&m_interpCeeInfo)) { - void* structPtr = ArgSlotEndianessFixup(reinterpret_cast(FixedSizeLocalSlot(locNum)), sizeof(void**)); + void* structPtr = ArgSlotEndiannessFixup(reinterpret_cast(FixedSizeLocalSlot(locNum)), sizeof(void**)); addr = *reinterpret_cast(structPtr); } else { - addr = ArgSlotEndianessFixup(reinterpret_cast(FixedSizeLocalSlot(locNum)), tp.Size(&m_interpCeeInfo)); + addr = ArgSlotEndiannessFixup(reinterpret_cast(FixedSizeLocalSlot(locNum)), tp.Size(&m_interpCeeInfo)); } // The "addr" above, while a byref, is never a heap pointer, so we're robust if // any of these were to cause a GC. @@ -11809,12 +11809,12 @@ void Interpreter::PrintLocals() void* localPtr = NULL; if (it.IsLargeStruct(&m_interpCeeInfo)) { - void* structPtr = ArgSlotEndianessFixup(reinterpret_cast(FixedSizeLocalSlot(i)), sizeof(void**)); + void* structPtr = ArgSlotEndiannessFixup(reinterpret_cast(FixedSizeLocalSlot(i)), sizeof(void**)); localPtr = *reinterpret_cast(structPtr); } else { - localPtr = ArgSlotEndianessFixup(reinterpret_cast(FixedSizeLocalSlot(i)), it.Size(&m_interpCeeInfo)); + localPtr = ArgSlotEndiannessFixup(reinterpret_cast(FixedSizeLocalSlot(i)), it.Size(&m_interpCeeInfo)); } fprintf(GetLogFile(), " loc%-4d: %10s: ", i, CorInfoTypeNames[cit]); PrintValue(it, reinterpret_cast(localPtr)); diff --git a/src/coreclr/vm/interpreter.h b/src/coreclr/vm/interpreter.h index 517cb554bd3ed..be3c1ea2fed51 100644 --- a/src/coreclr/vm/interpreter.h +++ b/src/coreclr/vm/interpreter.h @@ -828,7 +828,7 @@ class Interpreter { if (methInfo_->m_localDescs[i].m_type.IsLargeStruct(&m_interpCeeInfo)) { - void* structPtr = ArgSlotEndianessFixup(reinterpret_cast(FixedSizeLocalSlot(i)), sizeof(void**)); + void* structPtr = ArgSlotEndiannessFixup(reinterpret_cast(FixedSizeLocalSlot(i)), sizeof(void**)); *reinterpret_cast(structPtr) = LargeStructLocalSlot(i); } } @@ -1212,23 +1212,23 @@ class Interpreter template __forceinline T* OpStackGetAddr(unsigned ind) { - return reinterpret_cast(ArgSlotEndianessFixup(reinterpret_cast(&m_operandStackX[ind].m_val), sizeof(T))); + return reinterpret_cast(ArgSlotEndiannessFixup(reinterpret_cast(&m_operandStackX[ind].m_val), sizeof(T))); } __forceinline void* OpStackGetAddr(unsigned ind, size_t sz) { - return ArgSlotEndianessFixup(reinterpret_cast(&m_operandStackX[ind].m_val), sz); + return ArgSlotEndiannessFixup(reinterpret_cast(&m_operandStackX[ind].m_val), sz); } #else template __forceinline T* OpStackGetAddr(unsigned ind) { - return reinterpret_cast(ArgSlotEndianessFixup(reinterpret_cast(&m_operandStack[ind]), sizeof(T))); + return reinterpret_cast(ArgSlotEndiannessFixup(reinterpret_cast(&m_operandStack[ind]), sizeof(T))); } __forceinline void* OpStackGetAddr(unsigned ind, size_t sz) { - return ArgSlotEndianessFixup(reinterpret_cast(&m_operandStack[ind]), sz); + return ArgSlotEndiannessFixup(reinterpret_cast(&m_operandStack[ind]), sz); } #endif @@ -1237,7 +1237,7 @@ class Interpreter _ASSERTE(sz <= sizeof(INT64)); INT64 ret = 0; - memcpy(ArgSlotEndianessFixup(reinterpret_cast(&ret), sz), src, sz); + memcpy(ArgSlotEndiannessFixup(reinterpret_cast(&ret), sz), src, sz); return ret; } diff --git a/src/coreclr/vm/jitinterface.cpp b/src/coreclr/vm/jitinterface.cpp index 78a439d4332af..a6bd0d8ea26c3 100644 --- a/src/coreclr/vm/jitinterface.cpp +++ b/src/coreclr/vm/jitinterface.cpp @@ -7750,7 +7750,7 @@ CorInfoInline CEEInfo::canInline (CORINFO_METHOD_HANDLE hCaller, } #endif - // The orginal caller is the current method + // The original caller is the current method MethodDesc * pOrigCaller; pOrigCaller = m_pMethodBeingCompiled; Module * pOrigCallerModule; @@ -13792,7 +13792,7 @@ BOOL LoadDynamicInfoEntry(Module *currentModule, MethodDesc *pImplMethodCompiler = NULL; - if ((flags & READYTORUN_VIRTUAL_OVERRIDE_VirtualFunctionOverriden) != 0) + if ((flags & READYTORUN_VIRTUAL_OVERRIDE_VirtualFunctionOverridden) != 0) { pImplMethodCompiler = ZapSig::DecodeMethod(currentModule, pInfoModule, updatedSignature); } diff --git a/src/coreclr/vm/loongarch64/asmhelpers.S b/src/coreclr/vm/loongarch64/asmhelpers.S index 84183a1e31d8b..5b037b24489ec 100644 --- a/src/coreclr/vm/loongarch64/asmhelpers.S +++ b/src/coreclr/vm/loongarch64/asmhelpers.S @@ -672,7 +672,7 @@ LOCAL_LABEL(Success): blt $t4, $zero, LOCAL_LABEL(Promote) ld.d $t4, $t1, ResolveCacheElem__target // get the ImplTarget - jirl $r0, $t4, 0 // branch to interface implemenation target + jirl $r0, $t4, 0 // branch to interface implementation target LOCAL_LABEL(Promote): // Move this entry to head postion of the chain diff --git a/src/coreclr/vm/marshalnative.cpp b/src/coreclr/vm/marshalnative.cpp index ad9bc0fa3feb0..d7acb946a47c7 100644 --- a/src/coreclr/vm/marshalnative.cpp +++ b/src/coreclr/vm/marshalnative.cpp @@ -1083,7 +1083,7 @@ FCIMPL2(void, MarshalNative::GetNativeVariantForObjectNative, Object* ObjUNSAFE, COMPlusThrowArgumentException(W("obj"), W("Argument_NeedNonGenericObject")); } - // intialize the output variant + // initialize the output variant SafeVariantInit((VARIANT*)pDestNativeVariant); OleVariant::MarshalOleVariantForObject(&Obj, (VARIANT*)pDestNativeVariant); diff --git a/src/coreclr/vm/memberload.cpp b/src/coreclr/vm/memberload.cpp index 6ab3ceb6b0509..9dd892d467991 100644 --- a/src/coreclr/vm/memberload.cpp +++ b/src/coreclr/vm/memberload.cpp @@ -1093,7 +1093,7 @@ MemberLoader::FindMethod( MODE_ANY; } CONTRACT_END; - // Retrieve the right comparition function to use. + // Retrieve the right comparison function to use. UTF8StringCompareFuncPtr StrCompFunc = FM_GetStrCompFunc(flags); SString targetName(SString::Utf8Literal, pszName); @@ -1327,7 +1327,7 @@ MemberLoader::FindMethodByName(MethodTable * pMT, LPCUTF8 pszName, FM_Flags flag // There is no need to check virtuals for parent types, since by definition they have the same name. // - // Warning: This is not entirely true as virtuals can be overriden explicitly regardless of their name. + // Warning: This is not entirely true as virtuals can be overridden explicitly regardless of their name. // We should be fine though as long as we do not use this code to find arbitrary user-defined methods. flags = (FM_Flags)(flags | FM_ExcludeVirtual); } @@ -1487,7 +1487,7 @@ MemberLoader::FindField(MethodTable * pMT, LPCUTF8 pszName, PCCOR_SIGNATURE pSig CONSISTENCY_CHECK(pMT->CheckLoadLevel(CLASS_LOAD_APPROXPARENTS)); - // Retrieve the right comparition function to use. + // Retrieve the right comparison function to use. UTF8StringCompareFuncPtr StrCompFunc = bCaseSensitive ? strcmp : stricmpUTF8; // Array classes don't have fields, and don't have metadata diff --git a/src/coreclr/vm/memberload.h b/src/coreclr/vm/memberload.h index e36db3f9a2c91..4ad52f8feb2a3 100644 --- a/src/coreclr/vm/memberload.h +++ b/src/coreclr/vm/memberload.h @@ -198,7 +198,7 @@ class MemberLoader static const FM_Flags FM_SpecialVirtualMask = (FM_Flags) (FM_ExcludeNonVirtual | FM_ExcludeVirtual); - // Typedef for string comparition functions. + // Typedef for string comparison functions. typedef int (__cdecl *UTF8StringCompareFuncPtr)(const char *, const char *); static inline UTF8StringCompareFuncPtr FM_GetStrCompFunc(DWORD dwFlags) diff --git a/src/coreclr/vm/method.cpp b/src/coreclr/vm/method.cpp index fef201a83cd99..6bf7a99db802c 100644 --- a/src/coreclr/vm/method.cpp +++ b/src/coreclr/vm/method.cpp @@ -1818,7 +1818,7 @@ MethodDesc* MethodDesc::ResolveGenericVirtualMethod(OBJECTREF *orThis) MethodTable *pTargetMT = pTargetMDBeforeGenericMethodArgs->GetMethodTable(); // No need to find/create a new generic instantiation if the target is the - // same as the static, i.e. the virtual method has not been overriden. + // same as the static, i.e. the virtual method has not been overridden. if (!pTargetMT->IsSharedByGenericInstantiations() && !pTargetMT->IsValueType() && pTargetMDBeforeGenericMethodArgs == pStaticMDWithoutGenericMethodArgs) RETURN(pStaticMD); diff --git a/src/coreclr/vm/methodtable.cpp b/src/coreclr/vm/methodtable.cpp index b9a34865b0095..444dd1ef4c503 100644 --- a/src/coreclr/vm/methodtable.cpp +++ b/src/coreclr/vm/methodtable.cpp @@ -65,7 +65,7 @@ #ifndef DACCESS_COMPILE -// Typedef for string comparition functions. +// Typedef for string comparison functions. typedef int (__cdecl *UTF8StringCompareFuncPtr)(const char *, const char *); MethodDataCache *MethodTable::s_pMethodDataCache = NULL; @@ -998,7 +998,7 @@ void MethodTable::SetInterfaceDeclaredOnClass(DWORD index) // Get address of optional slot for extra info. PTR_TADDR pInfoSlot = GetExtraInterfaceInfoPtr(); - if (GetNumInterfaces() <= kInlinedInterfaceInfoThreshhold) + if (GetNumInterfaces() <= kInlinedInterfaceInfoThreshold) { // Bitmap of flags is stored inline in the optional slot. *pInfoSlot |= SELECT_TADDR_BIT(index); @@ -1038,7 +1038,7 @@ bool MethodTable::IsInterfaceDeclaredOnClass(DWORD index) // Get data from the optional extra info slot. TADDR taddrInfo = *GetExtraInterfaceInfoPtr(); - if (GetNumInterfaces() <= kInlinedInterfaceInfoThreshhold) + if (GetNumInterfaces() <= kInlinedInterfaceInfoThreshold) { // Bitmap of flags is stored directly in the value. return (taddrInfo & SELECT_TADDR_BIT(index)) != 0; @@ -1200,7 +1200,7 @@ void MethodTable::SetupGenericsStaticsInfo(FieldDesc* pStaticFieldDescs) // For small numbers of interfaces we can record the info in the TADDR of the optional member itself (use // the TADDR as a bitmap). - if (cInterfaces <= kInlinedInterfaceInfoThreshhold) + if (cInterfaces <= kInlinedInterfaceInfoThreshold) return 0; // Otherwise we'll cause an array of TADDRs to be allocated (use TADDRs since the heap space allocated @@ -1214,9 +1214,9 @@ void MethodTable::EnumMemoryRegionsForExtraInterfaceInfo() { SUPPORTS_DAC; - // No extra data to enum if the number of interfaces is below the threshhold -- there is either no data or + // No extra data to enum if the number of interfaces is below the threshold -- there is either no data or // it all fits into the optional members inline. - if (GetNumInterfaces() <= kInlinedInterfaceInfoThreshhold) + if (GetNumInterfaces() <= kInlinedInterfaceInfoThreshold) return; DacEnumMemoryRegion(*GetExtraInterfaceInfoPtr(), GetExtraInterfaceInfoSize(GetNumInterfaces())); @@ -3430,7 +3430,7 @@ BOOL MethodTable::RunClassInitEx(OBJECTREF *pThrowable) // Activate our module if necessary EnsureInstanceActive(); - STRESS_LOG1(LF_CLASSLOADER, LL_INFO1000, "RunClassInit: Calling class contructor for type %pT\n", this); + STRESS_LOG1(LF_CLASSLOADER, LL_INFO1000, "RunClassInit: Calling class constructor for type %pT\n", this); MethodTable * pCanonMT = GetCanonicalMethodTable(); @@ -3453,7 +3453,7 @@ BOOL MethodTable::RunClassInitEx(OBJECTREF *pThrowable) CALL_MANAGED_METHOD_NORET(args); } - STRESS_LOG1(LF_CLASSLOADER, LL_INFO100000, "RunClassInit: Returned Successfully from class contructor for type %pT\n", this); + STRESS_LOG1(LF_CLASSLOADER, LL_INFO100000, "RunClassInit: Returned Successfully from class constructor for type %pT\n", this); fRet = TRUE; } @@ -4058,7 +4058,7 @@ OBJECTREF MethodTable::GetManagedClassObject() CONTRACT_END; #ifdef _DEBUG - // Force a GC here because GetManagedClassObject could trigger GC nondeterminsticaly + // Force a GC here because GetManagedClassObject could trigger GC nondeterministicaly GCStress::MaybeTrigger(); #endif // _DEBUG @@ -4257,7 +4257,7 @@ VOID DoAccessibilityCheckForConstraints(MethodTable *pAskingMT, TypeVarTypeDesc // on the pending list rather that pushed to CLASS_LOADED in the case of cyclic // dependencies - the root caller must handle this. // -// pfBailed - if we or one of our depedencies bails early due to cyclic dependencies, we +// pfBailed - if we or one of our dependencies bails early due to cyclic dependencies, we // must set *pfBailed to TRUE. Otherwise, we must *leave it unchanged* (thus, the // boolean acts as a cumulative OR.) // @@ -4862,7 +4862,7 @@ CorElementType MethodTable::GetInternalCorElementType() break; } - // DAC may be targetting a dump; dumps do not guarantee you can retrieve the EEClass from + // DAC may be targeting a dump; dumps do not guarantee you can retrieve the EEClass from // the MethodTable so this is not expected to work in a DAC build. #if defined(_DEBUG) && !defined(DACCESS_COMPILE) if (IsRestored_NoLogging()) @@ -5921,7 +5921,7 @@ BOOL MethodTable::HasSameInterfaceImplementationAsParent(MethodTable *pItfMT, Me return FALSE; } - // The target slots are the same, but they can still be overriden. We'll iterate + // The target slots are the same, but they can still be overridden. We'll iterate // the dispatch map beginning with pParentMT up the hierarchy and for each pItfMT // entry check the target slot contents (pParentMT vs. this class). A mismatch // means that there is an override. We'll keep track of source (interface) slots @@ -5949,7 +5949,7 @@ BOOL MethodTable::HasSameInterfaceImplementationAsParent(MethodTable *pItfMT, Me UINT32 targetSlot = pCurEntry->GetTargetSlotNumber(); if (GetRestoredSlot(targetSlot) != pParentMT->GetRestoredSlot(targetSlot)) { - // the target slot is overriden + // the target slot is overridden return FALSE; } diff --git a/src/coreclr/vm/methodtable.h b/src/coreclr/vm/methodtable.h index c9ebd7a898242..55366191f28d8 100644 --- a/src/coreclr/vm/methodtable.h +++ b/src/coreclr/vm/methodtable.h @@ -277,7 +277,7 @@ struct MethodTableWriteableData enum_flag_HasApproxParent = 0x00000010, enum_flag_UnrestoredTypeKey = 0x00000020, enum_flag_IsNotFullyLoaded = 0x00000040, - enum_flag_DependenciesLoaded = 0x00000080, // class and all depedencies loaded up to CLASS_LOADED_BUT_NOT_VERIFIED + enum_flag_DependenciesLoaded = 0x00000080, // class and all dependencies loaded up to CLASS_LOADED_BUT_NOT_VERIFIED // enum_unused = 0x00000100, @@ -2047,7 +2047,7 @@ class MethodTable // Count of interfaces that can have their extra info stored inline in the optional data structure itself // (once the interface count exceeds this limit the optional data slot will instead point to a buffer with // the information). - enum { kInlinedInterfaceInfoThreshhold = sizeof(TADDR) * 8 }; + enum { kInlinedInterfaceInfoThreshold = sizeof(TADDR) * 8 }; // Calculate how many bytes of storage will be required to track additional information for interfaces. // This will be zero if there are no interfaces, but can also be zero for small numbers of interfaces as @@ -3333,7 +3333,7 @@ public : #if defined(UNIX_AMD64_ABI) #error "Can't define both FEATURE_HFA and UNIX_AMD64_ABI" #endif - enum_flag_IsHFA = 0x00000800, // This type is an HFA (Homogenous Floating-point Aggregate) + enum_flag_IsHFA = 0x00000800, // This type is an HFA (Homogeneous Floating-point Aggregate) #endif // FEATURE_HFA #if defined(UNIX_AMD64_ABI) @@ -3643,9 +3643,9 @@ public : // for data that is only relevant to a small number of method tables. // Optional members and multipurpose slots have similar purpose, but they differ in details: - // - Multipurpose slots can only accomodate pointer sized structures right now. It is non-trivial + // - Multipurpose slots can only accommodate pointer sized structures right now. It is non-trivial // to add new ones, the access is faster. - // - Optional members can accomodate structures of any size. It is trivial to add new ones, + // - Optional members can accommodate structures of any size. It is trivial to add new ones, // the access is slower. // The following macro will automatically create GetXXX accessors for the optional members. diff --git a/src/coreclr/vm/methodtablebuilder.cpp b/src/coreclr/vm/methodtablebuilder.cpp index 13b0f88ff6b80..eabf7d68c2690 100644 --- a/src/coreclr/vm/methodtablebuilder.cpp +++ b/src/coreclr/vm/methodtablebuilder.cpp @@ -6087,7 +6087,7 @@ MethodTableBuilder::InitMethodDesc( BuildMethodTableThrowException(IDS_CLASSLOAD_GENERAL); } - // StoredSig specific intialization + // StoredSig specific initialization { StoredSigMethodDesc *pNewSMD = (StoredSigMethodDesc*) pNewMD;; DWORD cSig; @@ -8677,7 +8677,7 @@ MethodTableBuilder::HandleExplicitLayout( if (clstotalsize != 0) { - // size must be large enough to accomodate layout. If not, we use the layout size instead. + // size must be large enough to accommodate layout. If not, we use the layout size instead. if (!numInstanceFieldBytes.IsOverflow() && clstotalsize >= numInstanceFieldBytes.Value()) { numInstanceFieldBytes = S_UINT32(clstotalsize); @@ -11791,7 +11791,7 @@ BOOL MethodTableBuilder::ChangesImplementationOfVirtualSlot(SLOT_INDEX idx) // the fact that we get some false positives and end up sharing less vtable chunks. // Search the previous slots in the parent vtable for the same implementation. If it exists and it was - // overriden, the ClassLoader::PropagateCovariantReturnMethodImplSlots will propagate the change to the current + // overridden, the ClassLoader::PropagateCovariantReturnMethodImplSlots will propagate the change to the current // slot (idx), so the implementation of it will change. MethodDesc* pParentMD = ParentImpl.GetMethodDesc(); for (SLOT_INDEX i = 0; i < idx; i++) diff --git a/src/coreclr/vm/mngstdinterfaces.cpp b/src/coreclr/vm/mngstdinterfaces.cpp index f8d9f7696d281..042afcb7bfe2a 100644 --- a/src/coreclr/vm/mngstdinterfaces.cpp +++ b/src/coreclr/vm/mngstdinterfaces.cpp @@ -351,7 +351,7 @@ FCIMPL1(FC_BOOL_RET, StdMngIEnumerator::MoveNext, Object* refThisUNSAFE) // result. The high bits are undefined on AMD64. (Note that a narrowing // cast to CLR_BOOL will not work since it is the same as checking the // size_t result != 0.) - FC_RETURN_BOOL(*(CLR_BOOL*)StackElemEndianessFixup(&retVal, sizeof(CLR_BOOL))); + FC_RETURN_BOOL(*(CLR_BOOL*)StackElemEndiannessFixup(&retVal, sizeof(CLR_BOOL))); } FCIMPLEND diff --git a/src/coreclr/vm/packedfields.inl b/src/coreclr/vm/packedfields.inl index aa070fdbcbbf9..19e33e6d95ed6 100644 --- a/src/coreclr/vm/packedfields.inl +++ b/src/coreclr/vm/packedfields.inl @@ -146,7 +146,7 @@ public: // table to map values encoded into the real sizes. Experiments with EEClass packed fields over // CoreLib show that this currently doesn't yield us much benefit, primarily due to the DWORD // round-up size semantic, which implies we'd need a lot more optimization than this to reduce the - // average structure size below the next DWORD threshhold. + // average structure size below the next DWORD threshold. BitVectorSet(dwOffset, kMaxLengthBits, dwFieldLength - 1); dwOffset += kMaxLengthBits; diff --git a/src/coreclr/vm/peimage.cpp b/src/coreclr/vm/peimage.cpp index 1135b75087e78..2842261f5f3c1 100644 --- a/src/coreclr/vm/peimage.cpp +++ b/src/coreclr/vm/peimage.cpp @@ -609,12 +609,12 @@ void PEImage::EnumMemoryRegions(CLRDataEnumMemoryFlags flags) else fileName = pCvInfo->path; - size_t fileNameLenght = strlen(fileName); - size_t fullPathLenght = strlen(pCvInfo->path); - memmove(pCvInfo->path, fileName, fileNameLenght); + size_t fileNameLength = strlen(fileName); + size_t fullPathLength = strlen(pCvInfo->path); + memmove(pCvInfo->path, fileName, fileNameLength); // NULL out the rest of the path buffer. - for (size_t i = fileNameLenght; i < MAX_PATH_FNAME - 1; i++) + for (size_t i = fileNameLength; i < MAX_PATH_FNAME - 1; i++) { pCvInfo->path[i] = '\0'; } diff --git a/src/coreclr/vm/pinvokeoverride.cpp b/src/coreclr/vm/pinvokeoverride.cpp index b24ad53842b86..d8f1d0972a399 100644 --- a/src/coreclr/vm/pinvokeoverride.cpp +++ b/src/coreclr/vm/pinvokeoverride.cpp @@ -55,7 +55,7 @@ const void* PInvokeOverride::GetMethodImpl(const char* libraryName, const char* const void* result = overrideImpl(libraryName, entrypointName); if (result != nullptr) { - LOG((LF_INTEROP, LL_INFO1000, "PInvoke overriden for: lib: %s, entry: %s \n", libraryName, entrypointName)); + LOG((LF_INTEROP, LL_INFO1000, "PInvoke overridden for: lib: %s, entry: %s \n", libraryName, entrypointName)); return result; } } diff --git a/src/coreclr/vm/profdetach.cpp b/src/coreclr/vm/profdetach.cpp index ffbe0bec68617..7321b878f6a38 100644 --- a/src/coreclr/vm/profdetach.cpp +++ b/src/coreclr/vm/profdetach.cpp @@ -232,7 +232,7 @@ HRESULT ProfilingAPIDetach::RequestProfilerDetach(ProfilerInfo *pProfilerInfo, D s_profilerDetachInfos.Push(detachInfo); } EX_CATCH_HRESULT(hr); - + if (FAILED(hr)) { return hr; @@ -388,7 +388,7 @@ void ProfilingAPIDetach::SleepWhileProfilerEvacuates(ProfilerDetachInfo *pDetach // Here's the "within reason" part: the user may not customize these values to // be more "extreme" than the constants, or to be 0 (which would confuse the - // issue of whether these statics were intialized yet). + // issue of whether these statics were initialized yet). if ((s_dwMinSleepMs < kdwDefaultMinSleepMs) || (s_dwMinSleepMs > kdwDefaultMaxSleepMs)) { // Sleeping less than 300ms between evac checks could negatively affect the @@ -489,7 +489,7 @@ void ProfilingAPIDetach::UnloadProfiler(ProfilerDetachInfo *pDetachInfo) // Notify profiler it's about to be unloaded _ASSERTE(pDetachInfo->m_pProfilerInfo != NULL); - + { // This EvacuationCounterHolder is just to make asserts in EEToProfInterfaceImpl happy. // Using it like this without the dirty read/evac counter increment/clean read pattern @@ -498,7 +498,7 @@ void ProfilingAPIDetach::UnloadProfiler(ProfilerDetachInfo *pDetachInfo) EvacuationCounterHolder evacuationCounter(pDetachInfo->m_pProfilerInfo); pDetachInfo->m_pProfilerInfo->pProfInterface->ProfilerDetachSucceeded(); } - + EEToProfInterfaceImpl *pProfInterface = pDetachInfo->m_pProfilerInfo->pProfInterface.Load(); pDetachInfo->m_pProfilerInfo->pProfInterface.Store(NULL); delete pProfInterface; diff --git a/src/coreclr/vm/profilinghelper.cpp b/src/coreclr/vm/profilinghelper.cpp index 20d3cbf175f24..4085009fb8ec2 100644 --- a/src/coreclr/vm/profilinghelper.cpp +++ b/src/coreclr/vm/profilinghelper.cpp @@ -472,7 +472,7 @@ HRESULT ProfilingAPIUtility::InitializeProfiling() #ifdef _DEBUG - // Test-only, debug-only code to allow attaching profilers to call ICorProfilerInfo inteface, + // Test-only, debug-only code to allow attaching profilers to call ICorProfilerInfo interface, // which would otherwise be disallowed for attaching profilers DWORD dwTestOnlyEnableICorProfilerInfo = CLRConfig::GetConfigValue(CLRConfig::INTERNAL_TestOnlyEnableICorProfilerInfo); if (dwTestOnlyEnableICorProfilerInfo != 0) diff --git a/src/coreclr/vm/proftoeeinterfaceimpl.cpp b/src/coreclr/vm/proftoeeinterfaceimpl.cpp index 5641494af67cb..3fa7a14011968 100644 --- a/src/coreclr/vm/proftoeeinterfaceimpl.cpp +++ b/src/coreclr/vm/proftoeeinterfaceimpl.cpp @@ -90,7 +90,7 @@ // on startup). If a profiler later attaches and calls these functions, then the // ObjectAllocated notifications will call into the profiler's ObjectAllocated callback. // * COMPlus_TestOnlyEnableICorProfilerInfo: -// * If nonzero, then attaching profilers allows to call ICorProfilerInfo inteface, +// * If nonzero, then attaching profilers allows to call ICorProfilerInfo interface, // which would otherwise be disallowed for attaching profilers // * COMPlus_TestOnlyAllowedEventMask // * If a profiler needs to work around the restrictions of either @@ -4338,7 +4338,7 @@ HRESULT ProfToEEInterfaceImpl::GetILFunctionBody(ModuleID moduleId, // Don't return rewritten IL, use the new API to get that. pbMethod = (LPCBYTE) pModule->GetDynamicIL(methodId, FALSE); - // Method not overriden - get the original copy of the IL by going to metadata + // Method not overridden - get the original copy of the IL by going to metadata if (pbMethod == NULL) { HRESULT hr = S_OK; @@ -8029,7 +8029,7 @@ StackWalkAction ProfilerStackWalkCallback(CrawlFrame *pCf, PROFILER_STACK_WALK_D //--------------------------------------------------------------------------------------- // Normally, calling GetFunction() on the frame is sufficient to ensure -// HelperMethodFrames are intialized. However, sometimes we need to be able to specify +// HelperMethodFrames are initialized. However, sometimes we need to be able to specify // that we should not enter the host while initializing, so we need to initialize such // frames more directly. This small helper function directly forces the initialization, // and ensures we don't enter the host as a result if we're executing in an asynchronous diff --git a/src/coreclr/vm/reflectioninvocation.cpp b/src/coreclr/vm/reflectioninvocation.cpp index 3e5d1a8fb5b8a..6192bc819319e 100644 --- a/src/coreclr/vm/reflectioninvocation.cpp +++ b/src/coreclr/vm/reflectioninvocation.cpp @@ -336,7 +336,7 @@ static OBJECTREF InvokeArrayConstructor(TypeHandle th, PVOID* args, int argCnt) INT32 size = *(INT32*)args[i]; ARG_SLOT value = size; - memcpyNoGCRefs(indexes + i, ArgSlotEndianessFixup(&value, sizeof(INT32)), sizeof(INT32)); + memcpyNoGCRefs(indexes + i, ArgSlotEndiannessFixup(&value, sizeof(INT32)), sizeof(INT32)); } return AllocateArrayEx(th, indexes, argCnt); @@ -1480,7 +1480,7 @@ FCIMPL2_IV(Object*, ReflectionInvocation::CreateEnum, ReflectClassBaseObject *pT OBJECTREF obj = NULL; HELPER_METHOD_FRAME_BEGIN_RET_1(refType); MethodTable *pEnumMT = typeHandle.AsMethodTable(); - obj = pEnumMT->Box(ArgSlotEndianessFixup ((ARG_SLOT*)&value, + obj = pEnumMT->Box(ArgSlotEndiannessFixup ((ARG_SLOT*)&value, pEnumMT->GetNumInstanceFieldBytes())); HELPER_METHOD_FRAME_END(); @@ -2106,7 +2106,7 @@ FCIMPL2_IV(Object*, ReflectionEnum::InternalBoxEnum, ReflectClassBaseObject* tar MethodTable* pMT = target->GetType().AsMethodTable(); HELPER_METHOD_FRAME_BEGIN_RET_0(); - ret = pMT->Box(ArgSlotEndianessFixup((ARG_SLOT*)&value, pMT->GetNumInstanceFieldBytes())); + ret = pMT->Box(ArgSlotEndiannessFixup((ARG_SLOT*)&value, pMT->GetNumInstanceFieldBytes())); HELPER_METHOD_FRAME_END(); return OBJECTREFToObject(ret); diff --git a/src/coreclr/vm/siginfo.cpp b/src/coreclr/vm/siginfo.cpp index d255dd36f91c4..f88b1e83de460 100644 --- a/src/coreclr/vm/siginfo.cpp +++ b/src/coreclr/vm/siginfo.cpp @@ -4770,7 +4770,7 @@ BOOL MetaSig::CompareVariableConstraints(const Substitution *pSubst1, // NB: we do not attempt to match constraints equivalent to object (and ValueType when tok1 is notNullable) // because they // a) are vacuous, and - // b) may be implicit (ie. absent) in the overriden variable's declaration + // b) may be implicit (ie. absent) in the overridden variable's declaration if (!(CompareTypeDefOrRefOrSpec(pModule1, tkConstraintType1, NULL, CoreLibBinder::GetModule(), g_pObjectClass->GetCl(), NULL, NULL) || (((specialConstraints1 & gpNotNullableValueTypeConstraint) != 0) && diff --git a/src/coreclr/vm/siginfo.hpp b/src/coreclr/vm/siginfo.hpp index 76b59e641ddc7..4dbbc09c09436 100644 --- a/src/coreclr/vm/siginfo.hpp +++ b/src/coreclr/vm/siginfo.hpp @@ -229,7 +229,7 @@ class SigPointer : public SigParser // pTypeContext indicates how to instantiate any generic type parameters we come // However, first we implicitly apply the substitution pSubst to the metadata if pSubst is supplied. // That is, if the metadata contains a type variable "!0" then we first look up - // !0 in pSubst to produce another item of metdata and continue processing. + // !0 in pSubst to produce another item of metadata and continue processing. // If pSubst is empty then we look up !0 in the pTypeContext to produce a final // type handle. If any of these are out of range we throw an exception. // diff --git a/src/coreclr/vm/stackingallocator.cpp b/src/coreclr/vm/stackingallocator.cpp index 8806bceabb2ff..286c4d09e5fd2 100644 --- a/src/coreclr/vm/stackingallocator.cpp +++ b/src/coreclr/vm/stackingallocator.cpp @@ -56,7 +56,7 @@ StackingAllocator::InitialStackBlock::InitialStackBlock() { m_initialBlockHeader.m_Next = NULL; m_initialBlockHeader.m_Length = sizeof(m_dataSpace); - INDEBUG(m_initialBlockHeader.m_Sentinal = 0); + INDEBUG(m_initialBlockHeader.m_Sentinel = 0); } StackingAllocator::~StackingAllocator() @@ -213,7 +213,7 @@ bool StackingAllocator::AllocNewBlockForBytes(unsigned n) // the cast below is safe because b->m_Length is less than MaxBlockSize (4096) m_BytesLeft = static_cast(b->m_Length); - INDEBUG(b->m_Sentinal = 0); + INDEBUG(b->m_Sentinel = 0); RETURN true; } @@ -289,7 +289,7 @@ void StackingAllocator::Collapse(void *CheckpointMarker) } // Cache contents of checkpoint, we can potentially deallocate it in the - // next step (if a new block had to be allocated to accomodate the + // next step (if a new block had to be allocated to accommodate the // checkpoint). StackBlock *pOldBlock = c->m_OldBlock; unsigned iOldBytesLeft = c->m_OldBytesLeft; @@ -315,7 +315,7 @@ void StackingAllocator::Validate(StackBlock *block, void* spot) if (!block) return; _ASSERTE(m_InitialBlock.m_initialBlockHeader.m_Length == sizeof(m_InitialBlock.m_dataSpace)); - Sentinal* ptr = block->m_Sentinal; + Sentinel* ptr = block->m_Sentinel; _ASSERTE(spot); while(ptr >= spot) { @@ -326,11 +326,11 @@ void StackingAllocator::Validate(StackBlock *block, void* spot) // has a return string buffer!. This usually means the end // programmer did not allocate a big enough buffer before passing // it to the PINVOKE method. - if (ptr->m_Marker1 != Sentinal::marker1Val) + if (ptr->m_Marker1 != Sentinel::marker1Val) _ASSERTE(!"Memory overrun!! May be bad buffer passed to PINVOKE. turn on logging LF_STUBS level 6 to find method"); ptr = ptr->m_Next; } - block->m_Sentinal = ptr; + block->m_Sentinel = ptr; } #endif // _DEBUG diff --git a/src/coreclr/vm/stackingallocator.h b/src/coreclr/vm/stackingallocator.h index a33b50db32a28..a937bf942201a 100644 --- a/src/coreclr/vm/stackingallocator.h +++ b/src/coreclr/vm/stackingallocator.h @@ -20,13 +20,13 @@ #endif #ifdef _DEBUG - struct Sentinal + struct Sentinel { enum { marker1Val = 0xBAD00BAD }; - Sentinal(Sentinal* next) : m_Marker1(marker1Val), m_Next(next) { LIMITED_METHOD_CONTRACT; } + Sentinel(Sentinel* next) : m_Marker1(marker1Val), m_Next(next) { LIMITED_METHOD_CONTRACT; } unsigned m_Marker1; // just some data bytes - Sentinal* m_Next; // linked list of these + Sentinel* m_Next; // linked list of these }; #endif @@ -38,7 +38,7 @@ { StackBlock *m_Next; // Next oldest block in list DWORD_PTR m_Length; // Length of block excluding header (needs to be pointer-sized for alignment on IA64) - INDEBUG(Sentinal* m_Sentinal;) // insure that we don't fall of the end of the buffer + INDEBUG(Sentinel* m_Sentinel;) // insure that we don't fall of the end of the buffer INDEBUG(void** m_Pad;) // keep the size a multiple of 8 char *GetData() { return (char *)(this + 1);} }; @@ -135,8 +135,8 @@ class StackingAllocator return NULL; } - // leave room for sentinal - INDEBUG(n += sizeof(Sentinal)); + // leave room for sentinel + INDEBUG(n += sizeof(Sentinel)); // Is the request too large for the current block? if (n > m_BytesLeft) @@ -156,8 +156,8 @@ class StackingAllocator m_BytesLeft -= n; #ifdef _DEBUG - // Add sentinal to the end - m_FirstBlock->m_Sentinal = new(m_FirstFree - sizeof(Sentinal)) Sentinal(m_FirstBlock->m_Sentinal); + // Add sentinel to the end + m_FirstBlock->m_Sentinel = new(m_FirstFree - sizeof(Sentinel)) Sentinel(m_FirstBlock->m_Sentinel); #endif RETURN ret; diff --git a/src/coreclr/vm/stdinterfaces.cpp b/src/coreclr/vm/stdinterfaces.cpp index a5a70e6ee1c21..094d340770dd3 100644 --- a/src/coreclr/vm/stdinterfaces.cpp +++ b/src/coreclr/vm/stdinterfaces.cpp @@ -556,7 +556,7 @@ HRESULT GetITypeLibForAssembly(_In_ Assembly *pAssembly, _Outptr_ ITypeLib **ppT ITypeLib *pTlb = pAssembly->GetTypeLib(); if (pTlb != nullptr) { - // If the cached value is the invalid sentinal, an attempt was already made but failed. + // If the cached value is the invalid sentinel, an attempt was already made but failed. if (pTlb == Assembly::InvalidTypeLib) return TLBX_E_LIBNOTREGISTERED; diff --git a/src/coreclr/vm/stringliteralmap.cpp b/src/coreclr/vm/stringliteralmap.cpp index 6880614f917fb..361de54e59164 100644 --- a/src/coreclr/vm/stringliteralmap.cpp +++ b/src/coreclr/vm/stringliteralmap.cpp @@ -568,7 +568,7 @@ void GlobalStringLiteralMap::RemoveStringLiteralEntry(StringLiteralEntry *pEntry BOOL bSuccess; bSuccess = m_StringToEntryHashTable->DeleteValue(&StringData); - // this assert is comented out to accomodate case when StringLiteralEntryHolder + // this assert is comented out to accommodate case when StringLiteralEntryHolder // releases this object after failed insertion into hash //_ASSERTE(bSuccess); diff --git a/src/coreclr/vm/stublink.cpp b/src/coreclr/vm/stublink.cpp index d31953572d8c9..fd58691fcbe7d 100644 --- a/src/coreclr/vm/stublink.cpp +++ b/src/coreclr/vm/stublink.cpp @@ -1382,7 +1382,7 @@ bool StubLinker::EmitUnwindInfo(Stub* pStubRX, Stub* pStubRW, int globalsize, Lo // // Resolve the unwind operation offsets, and fill in the UNWIND_INFO and - // RUNTIME_FUNCTION structs preceeding the stub. The unwind codes are recorded + // RUNTIME_FUNCTION structs preceding the stub. The unwind codes are recorded // in decreasing address order. // diff --git a/src/coreclr/vm/stubmgr.cpp b/src/coreclr/vm/stubmgr.cpp index fa233bdc59478..94bc431533055 100644 --- a/src/coreclr/vm/stubmgr.cpp +++ b/src/coreclr/vm/stubmgr.cpp @@ -1839,7 +1839,7 @@ static BOOL IsVarargPInvokeStub(PCODE stubStartAddress) BOOL InteropDispatchStubManager::CheckIsStub_Internal(PCODE stubStartAddress) { WRAPPER_NO_CONTRACT; - //@dbgtodo dharvey implement DAC suport + //@dbgtodo dharvey implement DAC support #ifndef DACCESS_COMPILE #ifdef FEATURE_COMINTEROP diff --git a/src/coreclr/vm/syncblk.h b/src/coreclr/vm/syncblk.h index da480700daa7c..6629f4e971398 100644 --- a/src/coreclr/vm/syncblk.h +++ b/src/coreclr/vm/syncblk.h @@ -458,7 +458,7 @@ class AwareLock AwareLock(DWORD indx) : m_Recursion(0), #ifndef DACCESS_COMPILE -// PreFAST has trouble with intializing a NULL PTR_Thread. +// PreFAST has trouble with initializing a NULL PTR_Thread. m_HoldingThread(NULL), #endif // DACCESS_COMPILE m_TransientPrecious(0), @@ -562,7 +562,7 @@ class AwareLock { WRAPPER_NO_CONTRACT; - // CLREvent::SetMonitorEvent works even if the event has not been intialized yet + // CLREvent::SetMonitorEvent works even if the event has not been initialized yet m_SemEvent.SetMonitorEvent(); m_lockState.InterlockedTrySetShouldNotPreemptWaitersIfNecessary(this); @@ -983,7 +983,7 @@ class SyncBlock // space for the minimum, which is the pointer within an SLink. SLink m_Link; - // This is the hash code for the object. It can either have been transfered + // This is the hash code for the object. It can either have been transferred // from the header dword, in which case it will be limited to 26 bits, or // have been generated right into this member variable here, when it will // be a full 32 bits. diff --git a/src/coreclr/vm/threadpoolrequest.cpp b/src/coreclr/vm/threadpoolrequest.cpp index ddccec27b6d5d..fb31321f31a9f 100644 --- a/src/coreclr/vm/threadpoolrequest.cpp +++ b/src/coreclr/vm/threadpoolrequest.cpp @@ -30,7 +30,7 @@ BYTE PerAppDomainTPCountList::s_padding[MAX_CACHE_LINE_SIZE - sizeof(LONG)]; // Cacheline aligned, hot variable DECLSPEC_ALIGN(MAX_CACHE_LINE_SIZE) LONG PerAppDomainTPCountList::s_ADHint = -1; -// Move out of from preceeding variables' cache line +// Move out of from preceding variables' cache line DECLSPEC_ALIGN(MAX_CACHE_LINE_SIZE) UnManagedPerAppDomainTPCount PerAppDomainTPCountList::s_unmanagedTPCount; //The list of all per-appdomain work-request counts. ArrayListStatic PerAppDomainTPCountList::s_appDomainIndexList; diff --git a/src/coreclr/vm/threads.h b/src/coreclr/vm/threads.h index ee2ca0a1de948..cb2bf59ca35c9 100644 --- a/src/coreclr/vm/threads.h +++ b/src/coreclr/vm/threads.h @@ -804,8 +804,8 @@ class TailCallTls // #ThreadClass // -// A code:Thread contains all the per-thread information needed by the runtime. You can get at this -// structure throught the and OS TLS slot see code:#RuntimeThreadLocals for more +// A code:Thread contains all the per-thread information needed by the runtime. We can get this +// structure through the OS TLS slot see code:#RuntimeThreadLocals for more information. class Thread { friend struct ThreadQueue; // used to enqueue & dequeue threads onto SyncBlocks @@ -2536,7 +2536,7 @@ class Thread } PTR_CONTEXT m_OSContext; // ptr to a Context structure used to record the OS specific ThreadContext for a thread - // this is used for thread stop/abort and is intialized on demand + // this is used for thread stop/abort and is initialized on demand PT_CONTEXT GetAbortContext (); @@ -5114,7 +5114,7 @@ class GCHolderBase { // Either we initialized m_Thread explicitly with GetThread() in the // constructor, or our caller (instantiator of GCHolder) called our constructor - // with GetThread() (which we already asserted in the constuctor) + // with GetThread() (which we already asserted in the constructor) // (i.e., m_Thread == GetThread()). Also, note that if THREAD_EXISTS, // then m_Thread must be non-null (as it's == GetThread()). So the // "if" below looks a little hokey since we're checking for either condition. diff --git a/src/coreclr/vm/threadsuspend.cpp b/src/coreclr/vm/threadsuspend.cpp index 89e5598a10e13..cc5dcae23f76d 100644 --- a/src/coreclr/vm/threadsuspend.cpp +++ b/src/coreclr/vm/threadsuspend.cpp @@ -5177,7 +5177,7 @@ BOOL ThreadCaughtInKernelModeExceptionHandling(Thread *pThread, CONTEXT *ctx) // 32-bit platforms, this should be fine. _ASSERTE(sizeof(DWORD) == sizeof(void*)); - // There are cases where the ESP is just decremented but the page is not touched, thus the page is not commited or + // There are cases where the ESP is just decremented but the page is not touched, thus the page is not committed or // still has page guard bit set. We can't hit the race in such case so we just leave. Besides, we can't access the // memory with page guard flag or not committed. MEMORY_BASIC_INFORMATION mbi; diff --git a/src/coreclr/vm/typectxt.h b/src/coreclr/vm/typectxt.h index fc9970a6b7817..01bae5a42142d 100644 --- a/src/coreclr/vm/typectxt.h +++ b/src/coreclr/vm/typectxt.h @@ -41,7 +41,7 @@ class SigTypeContext // and a null declaring Type is passed then the type context will // be a representative context, not an exact one. // This is sufficient for most purposes, e.g. GC and field layout, because - // these operations are "parametric", i.e. behave the same for all shared types. + // these operations are "parameteric", i.e. behave the same for all shared types. // // If declaringType is non-null, then the MethodDesc is assumed to be // shared between generic classes, and the type handle is used to give the @@ -85,14 +85,14 @@ class SigTypeContext inline SigTypeContext(FieldDesc *pFD, TypeHandle declaringType = TypeHandle()) { WRAPPER_NO_CONTRACT; InitTypeContext(pFD,declaringType,this); } - // Copy contructor - try not to use this. The C++ compiler is not doing a good job + // Copy constructor - try not to use this. The C++ compiler is not doing a good job // of copy-constructor based code, and we've had perf regressions when using this too // much for this simple objects. Use an explicit call to InitTypeContext instead, // or use GetOptionalTypeContext. inline SigTypeContext(const SigTypeContext &c) { WRAPPER_NO_CONTRACT; InitTypeContext(&c,this); } - // Copy contructor from a possibly-NULL pointer. + // Copy constructor from a possibly-NULL pointer. inline SigTypeContext(const SigTypeContext *c) { WRAPPER_NO_CONTRACT; InitTypeContext(c,this); } @@ -135,7 +135,7 @@ inline void SigTypeContext::InitTypeContext(Instantiation classInst, } -// Copy contructor from a possibly-NULL pointer. +// Copy constructor from a possibly-NULL pointer. inline void SigTypeContext::InitTypeContext(const SigTypeContext *c,SigTypeContext *pRes) { LIMITED_METHOD_DAC_CONTRACT; diff --git a/src/coreclr/vm/typedesc.cpp b/src/coreclr/vm/typedesc.cpp index 41abdebda71ae..a65a13194c018 100644 --- a/src/coreclr/vm/typedesc.cpp +++ b/src/coreclr/vm/typedesc.cpp @@ -594,7 +594,7 @@ ClassLoadLevel TypeDesc::GetLoadLevel() // dependencies - the root caller must handle this. // // -// pfBailed - if we or one of our depedencies bails early due to cyclic dependencies, we +// pfBailed - if we or one of our dependencies bails early due to cyclic dependencies, we // must set *pfBailed to TRUE. Otherwise, we must *leave it unchanged* (thus, the // boolean acts as a cumulative OR.) // diff --git a/src/coreclr/vm/typehandle.cpp b/src/coreclr/vm/typehandle.cpp index c0b194c86e9fa..115aae3154361 100644 --- a/src/coreclr/vm/typehandle.cpp +++ b/src/coreclr/vm/typehandle.cpp @@ -1075,7 +1075,7 @@ OBJECTREF TypeHandle::GetManagedClassObject() const CONTRACTL_END; #ifdef _DEBUG - // Force a GC here because GetManagedClassObject could trigger GC nondeterminsticaly + // Force a GC here because GetManagedClassObject could trigger GC nondeterministicaly GCStress::MaybeTrigger(); #endif // _DEBUG diff --git a/src/coreclr/vm/typehandle.h b/src/coreclr/vm/typehandle.h index 80a0e78865802..decfa20df4274 100644 --- a/src/coreclr/vm/typehandle.h +++ b/src/coreclr/vm/typehandle.h @@ -423,7 +423,7 @@ class TypeHandle PTR_Module GetModule() const; // The module where this type lives for the purposes of loading and prejitting - // Note: NGen time result might differ from runtime result for parametrized types (generics, arrays, etc.) + // Note: NGen time result might differ from runtime result for parameterized types (generics, arrays, etc.) // See code:ClassLoader::ComputeLoaderModule or file:clsload.hpp#LoaderModule for more information PTR_Module GetLoaderModule() const; diff --git a/src/coreclr/vm/virtualcallstub.h b/src/coreclr/vm/virtualcallstub.h index 2e1e9d547da7e..305e84d7c18e1 100644 --- a/src/coreclr/vm/virtualcallstub.h +++ b/src/coreclr/vm/virtualcallstub.h @@ -1074,7 +1074,7 @@ class LookupEntry : public Entry stub = (LookupStub*) s; } - //default contructor to allow stack and inline allocation of lookup entries + //default constructor to allow stack and inline allocation of lookup entries LookupEntry() {LIMITED_METHOD_CONTRACT; stub = NULL;} //implementations of abstract class Entry @@ -1111,7 +1111,7 @@ class VTableCallEntry : public Entry stub = (VTableCallStub*)s; } - //default contructor to allow stack and inline allocation of vtable call entries + //default constructor to allow stack and inline allocation of vtable call entries VTableCallEntry() { LIMITED_METHOD_CONTRACT; stub = NULL; } //implementations of abstract class Entry @@ -1152,7 +1152,7 @@ class ResolveCacheEntry : public Entry pElem = (ResolveCacheElem*) elem; } - //default contructor to allow stack and inline allocation of lookup entries + //default constructor to allow stack and inline allocation of lookup entries ResolveCacheEntry() { LIMITED_METHOD_CONTRACT; pElem = NULL; } //access and compare the keys of the entry @@ -1197,7 +1197,7 @@ class ResolveEntry : public Entry _ASSERTE(VirtualCallStubManager::isResolvingStubStatic((PCODE)s)); stub = (ResolveStub*) s; } - //default contructor to allow stack and inline allocation of resovler entries + //default constructor to allow stack and inline allocation of resovler entries ResolveEntry() { LIMITED_METHOD_CONTRACT; stub = CALL_STUB_EMPTY_ENTRY; } //implementations of abstract class Entry @@ -1235,7 +1235,7 @@ class DispatchEntry : public Entry _ASSERTE(VirtualCallStubManager::isDispatchingStubStatic((PCODE)s)); stub = (DispatchStub*) s; } - //default contructor to allow stack and inline allocation of resovler entries + //default constructor to allow stack and inline allocation of resovler entries DispatchEntry() { LIMITED_METHOD_CONTRACT; stub = CALL_STUB_EMPTY_ENTRY; } //implementations of abstract class Entry @@ -1445,7 +1445,7 @@ a power of 2, so we force stride to be odd. Note -- it must be assumed that multiple probers are walking the same tables and buckets at the same time. Additionally, the counts may not be accurate, and there may be duplicates in the tables. Since the tables -do not allow concurrrent deletion, some of the concurrency issues are ameliorated. +do not allow concurrent deletion, some of the concurrency issues are ameliorated. */ class Prober { diff --git a/src/coreclr/vm/win32threadpool.cpp b/src/coreclr/vm/win32threadpool.cpp index 609ac1c6a77b0..398053336bbfa 100644 --- a/src/coreclr/vm/win32threadpool.cpp +++ b/src/coreclr/vm/win32threadpool.cpp @@ -137,7 +137,7 @@ CLRLifoSemaphore* ThreadpoolMgr::RetiredWorkerSemaphore; // Cacheline aligned, hot variable DECLSPEC_ALIGN(MAX_CACHE_LINE_SIZE) LONG ThreadpoolMgr::GateThreadStatus=GATE_THREAD_STATUS_NOT_RUNNING; -// Move out of from preceeding variables' cache line +// Move out of from preceding variables' cache line DECLSPEC_ALIGN(MAX_CACHE_LINE_SIZE) ThreadpoolMgr::RecycledListsWrapper ThreadpoolMgr::RecycledLists; BOOL ThreadpoolMgr::IsApcPendingOnWaitThread = FALSE; @@ -2151,7 +2151,7 @@ BOOL ThreadpoolMgr::RegisterWaitForSingleObject(PHANDLE phNewWaitObject, } -// Returns a wait thread that can accomodate another wait request. The +// Returns a wait thread that can accommodate another wait request. The // caller is responsible for synchronizing access to the WaitThreadsHead ThreadpoolMgr::ThreadCB* ThreadpoolMgr::FindWaitThread() { diff --git a/src/coreclr/vm/win32threadpool.h b/src/coreclr/vm/win32threadpool.h index b0fbe2531d374..fe215efb7ced8 100644 --- a/src/coreclr/vm/win32threadpool.h +++ b/src/coreclr/vm/win32threadpool.h @@ -830,7 +830,7 @@ class ThreadpoolMgr static BOOL AddWaitRequest(HANDLE waitHandle, WaitInfo* waitInfo); - static ThreadCB* FindWaitThread(); // returns a wait thread that can accomodate another wait request + static ThreadCB* FindWaitThread(); // returns a wait thread that can accommodate another wait request static BOOL CreateWaitThread(); diff --git a/src/installer/managed/Microsoft.NET.HostModel/AppHost/MachOUtils.cs b/src/installer/managed/Microsoft.NET.HostModel/AppHost/MachOUtils.cs index c717ef75659f9..b0da962c1ab10 100644 --- a/src/installer/managed/Microsoft.NET.HostModel/AppHost/MachOUtils.cs +++ b/src/installer/managed/Microsoft.NET.HostModel/AppHost/MachOUtils.cs @@ -352,14 +352,14 @@ public static unsafe bool RemoveSignature(FileStream stream) /// * The bytes for the bundler may be unnecessarily loaded at startup /// * Tools that process the string table may be confused (?) /// * The string table size is limited to 4GB. Bundles larger than that size - /// cannot be accomodated by this utility. + /// cannot be accommodated by this utility. /// /// /// Path to the AppHost /// /// True if /// - The input is a MachO binary, and - /// - The additional bytes were successfully accomodated within the MachO segments. + /// - The additional bytes were successfully accommodated within the MachO segments. /// False otherwise /// /// diff --git a/src/installer/managed/Microsoft.NET.HostModel/Bundle/Manifest.cs b/src/installer/managed/Microsoft.NET.HostModel/Bundle/Manifest.cs index cfc68b0cf9b6e..e4a3547a8221f 100644 --- a/src/installer/managed/Microsoft.NET.HostModel/Bundle/Manifest.cs +++ b/src/installer/managed/Microsoft.NET.HostModel/Bundle/Manifest.cs @@ -63,7 +63,7 @@ private enum HeaderFlags : ulong } // Bundle ID is a string that is used to uniquely - // identify this bundle. It is choosen to be compatible + // identify this bundle. It is chosen to be compatible // with path-names so that the AppHost can use it in // extraction path. public string BundleID { get; private set; } diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardReleaseAndPreRelease.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardReleaseAndPreRelease.cs index 1289292602add..28ca4346a7ea7 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardReleaseAndPreRelease.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardReleaseAndPreRelease.cs @@ -145,7 +145,7 @@ public void RollForwardOnPatch_FromReleaseToPreRelease( // Verifies that rollForward settings behave as expected when starting from 4.0.0 which doesn't exit // to other available 4.1.* versions (both release and pre-release). So roll forward on minor version. - // Specifically targetting the behavior that starting from release should by default prefer release versions. + // Specifically targeting the behavior that starting from release should by default prefer release versions. // Also verifying behavior when DOTNET_ROLL_FORWARD_TO_PRERELEASE is set. [Theory] // rollForward applyPatches rollForwardToPreRelease resolvedFramework [InlineData(Constants.RollForwardSetting.Minor, null, false, "4.1.2")] @@ -178,7 +178,7 @@ public void RollForwardOnMinor_FromReleaseIgnoresPreReleaseIfReleaseAvailable( // Verifies that rollForward settings behave as expected when starting from 3.0.0 which does exit // to other available 4.1.* versions (both release and pre-release). So roll forward on major version. - // Specifically targetting the behavior that starting from release should by default prefer release versions. + // Specifically targeting the behavior that starting from release should by default prefer release versions. // Also verifying behavior when DOTNET_ROLL_FORWARD_TO_PRERELEASE is set. [Theory] // rollForward applyPatches rollForwardToPreRelease resolvedFramework [InlineData(Constants.RollForwardSetting.Major, null, false, "4.1.2")] diff --git a/src/installer/tests/scripts/linux-test/SdkInstallation.sh b/src/installer/tests/scripts/linux-test/SdkInstallation.sh index 2701c79e14c6b..95bb3bd754c6c 100644 --- a/src/installer/tests/scripts/linux-test/SdkInstallation.sh +++ b/src/installer/tests/scripts/linux-test/SdkInstallation.sh @@ -209,15 +209,15 @@ run_app(){ project_output=$(dotnet run) if [[ "$project_output" == 'Hello World!' ]]; then - sucess_install=1; + success_install=1; else - sucess_install=0; + success_install=0; fi fi } test_result_install(){ if [ -e $result_file ]; then - if [ $sucess_install -eq 1 ]; then + if [ $success_install -eq 1 ]; then echo "$distro:$version install -> passed" >> $result_file else echo "$distro:$version install -> failed" >> $result_file @@ -227,13 +227,13 @@ test_result_install(){ test_result_uninstall(){ if [[ -z "$dotnet_installed_packages" ]]; then - sucess_uninstall=1; + success_uninstall=1; else - sucess_uninstall=0; + success_uninstall=0; fi if [ -e $result_file ]; then - if [ $sucess_uninstall -eq 1 ]; then + if [ $success_uninstall -eq 1 ]; then echo "$distro:$version uninstall -> passed" >> $result_file else echo "$distro:$version uninstall -> failed" >> $result_file @@ -289,7 +289,7 @@ if [[ "$distro" == "ubuntu" || "$distro" == "debian" ]]; then fi - if [[ "$3" == "uninstall" && "$sucess_install" == 1 || "$2" == "uninstall" ]]; then + if [[ "$3" == "uninstall" && "$success_install" == 1 || "$2" == "uninstall" ]]; then uninstall_dotnet_deb test_result_uninstall fi @@ -339,7 +339,7 @@ elif [[ "$distro" == "fedora" || "$distro" == "centos" || "$distro" == "oracleli echo $runtime_aspnet fi - if [[ "$3" == "uninstall" && "$sucess_install" == 1 || "$2" == "uninstall" ]]; then + if [[ "$3" == "uninstall" && "$success_install" == 1 || "$2" == "uninstall" ]]; then uninstall_dotnet_yum test_result_uninstall fi @@ -392,7 +392,7 @@ elif [[ "$distro" == "opensuse" || "$distro" == "sles" ]]; then fi - if [[ "$3" == "uninstall" && "$sucess_install" == 1 || "$2" == "uninstall" ]]; then + if [[ "$3" == "uninstall" && "$success_install" == 1 || "$2" == "uninstall" ]]; then uninstall_dotnet_zypper test_result_uninstall fi diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs index 298b250b5ecba..8fbba5a49b765 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs @@ -740,7 +740,7 @@ private static unsafe int AlpnServerSelectCallback(IntPtr ssl, byte** outp, byte // We attached GCHandle to the SSL so we can find back SafeSslContextHandle holding the cache. // New session has refCount of 1. // If this function returns 0, OpenSSL will drop the refCount and discard the session. - // If we return 1, the ownership is transfered to us and we will need to call SessionFree(). + // If we return 1, the ownership is transferred to us and we will need to call SessionFree(). private static unsafe int NewSessionCallback(IntPtr ssl, IntPtr session) { Debug.Assert(ssl != IntPtr.Zero); diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs index 56c954f1e9a30..f3477aed5e91a 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs @@ -159,8 +159,8 @@ internal static SafeX509StoreHandle X509ChainNew(SafeX509StackHandle systemTrust return store; } - [LibraryImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_X509StoreDestory")] - internal static partial void X509StoreDestory(IntPtr v); + [LibraryImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_X509StoreDestroy")] + internal static partial void X509StoreDestroy(IntPtr v); [LibraryImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_X509StoreAddCrl")] [return: MarshalAs(UnmanagedType.Bool)] diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Ext.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Ext.cs index b52e9a517e3e4..b3fff2b95fef4 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Ext.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509Ext.cs @@ -34,7 +34,7 @@ internal static partial bool DecodeX509BasicConstraints2Extension( [LibraryImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_DecodeExtendedKeyUsage")] internal static partial SafeEkuExtensionHandle DecodeExtendedKeyUsage(byte[] buf, int len); - [LibraryImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_ExtendedKeyUsageDestory")] - internal static partial void ExtendedKeyUsageDestory(IntPtr a); + [LibraryImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_ExtendedKeyUsageDestroy")] + internal static partial void ExtendedKeyUsageDestroy(IntPtr a); } } diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeX509Handles.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeX509Handles.Unix.cs index 6b1e3108a8b9f..7017405cb4a6a 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeX509Handles.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeX509Handles.Unix.cs @@ -74,7 +74,7 @@ public SafeX509StoreHandle() : protected override bool ReleaseHandle() { - Interop.Crypto.X509StoreDestory(handle); + Interop.Crypto.X509StoreDestroy(handle); SetHandle(IntPtr.Zero); return true; } diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/X509ExtensionSafeHandles.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/X509ExtensionSafeHandles.Unix.cs index e79ff15d52111..14badf8382550 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/X509ExtensionSafeHandles.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/X509ExtensionSafeHandles.Unix.cs @@ -36,7 +36,7 @@ public SafeEkuExtensionHandle() : protected override bool ReleaseHandle() { - Interop.Crypto.ExtendedKeyUsageDestory(handle); + Interop.Crypto.ExtendedKeyUsageDestroy(handle); SetHandle(IntPtr.Zero); return true; } diff --git a/src/libraries/Common/src/System/Data/ProviderBase/DbMetaDataFactory.cs b/src/libraries/Common/src/System/Data/ProviderBase/DbMetaDataFactory.cs index bbd6eefe88fdd..6e9d95481c1c0 100644 --- a/src/libraries/Common/src/System/Data/ProviderBase/DbMetaDataFactory.cs +++ b/src/libraries/Common/src/System/Data/ProviderBase/DbMetaDataFactory.cs @@ -279,7 +279,7 @@ internal DataRow FindMetaDataCollectionRow(string collectionName) // have an inexact match - ok only if it is the only one if (exactCollectionName != null) { - // can't fail here becasue we may still find an exact match + // can't fail here because we may still find an exact match haveMultipleInexactMatches = true; } requestedCollectionRow = row; diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs index d7e41077e7e1c..66c3d56033738 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs @@ -441,7 +441,7 @@ private static string Format(FormattableString s) #region Custom WriteEvent overloads [NonEvent] - [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Parameters passed to WriteEvent are all primative values.")] + [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Parameters passed to WriteEvent are all primitive values.")] private unsafe void WriteEvent(int eventId, string? arg1, string? arg2, string? arg3, string? arg4) { if (IsEnabled()) @@ -486,7 +486,7 @@ private unsafe void WriteEvent(int eventId, string? arg1, string? arg2, string? } [NonEvent] - [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Parameters passed to WriteEvent are all primative values.")] + [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Parameters passed to WriteEvent are all primitive values.")] private unsafe void WriteEvent(int eventId, string? arg1, string? arg2, byte[]? arg3) { if (IsEnabled()) diff --git a/src/libraries/Common/tests/System/IO/Compression/ZipTestHelper.cs b/src/libraries/Common/tests/System/IO/Compression/ZipTestHelper.cs index 4e105b0fe6d99..a2ae0de6dbaa9 100644 --- a/src/libraries/Common/tests/System/IO/Compression/ZipTestHelper.cs +++ b/src/libraries/Common/tests/System/IO/Compression/ZipTestHelper.cs @@ -267,16 +267,16 @@ public static void IsZipSameAsDir(Stream archiveFile, string directory, ZipArchi if (entry == null) //entry not found { string entryNameOtherSlash = FlipSlashes(entryName); - bool isEmtpy = !files.Any( + bool isEmpty = !files.Any( f => f.IsFile && (f.FullName.StartsWith(entryName, StringComparison.OrdinalIgnoreCase) || f.FullName.StartsWith(entryNameOtherSlash, StringComparison.OrdinalIgnoreCase))); - if (requireExplicit || isEmtpy) + if (requireExplicit || isEmpty) { Assert.Contains("emptydir", entryName); } - if ((!requireExplicit && !isEmtpy) || entryName.Contains("emptydir")) + if ((!requireExplicit && !isEmpty) || entryName.Contains("emptydir")) count--; //discount this entry } else diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs index 14c99f34edaf2..9a5478868fad8 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs @@ -576,7 +576,7 @@ public async Task PostAsync_Cancel_CancellationTokenPassedToContent(HttpContent { return; } - // Skipping test for a sync scenario becasue DelegateStream drops the original cancellationToken when it calls Read/Write methods. + // Skipping test for a sync scenario because DelegateStream drops the original cancellationToken when it calls Read/Write methods. // As a result, ReadAsyncFunc receives default in cancellationToken, which will never get signaled through the cancellationTokenSource. if (!TestAsync) { diff --git a/src/libraries/Common/tests/System/Net/Http/HttpMessageHandlerLoopbackServer.cs b/src/libraries/Common/tests/System/Net/Http/HttpMessageHandlerLoopbackServer.cs index 5379ad2c3c541..9d9d412511ac6 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpMessageHandlerLoopbackServer.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpMessageHandlerLoopbackServer.cs @@ -16,8 +16,8 @@ public class HttpMessageHandlerLoopbackServer : GenericLoopbackServer HttpRequestMessage _request; public HttpStatusCode ResponseStatusCode; public IList ResponseHeaders; - public string ReponseContentString; - public byte[] ReponseContentBytes; + public string ResponseContentString; + public byte[] ResponseContentBytes; private HttpMessageHandlerLoopbackServer(HttpRequestMessage request) { @@ -33,7 +33,7 @@ public async override Task HandleRequestAsync(HttpStatusCode st { ResponseStatusCode = statusCode; ResponseHeaders = headers; - ReponseContentString = content; + ResponseContentString = content; return await HttpRequestData.FromHttpRequestMessageAsync(_request).ConfigureAwait(false); } @@ -41,7 +41,7 @@ public async Task HandleRequestAsync(HttpStatusCode statusCode, { ResponseStatusCode = statusCode; ResponseHeaders = headers; - ReponseContentBytes = bytes; + ResponseContentBytes = bytes; return await HttpRequestData.FromHttpRequestMessageAsync(_request).ConfigureAwait(false); } @@ -73,13 +73,13 @@ protected override async Task SendAsync(HttpRequestMessage await _serverFunc(server).ConfigureAwait(false); var response = new HttpResponseMessage(server.ResponseStatusCode); - if (server.ReponseContentString != null) + if (server.ResponseContentString != null) { - response.Content = new StringContent(server.ReponseContentString); + response.Content = new StringContent(server.ResponseContentString); } else { - response.Content = new ByteArrayContent(server.ReponseContentBytes); + response.Content = new ByteArrayContent(server.ResponseContentBytes); } foreach (var header in server.ResponseHeaders ?? Array.Empty()) diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props index d29a01ab9fba4..5ae04267a295d 100644 --- a/src/libraries/Directory.Build.props +++ b/src/libraries/Directory.Build.props @@ -53,7 +53,7 @@ true - + diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComRuntimeHelpers.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComRuntimeHelpers.cs index 3eb63bce7ea00..114b869124aff 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComRuntimeHelpers.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComRuntimeHelpers.cs @@ -308,7 +308,7 @@ public static unsafe int IDispatchInvoke( && (flags & ComTypes.INVOKEKIND.INVOKE_FUNC) != 0 && (flags & (ComTypes.INVOKEKIND.INVOKE_PROPERTYPUT | ComTypes.INVOKEKIND.INVOKE_PROPERTYPUTREF)) == 0) { - // Re-invoke with no result argument to accomodate Word + // Re-invoke with no result argument to accommodate Word hresult = pfnIDispatchInvoke(dispatchPointer, memberDispId, &IID_NULL, 0, (ushort)ComTypes.INVOKEKIND.INVOKE_FUNC, pDispParams, null, pExcepInfo, pArgErr); } diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchComObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchComObject.cs index 7776fe92444b8..46095809c7c76 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchComObject.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchComObject.cs @@ -118,9 +118,9 @@ public ComTypeDesc ComTypeDesc private static int GetIDsOfNames(IDispatch dispatch, string name, out int dispId) { int[] dispIds = new int[1]; - Guid emtpyRiid = Guid.Empty; + Guid emptyRiid = Guid.Empty; int hresult = dispatch.TryGetIDsOfNames( - ref emtpyRiid, + ref emptyRiid, new string[] { name }, 1, 0, diff --git a/src/libraries/Microsoft.CSharp/tests/ArrayHandling.cs b/src/libraries/Microsoft.CSharp/tests/ArrayHandling.cs index 7ee63f4d5d2db..380f5ba90d425 100644 --- a/src/libraries/Microsoft.CSharp/tests/ArrayHandling.cs +++ b/src/libraries/Microsoft.CSharp/tests/ArrayHandling.cs @@ -116,7 +116,7 @@ public void MDArrayLength() [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNonZeroLowerBoundArraySupported))] [ActiveIssue("https://github.com/dotnet/runtime/issues/26798", TargetFrameworkMonikers.NetFramework)] - public void NonSZ1RArrayLenght() + public void NonSZ1RArrayLength() { dynamic d = Array.CreateInstance(typeof(int), new[] {23}, new[] {-2}); Assert.Equal(23, d.Length); diff --git a/src/libraries/Microsoft.CSharp/tests/RuntimeBinderTests.cs b/src/libraries/Microsoft.CSharp/tests/RuntimeBinderTests.cs index 28c8cc6f7f46c..45c1e3f477c3e 100644 --- a/src/libraries/Microsoft.CSharp/tests/RuntimeBinderTests.cs +++ b/src/libraries/Microsoft.CSharp/tests/RuntimeBinderTests.cs @@ -93,7 +93,7 @@ public void InternalsVisibleToTest() MySite.mySite.Target(MySite.mySite, typed); - // call should suceed becasue of the IVT to Microsoft.CSharp + // call should suceed because of the IVT to Microsoft.CSharp Assert.Equal("CALLED", Class1.Result); // make a callsite as if it is contained inside "System.Exception" diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCache.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCache.cs index 445a575b371e8..0bb304273877a 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCache.cs +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCache.cs @@ -157,7 +157,7 @@ internal void SetEntry(CacheEntry entry) } else { - // The update will fail if the previous entry was removed after retrival. + // The update will fail if the previous entry was removed after retrieval. // Adding the new entry will succeed only if no entry has been added since. // This guarantees removing an old entry does not prevent adding a new entry. entryAdded = coherentState._entries.TryAdd(entry.Key, entry); diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs index c516bb7520cfa..7eca0e5f41db8 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs @@ -764,7 +764,7 @@ private static List GetAllProperties([DynamicallyAccessedMembers(D foreach (PropertyInfo property in properties) { // if the property is virtual, only add the base-most definition so - // overriden properties aren't duplicated in the list. + // overridden properties aren't duplicated in the list. MethodInfo? setMethod = property.GetSetMethod(true); if (setMethod is null || !setMethod.IsVirtual || setMethod == setMethod.GetBaseDefinition()) diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationBinderTests.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationBinderTests.cs index afe17336d2047..cba588d0eed8f 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationBinderTests.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationBinderTests.cs @@ -162,7 +162,7 @@ public ClassWhereParametersHaveDefaultValue(string? name, string address, int ag Age = age; } } - + public record RecordTypeOptions(string Color, int Length); @@ -206,7 +206,7 @@ public MutableStructWithConstructor(string randomParameter) public string Color { get; set; } public int Length { get; set; } } - + public class ImmutableLengthAndColorClass { public ImmutableLengthAndColorClass(string color, int length) @@ -454,7 +454,7 @@ public void CanBindConfigurationKeyNameAttributes() var config = configurationBuilder.Build(); var options = config.Get(); - + Assert.Equal("Yo", options.NamedProperty); } @@ -1495,7 +1495,7 @@ public void CanBindMutableStruct_UnmatchedConstructorsAreIgnored() var options = config.Get(); Assert.Equal(42, options.Length); Assert.Equal("Green", options.Color); - } + } // If the immutable type has a public parameterized constructor, // then pick it. @@ -1757,10 +1757,10 @@ public void CanBindVirtualProperties() configurationBuilder.AddInMemoryCollection(new Dictionary { { $"{nameof(BaseClassWithVirtualProperty.Test)}:0", "1" }, - { $"{nameof(BaseClassWithVirtualProperty.TestGetSetOverriden)}", "2" }, - { $"{nameof(BaseClassWithVirtualProperty.TestGetOverriden)}", "3" }, - { $"{nameof(BaseClassWithVirtualProperty.TestSetOverriden)}", "4" }, - { $"{nameof(BaseClassWithVirtualProperty.TestNoOverriden)}", "5" }, + { $"{nameof(BaseClassWithVirtualProperty.TestGetSetOverridden)}", "2" }, + { $"{nameof(BaseClassWithVirtualProperty.TestGetOverridden)}", "3" }, + { $"{nameof(BaseClassWithVirtualProperty.TestSetOverridden)}", "4" }, + { $"{nameof(BaseClassWithVirtualProperty.TestNoOverridden)}", "5" }, { $"{nameof(BaseClassWithVirtualProperty.TestVirtualSet)}", "6" } }); IConfiguration config = configurationBuilder.Build(); @@ -1769,10 +1769,10 @@ public void CanBindVirtualProperties() config.Bind(test); Assert.Equal("1", Assert.Single(test.Test)); - Assert.Equal("2", test.TestGetSetOverriden); - Assert.Equal("3", test.TestGetOverriden); - Assert.Equal("4", test.TestSetOverriden); - Assert.Equal("5", test.TestNoOverriden); + Assert.Equal("2", test.TestGetSetOverridden); + Assert.Equal("3", test.TestGetOverridden); + Assert.Equal("4", test.TestSetOverridden); + Assert.Equal("5", test.TestNoOverridden); Assert.Null(test.ExposeTestVirtualSet()); } @@ -1874,9 +1874,9 @@ public class BaseClassWithVirtualProperty public virtual string[] Test { get; set; } = System.Array.Empty(); - public virtual string? TestGetSetOverriden { get; set; } - public virtual string? TestGetOverriden { get; set; } - public virtual string? TestSetOverriden { get; set; } + public virtual string? TestGetSetOverridden { get; set; } + public virtual string? TestGetOverridden { get; set; } + public virtual string? TestSetOverridden { get; set; } private string? _testVirtualSet; public virtual string? TestVirtualSet @@ -1884,7 +1884,7 @@ public virtual string? TestVirtualSet set => _testVirtualSet = value; } - public virtual string? TestNoOverriden { get; set; } + public virtual string? TestNoOverridden { get; set; } public string? ExposePrivatePropertyValue() => PrivateProperty; } @@ -1893,11 +1893,11 @@ public class ClassOverridingVirtualProperty : BaseClassWithVirtualProperty { public override string[] Test { get => base.Test; set => base.Test = value; } - public override string? TestGetSetOverriden { get; set; } - public override string? TestGetOverriden => base.TestGetOverriden; - public override string? TestSetOverriden + public override string? TestGetSetOverridden { get; set; } + public override string? TestGetOverridden => base.TestGetOverridden; + public override string? TestSetOverridden { - set => base.TestSetOverriden = value; + set => base.TestSetOverridden = value; } private string? _testVirtualSet; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationCollectionBindingTests.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationCollectionBindingTests.cs index 7fdbcb50569db..8e4b9bea54a82 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationCollectionBindingTests.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/ConfigurationCollectionBindingTests.cs @@ -492,7 +492,7 @@ public void ShouldPreserveExistingKeysInDictionary() var origin = new Dictionary { ["a"] = 97 }; config.Bind("ascii", origin); - + Assert.Equal(2, origin.Count); Assert.Equal(97, origin["a"]); Assert.Equal(98, origin["b"]); @@ -965,7 +965,7 @@ public void CanBindUninitializedIEnumerable() configurationBuilder.AddInMemoryCollection(input); var config = configurationBuilder.Build(); - var options = new UnintializedCollectionsOptions(); + var options = new UninitializedCollectionsOptions(); config.Bind(options); var array = options.IEnumerable.ToArray(); @@ -1088,7 +1088,7 @@ public void CanBindUninitializedICollection() configurationBuilder.AddInMemoryCollection(input); var config = configurationBuilder.Build(); - var options = new UnintializedCollectionsOptions(); + var options = new UninitializedCollectionsOptions(); config.Bind(options); var array = options.ICollection.ToArray(); @@ -1116,7 +1116,7 @@ public void CanBindUninitializedIReadOnlyCollection() configurationBuilder.AddInMemoryCollection(input); var config = configurationBuilder.Build(); - var options = new UnintializedCollectionsOptions(); + var options = new UninitializedCollectionsOptions(); config.Bind(options); var array = options.IReadOnlyCollection.ToArray(); @@ -1144,7 +1144,7 @@ public void CanBindUninitializedIReadOnlyList() configurationBuilder.AddInMemoryCollection(input); var config = configurationBuilder.Build(); - var options = new UnintializedCollectionsOptions(); + var options = new UninitializedCollectionsOptions(); config.Bind(options); var array = options.IReadOnlyList.ToArray(); @@ -1171,7 +1171,7 @@ public void CanBindUninitializedIDictionary() configurationBuilder.AddInMemoryCollection(input); var config = configurationBuilder.Build(); - var options = new UnintializedCollectionsOptions(); + var options = new UninitializedCollectionsOptions(); config.Bind(options); Assert.Equal(3, options.IDictionary.Count); @@ -1195,7 +1195,7 @@ public void CanBindUninitializedIReadOnlyDictionary() configurationBuilder.AddInMemoryCollection(input); var config = configurationBuilder.Build(); - var options = new UnintializedCollectionsOptions(); + var options = new UninitializedCollectionsOptions(); config.Bind(options); Assert.Equal(3, options.IReadOnlyDictionary.Count); @@ -1250,7 +1250,7 @@ public void TestCanBindListPropertyWithoutSetter() Assert.Equal(new[] { "a", "b" }, options.ListPropertyWithoutSetter); } - private class UnintializedCollectionsOptions + private class UninitializedCollectionsOptions { public IEnumerable IEnumerable { get; set; } public IDictionary IDictionary { get; set; } diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostBuilderTests.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostBuilderTests.cs index c66e3ca37e630..2f7aaca8cbaec 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostBuilderTests.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostBuilderTests.cs @@ -235,7 +235,7 @@ public void ConfigBasedSettingsConfigBasedOverride() } [Fact] - public void UseEnvironmentIsNotOverriden() + public void UseEnvironmentIsNotOverridden() { var vals = new Dictionary { diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ConversionResolution.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ConversionResolution.vb index 2d56517405448..2e4eeb9c38723 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ConversionResolution.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ConversionResolution.vb @@ -1122,7 +1122,7 @@ Namespace Microsoft.VisualBasic.CompilerServices End Class - Friend NotInheritable Class FixedExistanceList + Friend NotInheritable Class FixedExistenceList Private Structure Entry Friend Type As Type @@ -1211,7 +1211,7 @@ Namespace Microsoft.VisualBasic.CompilerServices End Class Friend Shared ReadOnly ConversionCache As FixedList = New FixedList - Friend Shared ReadOnly UnconvertibleTypeCache As FixedExistanceList = New FixedExistanceList + Friend Shared ReadOnly UnconvertibleTypeCache As FixedExistenceList = New FixedExistenceList End Class End Class diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6File.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6File.vb index 1a6793bd16005..20aec08c48452 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6File.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6File.vb @@ -98,7 +98,7 @@ Namespace Microsoft.VisualBasic.CompilerServices Implements IRecordEnum Public m_oFile As VB6File - + Sub New(ByVal oFile As VB6File) MyBase.New() m_oFile = oFile @@ -220,7 +220,7 @@ Namespace Microsoft.VisualBasic.CompilerServices Implements IRecordEnum Dim m_oFile As VB6File - + Sub New(ByVal oFile As VB6File) MyBase.New() m_oFile = oFile @@ -579,7 +579,7 @@ Namespace Microsoft.VisualBasic.CompilerServices 'Function Seek ' 'RANDOM MODE - Returns number of next record - 'other modes - Returns the byte position at which the next operation + 'other modes - Returns the byte position at which the next operation ' will take place Friend Overridable Overloads Function Seek() As Long 'm_position is the last read byte as a zero based offset @@ -1773,7 +1773,7 @@ NewLine: If iElementY > ArrUBoundY OrElse iElementX > ArrUBoundX Then obj = Nothing Else - 'These are supposed to be ordered Y, X + 'These are supposed to be ordered Y, X ' because of the order VB6 writes out obj = arr.GetValue(iElementY, iElementX) End If @@ -1868,7 +1868,7 @@ NewLine: ByteLength = FixedStringLength Else 'String contains multi-byte characters. Truncate to 'FixedStringLength' - ' bytes (if cuts off half of a DBCS character, that character + ' bytes (if cuts off half of a DBCS character, that character ' is replaced with a single Chr(0)) Dim Bytes() As Byte = m_Encoding.GetBytes(sTemp) sTemp = m_Encoding.GetString(Bytes, 0, FixedStringLength) diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb index 6c27dff49b3f4..9983ad0022d83 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb @@ -338,7 +338,7 @@ RangeCheck: If (LongValue > 0) Then Return Hex(LongValue) Else - 'For VB6 compatability, format as Int32 value + 'For VB6 compatibility, format as Int32 value ' unless it overflows into an Int64 If (LongValue >= System.Int32.MinValue) Then Return Hex(CInt(LongValue)) @@ -449,7 +449,7 @@ RangeCheck: If (LongValue > 0) Then Return Oct(LongValue) Else - 'For VB6 compatability, format as Int32 value + 'For VB6 compatibility, format as Int32 value ' unless it overflows into an Int64 If (LongValue >= System.Int32.MinValue) Then Return Oct(CInt(LongValue)) @@ -991,7 +991,7 @@ NextOctCharacter: vtSuffix = VariantType.Integer cDecMax = 0 Case "@"c - 'Convert currency to Decimal + 'Convert currency to Decimal 'vtSuffix = VariantType.Currency vtSuffix = VariantType.Decimal cDecMax = 4 @@ -1059,7 +1059,7 @@ NextOctCharacter: Private Function ShiftVTBits(ByVal vt As Integer) As Integer Select Case vt - 'Case VariantType.Empty + 'Case VariantType.Empty 'Case VariantType.Null Case VariantType.Short Return VTBIT_I2 diff --git a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CSharpCodeGenerationTests.cs b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CSharpCodeGenerationTests.cs index fd84431efc0ed..f37bc8b2834f6 100644 --- a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CSharpCodeGenerationTests.cs +++ b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CSharpCodeGenerationTests.cs @@ -1378,7 +1378,7 @@ public void ValueTypes() structA.Members.Add(innerStruct); class1.Members.Add(structA); - // create second struct to test tructs of non-primative types + // create second struct to test tructs of non-primitive types CodeTypeDeclaration structC = new CodeTypeDeclaration("structC"); structC.IsStruct = true; @@ -1409,14 +1409,14 @@ public void ValueTypes() nestedStructMethod.Statements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeFieldReferenceExpression(new CodeVariableReferenceExpression("varStructA"), "innerStruct"), "int1"))); class1.Members.Add(nestedStructMethod); - // create method to test nested non primative struct member - CodeMemberMethod nonPrimativeStructMethod = new CodeMemberMethod(); - nonPrimativeStructMethod.Name = "NonPrimativeStructMethod"; - nonPrimativeStructMethod.ReturnType = new CodeTypeReference(typeof(DateTime)); - nonPrimativeStructMethod.Attributes = MemberAttributes.Public | MemberAttributes.Static; + // create method to test nested non primitive struct member + CodeMemberMethod nonPrimitiveStructMethod = new CodeMemberMethod(); + nonPrimitiveStructMethod.Name = "NonPrimitiveStructMethod"; + nonPrimitiveStructMethod.ReturnType = new CodeTypeReference(typeof(DateTime)); + nonPrimitiveStructMethod.Attributes = MemberAttributes.Public | MemberAttributes.Static; CodeVariableDeclarationStatement varStructC = new CodeVariableDeclarationStatement("structC", "varStructC"); - nonPrimativeStructMethod.Statements.Add(varStructC); - nonPrimativeStructMethod.Statements.Add + nonPrimitiveStructMethod.Statements.Add(varStructC); + nonPrimitiveStructMethod.Statements.Add ( new CodeAssignStatement ( @@ -1426,8 +1426,8 @@ public void ValueTypes() /* Expression2 */ new CodeObjectCreateExpression("DateTime", new CodeExpression[] { new CodePrimitiveExpression(1), new CodePrimitiveExpression(-1) }) ) ); - nonPrimativeStructMethod.Statements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeVariableReferenceExpression("varStructC"), "pt1"))); - class1.Members.Add(nonPrimativeStructMethod); + nonPrimitiveStructMethod.Statements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeVariableReferenceExpression("varStructC"), "pt1"))); + class1.Members.Add(nonPrimitiveStructMethod); AssertEqual(ns, @"namespace NS { @@ -1440,7 +1440,7 @@ public static int NestedStructMethod() { return varStructA.innerStruct.int1; } - public static System.DateTime NonPrimativeStructMethod() { + public static System.DateTime NonPrimitiveStructMethod() { structC varStructC; varStructC.pt1 = new DateTime(1, -1); return varStructC.pt1; diff --git a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CodeDomProviderTests.cs b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CodeDomProviderTests.cs index 10df5b5df10bd..564073f10987c 100644 --- a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CodeDomProviderTests.cs +++ b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CodeDomProviderTests.cs @@ -36,7 +36,7 @@ public void LanguageOptions_ReturnsNone() } [Fact] - public void CreateGenerator_ReturnsOverridenGenerator() + public void CreateGenerator_ReturnsOverriddenGenerator() { #pragma warning disable 0618 CustomProvider provider = new CustomProvider(); diff --git a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/VBCodeGenerationTests.cs b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/VBCodeGenerationTests.cs index 89c4b4055f64b..a81bab80f0528 100644 --- a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/VBCodeGenerationTests.cs +++ b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/VBCodeGenerationTests.cs @@ -1318,7 +1318,7 @@ public void ValueTypes() structA.Members.Add(innerStruct); class1.Members.Add(structA); - // create second struct to test tructs of non-primative types + // create second struct to test tructs of non-primitive types CodeTypeDeclaration structC = new CodeTypeDeclaration("structC"); structC.IsStruct = true; @@ -1349,14 +1349,14 @@ public void ValueTypes() nestedStructMethod.Statements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeFieldReferenceExpression(new CodeVariableReferenceExpression("varStructA"), "innerStruct"), "int1"))); class1.Members.Add(nestedStructMethod); - // create method to test nested non primative struct member - CodeMemberMethod nonPrimativeStructMethod = new CodeMemberMethod(); - nonPrimativeStructMethod.Name = "NonPrimativeStructMethod"; - nonPrimativeStructMethod.ReturnType = new CodeTypeReference(typeof(DateTime)); - nonPrimativeStructMethod.Attributes = MemberAttributes.Public | MemberAttributes.Static; + // create method to test nested non primitive struct member + CodeMemberMethod nonPrimitiveStructMethod = new CodeMemberMethod(); + nonPrimitiveStructMethod.Name = "NonPrimitiveStructMethod"; + nonPrimitiveStructMethod.ReturnType = new CodeTypeReference(typeof(DateTime)); + nonPrimitiveStructMethod.Attributes = MemberAttributes.Public | MemberAttributes.Static; CodeVariableDeclarationStatement varStructC = new CodeVariableDeclarationStatement("structC", "varStructC"); - nonPrimativeStructMethod.Statements.Add(varStructC); - nonPrimativeStructMethod.Statements.Add + nonPrimitiveStructMethod.Statements.Add(varStructC); + nonPrimitiveStructMethod.Statements.Add ( new CodeAssignStatement ( @@ -1366,8 +1366,8 @@ public void ValueTypes() /* Expression2 */ new CodeObjectCreateExpression("DateTime", new CodeExpression[] { new CodePrimitiveExpression(1), new CodePrimitiveExpression(-1) }) ) ); - nonPrimativeStructMethod.Statements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeVariableReferenceExpression("varStructC"), "pt1"))); - class1.Members.Add(nonPrimativeStructMethod); + nonPrimitiveStructMethod.Statements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeVariableReferenceExpression("varStructC"), "pt1"))); + class1.Members.Add(nonPrimitiveStructMethod); AssertEqual(ns, @"Imports System @@ -1378,7 +1378,7 @@ Dim varStructA As structA varStructA.innerStruct.int1 = 3 Return varStructA.innerStruct.int1 End Function - Public Shared Function NonPrimativeStructMethod() As Date + Public Shared Function NonPrimitiveStructMethod() As Date Dim varStructC As structC varStructC.pt1 = New DateTime(1, -1) Return varStructC.pt1 diff --git a/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/PartitionerStatic.cs b/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/PartitionerStatic.cs index ac906d628fa05..5587558704955 100644 --- a/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/PartitionerStatic.cs +++ b/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/PartitionerStatic.cs @@ -178,7 +178,7 @@ public static OrderablePartitioner Create(IEnumerable /// A partitioner. /// The argument is /// less than or equal to the argument. - /// if ProccessorCount == 1, for correct rangeSize calculation the const CoreOversubscriptionRate must be > 1 (avoid division by 1) + /// if ProcessorCount == 1, for correct rangeSize calculation the const CoreOversubscriptionRate must be > 1 (avoid division by 1) public static OrderablePartitioner> Create(long fromInclusive, long toExclusive) { if (toExclusive <= fromInclusive) throw new ArgumentOutOfRangeException(nameof(toExclusive)); @@ -231,7 +231,7 @@ private static IEnumerable> CreateRanges(long fromInclusive, l /// A partitioner. /// The argument is /// less than or equal to the argument. - /// if ProccessorCount == 1, for correct rangeSize calculation the const CoreOversubscriptionRate must be > 1 (avoid division by 1), + /// if ProcessorCount == 1, for correct rangeSize calculation the const CoreOversubscriptionRate must be > 1 (avoid division by 1), /// and the same issue could occur with rangeSize == -1 when fromInclusive = int.MinValue and toExclusive = int.MaxValue. public static OrderablePartitioner> Create(int fromInclusive, int toExclusive) { diff --git a/src/libraries/System.Collections.Immutable/tests/ImmutableArrayTest.cs b/src/libraries/System.Collections.Immutable/tests/ImmutableArrayTest.cs index 6a170d1f2f7bb..f2c379a5e75bb 100644 --- a/src/libraries/System.Collections.Immutable/tests/ImmutableArrayTest.cs +++ b/src/libraries/System.Collections.Immutable/tests/ImmutableArrayTest.cs @@ -80,7 +80,7 @@ public void AsSpanRoundTripTests(IEnumerable source) public void AsSpanRoundTripEmptyArrayTests() { ImmutableArray immutableArray = ImmutableArray.Create(Array.Empty()); - + ReadOnlySpan span = immutableArray.AsSpan(); Assert.Equal(immutableArray, span.ToArray()); Assert.Equal(immutableArray.Length, span.Length); @@ -95,7 +95,7 @@ public void AsSpanRoundTripDefaultArrayTests() { ImmutableArray immutableArray = new ImmutableArray(); Assert.True(immutableArray.IsDefault); - + ReadOnlySpan span = immutableArray.AsSpan(); Assert.Equal(0, span.Length); Assert.True(span.IsEmpty); @@ -120,7 +120,7 @@ public void AsSpanRoundTripDefaultArrayStringTests() { ImmutableArray immutableArray = new ImmutableArray(); Assert.True(immutableArray.IsDefault); - + ReadOnlySpan span = immutableArray.AsSpan(); Assert.Equal(0, span.Length); Assert.True(span.IsEmpty); @@ -1187,7 +1187,7 @@ public void AddRangeDerivedArray(IEnumerable source, IEnumerable it public void AddRangeEmptyOptimization(IEnumerable source) { ImmutableArray array = source.ToImmutableArray(); - + // Verify that underlying array is reference-equal as original array Assert.True(array.AddRange(Array.Empty()) == array); Assert.True(array.AddRange(ReadOnlySpan.Empty) == array); @@ -1222,7 +1222,7 @@ public void AddRangeInvalid(IEnumerable source) int[] sourceArray = source.ToArray(); TestExtensionsMethods.ValidateDefaultThisBehavior(() => s_emptyDefault.AddRange(sourceArray)); // Array overload TestExtensionsMethods.ValidateDefaultThisBehavior(() => s_emptyDefault.AddRange(new ReadOnlySpan(sourceArray))); // ReadOnlySpan overload - + Assert.Throws(() => source.ToImmutableArray().AddRange((IEnumerable)s_emptyDefault)); // Enumerable overload TestExtensionsMethods.ValidateDefaultThisBehavior(() => s_emptyDefault.AddRange(s_emptyDefault)); @@ -1307,7 +1307,7 @@ public void InsertRangeInvalid(IEnumerable source) int[] array = s_oneElement.ToArray(); AssertExtensions.Throws("index", () => immutableArray.InsertRange(immutableArray.Length + 1, array)); AssertExtensions.Throws("index", () => immutableArray.InsertRange(-1, array)); - + var span = new ReadOnlySpan(array); AssertExtensions.Throws("index", span, s => immutableArray.InsertRange(immutableArray.Length + 1, s)); AssertExtensions.Throws("index", span, s => immutableArray.InsertRange(-1, s)); @@ -1373,7 +1373,7 @@ public void InsertRange(IEnumerable source, int index, IEnumerable ite { array = it.ToArray(); } - + Assert.Equal(expected, immutableArray.InsertRange(index, array)); // Array overload Assert.Equal(expected, immutableArray.InsertRange(index, new ReadOnlySpan(array))); // Span overload @@ -1381,7 +1381,7 @@ public void InsertRange(IEnumerable source, int index, IEnumerable ite { // Insertion at the end is equivalent to adding. expected = source.Concat(items); - + Assert.Equal(expected, immutableArray.InsertRange(index, it)); // Enumerable overload Assert.Equal(expected, immutableArray.InsertRange(index, it.ToImmutableArray())); // ImmutableArray overload Assert.Equal(expected, immutableArray.InsertRange(index, array)); // Array overload @@ -2239,7 +2239,7 @@ public static IEnumerable IStructuralEquatableEqualsNullComparerData() [Fact] public void IStructuralEquatableEqualsNullComparerInvalid() { - // This was not fixed for compatability reasons. See https://github.com/dotnet/runtime/issues/19265 + // This was not fixed for compatibility reasons. See https://github.com/dotnet/runtime/issues/19265 Assert.Throws(() => ((IStructuralEquatable)ImmutableArray.Create(1, 2, 3)).Equals(ImmutableArray.Create(1, 2, 3), comparer: null)); Assert.Throws(() => ((IStructuralEquatable)s_emptyDefault).Equals(other: null, comparer: null)); } @@ -2366,7 +2366,7 @@ public void IStructuralComparableCompareToNullComparerNullReferenceInvalid(IEnum public static IEnumerable IStructuralComparableCompareToNullComparerNullReferenceInvalidData() { - // This was not fixed for compatability reasons. See https://github.com/dotnet/runtime/issues/19265 + // This was not fixed for compatibility reasons. See https://github.com/dotnet/runtime/issues/19265 yield return new object[] { new[] { 1, 2, 3 }, new[] { 1, 2, 3 } }; yield return new object[] { new[] { 1, 2, 3 }, ImmutableArray.Create(1, 2, 3) }; // Cache this into a local so the comparands are reference-equal. diff --git a/src/libraries/System.Collections.NonGeneric/tests/HashtableTests.cs b/src/libraries/System.Collections.NonGeneric/tests/HashtableTests.cs index e50fd1a3c3858..f4421369ad3f5 100644 --- a/src/libraries/System.Collections.NonGeneric/tests/HashtableTests.cs +++ b/src/libraries/System.Collections.NonGeneric/tests/HashtableTests.cs @@ -869,7 +869,7 @@ private static void VerifyHashtable(ComparableHashtable hash1, Hashtable hash2, } else { - // Make sure that construtor imports all keys and values + // Make sure that constructor imports all keys and values Assert.Equal(hash2.Count, hash1.Count); for (int i = 0; i < 100; i++) { diff --git a/src/libraries/System.Collections/tests/Generic/SortedList/SortedList.Generic.Tests.cs b/src/libraries/System.Collections/tests/Generic/SortedList/SortedList.Generic.Tests.cs index 8e4790f6d9930..7fc503b3b96c9 100644 --- a/src/libraries/System.Collections/tests/Generic/SortedList/SortedList.Generic.Tests.cs +++ b/src/libraries/System.Collections/tests/Generic/SortedList/SortedList.Generic.Tests.cs @@ -274,7 +274,7 @@ public void SortedList_Generic_GetKeyAtIndex_EveryIndex(int count) [Theory] [MemberData(nameof(ValidCollectionSizes))] - public void SortedList_Generic_GetKeyAtIndex_OutOfRangeIndicies(int count) + public void SortedList_Generic_GetKeyAtIndex_OutOfRangeIndices(int count) { SortedList dictionary = (SortedList)GenericIDictionaryFactory(count); Assert.Throws(() => dictionary.GetKeyAtIndex(-1)); @@ -301,7 +301,7 @@ public void SortedList_Generic_GetValueAtIndex_EveryIndex(int count) [Theory] [MemberData(nameof(ValidCollectionSizes))] - public void SortedList_Generic_GetValueAtIndex_OutOfRangeIndicies(int count) + public void SortedList_Generic_GetValueAtIndex_OutOfRangeIndices(int count) { SortedList dictionary = (SortedList)GenericIDictionaryFactory(count); Assert.Throws(() => dictionary.GetValueAtIndex(-1)); @@ -483,7 +483,7 @@ public void SortedList_Generic_SetValueAtIndex_EveryIndex(int count) [Theory] [MemberData(nameof(ValidCollectionSizes))] - public void SortedList_Generic_SetValueAtIndex_OutOfRangeIndicies(int count) + public void SortedList_Generic_SetValueAtIndex_OutOfRangeIndices(int count) { if (!IsReadOnly) { diff --git a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationAttribute.cs b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationAttribute.cs index 4760db92e3d0f..ae9d1c87be91d 100644 --- a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationAttribute.cs +++ b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/ValidationAttribute.cs @@ -284,7 +284,7 @@ private void SetResourceAccessorByPropertyLookup() /// /// /// The error message will be re-evaluated every time this function is called. - /// It applies the (for example, the name of a field) to the formated error message, resulting + /// It applies the (for example, the name of a field) to the formatted error message, resulting /// in something like "The field 'name' has an incorrect value". /// /// Derived classes can override this method to customize how errors are generated. diff --git a/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/ValidationAttributeTestBase.cs b/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/ValidationAttributeTestBase.cs index 2c4b6be9084b2..4f3815bacd405 100644 --- a/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/ValidationAttributeTestBase.cs +++ b/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/ValidationAttributeTestBase.cs @@ -84,7 +84,7 @@ public void ErrorMessage_Valid() { return; } - ErrorMessageSet_ReturnsOverridenValue(InvalidValues().First()); + ErrorMessageSet_ReturnsOverriddenValue(InvalidValues().First()); ErrorMessageNotSet_ReturnsDefaultValue(InvalidValues().First()); ErrorMessageSetFromResource_ReturnsExpectedValue(InvalidValues().First()); } @@ -144,7 +144,7 @@ private void ErrorMessageResourceNameSet_ErrorMessageResourceTypeSet_NonStringPr Assert.Throws(InvalidErrorMessage_Type, () => test.Attribute.Validate(test.Value, test.ValidationContext)); } - private void ErrorMessageSet_ReturnsOverridenValue(TestCase test) + private void ErrorMessageSet_ReturnsOverriddenValue(TestCase test) { test.Attribute.ErrorMessage = "SomeErrorMessage"; diff --git a/src/libraries/System.ComponentModel.Composition.Registration/src/System/ComponentModel/Composition/Registration/PartBuilder.cs b/src/libraries/System.ComponentModel.Composition.Registration/src/System/ComponentModel/Composition/Registration/PartBuilder.cs index 5a07d74f42e2c..b9943aebf4c0e 100644 --- a/src/libraries/System.ComponentModel.Composition.Registration/src/System/ComponentModel/Composition/Registration/PartBuilder.cs +++ b/src/libraries/System.ComponentModel.Composition.Registration/src/System/ComponentModel/Composition/Registration/PartBuilder.cs @@ -22,7 +22,7 @@ public class PartBuilder // Constructor selector / configuration private Func _constructorFilter; - private Action _configureConstuctorImports; + private Action _configureConstructorImports; //Property Import/Export selection and configuration private readonly List, Action, Type>> _propertyExports; @@ -80,7 +80,7 @@ public PartBuilder SelectConstructor(Func co Action importConfiguration) { _constructorFilter = constructorFilter; - _configureConstuctorImports = importConfiguration; + _configureConstructorImports = importConfiguration; return this; } @@ -380,17 +380,17 @@ internal bool BuildConstructorAttributes(Type type, ref List>> configuredMembers, Action configureConstuctorImports) + private static void ConfigureConstructorAttributes(ConstructorInfo constructorInfo, ref List>> configuredMembers, Action configureConstructorImports) { configuredMembers ??= new List>>(); @@ -431,7 +431,7 @@ private static void ConfigureConstructorAttributes(ConstructorInfo constructorIn var importBuilder = new ImportBuilder(); // Let the developer alter them if they specified to do so - configureConstuctorImports?.Invoke(pi, importBuilder); + configureConstructorImports?.Invoke(pi, importBuilder); // Generate the attributes List attributes = null; diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AtomicComposition.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AtomicComposition.cs index 2884ae6c92c69..7554d9eebec8f 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AtomicComposition.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AtomicComposition.cs @@ -25,7 +25,7 @@ namespace System.ComponentModel.Composition.Hosting /// /// Secondly, state is added in the form of queries associated with an object key. The /// key represents a unique object the state is being held on behalf of. The quieries are - /// accessed throught the Query methods which provide automatic chaining to execute queries + /// accessed through the Query methods which provide automatic chaining to execute queries /// across the target atomicComposition and its inner atomicComposition as appropriate. /// /// Lastly, when a nested atomicComposition is created for a given outer the outer atomicComposition is locked. diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartCatalog.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartCatalog.cs index aa330f186a5ce..868475475e463 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartCatalog.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartCatalog.cs @@ -146,9 +146,9 @@ private void ThrowIfDisposed() } // - // If neither Parts nor GetEnumerator() is overriden then return an empty list + // If neither Parts nor GetEnumerator() is overridden then return an empty list // If GetEnumerator is overridden this code should not be invoked: ReferenceAssemblies mark it as Abstract or Not present - // We verify whether Parts is overriden by seeing if the object returns matched the one cached for this instance + // We verify whether Parts is overridden by seeing if the object returns matched the one cached for this instance // Note: a query object is only cached if Parts is invoked on a catalog which did not implement it // Because reference assemblies do not expose Parts and we no longer use it, it should not get invoked by 3rd parties // Because the reference assemblies mark GetEnumerator as Abstract 3rd party code should not lack an implementation diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/GenericSpecializationPartCreationInfo.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/GenericSpecializationPartCreationInfo.cs index c52e709cb2caf..5bc4725544463 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/GenericSpecializationPartCreationInfo.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/GenericSpecializationPartCreationInfo.cs @@ -71,13 +71,13 @@ public Lazy GetLazyPartType() { if (_constructor == null) { - ConstructorInfo? genericConstuctor = _originalPartCreationInfo.GetConstructor(); + ConstructorInfo? genericConstructor = _originalPartCreationInfo.GetConstructor(); ConstructorInfo? result = null; - if (genericConstuctor != null) + if (genericConstructor != null) { foreach (ConstructorInfo constructor in GetPartType().GetConstructors(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) { - if (constructor.MetadataToken == genericConstuctor.MetadataToken) + if (constructor.MetadataToken == genericConstructor.MetadataToken) { result = constructor; break; diff --git a/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/AttributedModel/AttributedModelDiscoveryTests.cs b/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/AttributedModel/AttributedModelDiscoveryTests.cs index 8361b19fcf923..68c1fe96a1048 100644 --- a/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/AttributedModel/AttributedModelDiscoveryTests.cs +++ b/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/AttributedModel/AttributedModelDiscoveryTests.cs @@ -116,14 +116,14 @@ public void CreatePartDefinition_SharedTypeMarkedWithNonSharedMetadata_ShouldHav [PartMetadata("BaseOnlyName", 1)] [PartMetadata("OverrideName", 2)] - public class BasePartWithMetdata + public class BasePartWithMetadata { } [PartMetadata("DerivedOnlyName", 3)] [PartMetadata("OverrideName", 4)] - public class DerivedPartWithMetadata : BasePartWithMetdata + public class DerivedPartWithMetadata : BasePartWithMetadata { } diff --git a/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Hosting/DirectoryCatalogDebuggerProxyTests.cs b/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Hosting/DirectoryCatalogDebuggerProxyTests.cs index c24674d7212a5..b91366935d5c4 100644 --- a/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Hosting/DirectoryCatalogDebuggerProxyTests.cs +++ b/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Hosting/DirectoryCatalogDebuggerProxyTests.cs @@ -56,7 +56,7 @@ public void Constructor_ValueAsCatalogArgument_ShouldSetAssemblyProperty() } [Fact] - public void Constuctor_ValueAsCatalogArgument_ShouldSetPathProperty() + public void Constructor_ValueAsCatalogArgument_ShouldSetPathProperty() { string path = GetTemporaryDirectory(); @@ -68,7 +68,7 @@ public void Constuctor_ValueAsCatalogArgument_ShouldSetPathProperty() [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/24240", TestPlatforms.AnyUnix)] // System.Reflection.ReflectionTypeLoadException : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. - public void Constuctor_ValueAsCatalogArgument_ShouldSetSearchPatternProperty() + public void Constructor_ValueAsCatalogArgument_ShouldSetSearchPatternProperty() { string directoryPath = GetTemporaryDirectory(); var expectations = new ExpectationCollection(); diff --git a/src/libraries/System.ComponentModel.Composition/tests/System/Integration/DiscoveryTests.cs b/src/libraries/System.ComponentModel.Composition/tests/System/Integration/DiscoveryTests.cs index df88318817f6e..2b708e3b49da1 100644 --- a/src/libraries/System.ComponentModel.Composition/tests/System/Integration/DiscoveryTests.cs +++ b/src/libraries/System.ComponentModel.Composition/tests/System/Integration/DiscoveryTests.cs @@ -481,7 +481,7 @@ public virtual int VirtualImport } } - public class ImportOnOverridenPropertyWithSameContract : ImportOnVirtualProperty + public class ImportOnOverriddenPropertyWithSameContract : ImportOnVirtualProperty { [Import("VirtualImport")] public override int VirtualImport @@ -503,7 +503,7 @@ public void Import_VirtualPropertyOverrideWithSameContract_ShouldSucceed() var container = ContainerFactory.Create(); container.AddAndComposeExportedValue("VirtualImport", 21); - var import = new ImportOnOverridenPropertyWithSameContract(); + var import = new ImportOnOverriddenPropertyWithSameContract(); container.SatisfyImportsOnce(import); @@ -516,7 +516,7 @@ public void Import_VirtualPropertyOverrideWithSameContract_ShouldSucceed() Assert.Equal(21, import.VirtualImport); } - public class ImportOnOverridenPropertyWithDifferentContract : ImportOnVirtualProperty + public class ImportOnOverriddenPropertyWithDifferentContract : ImportOnVirtualProperty { [Import("OverriddenImport")] public override int VirtualImport @@ -535,7 +535,7 @@ public void Import_VirtualPropertyOverrideWithDifferentContract_ShouldSucceed() container.AddAndComposeExportedValue("VirtualImport", 21); container.AddAndComposeExportedValue("OverriddenImport", 42); - var import = new ImportOnOverridenPropertyWithSameContract(); + var import = new ImportOnOverriddenPropertyWithSameContract(); container.SatisfyImportsOnce(import); diff --git a/src/libraries/System.ComponentModel.EventBasedAsync/tests/AsyncOperationTests.cs b/src/libraries/System.ComponentModel.EventBasedAsync/tests/AsyncOperationTests.cs index 709ba7ff0e4a4..f3a66a7977f82 100644 --- a/src/libraries/System.ComponentModel.EventBasedAsync/tests/AsyncOperationTests.cs +++ b/src/libraries/System.ComponentModel.EventBasedAsync/tests/AsyncOperationTests.cs @@ -95,7 +95,7 @@ public static void Throw() [Fact] public static void PostNullDelegate() { - // the xUnit SynchronizationContext - AysncTestSyncContext interferes with the current SynchronizationContext + // the xUnit SynchronizationContext - AsyncTestSyncContext interferes with the current SynchronizationContext // used by AsyncOperation when there is exception thrown -> the SC.OperationCompleted() is not called. // use new SC here to avoid this issue var orignal = SynchronizationContext.Current; diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/BindingList.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/BindingList.cs index e9bd9adb78516..f7d36e4dd2666 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/BindingList.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/BindingList.cs @@ -283,7 +283,7 @@ public virtual void EndNew(int itemIndex) /// /// Add operations are cancellable via the interface. The position of the /// new item is tracked until the add operation is either cancelled by a call to , - /// explicitly commited by a call to , or implicitly commmited some other operation + /// explicitly committed by a call to , or implicitly commmited some other operation /// changes the contents of the list (such as an Insert or Remove). When an add operation is /// cancelled, the new item is removed from the list. /// diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseManager.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseManager.cs index 45b85f0dd1efb..b672334a38375 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseManager.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseManager.cs @@ -307,7 +307,7 @@ private static bool ValidateInternalRecursive(LicenseContext context, Type type, } } - // When looking only at a type, we need to recurse up the inheritence + // When looking only at a type, we need to recurse up the inheritance // chain, however, we can't give out the license, since this may be // from more than one provider. if (isValid && instance == null) diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MaskedTextProvider.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MaskedTextProvider.cs index f82e2f24ba76f..3aaaffdcf03c4 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MaskedTextProvider.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MaskedTextProvider.cs @@ -361,7 +361,7 @@ private void Initialize() caseConversion = CaseConversion.ToUpper; continue; - case '|': // no convertion performed on the chars that follow. + case '|': // no conversion performed on the chars that follow. caseConversion = CaseConversion.None; continue; @@ -1852,7 +1852,7 @@ public bool Replace(string input, int startPosition, int endPosition, out int te return RemoveAt(startPosition, endPosition, out testPosition, out resultHint); } - // If replacing the entire text with a same-lenght text, we are just setting (not replacing) the test string to the new value; + // If replacing the entire text with a same-length text, we are just setting (not replacing) the test string to the new value; // in this case we just call SetString. // If the text length is different than the specified range we would need to remove or insert characters; there are three possible // cases as follows: diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/BindingListTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/BindingListTests.cs index 6c3d0885b815b..4d56a15105942 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/BindingListTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/BindingListTests.cs @@ -974,21 +974,21 @@ public void Insert_Null_Success() } [Fact] - public void ApplySort_ApplySortCoreOverriden_DoesNotThrow() + public void ApplySort_ApplySortCoreOverridden_DoesNotThrow() { IBindingList bindingList = new SubBindingList(); bindingList.ApplySort(null, ListSortDirection.Descending); } [Fact] - public void RemoveSort_RemoveSortCoreOverriden_DoesNotThrow() + public void RemoveSort_RemoveSortCoreOverridden_DoesNotThrow() { IBindingList bindingList = new SubBindingList(); bindingList.RemoveSort(); } [Fact] - public void Find_FindCoreOverriden_DoesNotThrow() + public void Find_FindCoreOverridden_DoesNotThrow() { IBindingList bindingList = new SubBindingList(); Assert.Equal(200, bindingList.Find(null, null)); diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/CultureInfoConverterTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/CultureInfoConverterTests.cs index 466d92d6eee2a..4015faa46564b 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/CultureInfoConverterTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/CultureInfoConverterTests.cs @@ -126,15 +126,15 @@ public void GetCultureName_NullCulture_ThrowsArgumentNullException() Assert.Throws("culture", () => converter.GetCultureName(null)); } - public static IEnumerable ConvertFrom_OverridenGetCultureName_TestData() + public static IEnumerable ConvertFrom_OverriddenGetCultureName_TestData() { yield return new object[] { "Fixed", "Fixed", CultureInfo.InvariantCulture }; yield return new object[] { "None", "en-US", new CultureInfo("en-US") }; } [Theory] - [MemberData(nameof(ConvertFrom_OverridenGetCultureName_TestData))] - public void ConvertFrom_OverridenGetCultureName_ReturnsExpected(string fixedValue, string text, CultureInfo expected) + [MemberData(nameof(ConvertFrom_OverriddenGetCultureName_TestData))] + public void ConvertFrom_OverriddenGetCultureName_ReturnsExpected(string fixedValue, string text, CultureInfo expected) { var converter = new FixedCultureInfoConverter { @@ -144,7 +144,7 @@ public void ConvertFrom_OverridenGetCultureName_ReturnsExpected(string fixedValu } [Fact] - public void GetCultureName_Overriden_ConversionsReturnsExpected() + public void GetCultureName_Overridden_ConversionsReturnsExpected() { var converter = new FixedCultureInfoConverter { diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs index 7bfb52ec428b1..d306714933c44 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs @@ -296,7 +296,7 @@ public void CopyTo_ValidRange_Success() } [Fact] - public void Properties_GetWhenPopulateOptionCollectionOverriden_ReturnsExpected() + public void Properties_GetWhenPopulateOptionCollectionOverridden_ReturnsExpected() { var service = new PopulatingDesignerOptionService(); DesignerOptionService.DesignerOptionCollection options = service.Options; diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/Design/ServiceContainerTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/Design/ServiceContainerTests.cs index 001abff49fa2d..846bb10e83196 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/Design/ServiceContainerTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/Design/ServiceContainerTests.cs @@ -511,7 +511,7 @@ public void GetService_DefaultService_ReturnsExpected(Type serviceType) var container = new ServiceContainer(); Assert.Same(container, container.GetService(serviceType)); - // Should return the container even if overriden. + // Should return the container even if overridden. container.AddService(serviceType, new ServiceContainer()); Assert.Same(container, container.GetService(serviceType)); } diff --git a/src/libraries/System.Composition.Convention/src/System/Composition/Convention/PartConventionBuilder.cs b/src/libraries/System.Composition.Convention/src/System/Composition/Convention/PartConventionBuilder.cs index 6cadec4c54f37..770877c40a9b0 100644 --- a/src/libraries/System.Composition.Convention/src/System/Composition/Convention/PartConventionBuilder.cs +++ b/src/libraries/System.Composition.Convention/src/System/Composition/Convention/PartConventionBuilder.cs @@ -27,7 +27,7 @@ public class PartConventionBuilder // Constructor selector / configuration private Func, ConstructorInfo> _constructorFilter; - private Action _configureConstuctorImports; + private Action _configureConstructorImports; //Property Import/Export selection and configuration private readonly List, Action, Type>> _propertyExports; @@ -135,7 +135,7 @@ public PartConventionBuilder SelectConstructor(Func throw new ArgumentNullException(nameof(importConfiguration)); } - _configureConstuctorImports = importConfiguration; + _configureConstructorImports = importConfiguration; SelectConstructor(constructorSelector); return this; } @@ -616,16 +616,16 @@ internal bool BuildConstructorAttributes(Type type, ref List>> configuredMembers, Action configureConstuctorImports) + private static void ConfigureConstructorAttributes(ConstructorInfo constructorInfo, ref List>> configuredMembers, Action configureConstructorImports) { configuredMembers ??= new List>>(); @@ -664,7 +664,7 @@ private static void ConfigureConstructorAttributes(ConstructorInfo constructorIn var importBuilder = new ImportConventionBuilder(); // Let the developer alter them if they specified to do so - configureConstuctorImports?.Invoke(pi, importBuilder); + configureConstructorImports?.Invoke(pi, importBuilder); // Generate the attributes List attributes = null; diff --git a/src/libraries/System.Composition.Hosting/tests/System/Composition/Hosting/Core/ExportDescriptorPromiseTests.cs b/src/libraries/System.Composition.Hosting/tests/System/Composition/Hosting/Core/ExportDescriptorPromiseTests.cs index 082eca388e478..552b70ec5e69f 100644 --- a/src/libraries/System.Composition.Hosting/tests/System/Composition/Hosting/Core/ExportDescriptorPromiseTests.cs +++ b/src/libraries/System.Composition.Hosting/tests/System/Composition/Hosting/Core/ExportDescriptorPromiseTests.cs @@ -10,14 +10,14 @@ namespace System.Composition.Hosting.Core.Tests { public class ExportDescriptorPromiseTests { - public static IEnumerable Ctor_Depedencies() + public static IEnumerable Ctor_DependenciesData() { yield return new object[] { null, null, false, Enumerable.Empty() }; yield return new object[] { new CompositionContract(typeof(int)), "Origin", true, Enumerable.Empty() }; } [Theory] - [MemberData(nameof(Ctor_Depedencies))] + [MemberData(nameof(Ctor_DependenciesData))] public void Ctor_Dependencies(CompositionContract contract, string origin, bool isShared, IEnumerable dependencies) { int calledDependencies = 0; diff --git a/src/libraries/System.Composition.TypedParts/tests/ContainerConfigurationTests.cs b/src/libraries/System.Composition.TypedParts/tests/ContainerConfigurationTests.cs index 4c9e9253bdcee..e6149ef66c4be 100644 --- a/src/libraries/System.Composition.TypedParts/tests/ContainerConfigurationTests.cs +++ b/src/libraries/System.Composition.TypedParts/tests/ContainerConfigurationTests.cs @@ -248,7 +248,7 @@ public void WithAssemblies_NullAssemblies_ThrowsArgumentNullException() } [Fact] - public void WithAssemby_Null_ThrowsNullReferenceExceptionOnCreation() + public void WithAssembly_Null_ThrowsNullReferenceExceptionOnCreation() { ContainerConfiguration configuration = new ContainerConfiguration().WithAssembly(null); Assert.Throws(() => configuration.CreateContainer()); diff --git a/src/libraries/System.Composition.TypedParts/tests/ReflectionTests.cs b/src/libraries/System.Composition.TypedParts/tests/ReflectionTests.cs index 291a1e5bbf13a..24e98d34d448d 100644 --- a/src/libraries/System.Composition.TypedParts/tests/ReflectionTests.cs +++ b/src/libraries/System.Composition.TypedParts/tests/ReflectionTests.cs @@ -27,7 +27,7 @@ public class ReflectionTests /// revert to a default value during GetExport. /// [ConditionalFact(nameof(HasMultiplerProcessors))] - public void MultiThreadedGetExportsWorkWithImportingConstuctor() + public void MultiThreadedGetExportsWorkWithImportingConstructor() { var errors = new ConcurrentBag(); diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationElement.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationElement.cs index 53bdfedbd629e..55c81fb976637 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationElement.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationElement.cs @@ -1757,7 +1757,7 @@ internal static void ValidateElement(ConfigurationElement elem, ConfigurationVal { validator = elem.ElementProperty.Validator; - // Since ElementProperty can be overriden by derived classes we need to make sure that + // Since ElementProperty can be overridden by derived classes we need to make sure that // the validator supports the type of elem every time if ((validator != null) && !validator.CanValidate(elem.GetType())) { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationElementCollection.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationElementCollection.cs index 34277ea16765c..20c95d501eb9f 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationElementCollection.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationElementCollection.cs @@ -201,7 +201,7 @@ internal IEnumerator GetElementsEnumerator() { // Return an enumerator over the collection's config elements. // This is different then the std GetEnumerator because the second one - // can return different set of items if overriden in a derived class + // can return different set of items if overridden in a derived class return new Enumerator(Items, this); } diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ProviderSettings.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ProviderSettings.cs index 74b4520f7097d..9127e1858f2db 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ProviderSettings.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ProviderSettings.cs @@ -84,10 +84,10 @@ protected internal override void Unmerge(ConfigurationElement sourceElement, ConfigurationSaveMode saveMode) { ProviderSettings parentProviders = parentElement as ProviderSettings; - parentProviders?.UpdatePropertyCollection(); // before reseting make sure the bag is filled in + parentProviders?.UpdatePropertyCollection(); // before resetting make sure the bag is filled in ProviderSettings sourceProviders = sourceElement as ProviderSettings; - sourceProviders?.UpdatePropertyCollection(); // before reseting make sure the bag is filled in + sourceProviders?.UpdatePropertyCollection(); // before resetting make sure the bag is filled in base.Unmerge(sourceElement, parentElement, saveMode); UpdatePropertyCollection(); @@ -96,7 +96,7 @@ protected internal override void Unmerge(ConfigurationElement sourceElement, protected internal override void Reset(ConfigurationElement parentElement) { ProviderSettings parentProviders = parentElement as ProviderSettings; - parentProviders?.UpdatePropertyCollection(); // before reseting make sure the bag is filled in + parentProviders?.UpdatePropertyCollection(); // before resetting make sure the bag is filled in base.Reset(parentElement); } diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/XmlUtil.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/XmlUtil.cs index 5b09f604a61ee..5613a6ad342c3 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/XmlUtil.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/XmlUtil.cs @@ -377,7 +377,7 @@ internal bool SkipChildElementsAndCopyOuterXmlToNextElement(XmlUtilWriter utilWr // - If the whitespace doesn't contain /r/n, then it's okay to skip them // as part of the element. // - If the whitespace contains /r/n, not skipping them will result - // in a redundant emtpy line being copied. + // in a redundant empty line being copied. if (Reader.NodeType == XmlNodeType.Whitespace) Reader.Skip(); } else diff --git a/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/ConfigurationPropertyTests.cs b/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/ConfigurationPropertyTests.cs index 44949ca0d51ee..d1de9913bdb04 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/ConfigurationPropertyTests.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/ConfigurationPropertyTests.cs @@ -126,14 +126,14 @@ public void ConfigurationElementConverterIgnored() } [TypeConverter(typeof(DummyCanConverter))] - public class MyConvertableClass + public class MyConvertibleClass { } [Fact] public void TypeConverterRecognized() { - ConfigurationProperty property = new ConfigurationProperty("foo", typeof(MyConvertableClass)); + ConfigurationProperty property = new ConfigurationProperty("foo", typeof(MyConvertibleClass)); Assert.IsType(property.Converter); } @@ -143,19 +143,19 @@ public void DescriptionValueIsExposed() { FooFailsValidator validator = new FooFailsValidator(); DummyCanConverter converter = new DummyCanConverter(); - ConfigurationProperty property = new ConfigurationProperty("foo", typeof(MyConvertableClass), null, converter, validator, ConfigurationPropertyOptions.None, "bar"); + ConfigurationProperty property = new ConfigurationProperty("foo", typeof(MyConvertibleClass), null, converter, validator, ConfigurationPropertyOptions.None, "bar"); Assert.Equal("bar", property.Description); } [TypeConverter(typeof(DummyCantConverter))] - public class MyUnconvertableClass + public class MyUnconvertibleClass { } [Fact] - public void UnconvertableFailsOnConverterAccess() + public void UnconvertibleFailsOnConverterAccess() { - ConfigurationProperty property = new ConfigurationProperty("foo", typeof(MyUnconvertableClass)); + ConfigurationProperty property = new ConfigurationProperty("foo", typeof(MyUnconvertibleClass)); Assert.Throws(() => property.Converter); } diff --git a/src/libraries/System.Data.Common/src/Resources/Strings.resx b/src/libraries/System.Data.Common/src/Resources/Strings.resx index 5199442caa450..7c641dad3c859 100644 --- a/src/libraries/System.Data.Common/src/Resources/Strings.resx +++ b/src/libraries/System.Data.Common/src/Resources/Strings.resx @@ -121,8 +121,8 @@ The expression is missing the closing parenthesis. Cannot interpret token '{0}' at position {1}. Expected {0}, but actual token at the position {2} is {1}. - Cannot convert from {0} to {1}. - Cannot convert value '{0}' to Type: {1}. + Cannot convert from {0} to {1}. + Cannot convert value '{0}' to Type: {1}. Invalid column name [{0}]. The expression contains invalid date constant '{0}'. Only constant expressions are allowed in the expression list for the IN operator. @@ -143,7 +143,7 @@ Cannot evaluate non-constant expression without current row. Unbound reference in the expression '{0}'. Cannot evaluate. Expression '{0}' is not an aggregate. - Filter expression '{0}' does not evaluate to a Boolean term. + Filter expression '{0}' does not evaluate to a Boolean term. Invalid type name '{0}'. Syntax error in Lookup expression: Expecting keyword 'Parent' followed by a single column argument with possible relation qualifier: Parent[(<relation_name>)].<column_name>. Need a row or a table to Invoke DataFilter. @@ -221,7 +221,7 @@ Type '{0}' does not contain static Null property or field. Type '{0}' does not implement IRevertibleChangeTracking; therefore can not proceed with RejectChanges(). SetAdded and SetModified can only be called on DataRows with Unchanged DataRowState. - Ordinal '{0}' exceeds the maximum number. + Ordinal '{0}' exceeds the maximum number. DataSet does not support System.Nullable<>. Cannot change the name of a constraint to empty string when it is in the ConstraintCollection. Cannot enforce constraints on constraint {0}. diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLBinaryStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLBinaryStorage.cs index 47389654691ad..5c69227729c0e 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLBinaryStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLBinaryStorage.cs @@ -98,7 +98,7 @@ public override void SetCapacity(int capacity) public override object ConvertXmlToObject(string s) { SqlBinary newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLByteStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLByteStorage.cs index a8db2b2a3adb1..eaaa6f1255b50 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLByteStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLByteStorage.cs @@ -208,7 +208,7 @@ public override void SetCapacity(int capacity) public override object ConvertXmlToObject(string s) { SqlByte newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLBytesStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLBytesStorage.cs index e9f554e152eef..fa51092ddabe0 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLBytesStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLBytesStorage.cs @@ -96,7 +96,7 @@ public override void SetCapacity(int capacity) public override object ConvertXmlToObject(string s) { SqlBinary newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLCharsStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLCharsStorage.cs index 93eb5bf832a46..32352bab64b4b 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLCharsStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLCharsStorage.cs @@ -99,7 +99,7 @@ public override object ConvertXmlToObject(string s) { SqlString newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDateTimeStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDateTimeStorage.cs index 7cc181a9b03dc..a68f5a8214c84 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDateTimeStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDateTimeStorage.cs @@ -134,7 +134,7 @@ public override void SetCapacity(int capacity) public override object ConvertXmlToObject(string s) { SqlDateTime newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDecimalStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDecimalStorage.cs index 80e3f7133791a..9187efd5d3564 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDecimalStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDecimalStorage.cs @@ -206,7 +206,7 @@ public override void SetCapacity(int capacity) public override object ConvertXmlToObject(string s) { SqlDecimal newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDoubleStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDoubleStorage.cs index ccfef423f3552..0f567b0bc40a1 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDoubleStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDoubleStorage.cs @@ -207,7 +207,7 @@ public override void SetCapacity(int capacity) public override object ConvertXmlToObject(string s) { SqlDouble newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLGuidStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLGuidStorage.cs index bd19d38f809b9..daa553b836339 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLGuidStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLGuidStorage.cs @@ -99,7 +99,7 @@ public override void SetCapacity(int capacity) public override object ConvertXmlToObject(string s) { SqlGuid newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt16Storage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt16Storage.cs index eb9f50a2d23d9..409ed1e3d780f 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt16Storage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt16Storage.cs @@ -207,7 +207,7 @@ public override void SetCapacity(int capacity) public override object ConvertXmlToObject(string s) { SqlInt16 newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt32Storage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt32Storage.cs index 36f3613ff82fc..fab103c633922 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt32Storage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt32Storage.cs @@ -207,7 +207,7 @@ public override void SetCapacity(int capacity) public override object ConvertXmlToObject(string s) { SqlInt32 newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt64Storage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt64Storage.cs index 68d8405678c3b..840b924f3dc3e 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt64Storage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt64Storage.cs @@ -208,7 +208,7 @@ public override void SetCapacity(int capacity) public override object ConvertXmlToObject(string s) { SqlInt64 newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLMoneyStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLMoneyStorage.cs index f4d356e80b310..75b06dc1607b9 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLMoneyStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLMoneyStorage.cs @@ -207,7 +207,7 @@ public override void SetCapacity(int capacity) public override object ConvertXmlToObject(string s) { SqlMoney newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLSingleStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLSingleStorage.cs index f58d5890a9646..2c38519859c29 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLSingleStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLSingleStorage.cs @@ -205,7 +205,7 @@ public override void SetCapacity(int capacity) public override object ConvertXmlToObject(string s) { SqlSingle newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLStringStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLStringStorage.cs index 9f241a7c0385e..c47165a9f451c 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLStringStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLStringStorage.cs @@ -160,7 +160,7 @@ public override void SetCapacity(int capacity) public override object ConvertXmlToObject(string s) { SqlString newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQlBooleanStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQlBooleanStorage.cs index fca7ea1e24b9d..08362e91d8e1c 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQlBooleanStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQlBooleanStorage.cs @@ -132,7 +132,7 @@ public override void SetCapacity(int capacity) public override object ConvertXmlToObject(string s) { SqlBoolean newValue = default; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); IXmlSerializable tmp = newValue; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SqlUDTStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SqlUDTStorage.cs index 41b70d77cb6a3..8ed9938ac835f 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SqlUDTStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SqlUDTStorage.cs @@ -150,7 +150,7 @@ public override object ConvertXmlToObject(string s) { object Obj = System.Activator.CreateInstance(_dataType, true)!; - string tempStr = string.Concat("", s, ""); // this is done since you can give fragmet to reader + string tempStr = string.Concat("", s, ""); // this is done since you can give fragment to reader StringReader strReader = new StringReader(tempStr); using (XmlTextReader xmlTextReader = new XmlTextReader(strReader)) diff --git a/src/libraries/System.Data.Common/src/System/Data/DataException.cs b/src/libraries/System.Data.Common/src/System/Data/DataException.cs index ffc9b5c9682a2..d41f5a7a66588 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataException.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataException.cs @@ -394,7 +394,7 @@ private static void ThrowDataException(string error, Exception? innerException) public static Exception CannotRemoveConstraint(string constraint, string table) => _Argument(SR.Format(SR.DataColumns_RemoveConstraint, constraint, table)); public static Exception CannotRemoveExpression(string column, string expression) => _Argument(SR.Format(SR.DataColumns_RemoveExpression, column, expression)); public static Exception ColumnNotInTheUnderlyingTable(string column, string table) => _Argument(SR.Format(SR.DataColumn_NotInTheUnderlyingTable, column, table)); - public static Exception InvalidOrdinal(string name, int ordinal) => _ArgumentOutOfRange(name, SR.Format(SR.DataColumn_OrdinalExceedMaximun, (ordinal).ToString(CultureInfo.InvariantCulture))); + public static Exception InvalidOrdinal(string name, int ordinal) => _ArgumentOutOfRange(name, SR.Format(SR.DataColumn_OrdinalExceedMaximum, (ordinal).ToString(CultureInfo.InvariantCulture))); // // _Constraint and ConstrainsCollection diff --git a/src/libraries/System.Data.Common/src/System/Data/DataRow.cs b/src/libraries/System.Data.Common/src/System/Data/DataRow.cs index c80fe12f8adba..7b9fb93495818 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataRow.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataRow.cs @@ -228,7 +228,7 @@ internal int GetNestedParentCount() DataRelation[] nestedParentRelations = _table.NestedParentRelations; foreach (DataRelation rel in nestedParentRelations) { - if (rel == null) // don't like this but done for backward code compatability + if (rel == null) // don't like this but done for backward code compatibility { continue; } @@ -886,7 +886,7 @@ internal DataColumn GetDataColumn(string columnName) DataRelation[] nestedParentRelations = _table.NestedParentRelations; foreach (DataRelation rel in nestedParentRelations) { - if (rel == null) // don't like this but done for backward code compatability + if (rel == null) // don't like this but done for backward code compatibility { continue; } diff --git a/src/libraries/System.Data.Common/src/System/Data/DataRowCollection.cs b/src/libraries/System.Data.Common/src/System/Data/DataRowCollection.cs index 9a2daa68701bc..b1a526a3361df 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataRowCollection.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataRowCollection.cs @@ -15,9 +15,9 @@ protected override int CompareNode(DataRow? record1, DataRow? record2) { throw ExceptionBuilder.InternalRBTreeError(RBTreeError.CompareNodeInDataRowTree); } - protected override int CompareSateliteTreeNode(DataRow? record1, DataRow? record2) + protected override int CompareSatelliteTreeNode(DataRow? record1, DataRow? record2) { - throw ExceptionBuilder.InternalRBTreeError(RBTreeError.CompareSateliteTreeNodeInDataRowTree); + throw ExceptionBuilder.InternalRBTreeError(RBTreeError.CompareSatelliteTreeNodeInDataRowTree); } } diff --git a/src/libraries/System.Data.Common/src/System/Data/DataRowView.cs b/src/libraries/System.Data.Common/src/System/Data/DataRowView.cs index c12d20bfd034c..8784f35284a0a 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataRowView.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataRowView.cs @@ -33,7 +33,7 @@ internal DataRowView(DataView dataView, DataRow row) /// Hashcode of public override int GetHashCode() { - // Everett compatability, must return hashcode for DataRow + // Everett compatibility, must return hashcode for DataRow // this does prevent using this object in collections like Hashtable // which use the hashcode as an immutable value to identify this object // user could/should have used the DataRow property instead of the hashcode diff --git a/src/libraries/System.Data.Common/src/System/Data/DataTable.cs b/src/libraries/System.Data.Common/src/System/Data/DataTable.cs index eba3f6acd109b..2227845493574 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataTable.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataTable.cs @@ -4384,7 +4384,7 @@ private void SetNewRecordWorker(DataRow row, int proposedRecord, DataRowAction a if ((-1 == currentRecord) && (-1 != proposedRecord) && (-1 != row._oldRecord) && (proposedRecord != row._oldRecord)) { // the transition from DataRowState.Deleted -> DataRowState.Modified - // with same orginal record but new current record + // with same original record but new current record // needs to raise an ItemChanged or ItemMoved instead of ItemAdded in the ListChanged event. // for indexes/views listening for both DataViewRowState.Deleted | DataViewRowState.ModifiedCurrent currentRecord = row._oldRecord; diff --git a/src/libraries/System.Data.Common/src/System/Data/DataTableReader.cs b/src/libraries/System.Data.Common/src/System/Data/DataTableReader.cs index 0a43cab1ea419..1ca55a9f40972 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataTableReader.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataTableReader.cs @@ -972,7 +972,7 @@ internal void DataChanged(DataRowChangeEventArgs args) } } else - { // we are proccessing current datarow + { // we are processing current datarow _currentRowRemoved = true; if (_rowCounter > 0) { diff --git a/src/libraries/System.Data.Common/src/System/Data/DataView.cs b/src/libraries/System.Data.Common/src/System/Data/DataView.cs index cb9f787d3caaa..1fe9fe049922a 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataView.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataView.cs @@ -821,7 +821,7 @@ internal void FinishAddNew(bool success) /// public IEnumerator GetEnumerator() { - // V1.1 compatability: returning List.GetEnumerator() from RowViewCache + // V1.1 compatibility: returning List.GetEnumerator() from RowViewCache // prevents users from changing data without invalidating the enumerator // aka don't 'return this.RowViewCache.GetEnumerator()' var temp = new DataRowView[Count]; diff --git a/src/libraries/System.Data.Common/src/System/Data/Filter/DataExpression.cs b/src/libraries/System.Data.Common/src/System/Data/Filter/DataExpression.cs index a774254f3044b..94d13b5c0b4c9 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Filter/DataExpression.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Filter/DataExpression.cs @@ -147,7 +147,7 @@ internal object Evaluate(DataRow? row, DataRowVersion version) catch (Exception e) when (ADP.IsCatchableExceptionType(e)) { ExceptionBuilder.TraceExceptionForCapture(e); - throw ExprException.DatavalueConvertion(result, _dataType!, e); + throw ExprException.DatavalueConversion(result, _dataType!, e); } } } @@ -210,7 +210,7 @@ public bool Invoke(DataRow row, DataRowVersion version) } catch (EvaluateException) { - throw ExprException.FilterConvertion(Expression); + throw ExprException.FilterConversion(Expression); } return result; } @@ -270,11 +270,11 @@ internal static bool ToBoolean(object value) catch (Exception e) when (ADP.IsCatchableExceptionType(e)) { ExceptionBuilder.TraceExceptionForCapture(e); - throw ExprException.DatavalueConvertion(value, typeof(bool), e); + throw ExprException.DatavalueConversion(value, typeof(bool), e); } } - throw ExprException.DatavalueConvertion(value, typeof(bool), null); + throw ExprException.DatavalueConversion(value, typeof(bool), null); } } } diff --git a/src/libraries/System.Data.Common/src/System/Data/Filter/FilterException.cs b/src/libraries/System.Data.Common/src/System/Data/Filter/FilterException.cs index 701f405143683..87bd7dfb13e70 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Filter/FilterException.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Filter/FilterException.cs @@ -162,14 +162,14 @@ public static Exception UnknownToken(Tokens tokExpected, Tokens tokCurr, int pos return _Syntax(SR.Format(SR.Expr_UnknownToken1, tokExpected.ToString(), tokCurr.ToString(), position.ToString(CultureInfo.InvariantCulture))); } - public static Exception DatatypeConvertion(Type type1, Type type2) + public static Exception DatatypeConversion(Type type1, Type type2) { - return _Eval(SR.Format(SR.Expr_DatatypeConvertion, type1.ToString(), type2.ToString())); + return _Eval(SR.Format(SR.Expr_DatatypeConversion, type1.ToString(), type2.ToString())); } - public static Exception DatavalueConvertion(object value, Type type, Exception? innerException) + public static Exception DatavalueConversion(object value, Type type, Exception? innerException) { - return _Eval(SR.Format(SR.Expr_DatavalueConvertion, value.ToString(), type.ToString()), innerException); + return _Eval(SR.Format(SR.Expr_DatavalueConversion, value.ToString(), type.ToString()), innerException); } public static Exception InvalidName(string name) @@ -287,9 +287,9 @@ public static Exception ComputeNotAggregate(string expr) return _Eval(SR.Format(SR.Expr_ComputeNotAggregate, expr)); } - public static Exception FilterConvertion(string expr) + public static Exception FilterConversion(string expr) { - return _Eval(SR.Format(SR.Expr_FilterConvertion, expr)); + return _Eval(SR.Format(SR.Expr_FilterConversion, expr)); } public static Exception LookupArgument() diff --git a/src/libraries/System.Data.Common/src/System/Data/Filter/FunctionNode.cs b/src/libraries/System.Data.Common/src/System/Data/Filter/FunctionNode.cs index e5d100bf27022..482081f64809f 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Filter/FunctionNode.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Filter/FunctionNode.cs @@ -338,7 +338,7 @@ private object EvalFunction(FunctionId id, object[] argumentValues, DataRow? row StorageType.Int32 => ((int)argumentValues[0] != 0), StorageType.Double => ((double)argumentValues[0] != 0.0), StorageType.String => bool.Parse((string)argumentValues[0]), - _ => throw ExprException.DatatypeConvertion(argumentValues[0].GetType(), typeof(bool)), + _ => throw ExprException.DatatypeConversion(argumentValues[0].GetType(), typeof(bool)), }; case FunctionId.cInt: Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}"); diff --git a/src/libraries/System.Data.Common/src/System/Data/LinqDataView.cs b/src/libraries/System.Data.Common/src/System/Data/LinqDataView.cs index 46bf364b58fc7..9b9c7e2eadce7 100644 --- a/src/libraries/System.Data.Common/src/System/Data/LinqDataView.cs +++ b/src/libraries/System.Data.Common/src/System/Data/LinqDataView.cs @@ -140,7 +140,7 @@ internal override int FindByKey(object? key) /// /// Since LinkDataView does not support multiple selectors/comparers, it does not make sense for /// them to Find using multiple keys. - /// This overriden method prevents users calling multi-key find on dataview. + /// This overridden method prevents users calling multi-key find on dataview. /// internal override int FindByKey(object?[] key) { @@ -180,7 +180,7 @@ internal override int FindByKey(object?[] key) /// /// Searches the index and finds rows where the sort-key matches the input key. /// Since LinkDataView does not support multiple selectors/comparers, it does not make sense for - /// them to Find using multiple keys. This overriden method prevents users calling multi-key find on dataview. + /// them to Find using multiple keys. This overridden method prevents users calling multi-key find on dataview. /// internal override DataRowView[] FindRowsByKey(object?[] key) { diff --git a/src/libraries/System.Data.Common/src/System/Data/RbTree.cs b/src/libraries/System.Data.Common/src/System/Data/RbTree.cs index a7892bdf9816a..46c4fae4efbf5 100644 --- a/src/libraries/System.Data.Common/src/System/Data/RbTree.cs +++ b/src/libraries/System.Data.Common/src/System/Data/RbTree.cs @@ -35,7 +35,7 @@ internal enum RBTreeError UnsupportedAccessMethodInNonNillRootSubtree = 17, AttachedNodeWithZerorbTreeNodeId = 18, // DataRowCollection CompareNodeInDataRowTree = 19, // DataRowCollection - CompareSateliteTreeNodeInDataRowTree = 20, // DataRowCollection + CompareSatelliteTreeNodeInDataRowTree = 20, // DataRowCollection NestedSatelliteTreeEnumerator = 21, } @@ -108,7 +108,7 @@ internal abstract class RBTree : IEnumerable private readonly TreeAccessMethod _accessMethod; protected abstract int CompareNode(K? record1, K? record2); - protected abstract int CompareSateliteTreeNode(K? record1, K? record2); + protected abstract int CompareSatelliteTreeNode(K? record1, K? record2); protected RBTree(TreeAccessMethod accessMethod) { @@ -358,7 +358,7 @@ private int GetNewNode(K? key) else if (_inUsePageCount < (32 * 1024)) page = AllocPage(8192); // approximately First 16 million slots (2^24) else - page = AllocPage(64 * 1024); // Page size to accomodate more than 16 million slots (Max 2 Billion and 16 million slots) + page = AllocPage(64 * 1024); // Page size to accommodate more than 16 million slots (Max 2 Billion and 16 million slots) // page contains atleast 1 free slot. int slotId = page!.AllocSlot(this); @@ -549,7 +549,7 @@ private int Compare(int root_id, int x_id, int z_id) { Debug.Assert(NIL != x_id, "nil left"); Debug.Assert(NIL != z_id, "nil right"); - return (root_id == NIL) ? CompareNode(Key(x_id), Key(z_id)) : CompareSateliteTreeNode(Key(x_id), Key(z_id)); + return (root_id == NIL) ? CompareNode(Key(x_id), Key(z_id)) : CompareSatelliteTreeNode(Key(x_id), Key(z_id)); } #endif @@ -560,9 +560,9 @@ private int Compare(int root_id, int x_id, int z_id) * * returns: The root of the tree to which the specified node was added. its NIL if the node was added to Main RBTree. * - * if root_id is NIL -> use CompareNode else use CompareSateliteTreeNode + * if root_id is NIL -> use CompareNode else use CompareSatelliteTreeNode * - * Satelite tree creation: + * Satellite tree creation: * First Duplicate value encountered. Create a *new* tree whose root will have the same key value as the current node. * The Duplicate tree nodes have same key when used with CompareRecords but distinct record ids. * The current record at all times will have the same *key* as the duplicate tree root. @@ -583,7 +583,7 @@ private int RBInsert(int root_id, int x_id, int mainTreeNodeID, int position, bo IncreaseSize(z_id); y_id = z_id; // y_id set to the proposed parent of x_id - int c = (root_id == NIL) ? CompareNode(Key(x_id), Key(z_id)) : CompareSateliteTreeNode(Key(x_id), Key(z_id)); + int c = (root_id == NIL) ? CompareNode(Key(x_id), Key(z_id)) : CompareSatelliteTreeNode(Key(x_id), Key(z_id)); if (c < 0) { @@ -722,7 +722,7 @@ private int RBInsert(int root_id, int x_id, int mainTreeNodeID, int position, bo { int c = 0; if (_accessMethod == TreeAccessMethod.KEY_SEARCH_AND_INDEX) - c = (root_id == NIL) ? CompareNode(Key(x_id), Key(y_id)) : CompareSateliteTreeNode(Key(x_id), Key(y_id)); + c = (root_id == NIL) ? CompareNode(Key(x_id), Key(y_id)) : CompareSatelliteTreeNode(Key(x_id), Key(y_id)); else if (_accessMethod == TreeAccessMethod.INDEX_ONLY) c = (position <= 0) ? -1 : 1; else @@ -853,10 +853,10 @@ public int RBDelete(int z_id) * Case 1: Node is in main tree only (decrease size in main tree) * Case 2: Node's key is shared with a main tree node whose next is non-NIL * (decrease size in both trees) - * Case 3: special case of case 2: After deletion, node leaves satelite tree with only 1 node (only root), - * it should collapse the satelite tree - go to case 4. (decrease size in both trees) - * Case 4: (1) Node is in Main tree and is a satelite tree root AND - * (2) It is the only node in Satelite tree + * Case 3: special case of case 2: After deletion, node leaves satellite tree with only 1 node (only root), + * it should collapse the satellite tree - go to case 4. (decrease size in both trees) + * Case 4: (1) Node is in Main tree and is a satellite tree root AND + * (2) It is the only node in Satellite tree * (Do not decrease size in any tree, as its a collpase operation) * */ @@ -872,7 +872,7 @@ private int RBDeleteX(int root_id, int z_id, int mainTreeNodeID) (new NodePath(z_id, mainTreeNodeID)).VerifyPath(this); #endif if (Next(z_id) != NIL) - return RBDeleteX(Next(z_id), Next(z_id), z_id); // delete root of satelite tree. + return RBDeleteX(Next(z_id), Next(z_id), z_id); // delete root of satellite tree. // if we reach here, we are guaranteed z_id.next is NIL. bool isCase3 = false; @@ -954,7 +954,7 @@ private int RBDeleteX(int root_id, int z_id, int mainTreeNodeID) tmp_py_id = Parent(tmp_py_id); } - //if satelite tree node deleted, decrease size in main tree as well. + //if satellite tree node deleted, decrease size in main tree as well. if (root_id != NIL) { // case 2, 3 @@ -971,7 +971,7 @@ private int RBDeleteX(int root_id, int z_id, int mainTreeNodeID) if (isCase3) { - // Collpase satelite tree, by swapping it with the main tree counterpart and freeing the main tree node + // Collpase satellite tree, by swapping it with the main tree counterpart and freeing the main tree node if (mNode == NIL || SubTreeSize(Next(mNode)) != 1) { throw ExceptionBuilder.InternalRBTreeError(RBTreeError.InvalidNodeSizeinDelete); @@ -1098,7 +1098,7 @@ private int RBDeleteFixup(int root_id, int x_id, int px_id /* px is parent of x if (x_id == NIL && px_id == NIL) { - return NIL; //case of satelite tree root being deleted. + return NIL; //case of satellite tree root being deleted. } while (((root_id == NIL ? root : root_id) != x_id) && color(x_id) == NodeColor.black) @@ -1218,7 +1218,7 @@ private int SearchSubTree(int root_id, K? key) int c; while (x_id != NIL) { - c = (root_id == NIL) ? CompareNode(key, Key(x_id)) : CompareSateliteTreeNode(key, Key(x_id)); + c = (root_id == NIL) ? CompareNode(key, Key(x_id)) : CompareSatelliteTreeNode(key, Key(x_id)); if (c == 0) { break; @@ -1241,7 +1241,7 @@ private int SearchSubTree(int root_id, K? key) return x_id; } - // only works on the main tree - does not work with satelite tree + // only works on the main tree - does not work with satellite tree public int Search(K key) { // for performance reasons, written as a while loop instead of a recursive method int x_id = root; @@ -1326,15 +1326,15 @@ public int GetIndexByKey(K key) * If I am right child then size=my size + size of left child of my parent + 1 * go up till root, if right child keep adding to the size. * (1) compute rank in main tree. - * (2) if node member of a satelite tree, add to rank its relative rank in that tree. + * (2) if node member of a satellite tree, add to rank its relative rank in that tree. * * Rank: * Case 1: Node is in Main RBTree only * Its rank/index is its main tree index - * Case 2: Node is in a Satelite tree only - * Its rank/index is its satelite tree index - * Case 3: Nodes is in both Main and Satelite RBTree (a main tree node can be a satelite tree root) - * Its rank/index is its main tree index + its satelite tree index - 1 + * Case 2: Node is in a Satellite tree only + * Its rank/index is its satellite tree index + * Case 3: Nodes is in both Main and Satellite RBTree (a main tree node can be a satellite tree root) + * Its rank/index is its main tree index + its satellite tree index - 1 * Returns the index of the specified node. * returns -1, if the specified Node is tree.NIL. * @@ -1446,7 +1446,7 @@ private NodePath GetNodeByIndex(int userIndex) int x_id, satelliteRootId; if (0 == _inUseSatelliteTreeCount) { - // if rows were only contigously append, then using (userIndex -= _pageTable[i].InUseCount) would + // if rows were only contiguously append, then using (userIndex -= _pageTable[i].InUseCount) would // be faster for the first 12 pages (about 5248) nodes before (log2 of Count) becomes faster again. // the additional complexity was deemed not worthy for the possible perf gain @@ -1532,7 +1532,7 @@ private int ComputeNodeByIndex(int x_id, int index) } #if DEBUG - // return true if all nodes are unique; i.e. no satelite trees. + // return true if all nodes are unique; i.e. no satellite trees. public bool CheckUnique(int curNodeId) { if (curNodeId != NIL) diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs index 363175a91391c..db617033a8f76 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs @@ -1242,7 +1242,7 @@ public static explicit operator decimal(SqlDecimal x) ResPrec = Math.Min(MaxPrecision, ResPrec); // If precision adjusted, scale is reduced to keep the integer part untruncated. - // But discard the extra carry, only keep the interger part as ResInteger, not ResInteger + 1. + // But discard the extra carry, only keep the integer part as ResInteger, not ResInteger + 1. Debug.Assert(ResPrec - ResInteger >= 0); if (ResPrec - ResInteger < ResScale) ResScale = ResPrec - ResInteger; diff --git a/src/libraries/System.Data.Common/src/System/Data/Select.cs b/src/libraries/System.Data.Common/src/System/Data/Select.cs index 3cf89bb11a9a5..33088dcad9347 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Select.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Select.cs @@ -630,7 +630,7 @@ private bool AcceptRecord(int record) } catch (Exception e) when (ADP.IsCatchableExceptionType(e)) { - throw ExprException.FilterConvertion(_rowFilter!.Expression); + throw ExprException.FilterConversion(_rowFilter!.Expression); } return result; } diff --git a/src/libraries/System.Data.Common/src/System/Data/Selection.cs b/src/libraries/System.Data.Common/src/System/Data/Selection.cs index e100b60ecb970..3da32ceb4b50f 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Selection.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Selection.cs @@ -51,7 +51,7 @@ internal IndexTree(Index index) : base(TreeAccessMethod.KEY_SEARCH_AND_INDEX) protected override int CompareNode(int record1, int record2) => _index.CompareRecords(record1, record2); - protected override int CompareSateliteTreeNode(int record1, int record2) => + protected override int CompareSatelliteTreeNode(int record1, int record2) => _index.CompareDuplicateRecords(record1, record2); } @@ -642,8 +642,8 @@ internal Range FindRecords(ComparisonBySelector comparis private Range GetRangeFromNode(int nodeId) { - // fill range with the min and max indexes of matching record (i.e min and max of satelite tree) - // min index is the index of the node in main tree, and max is the min + size of satelite tree-1 + // fill range with the min and max indexes of matching record (i.e min and max of satellite tree) + // min index is the index of the node in main tree, and max is the min + size of satellite tree-1 if (IndexTree.NIL == nodeId) { diff --git a/src/libraries/System.Data.Common/src/System/Data/XMLSchema.cs b/src/libraries/System.Data.Common/src/System/Data/XMLSchema.cs index 2de32d6e0c8e9..12e6b1e7cec9f 100644 --- a/src/libraries/System.Data.Common/src/System/Data/XMLSchema.cs +++ b/src/libraries/System.Data.Common/src/System/Data/XMLSchema.cs @@ -720,7 +720,7 @@ public void LoadSchema(XmlSchemaSet schemaSet, DataSet ds) { if (FromInference) { - ds._fTopLevelTable = true; // Backward compatability: for inference, if we do not read DataSet element + ds._fTopLevelTable = true; // Backward compatibility: for inference, if we do not read DataSet element } // we should not write it also setRootNStoDataSet = true; @@ -828,7 +828,7 @@ public void LoadSchema(XmlSchemaSet schemaSet, DataSet ds) tmpTable._fNestedInDataset = true; - // this fix is for backward compatability with old inference engine + // this fix is for backward compatibility with old inference engine if (FromInference && ds.Tables.Count == 0 && string.Equals(ds.DataSetName, "NewDataSet", StringComparison.Ordinal)) ds.DataSetName = XmlConvert.DecodeName(((XmlSchemaElement)_elements[0]).Name)!; @@ -836,7 +836,7 @@ public void LoadSchema(XmlSchemaSet schemaSet, DataSet ds) ds._fIsSchemaLoading = false; //reactivate column computations - //for backward compatability; we need to set NS of Root Element to DataSet, if root already does not mapped to dataSet + //for backward compatibility; we need to set NS of Root Element to DataSet, if root already does not mapped to dataSet if (setRootNStoDataSet) { if (ds.Tables.Count > 0) @@ -1126,7 +1126,7 @@ internal void HandleComplexType(XmlSchemaComplexType ct, DataTable table, ArrayL if (FromInference) { HandleAttributes(ct.Attributes, table, isBase); - if (isNillable) // this is for backward compatability to support xsi:Nill=true + if (isNillable) // this is for backward compatibility to support xsi:Nill=true HandleSimpleContentColumn("string", table, isBase, null, isNillable); } } @@ -1476,7 +1476,7 @@ internal DataTable InstantiateSimpleTable(XmlSchemaElement node) bool isSimpleContent = ((node.ElementSchemaType!.BaseXmlSchemaType != null) || (ct != null && ct.ContentModel is XmlSchemaSimpleContent)); if (!FromInference || (isSimpleContent && table.Columns.Count == 0)) - {// for inference backward compatability + {// for inference backward compatibility HandleElementColumn(node, table, false); string colName; @@ -1738,7 +1738,7 @@ internal DataTable InstantiateTable(XmlSchemaElement node, XmlSchemaComplexType // foreign key in the child table DataColumn childKey = _tableChild.AddForeignKey(parentKey); - // when we add unique key, we do set prefix; but for Fk we do not do . So for backward compatability + // when we add unique key, we do set prefix; but for Fk we do not do . So for backward compatibility if (FromInference) childKey.Prefix = _tableChild.Prefix; // childKey.Prefix = GetPrefix(childKey.Namespace); @@ -1948,7 +1948,7 @@ internal void HandleSimpleTypeSimpleContentColumn(XmlSchemaSimpleType typeNode, { // disallow multiple simple content columns for the table if (FromInference && table.XmlText != null) - { // backward compatability for inference + { // backward compatibility for inference return; } @@ -2086,7 +2086,7 @@ internal void HandleSimpleContentColumn(string strType, DataTable table, bool is // for Named Simple type support : We should not received anything here other than string. // there can not be typed simple content // disallow multiple simple content columns for the table - if (FromInference && table.XmlText != null) // backward compatability for inference + if (FromInference && table.XmlText != null) // backward compatibility for inference return; Type? type; @@ -2251,17 +2251,17 @@ internal void HandleAttributeColumn(XmlSchemaAttribute attrib, DataTable table, isToAdd = false; if (FromInference) - { // for backward compatability with old inference + { // for backward compatibility with old inference // throw eception if same column is being aded with different mapping if (column.ColumnMapping != MappingType.Attribute) throw ExceptionBuilder.ColumnTypeConflict(column.ColumnName); // in previous inference , if we have incoming column with different NS, we think as different column and //while adding , since there is no NS concept for datacolumn, we used to throw exception // simulate the same behavior. - if ((string.IsNullOrEmpty(attrib.QualifiedName.Namespace) && string.IsNullOrEmpty(column._columnUri)) || // backward compatability :SQL BU DT 310912 + if ((string.IsNullOrEmpty(attrib.QualifiedName.Namespace) && string.IsNullOrEmpty(column._columnUri)) || // backward compatibility :SQL BU DT 310912 (string.Equals(attrib.QualifiedName.Namespace, column.Namespace, StringComparison.Ordinal))) { - return; // backward compatability + return; // backward compatibility } column = new DataColumn(columnName, type, null, MappingType.Attribute); // this is to fix issue with Exception we used to throw for old inference engine if column //exists with different namespace; while adding it to columncollection @@ -2437,16 +2437,16 @@ internal void HandleElementColumn(XmlSchemaElement elem, DataTable table, bool i isToAdd = false; if (FromInference) - { // for backward compatability with old inference + { // for backward compatibility with old inference if (column.ColumnMapping != MappingType.Element) throw ExceptionBuilder.ColumnTypeConflict(column.ColumnName); // in previous inference , if we have incoming column with different NS, we think as different column and //while adding , since there is no NS concept for datacolumn, we used to throw exception // simulate the same behavior. - if ((string.IsNullOrEmpty(elem.QualifiedName.Namespace) && string.IsNullOrEmpty(column._columnUri)) || // backward compatability :SQL BU DT 310912 + if ((string.IsNullOrEmpty(elem.QualifiedName.Namespace) && string.IsNullOrEmpty(column._columnUri)) || // backward compatibility :SQL BU DT 310912 (string.Equals(elem.QualifiedName.Namespace, column.Namespace, StringComparison.Ordinal))) { - return; // backward compatability + return; // backward compatibility } column = new DataColumn(columnName, type, null, MappingType.Element); // this is to fix issue with Exception we used to throw for old inference engine if column //exists with different namespace; while adding it to columncollection @@ -2708,7 +2708,7 @@ internal void HandleDataSet(XmlSchemaElement node, bool isNewDataSet) { AddTablesToList(_tableList, dt); } - _ds.Tables.ReplaceFromInference(_tableList); // replace the list with the one in correct order: BackWard compatability for inference + _ds.Tables.ReplaceFromInference(_tableList); // replace the list with the one in correct order: BackWard compatibility for inference } } diff --git a/src/libraries/System.Data.Common/src/System/Xml/XmlDataDocument.cs b/src/libraries/System.Data.Common/src/System/Xml/XmlDataDocument.cs index 6d498e08fe107..2039b77103d93 100644 --- a/src/libraries/System.Data.Common/src/System/Xml/XmlDataDocument.cs +++ b/src/libraries/System.Data.Common/src/System/Xml/XmlDataDocument.cs @@ -3098,7 +3098,7 @@ public override XmlNodeList GetElementsByTagName(string name) // after adding Namespace support foir datatable, DataSet does not guarantee that infered tabels would be in the same sequence as they rae in XML, because // of Namespace. if a table is in different namespace than its children and DataSet, that table would efinetely be added to DataSet after its children. Its By Design - // so in order to maintain backward compatability, we reorder the copy of the datatable collection and use it + // so in order to maintain backward compatibility, we reorder the copy of the datatable collection and use it private DataTable[] OrderTables(DataSet? ds) { DataTable[]? retValue = null; diff --git a/src/libraries/System.Data.Odbc/src/Common/System/Data/Common/DBConnectionString.cs b/src/libraries/System.Data.Odbc/src/Common/System/Data/Common/DBConnectionString.cs index d916894edd0cd..84483d7095bb1 100644 --- a/src/libraries/System.Data.Odbc/src/Common/System/Data/Common/DBConnectionString.cs +++ b/src/libraries/System.Data.Odbc/src/Common/System/Data/Common/DBConnectionString.cs @@ -31,7 +31,7 @@ private static class KEY // a linked list of key/value and their length in _encryptedUsersConnectionString private readonly NameValuePair? _keychain; - // track the existance of "password" or "pwd" in the connection string + // track the existence of "password" or "pwd" in the connection string // not used for anything anymore but must keep it set correct for V1.1 serialization private readonly bool _hasPassword; @@ -59,7 +59,7 @@ internal DBConnectionString(DbConnectionOptions connectionOptions) : this(connectionOptions, null, KeyRestrictionBehavior.AllowOnly, null, true) { // used by DBDataPermission to convert from DbConnectionOptions to DBConnectionString - // since backward compatability requires Everett level classes + // since backward compatibility requires Everett level classes } private DBConnectionString(DbConnectionOptions connectionOptions, string? restrictions, KeyRestrictionBehavior behavior, Dictionary? synonyms, bool mustCloneDictionary) diff --git a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcDataReader.cs b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcDataReader.cs index 3165e2001d304..6171d8dfd4c74 100644 --- a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcDataReader.cs +++ b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcDataReader.cs @@ -41,7 +41,7 @@ private enum HasRowsStatus private int _row = -1; private int _column = -1; - // used to track position in field for sucessive reads in case of Sequential Access + // used to track position in field for successive reads in case of Sequential Access private long _sequentialBytesRead; private static int s_objectTypeCount; // Bid counter @@ -1251,7 +1251,7 @@ private long GetBytesOrChars(int i, long dataIndex, Array? buffer, bool isCharsB // SQLBU 266054: // If cbLengthOrIndicator is SQL_NO_TOTAL (-4), this call returns -4 or -2, depending on the type (GetChars=>-2, GetBytes=>-4). // This is the Orcas RTM and SP1 behavior, changing this would be a breaking change. - // SQL_NO_TOTAL means that the driver does not know what is the remained lenght of the data, so we cannot really guess the value here. + // SQL_NO_TOTAL means that the driver does not know what is the remained length of the data, so we cannot really guess the value here. // Reason: while returning different negative values depending on the type seems inconsistent, // this is what we did in Orcas RTM and SP1 and user code might rely on this behavior => changing it would be a breaking change. if (isCharsBuffer) diff --git a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcMetaDataFactory.cs b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcMetaDataFactory.cs index 324cd75c619ad..6486f0b2d3c69 100644 --- a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcMetaDataFactory.cs +++ b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcMetaDataFactory.cs @@ -48,7 +48,7 @@ internal OdbcMetaDataFactory(Stream XMLStream, new SchemaFunctionName(OdbcMetaDataCollectionNames.Tables, ODBC32.SQL_API.SQLTABLES), new SchemaFunctionName(OdbcMetaDataCollectionNames.Views, ODBC32.SQL_API.SQLTABLES)}; - // verify the existance of the table in the data set + // verify the existence of the table in the data set DataTable? metaDataCollectionsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]; if (metaDataCollectionsTable == null) { @@ -58,7 +58,7 @@ internal OdbcMetaDataFactory(Stream XMLStream, // copy the table filtering out any rows that don't apply to the current version of the provider metaDataCollectionsTable = CloneAndFilterCollection(DbMetaDataCollectionNames.MetaDataCollections, null); - // verify the existance of the table in the data set + // verify the existence of the table in the data set DataTable? restrictionsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.Restrictions]; if (restrictionsTable != null) { @@ -784,7 +784,7 @@ private DataTable GetDataTypesCollection(string?[]? restrictions, OdbcConnection - // verify the existance of the table in the data set + // verify the existence of the table in the data set DataTable? dataTypesTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.DataTypes]; if (dataTypesTable == null) { @@ -966,7 +966,7 @@ private DataTable GetReservedWordsCollection(string?[]? restrictions, OdbcConnec throw ADP.TooManyRestrictions(DbMetaDataCollectionNames.ReservedWords); } - // verify the existance of the table in the data set + // verify the existence of the table in the data set DataTable? reservedWordsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.ReservedWords]; if (reservedWordsTable == null) { diff --git a/src/libraries/System.Data.OleDb/src/OleDbConnectionString.cs b/src/libraries/System.Data.OleDb/src/OleDbConnectionString.cs index f9c53522874bf..0413efd293889 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbConnectionString.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbConnectionString.cs @@ -196,7 +196,7 @@ internal bool GetSupportIRow(OleDbConnection connection, OleDbCommand command) { object? value = command.GetPropertyValue(OleDbPropertySetGuid.Rowset, ODB.DBPROP_IRow); - // SQLOLEDB always returns VARIANT_FALSE for DBPROP_IROW, so base the answer on existance + // SQLOLEDB always returns VARIANT_FALSE for DBPROP_IROW, so base the answer on existence supportIRow = !(value is OleDbPropertyStatus); _supportIRow = supportIRow; _hasSupportIRow = true; diff --git a/src/libraries/System.Data.OleDb/src/OleDbDataAdapter.cs b/src/libraries/System.Data.OleDb/src/OleDbDataAdapter.cs index 6b1b5cfa2c7e8..0ef683f9af61c 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbDataAdapter.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbDataAdapter.cs @@ -334,7 +334,7 @@ private int FillFromRecordset(object data, UnsafeNativeMethods.ADORecordsetConst OleDbDataReader? dataReader = null; try { - // intialized with chapter only since we don't want ReleaseChapter called for this chapter handle + // initialized with chapter only since we don't want ReleaseChapter called for this chapter handle ChapterHandle chapterHandle = ChapterHandle.CreateChapterHandle(chapter); dataReader = new OleDbDataReader(null, null, 0, behavior); diff --git a/src/libraries/System.Data.OleDb/src/OleDbDataReader.cs b/src/libraries/System.Data.OleDb/src/OleDbDataReader.cs index 28b89d589b4a9..97a8c4f512551 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbDataReader.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbDataReader.cs @@ -39,7 +39,7 @@ public sealed class OleDbDataReader : DbDataReader private long _sequentialBytesRead; private int _sequentialOrdinal; - private Bindings?[]? _bindings; // _metdata contains the ColumnBinding + private Bindings?[]? _bindings; // _metadata contains the ColumnBinding // do we need to jump to the next accessor private int _nextAccessorForRetrieval; @@ -1270,7 +1270,7 @@ internal void HasRowsRead() // If a provider doesn't support IID_NULL and returns E_NOINTERFACE we want to break out // of the loop without throwing an exception. Our behavior will match ADODB in that scenario - // where Recordset.Close just releases the interfaces without proccessing remaining results + // where Recordset.Close just releases the interfaces without processing remaining results if ((OleDbHResult.DB_S_NORESULT == hr) || (OleDbHResult.E_NOINTERFACE == hr)) { break; diff --git a/src/libraries/System.Data.OleDb/src/OleDbMetaDataFactory.cs b/src/libraries/System.Data.OleDb/src/OleDbMetaDataFactory.cs index d13521df98d71..2efe89fc4ea86 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbMetaDataFactory.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbMetaDataFactory.cs @@ -49,7 +49,7 @@ internal OleDbMetaDataFactory(Stream XMLStream, new SchemaRowsetName(OleDbMetaDataCollectionNames.Tables, OleDbSchemaGuid.Tables), new SchemaRowsetName(OleDbMetaDataCollectionNames.Views, OleDbSchemaGuid.Views)}; - // verify the existance of the table in the data set + // verify the existence of the table in the data set DataTable? metaDataCollectionsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]; if (metaDataCollectionsTable == null) { @@ -59,7 +59,7 @@ internal OleDbMetaDataFactory(Stream XMLStream, // copy the table filtering out any rows that don't apply to the current version of the provider metaDataCollectionsTable = CloneAndFilterCollection(DbMetaDataCollectionNames.MetaDataCollections, null); - // verify the existance of the table in the data set + // verify the existence of the table in the data set DataTable? restrictionsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.Restrictions]; if (restrictionsTable != null) { @@ -349,7 +349,7 @@ private DataTable GetDataSourceInformationTable(OleDbConnection connection, OleD private DataTable GetDataTypesTable(OleDbConnection connection) { - // verify the existance of the table in the data set + // verify the existence of the table in the data set DataTable? dataTypesTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.DataTypes]; if (dataTypesTable == null) { @@ -424,7 +424,7 @@ private DataTable GetDataTypesTable(OleDbConnection connection) newRow[clrType] = nativeType.dataType!.FullName; newRow[providerDbType] = nativeType.enumOleDbType; - // searchable has to be special cased becasue it is not an eaxct mapping + // searchable has to be special cased because it is not an eaxct mapping if ((isSearchable != null) && (isSearchableWithLike != null) && (searchable != null)) { newRow[isSearchable] = DBNull.Value; @@ -468,7 +468,7 @@ private DataTable GetDataTypesTable(OleDbConnection connection) private DataTable GetReservedWordsTable(OleDbConnectionInternal internalConnection) { - // verify the existance of the table in the data set + // verify the existence of the table in the data set DataTable? reservedWordsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.ReservedWords]; if (null == reservedWordsTable) { diff --git a/src/libraries/System.Data.OleDb/src/RowBinding.cs b/src/libraries/System.Data.OleDb/src/RowBinding.cs index fb83a477d5a58..302098f0b3ac9 100644 --- a/src/libraries/System.Data.OleDb/src/RowBinding.cs +++ b/src/libraries/System.Data.OleDb/src/RowBinding.cs @@ -166,7 +166,7 @@ internal static int AlignDataSize(int value) internal object GetVariantValue(int offset) { - Debug.Assert(_needToReset, "data type requires reseting and _needToReset is false"); + Debug.Assert(_needToReset, "data type requires resetting and _needToReset is false"); Debug.Assert(0 == (ODB.SizeOf_Variant % 8), "unexpected VARIANT size mutiplier"); Debug.Assert(0 == offset % 8, "invalid alignment"); ValidateCheck(offset, 2 * ODB.SizeOf_Variant); @@ -195,8 +195,8 @@ internal object GetVariantValue(int offset) // translate to native internal void SetVariantValue(int offset, object value) { - // two contigous VARIANT structures, second should be a binary copy of the first - Debug.Assert(_needToReset, "data type requires reseting and _needToReset is false"); + // two contiguous VARIANT structures, second should be a binary copy of the first + Debug.Assert(_needToReset, "data type requires resetting and _needToReset is false"); Debug.Assert(0 == (ODB.SizeOf_Variant % 8), "unexpected VARIANT size mutiplier"); Debug.Assert(0 == offset % 8, "invalid alignment"); ValidateCheck(offset, 2 * ODB.SizeOf_Variant); @@ -236,8 +236,8 @@ internal void SetVariantValue(int offset, object value) // translate to native internal void SetBstrValue(int offset, string value) { - // two contigous BSTR ptr, second should be a binary copy of the first - Debug.Assert(_needToReset, "data type requires reseting and _needToReset is false"); + // two contiguous BSTR ptr, second should be a binary copy of the first + Debug.Assert(_needToReset, "data type requires resetting and _needToReset is false"); Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); ValidateCheck(offset, 2 * IntPtr.Size); @@ -276,7 +276,7 @@ internal void SetBstrValue(int offset, string value) // translate to native internal void SetByRefValue(int offset, IntPtr pinnedValue) { - Debug.Assert(_needToReset, "data type requires reseting and _needToReset is false"); + Debug.Assert(_needToReset, "data type requires resetting and _needToReset is false"); Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); ValidateCheck(offset, 2 * IntPtr.Size); @@ -366,7 +366,7 @@ internal void ResetValues() _haveData = false; } #if DEBUG - // verify types that need reseting are not forgotton, since the code + // verify types that need resetting are not forgotton, since the code // that sets this up is in dbbinding.cs, MaxLen { set; } if (!_needToReset) { @@ -482,7 +482,7 @@ private static void FreeBstr(IntPtr buffer, int valueOffset) { Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset"); - // two contigous BSTR ptrs that need to be freed + // two contiguous BSTR ptrs that need to be freed // the second should only be freed if different from the first RuntimeHelpers.PrepareConstrainedRegions(); try @@ -511,7 +511,7 @@ private static void FreeCoTaskMem(IntPtr buffer, int valueOffset) { Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset"); - // two contigous CoTaskMemAlloc ptrs that need to be freed + // two contiguous CoTaskMemAlloc ptrs that need to be freed // the first should only be freed if different from the first RuntimeHelpers.PrepareConstrainedRegions(); try @@ -535,7 +535,7 @@ private static void FreeCoTaskMem(IntPtr buffer, int valueOffset) private static void FreeVariant(IntPtr buffer, int valueOffset) { - // two contigous VARIANT structures that need to be freed + // two contiguous VARIANT structures that need to be freed // the second should only be freed if different from the first Debug.Assert(0 == (ODB.SizeOf_Variant % 8), "unexpected VARIANT size mutiplier"); @@ -567,7 +567,7 @@ private static void FreeVariant(IntPtr buffer, int valueOffset) private static unsafe void FreePropVariant(IntPtr buffer, int valueOffset) { - // two contigous PROPVARIANT structures that need to be freed + // two contiguous PROPVARIANT structures that need to be freed // the second should only be freed if different from the first Debug.Assert(0 == (sizeof(PROPVARIANT) % 8), "unexpected PROPVARIANT size mutiplier"); Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset"); diff --git a/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs b/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs index 2e496fd0fc888..69d16efcdc593 100644 --- a/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs +++ b/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs @@ -301,7 +301,7 @@ internal DataRow FindMetaDataCollectionRow(string collectionName) // have an inexact match - ok only if it is the only one if (exactCollectionName != null) { - // can't fail here becasue we may still find an exact match + // can't fail here because we may still find an exact match haveMultipleInexactMatches = true; } requestedCollectionRow = row; diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs index dc071432b3c78..d3e54c378b181 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs @@ -437,7 +437,7 @@ public IEnumerable Links public Activity(string operationName) { Source = s_defaultSource; - // Allow data by default in the constructor to keep the compatability. + // Allow data by default in the constructor to keep the compatibility. IsAllDataRequested = true; if (string.IsNullOrEmpty(operationName)) diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceActivity.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceActivity.cs index 3a10702ca1400..38aae94196281 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceActivity.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceActivity.cs @@ -71,7 +71,7 @@ public void StopActivity(Activity activity, object? args) /// Note that this callout is rarely used at instrumentation sites (only those sites /// that are on the 'boundry' of the process), and the instrumentation site will implement /// some default policy (it sets the activity in SOME way), and so this method does not - /// need to be overriden if that default policy is fine. Thus this is call should + /// need to be overridden if that default policy is fine. Thus this is call should /// be used rare (but often important) cases. /// /// Note that the type of 'payload' is typed as object here, but for any diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/LegacyPropagator.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/LegacyPropagator.cs index 3e24a95d376f7..389cab9ee1d18 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/LegacyPropagator.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/LegacyPropagator.cs @@ -167,7 +167,7 @@ internal static bool TryExtractBaggage(string baggageString, out IEnumerable>(); - // Insert in reverse order for asp.net compatability. + // Insert in reverse order for asp.net compatibility. baggageList.Insert(0, new KeyValuePair( WebUtility.UrlDecode(baggageString.Substring(keyStart, keyEnd - keyStart)).Trim(s_trimmingSpaceCharacters), WebUtility.UrlDecode(baggageString.Substring(valueStart, currentIndex - valueStart)).Trim(s_trimmingSpaceCharacters))); diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/ActivityTests.cs b/src/libraries/System.Diagnostics.DiagnosticSource/tests/ActivityTests.cs index d8ba5d93a16ba..179f5e2398662 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/tests/ActivityTests.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/ActivityTests.cs @@ -1584,7 +1584,7 @@ public void TestEvent() [Fact] public void TestIsAllDataRequested() { - // Activity constructor allways set IsAllDataRequested to true for compatability. + // Activity constructor always set IsAllDataRequested to true for compatibility. Activity a1 = new Activity("a1"); Assert.True(a1.IsAllDataRequested); Assert.True(object.ReferenceEquals(a1, a1.AddTag("k1", "v1"))); @@ -1626,7 +1626,7 @@ public void TestTagObjects() tagObjects = activity.TagObjects.ToArray(); Assert.Equal(5, tagObjects[4].Value); - activity.AddTag(null, null); // we allow that and we keeping the behavior for the compatability reason + activity.AddTag(null, null); // we allow that and we keeping the behavior for the compatibility reason Assert.Equal(5, activity.Tags.Count()); Assert.Equal(6, activity.TagObjects.Count()); diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounter.cs b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounter.cs index 09a07e065f039..a18ddeea87b99 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounter.cs +++ b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounter.cs @@ -454,7 +454,7 @@ private void Initialize() } /// - /// Intializes required resources + /// Initializes required resources /// private void InitializeImpl() { diff --git a/src/libraries/System.Diagnostics.Process/src/Resources/Strings.resx b/src/libraries/System.Diagnostics.Process/src/Resources/Strings.resx index e946c5268247e..5c60c6396a136 100644 --- a/src/libraries/System.Diagnostics.Process/src/Resources/Strings.resx +++ b/src/libraries/System.Diagnostics.Process/src/Resources/Strings.resx @@ -1,16 +1,16 @@  - @@ -134,7 +134,7 @@ Process was not started by this object, so requested information cannot be determined. - + Process with an Id of {0} is not running. diff --git a/src/libraries/System.Diagnostics.Process/src/System/Collections/Specialized/StringDictionaryWrapper.cs b/src/libraries/System.Diagnostics.Process/src/System/Collections/Specialized/StringDictionaryWrapper.cs index 1e928623a43c5..4df6703c7d66c 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Collections/Specialized/StringDictionaryWrapper.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Collections/Specialized/StringDictionaryWrapper.cs @@ -5,7 +5,7 @@ namespace System.Collections.Specialized { - // This class is an internal class used by System.Diagnostics.Proccess on property EnvironmentVariables which returns an StringDictionary. Since we need + // This class is an internal class used by System.Diagnostics.Process on property EnvironmentVariables which returns an StringDictionary. Since we need // EnvironmentVariables to return a StringDictionary, this is a wrapper to the Environment property in order to get the same comparer behavior on both properties. internal sealed class StringDictionaryWrapper : StringDictionary diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs index 2593cd5e3e568..890841a9fee52 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs @@ -65,7 +65,7 @@ public void Kill() EnsureState(State.HaveId); - // Check if we know the process has exited. This avoids us targetting another + // Check if we know the process has exited. This avoids us targeting another // process that has a recycled PID. This only checks our internal state, the Kill call below // activly checks if the process is still alive. if (GetHasExited(refresh: false)) diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs index 18da1e4213ea5..6eabc01efad42 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs @@ -1036,7 +1036,7 @@ public static Process GetProcessById(int processId, string machineName) { if (!ProcessManager.IsProcessRunning(processId, machineName)) { - throw new ArgumentException(SR.Format(SR.MissingProccess, processId.ToString())); + throw new ArgumentException(SR.Format(SR.MissingProcess, processId.ToString())); } return new Process(machineName, ProcessManager.IsRemoteMachine(machineName), processId, null); diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs index fffa2a0dc4dba..9eaa47d74a2ba 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs @@ -1274,7 +1274,7 @@ public void StartInfo_BadExe(bool useShellExecute) } [Fact] - public void UnintializedArgumentList() + public void UninitializedArgumentList() { ProcessStartInfo psi = new ProcessStartInfo(); Assert.Equal(0, psi.ArgumentList.Count); diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs index 6a6ffef0d7c57..db11065c836c8 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs @@ -1342,13 +1342,13 @@ public void GetProcessesByName_EmptyMachineName_ThrowsArgumentException() [PlatformSpecific(TestPlatforms.Windows)] // Behavior differs on Windows and Unix public void TestProcessOnRemoteMachineWindows() { - Process currentProccess = Process.GetCurrentProcess(); + Process currentProcess = Process.GetCurrentProcess(); - void TestRemoteProccess(Process remoteProcess) + void TestRemoteProcess(Process remoteProcess) { - Assert.Equal(currentProccess.Id, remoteProcess.Id); - Assert.Equal(currentProccess.BasePriority, remoteProcess.BasePriority); - Assert.Equal(currentProccess.EnableRaisingEvents, remoteProcess.EnableRaisingEvents); + Assert.Equal(currentProcess.Id, remoteProcess.Id); + Assert.Equal(currentProcess.BasePriority, remoteProcess.BasePriority); + Assert.Equal(currentProcess.EnableRaisingEvents, remoteProcess.EnableRaisingEvents); Assert.Equal("127.0.0.1", remoteProcess.MachineName); // This property throws exception only on remote processes. Assert.Throws(() => remoteProcess.MainModule); @@ -1356,8 +1356,8 @@ void TestRemoteProccess(Process remoteProcess) try { - TestRemoteProccess(Process.GetProcessById(currentProccess.Id, "127.0.0.1")); - TestRemoteProccess(Process.GetProcessesByName(currentProccess.ProcessName, "127.0.0.1").Where(p => p.Id == currentProccess.Id).Single()); + TestRemoteProcess(Process.GetProcessById(currentProcess.Id, "127.0.0.1")); + TestRemoteProcess(Process.GetProcessesByName(currentProcess.ProcessName, "127.0.0.1").Where(p => p.Id == currentProcess.Id).Single()); } catch (InvalidOperationException) { @@ -2437,7 +2437,7 @@ public void Kill_ExitedChildProcess_DoesNotThrow(bool killTree) Process process = CreateProcess(); process.Start(); - Assert.True(process.WaitForExit(Helpers.PassingTestTimeoutMilliseconds), $"Proccess {process.Id} did not finish in {Helpers.PassingTestTimeoutMilliseconds}."); + Assert.True(process.WaitForExit(Helpers.PassingTestTimeoutMilliseconds), $"Process {process.Id} did not finish in {Helpers.PassingTestTimeoutMilliseconds}."); process.Kill(killTree); } diff --git a/src/libraries/System.Diagnostics.StackTrace/tests/StackTraceTests.cs b/src/libraries/System.Diagnostics.StackTrace/tests/StackTraceTests.cs index e4f909176df16..8dc832cd3e42d 100644 --- a/src/libraries/System.Diagnostics.StackTrace/tests/StackTraceTests.cs +++ b/src/libraries/System.Diagnostics.StackTrace/tests/StackTraceTests.cs @@ -77,7 +77,7 @@ public void Ctor_SkipFrames(int skipFrames) } [Fact] - public void Ctor_LargeSkipFrames_GetFramesReturnsEmtpy() + public void Ctor_LargeSkipFrames_GetFramesReturnsEmpty() { var stackTrace = new StackTrace(int.MaxValue); Assert.Equal(0, stackTrace.FrameCount); diff --git a/src/libraries/System.Diagnostics.TraceSource/tests/TraceSourceClassTests.cs b/src/libraries/System.Diagnostics.TraceSource/tests/TraceSourceClassTests.cs index ac9f2f958bb22..12ca844c78ffb 100644 --- a/src/libraries/System.Diagnostics.TraceSource/tests/TraceSourceClassTests.cs +++ b/src/libraries/System.Diagnostics.TraceSource/tests/TraceSourceClassTests.cs @@ -11,7 +11,7 @@ namespace System.Diagnostics.TraceSourceTests public sealed class TraceSourceClassTests { [Fact] - public void ConstrutorExceptionTest() + public void ConstructorExceptionTest() { Assert.Throws(() => new TraceSource(null)); AssertExtensions.Throws("name", null, () => new TraceSource("")); diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs index 59f2177dc797f..d7a62a6934f07 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs @@ -1457,7 +1457,7 @@ internal override ResultSet GetGroupsMemberOf(Principal foreignPrincipal, StoreC if (sr == null) { - // no match so we better do a root level search in case we are targetting a domain where + // no match so we better do a root level search in case we are targeting a domain where // the user is not an FSP. GlobalDebug.WriteLineIf(GlobalDebug.Info, "ADStoreCtx", "GetGroupsMemberOf(ctx): No match"); diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SidList.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SidList.cs index 2aa13c19389e0..f9c1e0ab2258e 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SidList.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SidList.cs @@ -18,7 +18,7 @@ internal SidList(List sidListByteFormat) : this(sidListByteFormat, null, internal SidList(List sidListByteFormat, string target, NetCred credentials) { GlobalDebug.WriteLineIf(GlobalDebug.Info, "SidList", "SidList: processing {0} ByteFormat SIDs", sidListByteFormat.Count); - GlobalDebug.WriteLineIf(GlobalDebug.Info, "SidList", "SidList: Targetting {0} ", target ?? "local store"); + GlobalDebug.WriteLineIf(GlobalDebug.Info, "SidList", "SidList: Targeting {0} ", target ?? "local store"); // Build the list of SIDs to resolve IntPtr hUser = IntPtr.Zero; diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AuthZSet.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AuthZSet.cs index 442d3ef975682..29138853725c0 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AuthZSet.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AuthZSet.cs @@ -349,7 +349,7 @@ internal override object CurrentAsPrincipal { // It's a local group, because either (1) it's a local machine user, and local users can't be a member of a domain group, // or (2) it's a domain user that's a member of a group on the local machine. Pass the default machine context options - // If we initially targetted AD then those options will not be valid for the machine store. + // If we initially targeted AD then those options will not be valid for the machine store. PrincipalContext ctx = SDSCache.LocalMachine.GetContext( sidIssuerName, diff --git a/src/libraries/System.DirectoryServices.Protocols/tests/LdapConnectionTests.cs b/src/libraries/System.DirectoryServices.Protocols/tests/LdapConnectionTests.cs index 2de6a96dd5b4b..a9b0788990ec4 100644 --- a/src/libraries/System.DirectoryServices.Protocols/tests/LdapConnectionTests.cs +++ b/src/libraries/System.DirectoryServices.Protocols/tests/LdapConnectionTests.cs @@ -118,7 +118,7 @@ public void AuthType_Anonymous_DoesNotThrowNull() var connection = new LdapConnection("server"); connection.AuthType = AuthType.Anonymous; // When calling Bind we make sure that the exception thrown is not that there was a NullReferenceException - // trying to retrieve a null password's lenght, but instead an LdapException given the server cannot be reached. + // trying to retrieve a null password's length, but instead an LdapException given the server cannot be reached. Assert.Throws(() => connection.Bind()); } diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaClass.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaClass.cs index c35429530d0a6..55b972bbf8370 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaClass.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaClass.cs @@ -625,7 +625,7 @@ public ActiveDirectorySchemaClassCollection PossibleSuperiors } else { - // there are no superiors, return an emtpy collection + // there are no superiors, return an empty collection _possibleSuperiors = new ActiveDirectorySchemaClassCollection(_context, this, true /* is Bound */, PropertyManager.PossibleSuperiors, new ArrayList()); } } @@ -724,7 +724,7 @@ public ActiveDirectorySchemaPropertyCollection MandatoryProperties } else { - // there are no mandatory properties, return an emtpy collection + // there are no mandatory properties, return an empty collection _mandatoryProperties = new ActiveDirectorySchemaPropertyCollection(_context, this, true /* isBound */, PropertyManager.MustContain, new ArrayList()); } } @@ -800,7 +800,7 @@ public ActiveDirectorySchemaPropertyCollection OptionalProperties } else { - // there are no optional properties, return an emtpy collection + // there are no optional properties, return an empty collection _optionalProperties = new ActiveDirectorySchemaPropertyCollection(_context, this, true /* isBound */, PropertyManager.MayContain, new ArrayList()); } } @@ -885,7 +885,7 @@ public ActiveDirectorySchemaClassCollection AuxiliaryClasses } else { - // there are no auxiliary classes, return an emtpy collection + // there are no auxiliary classes, return an empty collection _auxiliaryClasses = new ActiveDirectorySchemaClassCollection(_context, this, true /* is Bound */, PropertyManager.AuxiliaryClass, new ArrayList()); } } diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaClassCollection.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaClassCollection.cs index 3533048122599..6c0ad17ba9951 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaClassCollection.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaClassCollection.cs @@ -259,7 +259,7 @@ protected override void OnClearComplete() } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnInsertComplete(int index, object value) #pragma warning restore CS8765 { @@ -278,7 +278,7 @@ protected override void OnInsertComplete(int index, object value) } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnRemoveComplete(int index, object value) #pragma warning restore CS8765 { @@ -310,7 +310,7 @@ protected override void OnRemoveComplete(int index, object value) } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnSetComplete(int index, object oldValue, object newValue) #pragma warning restore CS8765 { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaPropertyCollection.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaPropertyCollection.cs index c947713118f31..3e55f3d893ad4 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaPropertyCollection.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaPropertyCollection.cs @@ -272,7 +272,7 @@ protected override void OnClearComplete() } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnInsertComplete(int index, object value) #pragma warning restore CS8765 { @@ -291,7 +291,7 @@ protected override void OnInsertComplete(int index, object value) } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnRemoveComplete(int index, object value) #pragma warning restore CS8765 { @@ -323,7 +323,7 @@ protected override void OnRemoveComplete(int index, object value) } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnSetComplete(int index, object oldValue, object newValue) #pragma warning restore CS8765 { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteCollection.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteCollection.cs index 86e89777a193d..a51b3c88d8fc1 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteCollection.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteCollection.cs @@ -174,7 +174,7 @@ protected override void OnClearComplete() } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnInsertComplete(int index, object value) #pragma warning restore CS8765 { @@ -193,7 +193,7 @@ protected override void OnInsertComplete(int index, object value) } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnRemoveComplete(int index, object value) #pragma warning restore CS8765 { @@ -209,7 +209,7 @@ protected override void OnRemoveComplete(int index, object value) } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnSetComplete(int index, object oldValue, object newValue) #pragma warning restore CS8765 { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLinkCollection.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLinkCollection.cs index c19cb532cc5e1..161e89f47fc0a 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLinkCollection.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLinkCollection.cs @@ -175,7 +175,7 @@ protected override void OnClearComplete() } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnInsertComplete(int index, object value) #pragma warning restore CS8765 { @@ -194,7 +194,7 @@ protected override void OnInsertComplete(int index, object value) } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnRemoveComplete(int index, object value) #pragma warning restore CS8765 { @@ -210,7 +210,7 @@ protected override void OnRemoveComplete(int index, object value) } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnSetComplete(int index, object oldValue, object newValue) #pragma warning restore CS8765 { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySubnetCollection.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySubnetCollection.cs index de4b4a5970040..8a23dcf7d5002 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySubnetCollection.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySubnetCollection.cs @@ -200,7 +200,7 @@ protected override void OnClearComplete() } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnInsertComplete(int index, object value) #pragma warning restore CS8765 { @@ -229,7 +229,7 @@ protected override void OnInsertComplete(int index, object value) } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnRemoveComplete(int index, object value) #pragma warning restore CS8765 { @@ -255,7 +255,7 @@ protected override void OnRemoveComplete(int index, object value) } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnSetComplete(int index, object oldValue, object newValue) #pragma warning restore CS8765 { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServerCollection.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServerCollection.cs index be9e28a4b186c..ffad06836dcac 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServerCollection.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServerCollection.cs @@ -269,7 +269,7 @@ protected override void OnClearComplete() } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnInsertComplete(int index, object value) #pragma warning restore CS8765 { @@ -316,7 +316,7 @@ protected override void OnInsertComplete(int index, object value) } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnRemoveComplete(int index, object value) #pragma warning restore CS8765 { @@ -362,7 +362,7 @@ protected override void OnRemoveComplete(int index, object value) } } -#pragma warning disable CS8765 // Nullability doesn't match overriden member +#pragma warning disable CS8765 // Nullability doesn't match overridden member protected override void OnSetComplete(int index, object oldValue, object newValue) #pragma warning restore CS8765 { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/NativeMethods.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/NativeMethods.cs index 6d7a83a3d3b9e..db8ecd0de5149 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/NativeMethods.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/NativeMethods.cs @@ -347,7 +347,7 @@ internal static partial int DsGetDcOpen( internal static partial int DsGetDcNext( IntPtr getDcContextHandle, ref IntPtr sockAddressCount, - out IntPtr sockAdresses, + out IntPtr sockAddresses, out IntPtr dnsHostName); /*void WINAPI DsGetDcClose( diff --git a/src/libraries/System.Drawing.Common/src/System/Drawing/Drawing2D/LinearGradientBrush.cs b/src/libraries/System.Drawing.Common/src/System/Drawing/Drawing2D/LinearGradientBrush.cs index bf9aa25a3d7ec..68b674586aa81 100644 --- a/src/libraries/System.Drawing.Common/src/System/Drawing/Drawing2D/LinearGradientBrush.cs +++ b/src/libraries/System.Drawing.Common/src/System/Drawing/Drawing2D/LinearGradientBrush.cs @@ -481,7 +481,7 @@ public void MultiplyTransform(Matrix matrix, MatrixOrder order) ArgumentNullException.ThrowIfNull(matrix); // Multiplying the transform by a disposed matrix is a nop in GDI+, but throws - // with the libgdiplus backend. Simulate a nop for compatability with GDI+. + // with the libgdiplus backend. Simulate a nop for compatibility with GDI+. if (matrix.NativeMatrix == IntPtr.Zero) return; diff --git a/src/libraries/System.Drawing.Common/src/System/Drawing/Drawing2D/PathGradientBrush.cs b/src/libraries/System.Drawing.Common/src/System/Drawing/Drawing2D/PathGradientBrush.cs index 9eed53798f8b0..8b548b1ae431c 100644 --- a/src/libraries/System.Drawing.Common/src/System/Drawing/Drawing2D/PathGradientBrush.cs +++ b/src/libraries/System.Drawing.Common/src/System/Drawing/Drawing2D/PathGradientBrush.cs @@ -342,7 +342,7 @@ public void MultiplyTransform(Matrix matrix, MatrixOrder order) ArgumentNullException.ThrowIfNull(matrix); // Multiplying the transform by a disposed matrix is a nop in GDI+, but throws - // with the libgdiplus backend. Simulate a nop for compatability with GDI+. + // with the libgdiplus backend. Simulate a nop for compatibility with GDI+. if (matrix.NativeMatrix == IntPtr.Zero) return; diff --git a/src/libraries/System.Drawing.Common/src/System/Drawing/Graphics.cs b/src/libraries/System.Drawing.Common/src/System/Drawing/Graphics.cs index 0c80860cbf4bf..b6f3fef8b1f5d 100644 --- a/src/libraries/System.Drawing.Common/src/System/Drawing/Graphics.cs +++ b/src/libraries/System.Drawing.Common/src/System/Drawing/Graphics.cs @@ -428,7 +428,7 @@ public float PageScale } set { - // Libgdiplus doesn't perform argument validation, so do this here for compatability. + // Libgdiplus doesn't perform argument validation, so do this here for compatibility. if (value <= 0 || value > 1000000032) throw new ArgumentException(SR.GdiplusInvalidParameter); @@ -839,7 +839,7 @@ public void MultiplyTransform(Matrix matrix, MatrixOrder order) ArgumentNullException.ThrowIfNull(matrix); // Multiplying the transform by a disposed matrix is a nop in GDI+, but throws - // with the libgdiplus backend. Simulate a nop for compatability with GDI+. + // with the libgdiplus backend. Simulate a nop for compatibility with GDI+. if (matrix.NativeMatrix == IntPtr.Zero) return; diff --git a/src/libraries/System.Drawing.Common/src/System/Drawing/TextureBrush.cs b/src/libraries/System.Drawing.Common/src/System/Drawing/TextureBrush.cs index 14ac17ed03d0a..4f7755ee4250d 100644 --- a/src/libraries/System.Drawing.Common/src/System/Drawing/TextureBrush.cs +++ b/src/libraries/System.Drawing.Common/src/System/Drawing/TextureBrush.cs @@ -208,7 +208,7 @@ public void MultiplyTransform(Matrix matrix, MatrixOrder order) ArgumentNullException.ThrowIfNull(matrix); // Multiplying the transform by a disposed matrix is a nop in GDI+, but throws - // with the libgdiplus backend. Simulate a nop for compatability with GDI+. + // with the libgdiplus backend. Simulate a nop for compatibility with GDI+. if (matrix.NativeMatrix == IntPtr.Zero) { return; diff --git a/src/libraries/System.Drawing.Common/src/misc/GDI/DeviceContext.cs b/src/libraries/System.Drawing.Common/src/misc/GDI/DeviceContext.cs index 35290aa747bc9..707e0ac85123a 100644 --- a/src/libraries/System.Drawing.Common/src/misc/GDI/DeviceContext.cs +++ b/src/libraries/System.Drawing.Common/src/misc/GDI/DeviceContext.cs @@ -180,7 +180,7 @@ internal void Dispose(bool disposing) default: return; // do nothing, the hdc is not owned by this object. - // in this case it is ok if disposed throught finalization. + // in this case it is ok if disposed through finalization. } DbgUtil.AssertFinalization(this, disposing); diff --git a/src/libraries/System.Drawing.Common/tests/Drawing2D/GraphicsPathIteratorTests.cs b/src/libraries/System.Drawing.Common/tests/Drawing2D/GraphicsPathIteratorTests.cs index b4cce1cb635a5..91326943d9289 100644 --- a/src/libraries/System.Drawing.Common/tests/Drawing2D/GraphicsPathIteratorTests.cs +++ b/src/libraries/System.Drawing.Common/tests/Drawing2D/GraphicsPathIteratorTests.cs @@ -64,7 +64,7 @@ public void Ctor_NullPath_Success() } [ConditionalFact(Helpers.IsDrawingSupported)] - public void NextSubpath_PathFigureNotClosed_ReturnsExpeced() + public void NextSubpath_PathFigureNotClosed_ReturnsExpected() { using (GraphicsPath gp = new GraphicsPath()) using (GraphicsPathIterator gpi = new GraphicsPathIterator(gp)) @@ -76,7 +76,7 @@ public void NextSubpath_PathFigureNotClosed_ReturnsExpeced() } [ConditionalFact(Helpers.IsDrawingSupported)] - public void NextSubpath_PathFigureClosed_ReturnsExpeced() + public void NextSubpath_PathFigureClosed_ReturnsExpected() { using (GraphicsPath gp = new GraphicsPath(_twoPoints, new byte[] { 0, 129 })) using (GraphicsPathIterator gpi = new GraphicsPathIterator(gp)) @@ -111,7 +111,7 @@ public void NextSubpath_FigureNotClosed_ReturnsExpected() } [ConditionalFact(Helpers.IsDrawingSupported)] - public void NextSubpath_FigureClosed_ReturnsExpeced() + public void NextSubpath_FigureClosed_ReturnsExpected() { using (GraphicsPath gp = new GraphicsPath(_twoPoints, new byte[] { 0, 129 })) using (GraphicsPathIterator gpi = new GraphicsPathIterator(gp)) @@ -294,14 +294,14 @@ public void Enumerate_ReturnsExpected() } } - public static IEnumerable PointsTypesLenghtMismatch_TestData() + public static IEnumerable PointsTypesLengthMismatch_TestData() { yield return new object[] { new PointF[1], new byte[2] }; yield return new object[] { new PointF[2], new byte[1] }; } [ConditionalTheory(Helpers.IsDrawingSupported)] - [MemberData(nameof(PointsTypesLenghtMismatch_TestData))] + [MemberData(nameof(PointsTypesLengthMismatch_TestData))] public void Enumerate_PointsTypesMismatch_ThrowsArgumentException(PointF[] points, byte[] types) { using (GraphicsPath gp = new GraphicsPath()) @@ -330,7 +330,7 @@ public void Enumerate_NullPointsTypes_ThrowsNullReferenceException(PointF[] poin } [ConditionalTheory(Helpers.IsDrawingSupported)] - [MemberData(nameof(PointsTypesLenghtMismatch_TestData))] + [MemberData(nameof(PointsTypesLengthMismatch_TestData))] public void CopyData_PointsTypesMismatch_ThrowsArgumentException(PointF[] points, byte[] types) { using (GraphicsPath gp = new GraphicsPath()) @@ -375,7 +375,7 @@ public static IEnumerable CopyData_StartEndIndexesOutOfRange_TestData( [ConditionalTheory(Helpers.IsDrawingSupported)] [MemberData(nameof(CopyData_StartEndIndexesOutOfRange_TestData))] - public void CopyData_StartEndIndexesOutOfRange_ReturnsExpeced(PointF[] points, byte[] types, int startIndex, int endIndex) + public void CopyData_StartEndIndexesOutOfRange_ReturnsExpected(PointF[] points, byte[] types, int startIndex, int endIndex) { PointF[] resultPoints = new PointF[points.Length]; byte[] resultTypes = new byte[points.Length]; @@ -388,7 +388,7 @@ public void CopyData_StartEndIndexesOutOfRange_ReturnsExpeced(PointF[] points, b } [ConditionalFact(Helpers.IsDrawingSupported)] - public void CopyData_EqualStartEndIndexes_ReturnsExpeced() + public void CopyData_EqualStartEndIndexes_ReturnsExpected() { PointF[] points = new PointF[] { new PointF(1f, 1f), new PointF(2f, 2f), new PointF(3f, 3f), new PointF(4f, 4f) }; byte[] types = new byte[] { 0, 3, 3, 3 }; diff --git a/src/libraries/System.Drawing.Common/tests/Drawing2D/GraphicsPathTests.cs b/src/libraries/System.Drawing.Common/tests/Drawing2D/GraphicsPathTests.cs index 8003d9d703584..26ce6f70dc064 100644 --- a/src/libraries/System.Drawing.Common/tests/Drawing2D/GraphicsPathTests.cs +++ b/src/libraries/System.Drawing.Common/tests/Drawing2D/GraphicsPathTests.cs @@ -41,7 +41,7 @@ public void Ctor_Default_Success() using (GraphicsPath gp = new GraphicsPath()) { Assert.Equal(FillMode.Alternate, gp.FillMode); - AssertEmptyGrahicsPath(gp); + AssertEmptyGraphicsPath(gp); } } @@ -52,9 +52,9 @@ public void Ctor_FillMode_Success() using (GraphicsPath gpw = new GraphicsPath(FillMode.Winding)) { Assert.Equal(FillMode.Alternate, gpa.FillMode); - AssertEmptyGrahicsPath(gpa); + AssertEmptyGraphicsPath(gpa); Assert.Equal(FillMode.Winding, gpw.FillMode); - AssertEmptyGrahicsPath(gpw); + AssertEmptyGraphicsPath(gpw); } } @@ -116,7 +116,7 @@ public void Clone_Success() using (GraphicsPath clone = Assert.IsType(gp.Clone())) { Assert.Equal(FillMode.Alternate, clone.FillMode); - AssertEmptyGrahicsPath(clone); + AssertEmptyGraphicsPath(clone); } } @@ -128,7 +128,7 @@ public void Reset_Success() gp.Reset(); Assert.Equal(FillMode.Alternate, gp.FillMode); - AssertEmptyGrahicsPath(gp); + AssertEmptyGraphicsPath(gp); } } @@ -1189,16 +1189,16 @@ public void AddString_NegativeSize_Success() gpi.AddString("mono", FontFamily.GenericMonospace, 0, -10, new Point(10, 10), StringFormat.GenericDefault); AssertExtensions.GreaterThan(gpi.PointCount, 0); - int gpiLenghtOld = gpi.PathPoints.Length; + int gpiLengthOld = gpi.PathPoints.Length; gpi.AddString("mono", FontFamily.GenericMonospace, 0, -10, new Rectangle(10, 10, 10, 10), StringFormat.GenericDefault); - AssertExtensions.GreaterThan(gpi.PointCount, gpiLenghtOld); + AssertExtensions.GreaterThan(gpi.PointCount, gpiLengthOld); gpf.AddString("mono", FontFamily.GenericMonospace, 0, -10, new PointF(10f, 10f), StringFormat.GenericDefault); AssertExtensions.GreaterThan(gpf.PointCount, 0); - int pgfLenghtOld = gpf.PathPoints.Length; + int pgfLengthOld = gpf.PathPoints.Length; gpf.AddString("mono", FontFamily.GenericMonospace, 0, -10, new RectangleF(10f, 10f, 10f, 10f), StringFormat.GenericDefault); - AssertExtensions.GreaterThan(gpf.PointCount, pgfLenghtOld); + AssertExtensions.GreaterThan(gpf.PointCount, pgfLengthOld); } } @@ -1284,7 +1284,7 @@ public void Transform_PathEmpty_Success() { gp.Transform(matrix); Assert.Equal(new float[] { 1f, 1f, 2f, 2f, 3f, 3f }, matrix.Elements); - AssertEmptyGrahicsPath(gp); + AssertEmptyGraphicsPath(gp); } } @@ -2397,7 +2397,7 @@ public void Ctor_PointsTypes_Succes() } } - private void AssertEmptyGrahicsPath(GraphicsPath gp) + private void AssertEmptyGraphicsPath(GraphicsPath gp) { Assert.Equal(0, gp.PathData.Points.Length); Assert.Equal(0, gp.PathData.Types.Length); diff --git a/src/libraries/System.Drawing.Common/tests/Imaging/ImageAttributesTests.cs b/src/libraries/System.Drawing.Common/tests/Imaging/ImageAttributesTests.cs index 270216af7c304..5898c637befae 100644 --- a/src/libraries/System.Drawing.Common/tests/Imaging/ImageAttributesTests.cs +++ b/src/libraries/System.Drawing.Common/tests/Imaging/ImageAttributesTests.cs @@ -391,7 +391,7 @@ public static IEnumerable SetColorMatrices_Flags_TestData() [ConditionalTheory(Helpers.IsDrawingSupported)] [MemberData(nameof(SetColorMatrices_Flags_TestData))] - public void SetColorMatrices_ColorMatrixGrayMatrixFlags_Success(ColorMatrixFlag flag, Color grayShade, Color expecedGrayShade) + public void SetColorMatrices_ColorMatrixGrayMatrixFlags_Success(ColorMatrixFlag flag, Color grayShade, Color expectedGrayShade) { using (var brush = new SolidBrush(_actualGreen)) using (var bitmap = new Bitmap(_rectangle.Width, _rectangle.Height)) @@ -403,7 +403,7 @@ public void SetColorMatrices_ColorMatrixGrayMatrixFlags_Success(ColorMatrixFlag bitmap.SetPixel(1, 1, grayShade); graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); Assert.Equal(_expectedRed, bitmap.GetPixel(0, 0)); - Assert.Equal(expecedGrayShade, bitmap.GetPixel(1, 1)); + Assert.Equal(expectedGrayShade, bitmap.GetPixel(1, 1)); } } @@ -420,7 +420,7 @@ public static IEnumerable SetColorMatrices_FlagsTypes_TestData() [ConditionalTheory(Helpers.IsDrawingSupported)] [MemberData(nameof(SetColorMatrices_FlagsTypes_TestData))] public void SetColorMatrices_ColorMatrixGrayMatrixFlagsTypes_Success - (ColorMatrixFlag flag, ColorAdjustType type, Color grayShade, Color expecedGrayShade) + (ColorMatrixFlag flag, ColorAdjustType type, Color grayShade, Color expectedGrayShade) { using (var brush = new SolidBrush(_actualGreen)) using (var bitmap = new Bitmap(_rectangle.Width, _rectangle.Height)) @@ -432,7 +432,7 @@ public void SetColorMatrices_ColorMatrixGrayMatrixFlagsTypes_Success bitmap.SetPixel(1, 1, grayShade); graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); Assert.Equal(_expectedRed, bitmap.GetPixel(0, 0)); - Assert.Equal(expecedGrayShade, bitmap.GetPixel(1, 1)); + Assert.Equal(expectedGrayShade, bitmap.GetPixel(1, 1)); } } diff --git a/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Async.Tests.cs b/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Async.Tests.cs index fbe065bd80263..14087fb030d02 100644 --- a/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Async.Tests.cs +++ b/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Async.Tests.cs @@ -119,7 +119,7 @@ public Task Read_Archive_LongFileName_Over100_Under255_Async(TarEntryFormat form Read_Archive_LongFileName_Over100_Under255_Async_Internal(format, testFormat); [Theory] - // Neither V7 not Ustar can handle path lenghts waaaay beyond name+prefix length + // Neither V7 not Ustar can handle path lengths waaaay beyond name+prefix length [InlineData(TarEntryFormat.Pax, TestTarFormat.pax)] [InlineData(TarEntryFormat.Gnu, TestTarFormat.gnu)] [InlineData(TarEntryFormat.Gnu, TestTarFormat.oldgnu)] diff --git a/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Tests.cs b/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Tests.cs index 426ea002311d0..ffc537917fc7a 100644 --- a/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Tests.cs +++ b/src/libraries/System.Formats.Tar/tests/TarReader/TarReader.File.Tests.cs @@ -118,7 +118,7 @@ public void Read_Archive_LongFileName_Over100_Under255(TarEntryFormat format, Te Read_Archive_LongFileName_Over100_Under255_Internal(format, testFormat); [Theory] - // Neither V7 not Ustar can handle path lenghts waaaay beyond name+prefix length + // Neither V7 not Ustar can handle path lengths waaaay beyond name+prefix length [InlineData(TarEntryFormat.Pax, TestTarFormat.pax)] [InlineData(TarEntryFormat.Gnu, TestTarFormat.gnu)] [InlineData(TarEntryFormat.Gnu, TestTarFormat.oldgnu)] diff --git a/src/libraries/System.Globalization/tests/System/Globalization/CharUnicodeInfoTestData.cs b/src/libraries/System.Globalization/tests/System/Globalization/CharUnicodeInfoTestData.cs index e61b46506a8d6..224d3c8df98ff 100644 --- a/src/libraries/System.Globalization/tests/System/Globalization/CharUnicodeInfoTestData.cs +++ b/src/libraries/System.Globalization/tests/System/Globalization/CharUnicodeInfoTestData.cs @@ -125,8 +125,8 @@ private static double ParseNumericValueString(string numericValueString) return -1; } - int fractionDelimeterIndex = numericValueString.IndexOf("/"); - if (fractionDelimeterIndex == -1) + int fractionDelimiterIndex = numericValueString.IndexOf("/"); + if (fractionDelimiterIndex == -1) { // Parsing basic number return double.Parse(numericValueString); @@ -134,10 +134,10 @@ private static double ParseNumericValueString(string numericValueString) // Unicode datasets display fractions not decimals (e.g. 1/4 instead of 0.25), // so we should parse them as such - string numeratorString = numericValueString.Substring(0, fractionDelimeterIndex); + string numeratorString = numericValueString.Substring(0, fractionDelimiterIndex); double numerator = double.Parse(numeratorString); - string denominatorString = numericValueString.Substring(fractionDelimeterIndex + 1); + string denominatorString = numericValueString.Substring(fractionDelimiterIndex + 1); double denominator = double.Parse(denominatorString); return numerator / denominator; diff --git a/src/libraries/System.IO.Compression/tests/ZipArchive/zip_ManualAndCompatibilityTests.cs b/src/libraries/System.IO.Compression/tests/ZipArchive/zip_ManualAndCompatibilityTests.cs index 7fb059cf6d8c5..3d0bdeef04a5a 100644 --- a/src/libraries/System.IO.Compression/tests/ZipArchive/zip_ManualAndCompatibilityTests.cs +++ b/src/libraries/System.IO.Compression/tests/ZipArchive/zip_ManualAndCompatibilityTests.cs @@ -6,7 +6,7 @@ namespace System.IO.Compression.Tests { - public class zip_ManualAndCompatabilityTests : ZipFileTestBase + public class zip_ManualAndCompatibilityTests : ZipFileTestBase { public static bool IsUsingNewPathNormalization => !PathFeatures.IsUsingLegacyPathNormalization(); diff --git a/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CreateDirectoryTests.cs b/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CreateDirectoryTests.cs index f332aebb7d9d2..3924d09e031be 100644 --- a/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CreateDirectoryTests.cs +++ b/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CreateDirectoryTests.cs @@ -57,11 +57,11 @@ public void CreateDirectory_IsolatedStorageException() } [Theory, MemberData(nameof(ValidStores))] - public void CreateDirectory_Existance(PresetScopes scope) + public void CreateDirectory_Existence(PresetScopes scope) { using (var isf = GetPresetScope(scope)) { - string directory = "CreateDirectory_Existance"; + string directory = "CreateDirectory_Existence"; string subdirectory = Path.Combine(directory, "Subdirectory"); isf.CreateDirectory(directory); Assert.True(isf.DirectoryExists(directory), "directory exists"); diff --git a/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DirectoryExistsTests.cs b/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DirectoryExistsTests.cs index ae0d373b5602a..1422f9a5e4296 100644 --- a/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DirectoryExistsTests.cs +++ b/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DirectoryExistsTests.cs @@ -57,26 +57,26 @@ public void DirectoryExists_False() } [Fact] - public void DirectoryExists_Existance() + public void DirectoryExists_Existence() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) { - isf.CreateDirectory("DirectoryExists_Existance"); + isf.CreateDirectory("DirectoryExists_Existence"); - Assert.True(isf.DirectoryExists("DirectoryExists_Existance")); - isf.DeleteDirectory("DirectoryExists_Existance"); - Assert.False(isf.DirectoryExists("DirectoryExists_Existance")); + Assert.True(isf.DirectoryExists("DirectoryExists_Existence")); + isf.DeleteDirectory("DirectoryExists_Existence"); + Assert.False(isf.DirectoryExists("DirectoryExists_Existence")); } } [Theory] [MemberData(nameof(ValidStores))] - public void DirectoryExists_Existance_WithScope(PresetScopes scope) + public void DirectoryExists_Existence_WithScope(PresetScopes scope) { using (var isf = GetPresetScope(scope)) { string root = isf.GetUserRootDirectory(); - string directory = "DirectoryExists_Existance"; + string directory = "DirectoryExists_Existence"; isf.CreateDirectory(directory); Assert.True(Directory.Exists(Path.Combine(root, directory)), "exists per file.io where expected"); diff --git a/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/FileExistsTests.cs b/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/FileExistsTests.cs index 29741bbed455c..23df212b1eb59 100644 --- a/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/FileExistsTests.cs +++ b/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/FileExistsTests.cs @@ -58,12 +58,12 @@ public void FileExists_False() [Theory] [MemberData(nameof(ValidStores))] - public void FileExists_Existance(PresetScopes scope) + public void FileExists_Existence(PresetScopes scope) { using (var isf = GetPresetScope(scope)) { string root = isf.GetUserRootDirectory(); - string file = "FileExists_Existance"; + string file = "FileExists_Existence"; isf.CreateTestFile(file); Assert.True(File.Exists(Path.Combine(root, file)), "exists per file.io where expected"); diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackUriHelper.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackUriHelper.cs index 5841cb6dbafb1..e924b4d416e62 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackUriHelper.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackUriHelper.cs @@ -765,7 +765,7 @@ private ValidatedPartUri(string partUriString, bool isNormalized, bool computeIs _isRelationshipPartUri = isRelationshipPartUri; } - #endregion PrivateConstuctor + #endregion PrivateConstructor //------------------------------------------------------ // diff --git a/src/libraries/System.IO.Ports/tests/SerialPort/DataBits.cs b/src/libraries/System.IO.Ports/tests/SerialPort/DataBits.cs index 6ec74043a5261..0dc8dedc96c05 100644 --- a/src/libraries/System.IO.Ports/tests/SerialPort/DataBits.cs +++ b/src/libraries/System.IO.Ports/tests/SerialPort/DataBits.cs @@ -12,7 +12,7 @@ namespace System.IO.Ports.Tests public class DataBits_Property : PortsTest { //The default number of bytes to read/write to verify the speed of the port - //and that the bytes were transfered successfully + //and that the bytes were transferred successfully private const int DEFAULT_BYTE_SIZE = 512; //If the percentage difference between the expected time to transfer with the specified dataBits diff --git a/src/libraries/System.IO.Ports/tests/SerialPort/DiscardInBuffer.cs b/src/libraries/System.IO.Ports/tests/SerialPort/DiscardInBuffer.cs index 176a7f57e9fde..9a63e59ea53eb 100644 --- a/src/libraries/System.IO.Ports/tests/SerialPort/DiscardInBuffer.cs +++ b/src/libraries/System.IO.Ports/tests/SerialPort/DiscardInBuffer.cs @@ -15,7 +15,7 @@ public class DiscardInBuffer : PortsTest //The string used with Write(str) to fill the input buffer private const string DEFAULT_STRING = "Hello World"; - //The buffer lenght used whe filling the ouput buffer + //The buffer length used whe filling the ouput buffer private const int DEFAULT_BUFFER_LENGTH = 8; #region Test Cases diff --git a/src/libraries/System.IO.Ports/tests/SerialPort/Encoding.cs b/src/libraries/System.IO.Ports/tests/SerialPort/Encoding.cs index 88fd4f2391f7b..3ff2dc00fbb0e 100644 --- a/src/libraries/System.IO.Ports/tests/SerialPort/Encoding.cs +++ b/src/libraries/System.IO.Ports/tests/SerialPort/Encoding.cs @@ -13,7 +13,7 @@ namespace System.IO.Ports.Tests public class Encoding_Property : PortsTest { //The default number of bytes to read/write to verify the speed of the port - //and that the bytes were transfered successfully + //and that the bytes were transferred successfully private const int DEFAULT_CHAR_ARRAY_SIZE = 8; //The maximum time we will wait for all of encoded bytes to be received diff --git a/src/libraries/System.IO.Ports/tests/SerialPort/Handshake.cs b/src/libraries/System.IO.Ports/tests/SerialPort/Handshake.cs index a9c80e3e76ca6..3f1ce02b0c080 100644 --- a/src/libraries/System.IO.Ports/tests/SerialPort/Handshake.cs +++ b/src/libraries/System.IO.Ports/tests/SerialPort/Handshake.cs @@ -12,7 +12,7 @@ namespace System.IO.Ports.Tests public class Handshake_Property : PortsTest { //The default number of bytes to read/write to verify the speed of the port - //and that the bytes were transfered successfully + //and that the bytes were transferred successfully private static readonly int s_DEFAULT_BYTE_SIZE = TCSupport.MinimumBlockingByteCount; //The number of bytes to send when send XOn or XOff, the actual XOn/XOff char will be inserted somewhere diff --git a/src/libraries/System.IO.Ports/tests/SerialPort/Parity.cs b/src/libraries/System.IO.Ports/tests/SerialPort/Parity.cs index ae1514fd2bcf3..c28058f3b2c47 100644 --- a/src/libraries/System.IO.Ports/tests/SerialPort/Parity.cs +++ b/src/libraries/System.IO.Ports/tests/SerialPort/Parity.cs @@ -12,7 +12,7 @@ namespace System.IO.Ports.Tests public class Parity_Property : PortsTest { //The default number of bytes to read/write to verify the speed of the port - //and that the bytes were transfered successfully + //and that the bytes were transferred successfully private const int DEFAULT_BYTE_SIZE = 512; //If the percentage difference between the expected time to transfer with the specified parity diff --git a/src/libraries/System.IO.Ports/tests/SerialPort/Read_byte_int_int.cs b/src/libraries/System.IO.Ports/tests/SerialPort/Read_byte_int_int.cs index 06332b4d13201..82e26b9a3b770 100644 --- a/src/libraries/System.IO.Ports/tests/SerialPort/Read_byte_int_int.cs +++ b/src/libraries/System.IO.Ports/tests/SerialPort/Read_byte_int_int.cs @@ -366,7 +366,7 @@ private void VerifyReadException(byte[] buffer, int offset, int count, Type expe { int bufferLength = null == buffer ? 0 : buffer.Length; - Debug.WriteLine("Verifying read method throws {0} buffer.Lenght={1}, offset={2}, count={3}", expectedException, bufferLength, offset, count); + Debug.WriteLine("Verifying read method throws {0} buffer.Length={1}, offset={2}, count={3}", expectedException, bufferLength, offset, count); com.Open(); Assert.Throws(expectedException, () => com.Read(buffer, offset, count)); @@ -407,7 +407,7 @@ private void VerifyRead(byte[] buffer, int offset, int count, int numberOfBytesT buffer[i] = randByte; } - Debug.WriteLine("Verifying read method buffer.Lenght={0}, offset={1}, count={2} with {3} random chars", + Debug.WriteLine("Verifying read method buffer.Length={0}, offset={1}, count={2} with {3} random chars", buffer.Length, offset, count, bytesToWrite.Length); com1.ReadTimeout = 500; diff --git a/src/libraries/System.IO.Ports/tests/SerialPort/Read_char_int_int.cs b/src/libraries/System.IO.Ports/tests/SerialPort/Read_char_int_int.cs index e4a5e3addbf51..0f269d20e6a98 100644 --- a/src/libraries/System.IO.Ports/tests/SerialPort/Read_char_int_int.cs +++ b/src/libraries/System.IO.Ports/tests/SerialPort/Read_char_int_int.cs @@ -670,7 +670,7 @@ private void VerifyReadException(char[] buffer, int offset, int count, Type expe { int bufferLength = null == buffer ? 0 : buffer.Length; - Debug.WriteLine("Verifying read method throws {0} buffer.Lenght={1}, offset={2}, count={3}", expectedException, bufferLength, offset, count); + Debug.WriteLine("Verifying read method throws {0} buffer.Length={1}, offset={2}, count={3}", expectedException, bufferLength, offset, count); com.Open(); Assert.Throws(expectedException, () => com.Read(buffer, offset, count)); diff --git a/src/libraries/System.IO.Ports/tests/SerialPort/WriteLine.cs b/src/libraries/System.IO.Ports/tests/SerialPort/WriteLine.cs index 9cb5b700d022d..3d235f392e495 100644 --- a/src/libraries/System.IO.Ports/tests/SerialPort/WriteLine.cs +++ b/src/libraries/System.IO.Ports/tests/SerialPort/WriteLine.cs @@ -15,7 +15,7 @@ public class WriteLine : PortsTest //The string size used when verifying NewLine private const int NEWLINE_TESTING_STRING_SIZE = 4; - //The string size used when veryifying encoding + //The string size used when verifying encoding private const int ENCODING_STRING_SIZE = 4; //The string size used for large string testing diff --git a/src/libraries/System.IO.Ports/tests/SerialPort/WriteLine_Generic.cs b/src/libraries/System.IO.Ports/tests/SerialPort/WriteLine_Generic.cs index 9c479080d2cee..aa6f708ed531e 100644 --- a/src/libraries/System.IO.Ports/tests/SerialPort/WriteLine_Generic.cs +++ b/src/libraries/System.IO.Ports/tests/SerialPort/WriteLine_Generic.cs @@ -30,10 +30,10 @@ public class WriteLine_Generic : PortsTest //then the contents of the string itself private const string DEFAULT_STRING = "DEFAULT_STRING"; - //The string size used when veryifying BytesToWrite + //The string size used when verifying BytesToWrite private static readonly int s_STRING_SIZE_BYTES_TO_WRITE = TCSupport.MinimumBlockingByteCount; - //The string size used when veryifying Handshake + //The string size used when verifying Handshake private static readonly int s_STRING_SIZE_HANDSHAKE = TCSupport.MinimumBlockingByteCount; private const int NUM_TRYS = 5; diff --git a/src/libraries/System.IO.Ports/tests/SerialPort/Write_byte_int_int.cs b/src/libraries/System.IO.Ports/tests/SerialPort/Write_byte_int_int.cs index 6357e341c419e..eb7dcd899cdf4 100644 --- a/src/libraries/System.IO.Ports/tests/SerialPort/Write_byte_int_int.cs +++ b/src/libraries/System.IO.Ports/tests/SerialPort/Write_byte_int_int.cs @@ -234,7 +234,7 @@ private void VerifyWriteException(byte[] buffer, int offset, int count, Type exp { int bufferLength = null == buffer ? 0 : buffer.Length; - Debug.WriteLine("Verifying write method throws {0} buffer.Lenght={1}, offset={2}, count={3}", expectedException, bufferLength, offset, count); + Debug.WriteLine("Verifying write method throws {0} buffer.Length={1}, offset={2}, count={3}", expectedException, bufferLength, offset, count); com.Open(); try @@ -277,7 +277,7 @@ private void VerifyWrite(byte[] buffer, int offset, int count, Encoding encoding { Random rndGen = new Random(-55); - Debug.WriteLine("Verifying write method buffer.Lenght={0}, offset={1}, count={2}, endocing={3}", + Debug.WriteLine("Verifying write method buffer.Length={0}, offset={1}, count={2}, endocing={3}", buffer.Length, offset, count, encoding.EncodingName); com1.Encoding = encoding; diff --git a/src/libraries/System.IO.Ports/tests/SerialPort/Write_byte_int_int_Generic.cs b/src/libraries/System.IO.Ports/tests/SerialPort/Write_byte_int_int_Generic.cs index 92f62f7378fe6..9a698e18a5ffb 100644 --- a/src/libraries/System.IO.Ports/tests/SerialPort/Write_byte_int_int_Generic.cs +++ b/src/libraries/System.IO.Ports/tests/SerialPort/Write_byte_int_int_Generic.cs @@ -26,16 +26,16 @@ public class Write_byte_int_int_generic : PortsTest //to the write method and the testcase fails. private const double maxPercentageDifference = .15; - //The byte size used when veryifying exceptions that write will throw + //The byte size used when verifying exceptions that write will throw private const int BYTE_SIZE_EXCEPTION = 4; - //The byte size used when veryifying timeout + //The byte size used when verifying timeout private const int BYTE_SIZE_TIMEOUT = 4; - //The byte size used when veryifying BytesToWrite + //The byte size used when verifying BytesToWrite private const int BYTE_SIZE_BYTES_TO_WRITE = 4; - //The bytes size used when veryifying Handshake + //The bytes size used when verifying Handshake private const int BYTE_SIZE_HANDSHAKE = 8; private const int NUM_TRYS = 5; diff --git a/src/libraries/System.IO.Ports/tests/SerialPort/Write_char_int_int.cs b/src/libraries/System.IO.Ports/tests/SerialPort/Write_char_int_int.cs index be703c498bead..f0903f0df8706 100644 --- a/src/libraries/System.IO.Ports/tests/SerialPort/Write_char_int_int.cs +++ b/src/libraries/System.IO.Ports/tests/SerialPort/Write_char_int_int.cs @@ -234,7 +234,7 @@ private void VerifyWriteException(char[] buffer, int offset, int count, Type exp { int bufferLength = null == buffer ? 0 : buffer.Length; - Debug.WriteLine("Verifying write method throws {0} buffer.Lenght={1}, offset={2}, count={3}", expectedException, bufferLength, offset, count); + Debug.WriteLine("Verifying write method throws {0} buffer.Length={1}, offset={2}, count={3}", expectedException, bufferLength, offset, count); com.Open(); try @@ -275,7 +275,7 @@ private void VerifyWrite(char[] buffer, int offset, int count, Encoding encoding using (SerialPort com1 = TCSupport.InitFirstSerialPort()) using (SerialPort com2 = TCSupport.InitSecondSerialPort(com1)) { - Debug.WriteLine("Verifying write method buffer.Lenght={0}, offset={1}, count={2}, endocing={3}", + Debug.WriteLine("Verifying write method buffer.Length={0}, offset={1}, count={2}, endocing={3}", buffer.Length, offset, count, encoding.EncodingName); com1.Encoding = encoding; diff --git a/src/libraries/System.IO.Ports/tests/SerialPort/Write_char_int_int_Generic.cs b/src/libraries/System.IO.Ports/tests/SerialPort/Write_char_int_int_Generic.cs index e4355011796bd..1a2b14decfb48 100644 --- a/src/libraries/System.IO.Ports/tests/SerialPort/Write_char_int_int_Generic.cs +++ b/src/libraries/System.IO.Ports/tests/SerialPort/Write_char_int_int_Generic.cs @@ -26,16 +26,16 @@ public class Write_char_int_int_generic : PortsTest //to the write method and the testcase fails. private static double s_maxPercentageDifference = .15; - //The char size used when veryifying exceptions that write will throw + //The char size used when verifying exceptions that write will throw private const int CHAR_SIZE_EXCEPTION = 4; - //The char size used when veryifying timeout + //The char size used when verifying timeout private const int CHAR_SIZE_TIMEOUT = 4; - //The char size used when veryifying BytesToWrite + //The char size used when verifying BytesToWrite private const int CHAR_SIZE_BYTES_TO_WRITE = 4; - //The char size used when veryifying Handshake + //The char size used when verifying Handshake private const int CHAR_SIZE_HANDSHAKE = 8; private const int NUM_TRYS = 5; diff --git a/src/libraries/System.IO.Ports/tests/SerialStream/BeginRead.cs b/src/libraries/System.IO.Ports/tests/SerialStream/BeginRead.cs index 6454c8b7ab726..9627125e3512e 100644 --- a/src/libraries/System.IO.Ports/tests/SerialStream/BeginRead.cs +++ b/src/libraries/System.IO.Ports/tests/SerialStream/BeginRead.cs @@ -193,7 +193,7 @@ public void Callback() // callbackHandler.ReadAsyncResult guarantees that the callback has been calledhowever it does not gauarentee that // the code calling the callback has finished it's processing - IAsyncResult callbackReadAsyncResult = callbackHandler.ReadAysncResult; + IAsyncResult callbackReadAsyncResult = callbackHandler.ReadAsyncResult; // No we have to wait for the callbackHandler to complete elapsedTime = 0; @@ -239,7 +239,7 @@ public void Callback_EndReadonCallback() // callbackHandler.ReadAsyncResult guarantees that the callback has been calledhowever it does not gauarentee that // the code calling the callback has finished it's processing - IAsyncResult callbackReadAsyncResult = callbackHandler.ReadAysncResult; + IAsyncResult callbackReadAsyncResult = callbackHandler.ReadAsyncResult; // No we have to wait for the callbackHandler to complete elapsedTime = 0; @@ -285,7 +285,7 @@ public void Callback_State() // callbackHandler.ReadAsyncResult guarantees that the callback has been calledhowever it does not gauarentee that // the code calling the callback has finished it's processing - IAsyncResult callbackReadAsyncResult = callbackHandler.ReadAysncResult; + IAsyncResult callbackReadAsyncResult = callbackHandler.ReadAsyncResult; // No we have to wait for the callbackHandler to complete elapsedTime = 0; @@ -313,7 +313,7 @@ private void VerifyReadException(byte[] buffer, int offset, int count) where { int bufferLength = null == buffer ? 0 : buffer.Length; - Debug.WriteLine("Verifying read method throws {0} buffer.Lenght={1}, offset={2}, count={3}", + Debug.WriteLine("Verifying read method throws {0} buffer.Length={1}, offset={2}, count={3}", typeof(T), bufferLength, offset, count); com.Open(); @@ -347,7 +347,7 @@ private void VerifyRead(byte[] buffer, int offset, int count, int numberOfBytesT // Generate some random bytes in the buffer rndGen.NextBytes(buffer); - Debug.WriteLine("Verifying read method buffer.Lenght={0}, offset={1}, count={2} with {3} random chars", buffer.Length, offset, count, bytesToWrite.Length); + Debug.WriteLine("Verifying read method buffer.Length={0}, offset={1}, count={2} with {3} random chars", buffer.Length, offset, count, bytesToWrite.Length); com1.ReadTimeout = 500; @@ -380,7 +380,7 @@ private void VerifyBytesReadOnCom1FromCom2(SerialPort com1, SerialPort com2, byt callbackHandler.BeginReadAsyncResult = readAsyncResult; int bytesRead = com1.BaseStream.EndRead(readAsyncResult); - IAsyncResult asyncResult = callbackHandler.ReadAysncResult; + IAsyncResult asyncResult = callbackHandler.ReadAsyncResult; Assert.Equal(this, asyncResult.AsyncState); Assert.False(asyncResult.CompletedSynchronously); Assert.True(asyncResult.IsCompleted); @@ -442,7 +442,7 @@ private void VerifyBuffer(byte[] actualBuffer, byte[] expectedBuffer, int offset private class CallbackHandler { - private IAsyncResult _readAysncResult; + private IAsyncResult _readAsyncResult; private IAsyncResult _beginReadAsyncResult; private readonly SerialPort _com; @@ -453,13 +453,13 @@ public CallbackHandler(SerialPort com) _com = com; } - public void Callback(IAsyncResult readAysncResult) + public void Callback(IAsyncResult readAsyncResult) { lock (this) { - _readAysncResult = readAysncResult; + _readAsyncResult = readAsyncResult; - Assert.True(readAysncResult.IsCompleted, "IAsyncResult passed into callback is not completed"); + Assert.True(readAsyncResult.IsCompleted, "IAsyncResult passed into callback is not completed"); while (null == _beginReadAsyncResult) { @@ -479,7 +479,7 @@ public void Callback(IAsyncResult readAysncResult) Fail("Err_6498afead Expected IAsyncResult returned from begin read to not be completed"); } - if (!readAysncResult.IsCompleted) + if (!readAsyncResult.IsCompleted) { Fail("Err_1398ehpo Expected IAsyncResult passed into callback to not be completed"); } @@ -490,18 +490,18 @@ public void Callback(IAsyncResult readAysncResult) } - public IAsyncResult ReadAysncResult + public IAsyncResult ReadAsyncResult { get { lock (this) { - while (null == _readAysncResult) + while (null == _readAsyncResult) { Monitor.Wait(this); } - return _readAysncResult; + return _readAsyncResult; } } } diff --git a/src/libraries/System.IO.Ports/tests/SerialStream/BeginWrite.cs b/src/libraries/System.IO.Ports/tests/SerialStream/BeginWrite.cs index a5766f6fc911a..bbcc0e82d41d8 100644 --- a/src/libraries/System.IO.Ports/tests/SerialStream/BeginWrite.cs +++ b/src/libraries/System.IO.Ports/tests/SerialStream/BeginWrite.cs @@ -243,7 +243,7 @@ public void Callback() IAsyncResult writeAsyncResult = com1.BaseStream.BeginWrite(new byte[DEFAULT_NUM_BYTES_TO_WRITE], 0, DEFAULT_NUM_BYTES_TO_WRITE, callbackHandler.Callback, this); - callbackHandler.BeginWriteAysncResult = writeAsyncResult; + callbackHandler.BeginWriteAsyncResult = writeAsyncResult; Assert.Equal(this, writeAsyncResult.AsyncState); @@ -252,9 +252,9 @@ public void Callback() com2.RtsEnable = true; read(); - // callbackHandler.WriteAysncResult guarantees that the callback has been called however it does not gauarentee that + // callbackHandler.WriteAsyncResult guarantees that the callback has been called however it does not gauarentee that // the code calling the callback has finished it's processing - IAsyncResult callbackWriteAsyncResult = callbackHandler.WriteAysncResult; + IAsyncResult callbackWriteAsyncResult = callbackHandler.WriteAsyncResult; // No we have to wait for the callbackHandler to complete int elapsedTime = 0; @@ -290,15 +290,15 @@ public void Callback_State() }; IAsyncResult writeAsyncResult = com1.BaseStream.BeginWrite(new byte[DEFAULT_NUM_BYTES_TO_WRITE], 0, DEFAULT_NUM_BYTES_TO_WRITE, callbackHandler.Callback, this); - callbackHandler.BeginWriteAysncResult = writeAsyncResult; + callbackHandler.BeginWriteAsyncResult = writeAsyncResult; Assert.Throws(read); com2.RtsEnable = true; read(); - // callbackHandler.WriteAysncResult guarantees that the callback has been called however it does not gauarentee that + // callbackHandler.WriteAsyncResult guarantees that the callback has been called however it does not gauarentee that // the code calling the callback has finished it's processing - IAsyncResult callbackWriteAsyncResult = callbackHandler.WriteAysncResult; + IAsyncResult callbackWriteAsyncResult = callbackHandler.WriteAsyncResult; // No we have to wait for the callbackHandler to complete int elapsedTime = 0; @@ -339,7 +339,7 @@ private void VerifyWriteException(byte[] buffer, int offset, int count, Type exp { int bufferLength = null == buffer ? 0 : buffer.Length; - Debug.WriteLine("Verifying write method throws {0} buffer.Lenght={1}, offset={2}, count={3}", + Debug.WriteLine("Verifying write method throws {0} buffer.Length={1}, offset={2}, count={3}", expectedException, bufferLength, offset, count); com.Open(); @@ -369,7 +369,7 @@ private void VerifyWrite(byte[] buffer, int offset, int count, Encoding encoding { Random rndGen = new Random(-55); - Debug.WriteLine("Verifying write method buffer.Lenght={0}, offset={1}, count={2}, endocing={3}", + Debug.WriteLine("Verifying write method buffer.Length={0}, offset={1}, count={2}, endocing={3}", buffer.Length, offset, count, encoding.EncodingName); com1.Encoding = encoding; @@ -405,9 +405,9 @@ private void VerifyWriteByteArray(byte[] buffer, int offset, int count, SerialPo { IAsyncResult writeAsyncResult = com1.BaseStream.BeginWrite(buffer, offset, count, callbackHandler.Callback, this); com1.BaseStream.EndWrite(writeAsyncResult); - callbackHandler.BeginWriteAysncResult = writeAsyncResult; + callbackHandler.BeginWriteAsyncResult = writeAsyncResult; - IAsyncResult callbackWriteAsyncResult = callbackHandler.WriteAysncResult; + IAsyncResult callbackWriteAsyncResult = callbackHandler.WriteAsyncResult; Assert.Equal(this, callbackWriteAsyncResult.AsyncState); Assert.False(callbackWriteAsyncResult.CompletedSynchronously, "Should not have completed sync (cback)"); Assert.True(callbackWriteAsyncResult.IsCompleted, "Should have completed (cback)"); @@ -470,8 +470,8 @@ private void VerifyWriteByteArray(byte[] buffer, int offset, int count, SerialPo private class CallbackHandler { - private IAsyncResult _writeAysncResult; - private IAsyncResult _beginWriteAysncResult; + private IAsyncResult _writeAsyncResult; + private IAsyncResult _beginWriteAsyncResult; private readonly SerialPort _com; public CallbackHandler() : this(null) { } @@ -481,38 +481,38 @@ private CallbackHandler(SerialPort com) _com = com; } - public void Callback(IAsyncResult writeAysncResult) + public void Callback(IAsyncResult writeAsyncResult) { Debug.WriteLine("About to enter callback lock (already entered {0})", Monitor.IsEntered(this)); lock (this) { Debug.WriteLine("Inside callback lock"); - _writeAysncResult = writeAysncResult; + _writeAsyncResult = writeAsyncResult; - if (!writeAysncResult.IsCompleted) + if (!writeAsyncResult.IsCompleted) { throw new Exception("Err_23984afaea Expected IAsyncResult passed into callback to not be completed"); } - while (null == _beginWriteAysncResult) + while (null == _beginWriteAsyncResult) { Assert.True(Monitor.Wait(this, 5000), "Monitor.Wait in Callback"); } - if (null != _beginWriteAysncResult && !_beginWriteAysncResult.IsCompleted) + if (null != _beginWriteAsyncResult && !_beginWriteAsyncResult.IsCompleted) { throw new Exception("Err_7907azpu Expected IAsyncResult returned from begin write to not be completed"); } if (null != _com) { - _com.BaseStream.EndWrite(_beginWriteAysncResult); - if (!_beginWriteAysncResult.IsCompleted) + _com.BaseStream.EndWrite(_beginWriteAsyncResult); + if (!_beginWriteAsyncResult.IsCompleted) { throw new Exception("Err_6498afead Expected IAsyncResult returned from begin write to not be completed"); } - if (!writeAysncResult.IsCompleted) + if (!writeAsyncResult.IsCompleted) { throw new Exception("Err_1398ehpo Expected IAsyncResult passed into callback to not be completed"); } @@ -523,33 +523,33 @@ public void Callback(IAsyncResult writeAysncResult) } - public IAsyncResult WriteAysncResult + public IAsyncResult WriteAsyncResult { get { lock (this) { - while (null == _writeAysncResult) + while (null == _writeAsyncResult) { Monitor.Wait(this); } - return _writeAysncResult; + return _writeAsyncResult; } } } - public IAsyncResult BeginWriteAysncResult + public IAsyncResult BeginWriteAsyncResult { get { - return _beginWriteAysncResult; + return _beginWriteAsyncResult; } set { lock (this) { - _beginWriteAysncResult = value; + _beginWriteAsyncResult = value; Monitor.Pulse(this); } } diff --git a/src/libraries/System.IO.Ports/tests/SerialStream/BeginWrite_Generic.cs b/src/libraries/System.IO.Ports/tests/SerialStream/BeginWrite_Generic.cs index 0ecd3b3ff979e..b6537247f1aa5 100644 --- a/src/libraries/System.IO.Ports/tests/SerialStream/BeginWrite_Generic.cs +++ b/src/libraries/System.IO.Ports/tests/SerialStream/BeginWrite_Generic.cs @@ -24,16 +24,16 @@ public class SerialStream_BeginWrite_Generic : PortsTest // to the write method and the testcase fails. public static double maxPercentageDifference = .15; - // The byte size used when veryifying exceptions that write will throw + // The byte size used when verifying exceptions that write will throw private const int BYTE_SIZE_EXCEPTION = 4; - // The byte size used when veryifying timeout + // The byte size used when verifying timeout private const int BYTE_SIZE_TIMEOUT = 4; - // The byte size used when veryifying BytesToWrite + // The byte size used when verifying BytesToWrite private const int BYTE_SIZE_BYTES_TO_WRITE = 4; - // The bytes size used when veryifying Handshake + // The bytes size used when verifying Handshake private const int BYTE_SIZE_HANDSHAKE = 8; private const int MAX_WAIT = 250; private const int ITERATION_WAIT = 50; diff --git a/src/libraries/System.IO.Ports/tests/SerialStream/Flush.cs b/src/libraries/System.IO.Ports/tests/SerialStream/Flush.cs index c9bad88d97d5f..53fa33f1fb235 100644 --- a/src/libraries/System.IO.Ports/tests/SerialStream/Flush.cs +++ b/src/libraries/System.IO.Ports/tests/SerialStream/Flush.cs @@ -16,7 +16,7 @@ public class SerialStream_Flush : PortsTest private const int DEFAULT_BUFFER_SIZE = 32; private const int MAX_WAIT_TIME = 500; - // The buffer lenght used whe filling the ouput buffer + // The buffer length used whe filling the ouput buffer private const int DEFAULT_BUFFER_LENGTH = 8; #region Test Cases diff --git a/src/libraries/System.IO.Ports/tests/SerialStream/Read_byte_int_int.cs b/src/libraries/System.IO.Ports/tests/SerialStream/Read_byte_int_int.cs index 5f4b51c3e13f0..83bcf1c08dca7 100644 --- a/src/libraries/System.IO.Ports/tests/SerialStream/Read_byte_int_int.cs +++ b/src/libraries/System.IO.Ports/tests/SerialStream/Read_byte_int_int.cs @@ -180,7 +180,7 @@ private void VerifyReadException(byte[] buffer, int offset, int count, Type expe { int bufferLength = null == buffer ? 0 : buffer.Length; - Debug.WriteLine("Verifying read method throws {0} buffer.Lenght={1}, offset={2}, count={3}", + Debug.WriteLine("Verifying read method throws {0} buffer.Length={1}, offset={2}, count={3}", expectedException, bufferLength, offset, count); com.Open(); @@ -218,7 +218,7 @@ private void VerifyRead(byte[] buffer, int offset, int count, int numberOfBytesT } Debug.WriteLine( - "Verifying read method buffer.Lenght={0}, offset={1}, count={2} with {3} random chars", + "Verifying read method buffer.Length={0}, offset={1}, count={2} with {3} random chars", buffer.Length, offset, count, bytesToWrite.Length); com1.ReadTimeout = 500; diff --git a/src/libraries/System.IO.Ports/tests/SerialStream/Write_byte_int_int.cs b/src/libraries/System.IO.Ports/tests/SerialStream/Write_byte_int_int.cs index 4bb5e4045e761..a2d66764e6f8d 100644 --- a/src/libraries/System.IO.Ports/tests/SerialStream/Write_byte_int_int.cs +++ b/src/libraries/System.IO.Ports/tests/SerialStream/Write_byte_int_int.cs @@ -289,7 +289,7 @@ private void VerifyWriteException(byte[] buffer, int offset, int count, Type exp { int bufferLength = null == buffer ? 0 : buffer.Length; - Debug.WriteLine("Verifying write method throws {0} buffer.Lenght={1}, offset={2}, count={3}", + Debug.WriteLine("Verifying write method throws {0} buffer.Length={1}, offset={2}, count={3}", expectedException, bufferLength, offset, count); com.Open(); @@ -319,7 +319,7 @@ private void VerifyWrite(byte[] buffer, int offset, int count, Encoding encoding { var rndGen = new Random(-55); - Debug.WriteLine("Verifying write method buffer.Lenght={0}, offset={1}, count={2}, endocing={3}", + Debug.WriteLine("Verifying write method buffer.Length={0}, offset={1}, count={2}, endocing={3}", buffer.Length, offset, count, encoding.EncodingName); com1.Encoding = encoding; diff --git a/src/libraries/System.IO.Ports/tests/SerialStream/Write_byte_int_int_Generic.cs b/src/libraries/System.IO.Ports/tests/SerialStream/Write_byte_int_int_Generic.cs index d95d8cf623d4e..10fa104892497 100644 --- a/src/libraries/System.IO.Ports/tests/SerialStream/Write_byte_int_int_Generic.cs +++ b/src/libraries/System.IO.Ports/tests/SerialStream/Write_byte_int_int_Generic.cs @@ -26,16 +26,16 @@ public class SerialStream_Write_byte_int_int_Generic : PortsTest // to the write method and the testcase fails. private const double maxPercentageDifference = .15; - // The byte size used when veryifying exceptions that write will throw + // The byte size used when verifying exceptions that write will throw private const int BYTE_SIZE_EXCEPTION = 4; - // The byte size used when veryifying timeout + // The byte size used when verifying timeout private static readonly int s_BYTE_SIZE_TIMEOUT = TCSupport.MinimumBlockingByteCount; - // The byte size used when veryifying BytesToWrite + // The byte size used when verifying BytesToWrite private static readonly int s_BYTE_SIZE_BYTES_TO_WRITE = TCSupport.MinimumBlockingByteCount; - // The bytes size used when veryifying Handshake + // The bytes size used when verifying Handshake private static readonly int s_BYTE_SIZE_HANDSHAKE = TCSupport.MinimumBlockingByteCount; private const int NUM_TRYS = 5; diff --git a/src/libraries/System.IO/tests/MemoryStream/MemoryStream.ConstructorTests.cs b/src/libraries/System.IO/tests/MemoryStream/MemoryStream.ConstructorTests.cs index c2d4485165f48..c987446b102ef 100644 --- a/src/libraries/System.IO/tests/MemoryStream/MemoryStream.ConstructorTests.cs +++ b/src/libraries/System.IO/tests/MemoryStream/MemoryStream.ConstructorTests.cs @@ -10,7 +10,7 @@ public class MemoryStream_ConstructorTests [Theory] [InlineData(10, -1, int.MaxValue)] [InlineData(10, 6, -1)] - public static void MemoryStream_Ctor_NegativeIndeces(int arraySize, int index, int count) + public static void MemoryStream_Ctor_NegativeIndices(int arraySize, int index, int count) { Assert.Throws(() => new MemoryStream(new byte[arraySize], index, count)); } @@ -18,7 +18,7 @@ public static void MemoryStream_Ctor_NegativeIndeces(int arraySize, int index, i [Theory] [InlineData(1, 2, 1)] [InlineData(7, 8, 2)] - public static void MemoryStream_Ctor_OutOfRangeIndeces(int arraySize, int index, int count) + public static void MemoryStream_Ctor_OutOfRangeIndices(int arraySize, int index, int count) { AssertExtensions.Throws(null, () => new MemoryStream(new byte[arraySize], index, count)); } diff --git a/src/libraries/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs b/src/libraries/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs index c5317953fdb7a..166465d1af832 100644 --- a/src/libraries/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs +++ b/src/libraries/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs @@ -78,7 +78,7 @@ public void NegativeCount() } [Fact] - public void WriteCustomLenghtStrings() + public void WriteCustomLengthStrings() { char[] chArr = TestDataProvider.CharData; diff --git a/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicObject.cs b/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicObject.cs index f9245185fbbe9..351e63d885406 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicObject.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicObject.cs @@ -809,7 +809,7 @@ private DynamicMetaObject CallMethodNoResult(MethodInfo method, TBinder /// behavior which lets the call site determine how the binder is performed. /// [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2075:UnrecognizedReflectionPattern", - Justification = "This is looking if the method is overriden on an instantiated type. An overriden method will never be trimmed if the virtual method exists.")] + Justification = "This is looking if the method is overridden on an instantiated type. An overridden method will never be trimmed if the virtual method exists.")] private bool IsOverridden(MethodInfo method) { MemberInfo[] methods = Value.GetType().GetMember(method.Name, MemberTypes.Method, BindingFlags.Public | BindingFlags.Instance); diff --git a/src/libraries/System.Linq.Expressions/tests/Array/ArrayArrayIndexTests.cs b/src/libraries/System.Linq.Expressions/tests/Array/ArrayArrayIndexTests.cs index 1bd056bba9af3..4e6fe938515c8 100644 --- a/src/libraries/System.Linq.Expressions/tests/Array/ArrayArrayIndexTests.cs +++ b/src/libraries/System.Linq.Expressions/tests/Array/ArrayArrayIndexTests.cs @@ -1697,298 +1697,298 @@ private static void CheckdoubleArrayArrayIndex(double[][] array, bool useInterpr Assert.True(success); } - private static void CheckEnumArrayArrayIndex(E[][] array, bool useInterpeter) + private static void CheckEnumArrayArrayIndex(E[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckEnumArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckEnumArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckEnumLongArrayArrayIndex(El[][] array, bool useInterpeter) + private static void CheckEnumLongArrayArrayIndex(El[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckEnumLongArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckEnumLongArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckFloatArrayArrayIndex(float[][] array, bool useInterpeter) + private static void CheckFloatArrayArrayIndex(float[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckFloatArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckFloatArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckFuncArrayArrayIndex(Func[][] array, bool useInterpeter) + private static void CheckFuncArrayArrayIndex(Func[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckFuncArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckFuncArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckInterfaceArrayArrayIndex(I[][] array, bool useInterpeter) + private static void CheckInterfaceArrayArrayIndex(I[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckInterfaceArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckInterfaceArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckIEquatableArrayArrayIndex(IEquatable[][] array, bool useInterpeter) + private static void CheckIEquatableArrayArrayIndex(IEquatable[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckIEquatableArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckIEquatableArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckIEquatable2ArrayArrayIndex(IEquatable[][] array, bool useInterpeter) + private static void CheckIEquatable2ArrayArrayIndex(IEquatable[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckIEquatable2ArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckIEquatable2ArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckIntArrayArrayIndex(int[][] array, bool useInterpeter) + private static void CheckIntArrayArrayIndex(int[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckIntArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckIntArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckLongArrayArrayIndex(long[][] array, bool useInterpeter) + private static void CheckLongArrayArrayIndex(long[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckLongArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckLongArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckObjectArrayArrayIndex(object[][] array, bool useInterpeter) + private static void CheckObjectArrayArrayIndex(object[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckObjectArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckObjectArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckStructArrayArrayIndex(S[][] array, bool useInterpeter) + private static void CheckStructArrayArrayIndex(S[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckStructArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckStructArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckSByteArrayArrayIndex(sbyte[][] array, bool useInterpeter) + private static void CheckSByteArrayArrayIndex(sbyte[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckSByteArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckSByteArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckStructWithStringArrayArrayIndex(Sc[][] array, bool useInterpeter) + private static void CheckStructWithStringArrayArrayIndex(Sc[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckStructWithStringArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckStructWithStringArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckStructWithStringAndStructArrayArrayIndex(Scs[][] array, bool useInterpeter) + private static void CheckStructWithStringAndStructArrayArrayIndex(Scs[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckStructWithStringAndStructArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckStructWithStringAndStructArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckShortArrayArrayIndex(short[][] array, bool useInterpeter) + private static void CheckShortArrayArrayIndex(short[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckShortArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckShortArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckStructWithTwoFieldsArrayArrayIndex(Sp[][] array, bool useInterpeter) + private static void CheckStructWithTwoFieldsArrayArrayIndex(Sp[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckStructWithTwoFieldsArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckStructWithTwoFieldsArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckStructWithValueArrayArrayIndex(Ss[][] array, bool useInterpeter) + private static void CheckStructWithValueArrayArrayIndex(Ss[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckStructWithValueArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckStructWithValueArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckStringArrayArrayIndex(string[][] array, bool useInterpeter) + private static void CheckStringArrayArrayIndex(string[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckStringArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckStringArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckUIntArrayArrayIndex(uint[][] array, bool useInterpeter) + private static void CheckUIntArrayArrayIndex(uint[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckUIntArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckUIntArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckULongArrayArrayIndex(ulong[][] array, bool useInterpeter) + private static void CheckULongArrayArrayIndex(ulong[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckULongArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckULongArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckUShortArrayArrayIndex(ushort[][] array, bool useInterpeter) + private static void CheckUShortArrayArrayIndex(ushort[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckUShortArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckUShortArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckGenericWithCustomArrayArrayIndex(T[][] array, bool useInterpeter) + private static void CheckGenericWithCustomArrayArrayIndex(T[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckGenericWithCustomArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckGenericWithCustomArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckGenericArrayArrayIndex(T[][] array, bool useInterpeter) + private static void CheckGenericArrayArrayIndex(T[][] array, bool useInterpreter) { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckGenericWithClassRestrictionArrayArrayIndex(Tc[][] array, bool useInterpeter) where Tc : class + private static void CheckGenericWithClassRestrictionArrayArrayIndex(Tc[][] array, bool useInterpreter) where Tc : class { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckGenericWithClassRestrictionArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckGenericWithClassRestrictionArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckGenericWithClassAndNewRestrictionArrayArrayIndex(Tcn[][] array, bool useInterpeter) where Tcn : class, new() + private static void CheckGenericWithClassAndNewRestrictionArrayArrayIndex(Tcn[][] array, bool useInterpreter) where Tcn : class, new() { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckGenericWithClassAndNewRestrictionArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckGenericWithClassAndNewRestrictionArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckGenericWithSubClassRestrictionArrayArrayIndex(TC[][] array, bool useInterpeter) where TC : C + private static void CheckGenericWithSubClassRestrictionArrayArrayIndex(TC[][] array, bool useInterpreter) where TC : C { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckGenericWithSubClassRestrictionArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckGenericWithSubClassRestrictionArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); } - private static void CheckGenericWithSubClassAndNewRestrictionArrayArrayIndex(TCn[][] array, bool useInterpeter) where TCn : C, new() + private static void CheckGenericWithSubClassAndNewRestrictionArrayArrayIndex(TCn[][] array, bool useInterpreter) where TCn : C, new() { bool success = true; for (int i = 0; i < array.Length; i++) { - success &= CheckGenericWithSubClassAndNewRestrictionArrayArrayIndexExpression(array, i, useInterpeter); + success &= CheckGenericWithSubClassAndNewRestrictionArrayArrayIndexExpression(array, i, useInterpreter); } Assert.True(success); diff --git a/src/libraries/System.Linq.Expressions/tests/Dynamic/DynamicObjectTests.cs b/src/libraries/System.Linq.Expressions/tests/Dynamic/DynamicObjectTests.cs index 63d9334f31e8d..e41d3ae7fb731 100644 --- a/src/libraries/System.Linq.Expressions/tests/Dynamic/DynamicObjectTests.cs +++ b/src/libraries/System.Linq.Expressions/tests/Dynamic/DynamicObjectTests.cs @@ -102,7 +102,7 @@ public override bool TrySetMember(SetMemberBinder binder, object value) private class TestDynamicNameReflectiveNotOverride : TestDynamic { - // Like TestDynamicNameReflective but hides rather than overiding. + // Like TestDynamicNameReflective but hides rather than overriding. // Because DynamicObject reflects upon itself to see if these methods are // overridden, we test this override-detection against finding hiding // methods. @@ -146,13 +146,13 @@ public override bool TrySetMember(SetMemberBinder binder, object value) } } - private class DynamicallyConvertable : DynamicObject + private class DynamicallyConvertible : DynamicObject { public override bool TryConvert(ConvertBinder binder, out object result) { if (binder.ReturnType == typeof(string)) { - result = nameof(DynamicallyConvertable); + result = nameof(DynamicallyConvertible); return true; } @@ -166,20 +166,20 @@ public override bool TryConvert(ConvertBinder binder, out object result) return false; } - public static explicit operator DateTimeOffset(DynamicallyConvertable source) => + public static explicit operator DateTimeOffset(DynamicallyConvertible source) => new DateTimeOffset(1991, 8, 6, 0, 0, 0, new TimeSpan(2, 0, 0)); - public static implicit operator Uri(DynamicallyConvertable source) => + public static implicit operator Uri(DynamicallyConvertible source) => new Uri("http://example.net/"); } - private class DynamicallyConvertableNotOverride : DynamicObject + private class DynamicallyConvertibleNotOverride : DynamicObject { public new bool TryConvert(ConvertBinder binder, out object result) { if (binder.ReturnType == typeof(string)) { - result = nameof(DynamicallyConvertable); + result = nameof(DynamicallyConvertible); return true; } @@ -193,10 +193,10 @@ private class DynamicallyConvertableNotOverride : DynamicObject return false; } - public static explicit operator DateTimeOffset(DynamicallyConvertableNotOverride source) => + public static explicit operator DateTimeOffset(DynamicallyConvertibleNotOverride source) => new DateTimeOffset(1991, 8, 6, 0, 0, 0, new TimeSpan(2, 0, 0)); - public static implicit operator Uri(DynamicallyConvertableNotOverride source) => + public static implicit operator Uri(DynamicallyConvertibleNotOverride source) => new Uri("http://example.net/"); } @@ -559,7 +559,7 @@ public void MetaDynamicKnowsNamesFromDynamic() [Fact] public void ConvertBuiltInImplicit() { - dynamic d = new DynamicallyConvertable(); + dynamic d = new DynamicallyConvertible(); Uri u = d; Assert.Equal(new Uri("http://example.net/"), u); } @@ -567,7 +567,7 @@ public void ConvertBuiltInImplicit() [Fact] public void ConvertBuiltInExplicit() { - dynamic d = new DynamicallyConvertable(); + dynamic d = new DynamicallyConvertible(); DateTimeOffset dto = (DateTimeOffset)d; Assert.Equal(new DateTimeOffset(1991, 8, 6, 0, 0, 0, new TimeSpan(2, 0, 0)), dto); } @@ -575,7 +575,7 @@ public void ConvertBuiltInExplicit() [Fact] public void ConvertFailImplicitWhenMatchingExplicit() { - dynamic d = new DynamicallyConvertable(); + dynamic d = new DynamicallyConvertible(); DateTimeOffset dto = default(DateTimeOffset); Assert.Throws(() => dto = d); } @@ -583,15 +583,15 @@ public void ConvertFailImplicitWhenMatchingExplicit() [Fact] public void ConvertDynamicImplicit() { - dynamic d = new DynamicallyConvertable(); + dynamic d = new DynamicallyConvertible(); string name = d; - Assert.Equal(nameof(DynamicallyConvertable), name); + Assert.Equal(nameof(DynamicallyConvertible), name); } [Fact] public void ConvertDynamicExplicit() { - dynamic d = new DynamicallyConvertable(); + dynamic d = new DynamicallyConvertible(); DateTime dt = (DateTime)d; Assert.Equal(new DateTime(1991, 8, 6), dt); } @@ -599,7 +599,7 @@ public void ConvertDynamicExplicit() [Fact] public void ConvertFailImplicitOfferedDynamicallyExplicit() { - dynamic d = new DynamicallyConvertable(); + dynamic d = new DynamicallyConvertible(); DateTime dt = default(DateTime); Assert.Throws(() => dt = d); } @@ -607,7 +607,7 @@ public void ConvertFailImplicitOfferedDynamicallyExplicit() [Fact] public void ConvertFailNotOfferedConversion() { - dynamic d = new DynamicallyConvertable(); + dynamic d = new DynamicallyConvertible(); Expression ex = null; Assert.Throws(() => ex = d); Assert.Throws(() => ex = (Expression)d); @@ -616,7 +616,7 @@ public void ConvertFailNotOfferedConversion() [Fact] public void ConvertHidingTryConvert() { - dynamic d = new DynamicallyConvertableNotOverride(); + dynamic d = new DynamicallyConvertibleNotOverride(); Uri u = d; Assert.Equal(new Uri("http://example.net/"), u); DateTimeOffset dto = (DateTimeOffset)d; diff --git a/src/libraries/System.Linq.Expressions/tests/ILReader/SigParser.cs b/src/libraries/System.Linq.Expressions/tests/ILReader/SigParser.cs index 20a0f75dfeaf6..dac42d987bd9d 100644 --- a/src/libraries/System.Linq.Expressions/tests/ILReader/SigParser.cs +++ b/src/libraries/System.Linq.Expressions/tests/ILReader/SigParser.cs @@ -157,7 +157,7 @@ protected virtual void NotifyBeginParam() { } protected virtual void NotifyEndParam() { } // sentinel indication the location of the "..." in the method signature - protected virtual void NotifySentinal() { } + protected virtual void NotifySentinel() { } // number of generic parameters in this method signature (if any) protected virtual void NotifyGenericParamCount(sig_count count) { } @@ -356,7 +356,7 @@ bool ParseMethod(sig_elem_type elem_type) if (!ParseRetType()) return false; - bool fEncounteredSentinal = false; + bool fEncounteredSentinel = false; for (sig_count i = 0; i < param_count; i++) { @@ -365,11 +365,11 @@ bool ParseMethod(sig_elem_type elem_type) if (pb[pbCur] == ELEMENT_TYPE_SENTINEL) { - if (fEncounteredSentinal) + if (fEncounteredSentinel) return false; - fEncounteredSentinal = true; - NotifySentinal(); + fEncounteredSentinel = true; + NotifySentinel(); pbCur++; } diff --git a/src/libraries/System.Linq.Parallel/tests/Helpers/Comparers.cs b/src/libraries/System.Linq.Parallel/tests/Helpers/Comparers.cs index 649531329cc53..c79532a70208a 100644 --- a/src/libraries/System.Linq.Parallel/tests/Helpers/Comparers.cs +++ b/src/libraries/System.Linq.Parallel/tests/Helpers/Comparers.cs @@ -127,7 +127,7 @@ public int Compare(int x, int y) } } - internal static class DelgatedComparable + internal static class DelegatedComparable { public static DelegatedComparable Delegate(T value, IComparer comparer) where T : IComparable { diff --git a/src/libraries/System.Linq.Parallel/tests/QueryOperators/MaxTests.cs b/src/libraries/System.Linq.Parallel/tests/QueryOperators/MaxTests.cs index 2e5be76687178..d4e85839c5e59 100644 --- a/src/libraries/System.Linq.Parallel/tests/QueryOperators/MaxTests.cs +++ b/src/libraries/System.Linq.Parallel/tests/QueryOperators/MaxTests.cs @@ -246,8 +246,8 @@ public static void Max_Other(Labeled> labeled, int count, int { _ = count; ParallelQuery query = labeled.Item; - Assert.Equal(max, query.Select(x => DelgatedComparable.Delegate(x, Comparer.Default)).Max().Value); - Assert.Equal(0, query.Select(x => DelgatedComparable.Delegate(x, ReverseComparer.Instance)).Max().Value); + Assert.Equal(max, query.Select(x => DelegatedComparable.Delegate(x, Comparer.Default)).Max().Value); + Assert.Equal(0, query.Select(x => DelegatedComparable.Delegate(x, ReverseComparer.Instance)).Max().Value); } [Theory] @@ -273,8 +273,8 @@ public static void Max_NotComparable(Labeled> labeled, int co public static void Max_Other_SomeNull(Labeled> labeled, int count, int max) { ParallelQuery query = labeled.Item; - Assert.Equal(max, query.Max(x => x >= count / 2 ? DelgatedComparable.Delegate(x, Comparer.Default) : null).Value); - Assert.Equal(count / 2, query.Max(x => x >= count / 2 ? DelgatedComparable.Delegate(x, ReverseComparer.Instance) : null).Value); + Assert.Equal(max, query.Max(x => x >= count / 2 ? DelegatedComparable.Delegate(x, Comparer.Default) : null).Value); + Assert.Equal(count / 2, query.Max(x => x >= count / 2 ? DelegatedComparable.Delegate(x, ReverseComparer.Instance) : null).Value); } [Theory] diff --git a/src/libraries/System.Linq.Parallel/tests/QueryOperators/MinTests.cs b/src/libraries/System.Linq.Parallel/tests/QueryOperators/MinTests.cs index 2be13e797258f..b74f2b098153e 100644 --- a/src/libraries/System.Linq.Parallel/tests/QueryOperators/MinTests.cs +++ b/src/libraries/System.Linq.Parallel/tests/QueryOperators/MinTests.cs @@ -283,8 +283,8 @@ public static void Min_Other(Labeled> labeled, int count, int { _ = min; ParallelQuery query = labeled.Item; - Assert.Equal(0, query.Select(x => DelgatedComparable.Delegate(x, Comparer.Default)).Min().Value); - Assert.Equal(count - 1, query.Select(x => DelgatedComparable.Delegate(x, ReverseComparer.Instance)).Min().Value); + Assert.Equal(0, query.Select(x => DelegatedComparable.Delegate(x, Comparer.Default)).Min().Value); + Assert.Equal(count - 1, query.Select(x => DelegatedComparable.Delegate(x, ReverseComparer.Instance)).Min().Value); } [Theory] @@ -311,8 +311,8 @@ public static void Min_Other_SomeNull(Labeled> labeled, int c { _ = min; ParallelQuery query = labeled.Item; - Assert.Equal(count / 2, query.Min(x => x >= count / 2 ? DelgatedComparable.Delegate(x, Comparer.Default) : null).Value); - Assert.Equal(count - 1, query.Min(x => x >= count / 2 ? DelgatedComparable.Delegate(x, ReverseComparer.Instance) : null).Value); + Assert.Equal(count / 2, query.Min(x => x >= count / 2 ? DelegatedComparable.Delegate(x, Comparer.Default) : null).Value); + Assert.Equal(count - 1, query.Min(x => x >= count / 2 ? DelegatedComparable.Delegate(x, ReverseComparer.Instance) : null).Value); } [Theory] diff --git a/src/libraries/System.Linq/tests/ToDictionaryTests.cs b/src/libraries/System.Linq/tests/ToDictionaryTests.cs index 5060f0ebee48a..c78d732dcf35d 100644 --- a/src/libraries/System.Linq/tests/ToDictionaryTests.cs +++ b/src/libraries/System.Linq/tests/ToDictionaryTests.cs @@ -336,7 +336,7 @@ private static void AssertMatches(IEnumerable keys, IEnumerable valu } [Fact] - public void EmtpySource() + public void EmptySource() { int[] elements = new int[] { }; string[] keys = new string[] { }; diff --git a/src/libraries/System.Management/src/Resources/Strings.resx b/src/libraries/System.Management/src/Resources/Strings.resx index 40f915ba6f640..ea07c0daca673 100644 --- a/src/libraries/System.Management/src/Resources/Strings.resx +++ b/src/libraries/System.Management/src/Resources/Strings.resx @@ -155,7 +155,7 @@ Embedded class to represent WMI system Properties. - + Time interval functions ToTimeSpan and ToDmtfTimeInterval are added to the class to convert DMTF Time Interval to System.TimeSpan and vice-versa. diff --git a/src/libraries/System.Management/src/System/Management/ManagementPath.cs b/src/libraries/System.Management/src/System/Management/ManagementPath.cs index 2710b76d8fd97..bbb4cb9a8bd60 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementPath.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementPath.cs @@ -128,7 +128,7 @@ internal static string GetManagementPath( //Used internally to check whether a string passed in as a namespace is indeed syntactically correct //for a namespace (e.g. either has "\" or "/" in it or is the special case of "root") - //This doesn't check for the existance of that namespace, nor does it guarrantee correctness. + //This doesn't check for the existence of that namespace, nor does it guarrantee correctness. internal static bool IsValidNamespaceSyntax(string nsPath) { if (nsPath.Length != 0) diff --git a/src/libraries/System.Management/src/System/Management/PropertySet.cs b/src/libraries/System.Management/src/System/Management/PropertySet.cs index 390b718cc8b79..dbc3dc6ec8810 100644 --- a/src/libraries/System.Management/src/System/Management/PropertySet.cs +++ b/src/libraries/System.Management/src/System/Management/PropertySet.cs @@ -398,7 +398,7 @@ public virtual void Remove(string propertyName) /// /// /// Adds a new with the specified value. The value cannot - /// be null and must be convertable to a CIM type. + /// be null and must be convertible to a CIM type. /// /// The name of the new property. /// The value of the property (cannot be null). diff --git a/src/libraries/System.Management/src/System/Management/WMIGenerator.cs b/src/libraries/System.Management/src/System/Management/WMIGenerator.cs index e0e7c32673c47..0f2ed9d699fbd 100644 --- a/src/libraries/System.Management/src/System/Management/WMIGenerator.cs +++ b/src/libraries/System.Management/src/System/Management/WMIGenerator.cs @@ -377,7 +377,7 @@ public string ManagementClassName { } else { - //Now create the constuctor which accepts the key values + //Now create the constructor which accepts the key values GenerateConstructorWithKeys(); //Also generate a constructor which accepts a scope and keys @@ -2131,7 +2131,7 @@ private void GenerateDefaultConstructor() cctor.Comments.Add(new CodeCommentStatement(SR.CommentConstructors)); } /// - ///This function create the constuctor which accepts the key values. + ///This function create the constructor which accepts the key values. ///public cons(UInt32 key_Key1, String key_Key2) :this(null,<ClassName>.ConstructPath(<key1,key2>),null) { /// } /// @@ -2189,7 +2189,7 @@ private void GenerateConstructorWithKeys() } /// - ///This function create the constuctor which accepts a scope and key values. + ///This function create the constructor which accepts a scope and key values. ///public cons(ManagementScope scope,UInt32 key_Key1, String key_Key2) :this(scope,<ClassName>.ConstructPath(<key1,key2>),null) { /// } /// @@ -2464,7 +2464,7 @@ private void GenerateConstructorWithScopePathOptions() try { - classobj.Qualifiers["priveleges"].ToString(); + classobj.Qualifiers["privileges"].ToString(); } catch (ManagementException e) { @@ -2649,7 +2649,7 @@ private void GenerateInitializeObject() try { - classobj.Qualifiers["priveleges"].ToString(); + classobj.Qualifiers["privileges"].ToString(); } catch (ManagementException e) { @@ -2725,7 +2725,7 @@ private void GenerateInitializeObject() if (bPrivileges) { //Generate the statement - // Boolean bPriveleges = PrivateLateBoundObject.Scope.Options.EnablePrivileges; + // Boolean bPrivileges = PrivateLateBoundObject.Scope.Options.EnablePrivileges; cpre = new CodePropertyReferenceExpression(new CodePropertyReferenceExpression( new CodePropertyReferenceExpression( new CodeVariableReferenceExpression(PrivateNamesUsed["LateBoundObject"].ToString()), @@ -2779,7 +2779,7 @@ private void GenerateMethods() string strClassObj = "classObj"; bool bStatic = false; bool bPrivileges = false; - CodePropertyReferenceExpression cprePriveleges = null; + CodePropertyReferenceExpression cprePrivileges = null; CimType cimRetType = CimType.SInt8; // Initialized to remove warnings CodeTypeReference retRefType = null; bool isRetArray = false; @@ -2877,8 +2877,8 @@ private void GenerateMethods() if (bPrivileges) { //Generate the statement - // Boolean bPriveleges = PrivateLateBoundObject.Scope.Options.EnablePrivileges; - cprePriveleges = new CodePropertyReferenceExpression(new CodePropertyReferenceExpression( + // Boolean bPrivileges = PrivateLateBoundObject.Scope.Options.EnablePrivileges; + cprePrivileges = new CodePropertyReferenceExpression(new CodePropertyReferenceExpression( new CodePropertyReferenceExpression( new CodeVariableReferenceExpression(bStatic ? strClassObj : PrivateNamesUsed["LateBoundObject"].ToString()), PublicNamesUsed["ScopeProperty"].ToString()), @@ -2886,9 +2886,9 @@ private void GenerateMethods() "EnablePrivileges"); cis.TrueStatements.Add(new CodeVariableDeclarationStatement("System.Boolean", - PrivateNamesUsed["Privileges"].ToString(), cprePriveleges)); + PrivateNamesUsed["Privileges"].ToString(), cprePrivileges)); - cis.TrueStatements.Add(new CodeAssignStatement(cprePriveleges, new CodePrimitiveExpression(true))); + cis.TrueStatements.Add(new CodeAssignStatement(cprePrivileges, new CodePrimitiveExpression(true))); } @@ -3179,7 +3179,7 @@ private void GenerateMethods() // Assign the privileges back if (bPrivileges) { - cis.TrueStatements.Add(new CodeAssignStatement(cprePriveleges, new CodeVariableReferenceExpression(PrivateNamesUsed["Privileges"].ToString()))); + cis.TrueStatements.Add(new CodeAssignStatement(cprePrivileges, new CodeVariableReferenceExpression(PrivateNamesUsed["Privileges"].ToString()))); } //Now check if there is a return value. If there is one then return it from the function @@ -6147,7 +6147,7 @@ private bool GetDateTimeType(PropertyData prop, ref CodeTypeReference codeType) { if (bTimeSpanConversionFunctionsAdded == false) { - cc.Comments.Add(new CodeCommentStatement(SR.CommentTimeSpanConvertionFunction)); + cc.Comments.Add(new CodeCommentStatement(SR.CommentTimeSpanConversionFunction)); bTimeSpanConversionFunctionsAdded = true; // Call this function to generate conversion function GenerateTimeSpanConversionFunction(); diff --git a/src/libraries/System.Memory/tests/Binary/ReverseEndiannessUnitTests.cs b/src/libraries/System.Memory/tests/Binary/ReverseEndiannessUnitTests.cs index 4fd780d673a40..733059b4d44ee 100644 --- a/src/libraries/System.Memory/tests/Binary/ReverseEndiannessUnitTests.cs +++ b/src/libraries/System.Memory/tests/Binary/ReverseEndiannessUnitTests.cs @@ -5,7 +5,7 @@ namespace System.Buffers.Binary.Tests { - public class ReverseEndianessUnitTests + public class ReverseEndiannessUnitTests { [Fact] public void ReverseEndianness_ByteAndSByte_DoesNothing() diff --git a/src/libraries/System.Memory/tests/BuffersExtensions/BuffersExtensionsTests.cs b/src/libraries/System.Memory/tests/BuffersExtensions/BuffersExtensionsTests.cs index d3f180d9230d7..31a724215094b 100644 --- a/src/libraries/System.Memory/tests/BuffersExtensions/BuffersExtensionsTests.cs +++ b/src/libraries/System.Memory/tests/BuffersExtensions/BuffersExtensionsTests.cs @@ -120,15 +120,15 @@ public override string ToString() private class TestBufferWriterMultiSegment : IBufferWriter { private byte[] _current = new byte[0]; - private List _commited = new List(); + private List _committed = new List(); - public List Comitted => _commited; + public List Comitted => _committed; public void Advance(int bytes) { if (bytes == 0) return; - _commited.Add(_current.AsSpan(0, bytes).ToArray()); + _committed.Add(_current.AsSpan(0, bytes).ToArray()); _current = new byte[0]; } @@ -159,7 +159,7 @@ public Span GetSpan(int sizeHint) public override string ToString() { var builder = new StringBuilder(); - foreach (byte[] buffer in _commited) + foreach (byte[] buffer in _committed) { builder.Append(Encoding.UTF8.GetString(buffer)); } diff --git a/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOf.byte.cs b/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOf.byte.cs index 7935cbb36a497..e9046bbba986b 100644 --- a/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOf.byte.cs +++ b/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOf.byte.cs @@ -75,7 +75,7 @@ public static void TestNoMatch_Byte() } [Fact] - public static void TestAllignmentNoMatch_Byte() + public static void TestAlignmentNoMatch_Byte() { byte[] array = new byte[4 * Vector.Count]; for (var i = 0; i < Vector.Count; i++) @@ -91,7 +91,7 @@ public static void TestAllignmentNoMatch_Byte() } [Fact] - public static void TestAllignmentMatch_Byte() + public static void TestAlignmentMatch_Byte() { byte[] array = new byte[4 * Vector.Count]; for (int i = 0; i < array.Length; i++) diff --git a/src/libraries/System.Memory/tests/ReadOnlySpan/LastIndexOf.byte.cs b/src/libraries/System.Memory/tests/ReadOnlySpan/LastIndexOf.byte.cs index 7a34ccd1d79f2..2a5cb5b520dcc 100644 --- a/src/libraries/System.Memory/tests/ReadOnlySpan/LastIndexOf.byte.cs +++ b/src/libraries/System.Memory/tests/ReadOnlySpan/LastIndexOf.byte.cs @@ -75,7 +75,7 @@ public static void TestNoMatchLastIndexOf_Byte() } [Fact] - public static void TestAllignmentNoMatchLastIndexOf_Byte() + public static void TestAlignmentNoMatchLastIndexOf_Byte() { byte[] array = new byte[4 * Vector.Count]; for (var i = 0; i < Vector.Count; i++) @@ -91,7 +91,7 @@ public static void TestAllignmentNoMatchLastIndexOf_Byte() } [Fact] - public static void TestAllignmentMatchLastIndexOf_Byte() + public static void TestAlignmentMatchLastIndexOf_Byte() { byte[] array = new byte[4 * Vector.Count]; for (int i = 0; i < array.Length; i++) diff --git a/src/libraries/System.Memory/tests/Span/IndexOf.byte.cs b/src/libraries/System.Memory/tests/Span/IndexOf.byte.cs index 0212852bb9816..2a90c20fdc2b6 100644 --- a/src/libraries/System.Memory/tests/Span/IndexOf.byte.cs +++ b/src/libraries/System.Memory/tests/Span/IndexOf.byte.cs @@ -75,7 +75,7 @@ public static void TestNoMatch_Byte() } [Fact] - public static void TestAllignmentNoMatch_Byte() + public static void TestAlignmentNoMatch_Byte() { byte[] array = new byte[4 * Vector.Count]; for (var i = 0; i < Vector.Count; i++) @@ -91,7 +91,7 @@ public static void TestAllignmentNoMatch_Byte() } [Fact] - public static void TestAllignmentMatch_Byte() + public static void TestAlignmentMatch_Byte() { byte[] array = new byte[4 * Vector.Count]; for (int i = 0; i < array.Length; i++) diff --git a/src/libraries/System.Memory/tests/Span/LastIndexOf.byte.cs b/src/libraries/System.Memory/tests/Span/LastIndexOf.byte.cs index 904829285e5ea..f6e2f014de702 100644 --- a/src/libraries/System.Memory/tests/Span/LastIndexOf.byte.cs +++ b/src/libraries/System.Memory/tests/Span/LastIndexOf.byte.cs @@ -75,7 +75,7 @@ public static void TestNoMatchLastIndexOf_Byte() } [Fact] - public static void TestAllignmentNoMatchLastIndexOf_Byte() + public static void TestAlignmentNoMatchLastIndexOf_Byte() { byte[] array = new byte[4 * Vector.Count]; for (var i = 0; i < Vector.Count; i++) @@ -91,7 +91,7 @@ public static void TestAllignmentNoMatchLastIndexOf_Byte() } [Fact] - public static void TestAllignmentMatchLastIndexOf_Byte() + public static void TestAlignmentMatchLastIndexOf_Byte() { byte[] array = new byte[4 * Vector.Count]; for (int i = 0; i < array.Length; i++) diff --git a/src/libraries/System.Net.Http.Json/tests/FunctionalTests/JsonContentTests.netcoreapp.cs b/src/libraries/System.Net.Http.Json/tests/FunctionalTests/JsonContentTests.netcoreapp.cs index 698a4187a87c5..df5a45d83aab6 100644 --- a/src/libraries/System.Net.Http.Json/tests/FunctionalTests/JsonContentTests.netcoreapp.cs +++ b/src/libraries/System.Net.Http.Json/tests/FunctionalTests/JsonContentTests.netcoreapp.cs @@ -22,7 +22,7 @@ public void JsonContent_CopyTo_Succeeds() Person person = Person.Create(); using JsonContent content = JsonContent.Create(person); using MemoryStream stream = new MemoryStream(); - // HttpContent.CopyTo internally calls overriden JsonContent.SerializeToStream, which is the targeted method of this test. + // HttpContent.CopyTo internally calls overridden JsonContent.SerializeToStream, which is the targeted method of this test. content.CopyTo(stream, context: null, cancellationToken: default); stream.Seek(0, SeekOrigin.Begin); using StreamReader reader = new StreamReader(stream); diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs index 2d72c26fbac53..00cd0000f5bcb 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs +++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs @@ -1136,7 +1136,7 @@ private void SetRequireStreamEnd(SafeWinHttpHandle sessionHandle) if (WinHttpTrailersHelper.OsSupportsTrailers) { // Setting WINHTTP_OPTION_REQUIRE_STREAM_END to TRUE is needed for WinHttp to read trailing headers - // in case the response has Content-Lenght defined. + // in case the response has Content-Length defined. // According to the WinHttp team, the feature-detection logic in WinHttpTrailersHelper.OsSupportsTrailers // should also indicate the support of WINHTTP_OPTION_REQUIRE_STREAM_END. // WINHTTP_OPTION_REQUIRE_STREAM_END doesn't have effect on HTTP 1.1 requests, therefore it's safe to set it on diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpResponseParser.cs b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpResponseParser.cs index 053091aadbbf8..bf9e007f67f19 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpResponseParser.cs +++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpResponseParser.cs @@ -63,7 +63,7 @@ public static HttpResponseMessage CreateResponseMessage( // Create response stream and wrap it in a StreamContent object. var responseStream = new WinHttpResponseStream(requestHandle, state, response); - state.RequestHandle = null; // ownership successfully transfered to WinHttpResponseStram. + state.RequestHandle = null; // ownership successfully transferred to WinHttpResponseStram. Stream decompressedStream = responseStream; if (manuallyProcessedDecompressionMethods != DecompressionMethods.None) diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/BaseHeaderParser.cs b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/BaseHeaderParser.cs index 0c9d6f72ae2b5..e99b7238aa2dd 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/BaseHeaderParser.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/BaseHeaderParser.cs @@ -24,7 +24,7 @@ protected BaseHeaderParser(bool supportsMultipleValues) protected abstract int GetParsedValueLength(string value, int startIndex, object? storeValue, out object? parsedValue); -#pragma warning disable CS8765 // Doesn't match overriden member nullable attribute on out parameter +#pragma warning disable CS8765 // Doesn't match overridden member nullable attribute on out parameter public sealed override bool TryParseValue(string? value, object? storeValue, ref int index, out object? parsedValue) #pragma warning restore CS8765 diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs index 5754d2f5f6671..6e7264401705d 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs @@ -405,7 +405,7 @@ private int ReadChunksFromConnectionBuffer(Span buffer, CancellationTokenR if (currentLine.IsEmpty) { // Dispose of the registration and then check whether cancellation has been - // requested. This is necessary to make determinstic a race condition between + // requested. This is necessary to make deterministic a race condition between // cancellation being requested and unregistering from the token. Otherwise, // it's possible cancellation could be requested just before we unregister and // we then return a connection to the pool that has been or will be disposed diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs index 97f9ddf6b2b5c..83b522d0ce8f5 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs @@ -233,7 +233,7 @@ public override async ValueTask DrainAsync(int maxDrainBytes) if (_contentBytesRemaining == 0) { // Dispose of the registration and then check whether cancellation has been - // requested. This is necessary to make determinstic a race condition between + // requested. This is necessary to make deterministic a race condition between // cancellation being requested and unregistering from the token. Otherwise, // it's possible cancellation could be requested just before we unregister and // we then return a connection to the pool that has been or will be disposed diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/MultipartContentTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/MultipartContentTest.cs index 457085ccb3de2..c67def2093ed8 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/MultipartContentTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/MultipartContentTest.cs @@ -93,7 +93,7 @@ public void Ctor_Headers_AutomaticallyCreated() } [Fact] - public void Dispose_Empty_Sucess() + public void Dispose_Empty_Success() { var content = new MultipartContent(); content.Dispose(); diff --git a/src/libraries/System.Net.Mail/tests/Unit/MailAddressTests/MailAddressParserTest.cs b/src/libraries/System.Net.Mail/tests/Unit/MailAddressTests/MailAddressParserTest.cs index 0a632a43c7d9b..967fbae41cf1c 100644 --- a/src/libraries/System.Net.Mail/tests/Unit/MailAddressTests/MailAddressParserTest.cs +++ b/src/libraries/System.Net.Mail/tests/Unit/MailAddressTests/MailAddressParserTest.cs @@ -505,7 +505,7 @@ public void ParseAddress_WithMultipleSimpleAddresses_ShouldReadCorrectly() } [Fact] - public void ParseAdresses_WithOnlyOneAddress_ShouldReadCorrectly() + public void ParseAddresses_WithOnlyOneAddress_ShouldReadCorrectly() { IList result = MailAddressParser.ParseMultipleAddresses("Dr M\u00FCller "); diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/PhysicalAddress.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/PhysicalAddress.cs index e745a55f83f82..0bf04e204e835 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/PhysicalAddress.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/PhysicalAddress.cs @@ -215,7 +215,7 @@ private static bool TryGetValidSegmentLength(ReadOnlySpan address, char de } else if ((i - (segments - 1)) % validSegmentLength != 0) { - // segments - 1 = num of delimeters. Return false if new segment isn't the validSegmentLength + // segments - 1 = num of delimiters. Return false if new segment isn't the validSegmentLength return false; } diff --git a/src/libraries/System.Net.Primitives/tests/FunctionalTests/CookieCollectionTest.cs b/src/libraries/System.Net.Primitives/tests/FunctionalTests/CookieCollectionTest.cs index 1e11a2f083de4..0e23bbd474a82 100644 --- a/src/libraries/System.Net.Primitives/tests/FunctionalTests/CookieCollectionTest.cs +++ b/src/libraries/System.Net.Primitives/tests/FunctionalTests/CookieCollectionTest.cs @@ -198,7 +198,7 @@ public static void Remove_Success() } [Fact] - public static void Remove_NonExistantCookie_ReturnsFalse() + public static void Remove_NonExistentCookie_ReturnsFalse() { ICollection cc = CreateCookieCollection1(); Assert.Equal(5, cc.Count); diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs index 61473709129ef..b9165c0500584 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs @@ -1121,7 +1121,7 @@ public int Send(IList> buffers, SocketFlags socketFlags, out // Update the internal state of this socket according to the error before throwing. UpdateStatusAfterSocketError(errorCode); if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, new SocketException((int)errorCode)); - // Don't log transfered byte count in case of a failure. + // Don't log transferred byte count in case of a failure. return 0; } else if (SocketsTelemetry.Log.IsEnabled()) diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.cs index 2f818908bbe91..b8193155a7294 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.cs @@ -632,7 +632,7 @@ internal void FinishOperationSyncFailure(SocketError socketError, int bytesTrans break; } - // Don't log transfered byte count in case of a failure. + // Don't log transferred byte count in case of a failure. Complete(); } diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs index 33c534b644534..3b391e2327e0d 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs @@ -345,7 +345,7 @@ await listener.RunWithCallbackAsync(e => events.Enqueue((e, e.ActivityId)), asyn }); VerifyEvents(events, connect: true, expectedCount: 10); - VerifyEventCounters(events, connectCount: 10, shouldHaveTransferedBytes: true, shouldHaveDatagrams: true); + VerifyEventCounters(events, connectCount: 10, shouldHaveTransferredBytes: true, shouldHaveDatagrams: true); } }).Dispose(); } @@ -456,7 +456,7 @@ private static void VerifyEvents(ConcurrentQueue<(EventWrittenEventArgs Event, G } } - private static void VerifyEventCounters(ConcurrentQueue<(EventWrittenEventArgs Event, Guid ActivityId)> events, int connectCount, bool hasCurrentConnectCounter = false, bool connectOnly = false, bool shouldHaveTransferedBytes = false, bool shouldHaveDatagrams = false) + private static void VerifyEventCounters(ConcurrentQueue<(EventWrittenEventArgs Event, Guid ActivityId)> events, int connectCount, bool hasCurrentConnectCounter = false, bool connectOnly = false, bool shouldHaveTransferredBytes = false, bool shouldHaveDatagrams = false) { Dictionary eventCounters = events .Where(e => e.Event.EventName == "EventCounters") @@ -478,13 +478,13 @@ private static void VerifyEventCounters(ConcurrentQueue<(EventWrittenEventArgs E Assert.Equal(0, currentOutgoingConnectAttempts[^1]); Assert.True(eventCounters.TryGetValue("bytes-received", out double[] bytesReceived)); - if (shouldHaveTransferedBytes) + if (shouldHaveTransferredBytes) { Assert.True(bytesReceived[^1] > 0); } Assert.True(eventCounters.TryGetValue("bytes-sent", out double[] bytesSent)); - if (shouldHaveTransferedBytes) + if (shouldHaveTransferredBytes) { Assert.True(bytesSent[^1] > 0); } diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/CompressedSparseTensor.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/CompressedSparseTensor.cs index 12edcae45e51f..5722c04bf4e18 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/CompressedSparseTensor.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/CompressedSparseTensor.cs @@ -480,9 +480,9 @@ public override CompressedSparseTensor ToCompressedSparseTensor() { // Create a copy of the backing storage, eliminating any unused space. var newValues = values.Slice(0, nonZeroCount).ToArray(); - var newIndicies = indices.Slice(0, nonZeroCount).ToArray(); + var newIndices = indices.Slice(0, nonZeroCount).ToArray(); - return new CompressedSparseTensor(newValues, compressedCounts.ToArray(), newIndicies, nonZeroCount, dimensions, IsReversedStride); + return new CompressedSparseTensor(newValues, compressedCounts.ToArray(), newIndices, nonZeroCount, dimensions, IsReversedStride); } /// diff --git a/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs b/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs index 534331acaa878..5223557f5143f 100644 --- a/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs @@ -52,7 +52,7 @@ internal static unsafe SafeFileHandle Open(string fullPath, FileMode mode, FileA if ((options & FileOptions.Asynchronous) != 0) { - // the handle has not been exposed yet, so we don't need to aquire a lock + // the handle has not been exposed yet, so we don't need to acquire a lock fileHandle.InitThreadPoolBinding(); } diff --git a/src/libraries/System.Private.CoreLib/src/System/BitConverter.cs b/src/libraries/System.Private.CoreLib/src/System/BitConverter.cs index c85be98dfdd37..60caf8e76d275 100644 --- a/src/libraries/System.Private.CoreLib/src/System/BitConverter.cs +++ b/src/libraries/System.Private.CoreLib/src/System/BitConverter.cs @@ -13,7 +13,7 @@ namespace System /// public static class BitConverter { - // This field indicates the "endianess" of the architecture. + // This field indicates the "endianness" of the architecture. // The value is set to true if the architecture is // little endian; false if it is big endian. #if BIGENDIAN diff --git a/src/libraries/System.Private.CoreLib/src/System/Boolean.cs b/src/libraries/System.Private.CoreLib/src/System/Boolean.cs index 885e1db1b74bb..ba12f4b9ecc8c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Boolean.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Boolean.cs @@ -61,13 +61,13 @@ namespace System public static readonly string FalseString = FalseLiteral; // - // Overriden Instance Methods + // Overridden Instance Methods // /*=================================GetHashCode================================== **Args: None **Returns: 1 or 0 depending on whether this instance represents true or false. **Exceptions: None - **Overriden From: Value + **Overridden From: Value ==============================================================================*/ // Provides a hash code for this instance. public override int GetHashCode() diff --git a/src/libraries/System.Private.CoreLib/src/System/Buffer.cs b/src/libraries/System.Private.CoreLib/src/System/Buffer.cs index b9d5e199bbe83..c14bd684cb017 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Buffer.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Buffer.cs @@ -74,7 +74,7 @@ public static int ByteLength(Array array) // // If somebody called Get/SetByte on 2GB+ arrays, there is a decent chance that // the computation of the index has overflowed. Thus we intentionally always - // throw on 2GB+ arrays in Get/SetByte argument checks (even for indicies <2GB) + // throw on 2GB+ arrays in Get/SetByte argument checks (even for indices <2GB) // to prevent people from running into a trap silently. return checked((int)byteLength); diff --git a/src/libraries/System.Private.CoreLib/src/System/Buffers/MemoryManager.cs b/src/libraries/System.Private.CoreLib/src/System/Buffers/MemoryManager.cs index 1f4151131acd1..6603959390895 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Buffers/MemoryManager.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Buffers/MemoryManager.cs @@ -48,7 +48,7 @@ public abstract class MemoryManager : IMemoryOwner, IPinnable /// /// Returns an array segment. - /// Returns the default array segment if not overriden. + /// Returns the default array segment if not overridden. /// protected internal virtual bool TryGetArray(out ArraySegment segment) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs index bb879a64ce42b..f75b2967fd305 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs @@ -1935,7 +1935,7 @@ private unsafe void WriteEventVarargs(int eventId, Guid* childActivityID, object if (m_Dispatchers != null && metadata.EnabledForAnyListener) { // Maintain old behavior - object identity is preserved - if (!LocalAppContextSwitches.PreserveEventListnerObjectIdentity) + if (!LocalAppContextSwitches.PreserveEventListenerObjectIdentity) { args = SerializeEventArgs(eventId, args); } @@ -3721,7 +3721,7 @@ private static int GetHelperCallFirstArg(MethodInfo method) goto default; break; default: - /* Debug.Fail("Warning: User validation code sub-optimial: Unsuported opcode " + instrs[idx] + + /* Debug.Fail("Warning: User validation code sub-optimial: Unsupported opcode " + instrs[idx] + " at " + idx + " in method " + method.Name); */ return -1; } diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Nls.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Nls.cs index 496eb6597ee44..af35c5e56956a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Nls.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Nls.cs @@ -420,7 +420,7 @@ private static unsafe Interop.BOOL EnumTimeCallback(char* lpTimeFormatString, vo if (!useUserOverride && data.strings.Count > 1) { // Since there is no "NoUserOverride" aware EnumTimeFormatsEx, we always get an override - // The override is the first entry if it is overriden. + // The override is the first entry if it is overridden. // We can check if we have overrides by checking the GetLocaleInfo with no override // If we do have an override, we don't know if it is a user defined override or if the // user has just selected one of the predefined formats so we can't just remove it diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs index e9de8a6b8a95e..fa025d64f5d55 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs @@ -486,7 +486,7 @@ public virtual CultureInfo Parent { if (_name.Length == 5 && _name[2] == '-') { - // We need to keep the parent chain for the zh cultures as follows to preserve the resource lookup compatability + // We need to keep the parent chain for the zh cultures as follows to preserve the resource lookup compatibility // zh-CN -> zh-Hans -> zh -> Invariant // zh-HK -> zh-Hant -> zh -> Invariant // zh-MO -> zh-Hant -> zh -> Invariant diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeFormatInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeFormatInfo.cs index e5c85f574cdc9..4a70413b14607 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeFormatInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeFormatInfo.cs @@ -228,7 +228,7 @@ private string[] internalGetMonthNamesCore() return monthNames; } - // Invariant DateTimeFormatInfo doesn't have user-overriden values + // Invariant DateTimeFormatInfo doesn't have user-overridden values // Default calendar is gregorian public DateTimeFormatInfo() : this(CultureInfo.InvariantCulture._cultureData, GregorianCalendar.GetDefaultInstance()) diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeParse.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeParse.cs index 3b0876c04de94..13aae15d40ce6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeParse.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeParse.cs @@ -1171,7 +1171,7 @@ private static bool Lex(DS dps, ref __DTString str, ref DateTimeToken dtok, ref private static bool VerifyValidPunctuation(ref __DTString str) { - // Compatability Behavior. Allow trailing nulls and surrounding hashes + // Compatibility Behavior. Allow trailing nulls and surrounding hashes char ch = str.Value[str.Index]; if (ch == '#') { @@ -4570,7 +4570,7 @@ private static bool DoStrictParse( { // hh is used, but no AM/PM designator is specified. // Assume the time is AM. - // Don't throw exceptions in here becasue it is very confusing for the caller. + // Don't throw exceptions in here because it is very confusing for the caller. // I always got confused myself when I use "hh:mm:ss" to parse a time string, // and ParseExact() throws on me (because I didn't use the 24-hour clock 'HH'). parseInfo.timeMark = TM.AM; diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/GregorianCalendarHelper.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/GregorianCalendarHelper.cs index b22ac88c185a0..a79e625497a9f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/GregorianCalendarHelper.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/GregorianCalendarHelper.cs @@ -518,7 +518,7 @@ public DateTime ToDateTime(int year, int month, int day, int hour, int minute, i public int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek) { CheckTicksRange(time.Ticks); - // Use GregorianCalendar to get around the problem that the implmentation in Calendar.GetWeekOfYear() + // Use GregorianCalendar to get around the problem that the implementation in Calendar.GetWeekOfYear() // can call GetYear() that exceeds the supported range of the Gregorian-based calendars. return GregorianCalendar.GetDefaultInstance().GetWeekOfYear(time, rule, firstDayOfWeek); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/HijriCalendar.Win32.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/HijriCalendar.Win32.cs index 86145ca0fd89b..bee73ccb1bdc0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/HijriCalendar.Win32.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/HijriCalendar.Win32.cs @@ -26,7 +26,7 @@ private int GetHijriDateAdjustment() **Arguments: None. **Exceptions: **Note: - ** The HijriCalendar has a user-overidable calculation. That is, use can set a value from the control + ** The HijriCalendar has a user-overridable calculation. That is, use can set a value from the control ** panel, so that the calculation of the Hijri Calendar can move ahead or backwards from -2 to +2 days. ** ** The valid string values in the registry are: diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/IcuLocaleData.generator.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/IcuLocaleData.generator.cs index 45fb2085c97f9..4ca862777f193 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/IcuLocaleData.generator.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/IcuLocaleData.generator.cs @@ -1364,9 +1364,9 @@ static void GenerateData(string[] cultures, (string lcid, string culture)[] lcid Console.Write($"0x{(GeoId >> 24) & 0xff:x2}, 0x{(GeoId >> 16) & 0xff:x2}, 0x{(GeoId >> 8) & 0xff:x2}, 0x{GeoId & 0xff:x2}, "); Console.Write($"0x{DigitList & 0xff:x2}, "); - var Indicies = SpecificCultureIndex << 12 | ConsoleLocaleIndex; + var Indices = SpecificCultureIndex << 12 | ConsoleLocaleIndex; - Console.Write($"0x{(Indicies >> 16) & 0xff:x2}, 0x{(Indicies >> 8) & 0xff:x2}, 0x{Indicies & 0xff:x2}, "); + Console.Write($"0x{(Indices >> 16) & 0xff:x2}, 0x{(Indices >> 8) & 0xff:x2}, 0x{Indices & 0xff:x2}, "); Console.Write($" // {i / NUMERIC_LOCALE_DATA_COUNT_PER_ROW,-4} - {cultures[i / NUMERIC_LOCALE_DATA_COUNT_PER_ROW]}"); Console.WriteLine(); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Guid.cs b/src/libraries/System.Private.CoreLib/src/System/Guid.cs index ea1e5df08a7fe..7c6f84a8626b4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Guid.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Guid.cs @@ -826,7 +826,7 @@ public byte[] ToByteArray() return g; } - // Returns whether bytes are sucessfully written to given span. + // Returns whether bytes are successfully written to given span. public bool TryWriteBytes(Span destination) { if (BitConverter.IsLittleEndian) diff --git a/src/libraries/System.Private.CoreLib/src/System/LocalAppContextSwitches.cs b/src/libraries/System.Private.CoreLib/src/System/LocalAppContextSwitches.cs index 044e1fc59ae40..1e6e67af54bdc 100644 --- a/src/libraries/System.Private.CoreLib/src/System/LocalAppContextSwitches.cs +++ b/src/libraries/System.Private.CoreLib/src/System/LocalAppContextSwitches.cs @@ -34,11 +34,11 @@ public static bool EnforceLegacyJapaneseDateParsing get => GetCachedSwitchValue("Switch.System.Globalization.EnforceLegacyJapaneseDateParsing", ref s_enforceLegacyJapaneseDateParsing); } - private static int s_preserveEventListnerObjectIdentity; - public static bool PreserveEventListnerObjectIdentity + private static int s_preserveEventListenerObjectIdentity; + public static bool PreserveEventListenerObjectIdentity { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => GetCachedSwitchValue("Switch.System.Diagnostics.EventSource.PreserveEventListnerObjectIdentity", ref s_preserveEventListnerObjectIdentity); + get => GetCachedSwitchValue("Switch.System.Diagnostics.EventSource.PreserveEventListenerObjectIdentity", ref s_preserveEventListenerObjectIdentity); } private static int s_forceEmitInvoke; diff --git a/src/libraries/System.Private.CoreLib/src/System/Nullable.cs b/src/libraries/System.Private.CoreLib/src/System/Nullable.cs index e315ba48b52c8..5b02c367f26cb 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Nullable.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Nullable.cs @@ -9,7 +9,7 @@ namespace System { // Because we have special type system support that says a boxed Nullable - // can be used where a boxed is use, Nullable can not implement any intefaces + // can be used where a boxed is use, Nullable can not implement any interfaces // at all (since T may not). Do NOT add any interfaces to Nullable! // [Serializable] diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/CustomAttributeData.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/CustomAttributeData.cs index 496887dca1224..1ef9923364e09 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/CustomAttributeData.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/CustomAttributeData.cs @@ -83,7 +83,7 @@ public override string ToString() #region Public Members public virtual Type AttributeType => Constructor.DeclaringType!; - // Expected to be overriden + // Expected to be overridden public virtual ConstructorInfo Constructor => null!; public virtual IList ConstructorArguments => null!; public virtual IList NamedArguments => null!; diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs index aa2f20fecc368..0693779839403 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs @@ -317,7 +317,7 @@ public static ResourceManager CreateFileBasedResourceManager(string baseName, st // passing to the ResourceReader constructor) or a manifest resource file // name should look like. // - // This method can be overriden to look for a different extension, + // This method can be overridden to look for a different extension, // such as ".ResX", or a completely different format for naming files. protected virtual string GetResourceFileName(CultureInfo culture) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs index d309e982172fc..2e86555ae7c6c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs @@ -204,7 +204,7 @@ private static IAsyncStateMachineBox GetStateMachineBox( // At this point, taskField should really be null, in which case we want to create the box. // However, in a variety of debugger-related (erroneous) situations, it might be non-null, - // e.g. if the Task property is examined in a Watch window, forcing it to be lazily-intialized + // e.g. if the Task property is examined in a Watch window, forcing it to be lazily-initialized // as a Task rather than as an AsyncStateMachineBox. The worst that happens in such // cases is we lose the ability to properly step in the debugger, as the debugger uses that // object's identity to track this specific builder/state machine. As such, we proceed to diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/PoolingAsyncValueTaskMethodBuilderT.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/PoolingAsyncValueTaskMethodBuilderT.cs index 0297fd9a1e545..b5f01e81feb3c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/PoolingAsyncValueTaskMethodBuilderT.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/PoolingAsyncValueTaskMethodBuilderT.cs @@ -204,7 +204,7 @@ private static IAsyncStateMachineBox GetStateMachineBox( // At this point, m_task should really be null, in which case we want to create the box. // However, in a variety of debugger-related (erroneous) situations, it might be non-null, - // e.g. if the Task property is examined in a Watch window, forcing it to be lazily-intialized + // e.g. if the Task property is examined in a Watch window, forcing it to be lazily-initialized // as a Task rather than as an ValueTaskStateMachineBox. The worst that happens in such // cases is we lose the ability to properly step in the debugger, as the debugger uses that // object's identity to track this specific builder/state machine. As such, we proceed to diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi1.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi1.PlatformNotSupported.cs index 56ff44adb7d9c..a9dc857b623d6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi1.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi1.PlatformNotSupported.cs @@ -26,49 +26,49 @@ internal X64() { } /// /// unsigned __int64 _andn_u64 (unsigned __int64 a, unsigned __int64 b) /// ANDN r64a, r64b, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong AndNot(ulong left, ulong right) { throw new PlatformNotSupportedException(); } /// /// unsigned __int64 _bextr_u64 (unsigned __int64 a, unsigned int start, unsigned int len) /// BEXTR r64a, reg/m64, r64b - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong BitFieldExtract(ulong value, byte start, byte length) { throw new PlatformNotSupportedException(); } /// /// unsigned __int64 _bextr2_u64 (unsigned __int64 a, unsigned __int64 control) /// BEXTR r64a, reg/m64, r64b - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong BitFieldExtract(ulong value, ushort control) { throw new PlatformNotSupportedException(); } /// /// unsigned __int64 _blsi_u64 (unsigned __int64 a) /// BLSI reg, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong ExtractLowestSetBit(ulong value) { throw new PlatformNotSupportedException(); } /// /// unsigned __int64 _blsmsk_u64 (unsigned __int64 a) /// BLSMSK reg, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong GetMaskUpToLowestSetBit(ulong value) { throw new PlatformNotSupportedException(); } /// /// unsigned __int64 _blsr_u64 (unsigned __int64 a) /// BLSR reg, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong ResetLowestSetBit(ulong value) { throw new PlatformNotSupportedException(); } /// /// __int64 _mm_tzcnt_64 (unsigned __int64 a) /// TZCNT reg, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong TrailingZeroCount(ulong value) { throw new PlatformNotSupportedException(); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi1.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi1.cs index 82e501ca97dea..044ec940e75e0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi1.cs @@ -26,49 +26,49 @@ internal X64() { } /// /// unsigned __int64 _andn_u64 (unsigned __int64 a, unsigned __int64 b) /// ANDN r64a, r64b, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong AndNot(ulong left, ulong right) => AndNot(left, right); /// /// unsigned __int64 _bextr_u64 (unsigned __int64 a, unsigned int start, unsigned int len) /// BEXTR r64a, reg/m64, r64b - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong BitFieldExtract(ulong value, byte start, byte length) => BitFieldExtract(value, (ushort)(start | (length << 8))); /// /// unsigned __int64 _bextr2_u64 (unsigned __int64 a, unsigned __int64 control) /// BEXTR r64a, reg/m64, r64b - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong BitFieldExtract(ulong value, ushort control) => BitFieldExtract(value, control); /// /// unsigned __int64 _blsi_u64 (unsigned __int64 a) /// BLSI reg, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong ExtractLowestSetBit(ulong value) => ExtractLowestSetBit(value); /// /// unsigned __int64 _blsmsk_u64 (unsigned __int64 a) /// BLSMSK reg, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong GetMaskUpToLowestSetBit(ulong value) => GetMaskUpToLowestSetBit(value); /// /// unsigned __int64 _blsr_u64 (unsigned __int64 a) /// BLSR reg, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong ResetLowestSetBit(ulong value) => ResetLowestSetBit(value); /// /// __int64 _mm_tzcnt_64 (unsigned __int64 a) /// TZCNT reg, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong TrailingZeroCount(ulong value) => TrailingZeroCount(value); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi2.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi2.PlatformNotSupported.cs index 8c1a66ec97067..8d8fdcf2df2dd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi2.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi2.PlatformNotSupported.cs @@ -26,7 +26,7 @@ internal X64() { } /// /// unsigned __int64 _bzhi_u64 (unsigned __int64 a, unsigned int index) /// BZHI r64a, reg/m32, r64b - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong ZeroHighBits(ulong value, ulong index) { throw new PlatformNotSupportedException(); } @@ -34,7 +34,7 @@ internal X64() { } /// unsigned __int64 _mulx_u64 (unsigned __int64 a, unsigned __int64 b, unsigned __int64* hi) /// MULX r64a, r64b, reg/m64 /// The above native signature does not directly correspond to the managed signature. - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong MultiplyNoFlags(ulong left, ulong right) { throw new PlatformNotSupportedException(); } @@ -42,21 +42,21 @@ internal X64() { } /// unsigned __int64 _mulx_u64 (unsigned __int64 a, unsigned __int64 b, unsigned __int64* hi) /// MULX r64a, r64b, reg/m64 /// The above native signature does not directly correspond to the managed signature. - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static unsafe ulong MultiplyNoFlags(ulong left, ulong right, ulong* low) { throw new PlatformNotSupportedException(); } /// /// unsigned __int64 _pdep_u64 (unsigned __int64 a, unsigned __int64 mask) /// PDEP r64a, r64b, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong ParallelBitDeposit(ulong value, ulong mask) { throw new PlatformNotSupportedException(); } /// /// unsigned __int64 _pext_u64 (unsigned __int64 a, unsigned __int64 mask) /// PEXT r64a, r64b, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong ParallelBitExtract(ulong value, ulong mask) { throw new PlatformNotSupportedException(); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi2.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi2.cs index 95104e6d2b92e..2ed73efad2d86 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi2.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi2.cs @@ -26,7 +26,7 @@ internal X64() { } /// /// unsigned __int64 _bzhi_u64 (unsigned __int64 a, unsigned int index) /// BZHI r64a, reg/m32, r64b - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong ZeroHighBits(ulong value, ulong index) => ZeroHighBits(value, index); @@ -34,7 +34,7 @@ internal X64() { } /// unsigned __int64 _mulx_u64 (unsigned __int64 a, unsigned __int64 b, unsigned __int64* hi) /// MULX r64a, r64b, reg/m64 /// The above native signature does not directly correspond to the managed signature. - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong MultiplyNoFlags(ulong left, ulong right) => MultiplyNoFlags(left, right); @@ -42,21 +42,21 @@ internal X64() { } /// unsigned __int64 _mulx_u64 (unsigned __int64 a, unsigned __int64 b, unsigned __int64* hi) /// MULX r64a, r64b, reg/m64 /// The above native signature does not directly correspond to the managed signature. - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static unsafe ulong MultiplyNoFlags(ulong left, ulong right, ulong* low) => MultiplyNoFlags(left, right, low); /// /// unsigned __int64 _pdep_u64 (unsigned __int64 a, unsigned __int64 mask) /// PDEP r64a, r64b, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong ParallelBitDeposit(ulong value, ulong mask) => ParallelBitDeposit(value, mask); /// /// unsigned __int64 _pext_u64 (unsigned __int64 a, unsigned __int64 mask) /// PEXT r64a, r64b, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong ParallelBitExtract(ulong value, ulong mask) => ParallelBitExtract(value, mask); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Lzcnt.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Lzcnt.PlatformNotSupported.cs index 1c2eed20a3c87..849a68476610e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Lzcnt.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Lzcnt.PlatformNotSupported.cs @@ -25,7 +25,7 @@ internal X64() { } /// /// unsigned __int64 _lzcnt_u64 (unsigned __int64 a) /// LZCNT reg, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong LeadingZeroCount(ulong value) { throw new PlatformNotSupportedException(); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Lzcnt.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Lzcnt.cs index 55e8f737de8f1..2493ed2aba1b1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Lzcnt.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Lzcnt.cs @@ -26,7 +26,7 @@ internal X64() { } /// /// unsigned __int64 _lzcnt_u64 (unsigned __int64 a) /// LZCNT reg, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong LeadingZeroCount(ulong value) => LeadingZeroCount(value); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Popcnt.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Popcnt.PlatformNotSupported.cs index 28bfe8fda1a41..1913605685c33 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Popcnt.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Popcnt.PlatformNotSupported.cs @@ -25,7 +25,7 @@ internal X64() { } /// /// __int64 _mm_popcnt_u64 (unsigned __int64 a) /// POPCNT reg64, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong PopCount(ulong value) { throw new PlatformNotSupportedException(); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Popcnt.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Popcnt.cs index 3fdeffe594530..185f7fc00e619 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Popcnt.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Popcnt.cs @@ -26,7 +26,7 @@ internal X64() { } /// /// __int64 _mm_popcnt_u64 (unsigned __int64 a) /// POPCNT reg64, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong PopCount(ulong value) => PopCount(value); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse.PlatformNotSupported.cs index 1d92f91621b66..39bd4eb1cfac8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse.PlatformNotSupported.cs @@ -26,20 +26,20 @@ internal X64() { } /// /// __int64 _mm_cvtss_si64 (__m128 a) /// CVTSS2SI r64, xmm/m32 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static long ConvertToInt64(Vector128 value) { throw new PlatformNotSupportedException(); } /// /// __m128 _mm_cvtsi64_ss (__m128 a, __int64 b) /// CVTSI2SS xmm, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static Vector128 ConvertScalarToVector128Single(Vector128 upper, long value) { throw new PlatformNotSupportedException(); } /// /// __int64 _mm_cvttss_si64 (__m128 a) /// CVTTSS2SI r64, xmm/m32 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static long ConvertToInt64WithTruncation(Vector128 value) { throw new PlatformNotSupportedException(); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse.cs index 129f2ecbd09a1..2b0fa3aa6d6ea 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse.cs @@ -26,20 +26,20 @@ internal X64() { } /// /// __int64 _mm_cvtss_si64 (__m128 a) /// CVTSS2SI r64, xmm/m32 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static long ConvertToInt64(Vector128 value) => ConvertToInt64(value); /// /// __m128 _mm_cvtsi64_ss (__m128 a, __int64 b) /// CVTSI2SS xmm, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static Vector128 ConvertScalarToVector128Single(Vector128 upper, long value) => ConvertScalarToVector128Single(upper, value); /// /// __int64 _mm_cvttss_si64 (__m128 a) /// CVTTSS2SI r64, xmm/m32 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static long ConvertToInt64WithTruncation(Vector128 value) => ConvertToInt64WithTruncation(value); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs index a63ff84a64f64..c4f708b379e71 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs @@ -26,61 +26,61 @@ internal X64() { } /// /// __int64 _mm_cvtsd_si64 (__m128d a) /// CVTSD2SI r64, xmm/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static long ConvertToInt64(Vector128 value) { throw new PlatformNotSupportedException(); } /// /// __int64 _mm_cvtsi128_si64 (__m128i a) /// MOVQ reg/m64, xmm - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static long ConvertToInt64(Vector128 value) { throw new PlatformNotSupportedException(); } /// /// __int64 _mm_cvtsi128_si64 (__m128i a) /// MOVQ reg/m64, xmm - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong ConvertToUInt64(Vector128 value) { throw new PlatformNotSupportedException(); } /// /// __m128d _mm_cvtsi64_sd (__m128d a, __int64 b) /// CVTSI2SD xmm, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static Vector128 ConvertScalarToVector128Double(Vector128 upper, long value) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm_cvtsi64_si128 (__int64 a) /// MOVQ xmm, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static Vector128 ConvertScalarToVector128Int64(long value) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm_cvtsi64_si128 (__int64 a) /// MOVQ xmm, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static Vector128 ConvertScalarToVector128UInt64(ulong value) { throw new PlatformNotSupportedException(); } /// /// __int64 _mm_cvttsd_si64 (__m128d a) /// CVTTSD2SI reg, xmm/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static long ConvertToInt64WithTruncation(Vector128 value) { throw new PlatformNotSupportedException(); } /// /// void _mm_stream_si64(__int64 *p, __int64 a) /// MOVNTI m64, r64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static unsafe void StoreNonTemporal(long* address, long value) { throw new PlatformNotSupportedException(); } /// /// void _mm_stream_si64(__int64 *p, __int64 a) /// MOVNTI m64, r64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static unsafe void StoreNonTemporal(ulong* address, ulong value) { throw new PlatformNotSupportedException(); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse2.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse2.cs index 15c842f431ce5..8dd40ac3bf4b0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse2.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse2.cs @@ -26,61 +26,61 @@ internal X64() { } /// /// __int64 _mm_cvtsd_si64 (__m128d a) /// CVTSD2SI r64, xmm/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static long ConvertToInt64(Vector128 value) => ConvertToInt64(value); /// /// __int64 _mm_cvtsi128_si64 (__m128i a) /// MOVQ reg/m64, xmm - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static long ConvertToInt64(Vector128 value) => ConvertToInt64(value); /// /// __int64 _mm_cvtsi128_si64 (__m128i a) /// MOVQ reg/m64, xmm - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong ConvertToUInt64(Vector128 value) => ConvertToUInt64(value); /// /// __m128d _mm_cvtsi64_sd (__m128d a, __int64 b) /// CVTSI2SD xmm, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static Vector128 ConvertScalarToVector128Double(Vector128 upper, long value) => ConvertScalarToVector128Double(upper, value); /// /// __m128i _mm_cvtsi64_si128 (__int64 a) /// MOVQ xmm, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static Vector128 ConvertScalarToVector128Int64(long value) => ConvertScalarToVector128Int64(value); /// /// __m128i _mm_cvtsi64_si128 (__int64 a) /// MOVQ xmm, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static Vector128 ConvertScalarToVector128UInt64(ulong value) => ConvertScalarToVector128UInt64(value); /// /// __int64 _mm_cvttsd_si64 (__m128d a) /// CVTTSD2SI reg, xmm/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static long ConvertToInt64WithTruncation(Vector128 value) => ConvertToInt64WithTruncation(value); /// /// void _mm_stream_si64(__int64 *p, __int64 a) /// MOVNTI m64, r64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static unsafe void StoreNonTemporal(long* address, long value) => StoreNonTemporal(address, value); /// /// void _mm_stream_si64(__int64 *p, __int64 a) /// MOVNTI m64, r64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static unsafe void StoreNonTemporal(ulong* address, ulong value) => StoreNonTemporal(address, value); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs index a09030b4f3c7c..618f05c5cdd29 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs @@ -26,26 +26,26 @@ internal X64() { } /// /// __int64 _mm_extract_epi64 (__m128i a, const int imm8) /// PEXTRQ reg/m64, xmm, imm8 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static long Extract(Vector128 value, byte index) { throw new PlatformNotSupportedException(); } /// /// __int64 _mm_extract_epi64 (__m128i a, const int imm8) /// PEXTRQ reg/m64, xmm, imm8 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong Extract(Vector128 value, byte index) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm_insert_epi64 (__m128i a, __int64 i, const int imm8) /// PINSRQ xmm, reg/m64, imm8 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static Vector128 Insert(Vector128 value, long data, byte index) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm_insert_epi64 (__m128i a, __int64 i, const int imm8) /// PINSRQ xmm, reg/m64, imm8 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static Vector128 Insert(Vector128 value, ulong data, byte index) { throw new PlatformNotSupportedException(); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse41.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse41.cs index 46352356b2d01..06e676262602f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse41.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse41.cs @@ -26,26 +26,26 @@ internal X64() { } /// /// __int64 _mm_extract_epi64 (__m128i a, const int imm8) /// PEXTRQ reg/m64, xmm, imm8 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static long Extract(Vector128 value, byte index) => Extract(value, index); /// /// __int64 _mm_extract_epi64 (__m128i a, const int imm8) /// PEXTRQ reg/m64, xmm, imm8 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong Extract(Vector128 value, byte index) => Extract(value, index); /// /// __m128i _mm_insert_epi64 (__m128i a, __int64 i, const int imm8) /// PINSRQ xmm, reg/m64, imm8 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static Vector128 Insert(Vector128 value, long data, byte index) => Insert(value, data, index); /// /// __m128i _mm_insert_epi64 (__m128i a, __int64 i, const int imm8) /// PINSRQ xmm, reg/m64, imm8 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static Vector128 Insert(Vector128 value, ulong data, byte index) => Insert(value, data, index); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse42.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse42.PlatformNotSupported.cs index 9da1ca952c6df..e06b3545be9bf 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse42.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse42.PlatformNotSupported.cs @@ -26,7 +26,7 @@ internal X64() { } /// /// unsigned __int64 _mm_crc32_u64 (unsigned __int64 crc, unsigned __int64 v) /// CRC32 reg, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong Crc32(ulong crc, ulong data) { throw new PlatformNotSupportedException(); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse42.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse42.cs index 86ac34cf898cb..83ec7c0a536d5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse42.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse42.cs @@ -26,7 +26,7 @@ internal X64() { } /// /// unsigned __int64 _mm_crc32_u64 (unsigned __int64 crc, unsigned __int64 v) /// CRC32 reg, reg/m64 - /// This intrinisc is only available on 64-bit processes + /// This intrinsic is only available on 64-bit processes /// public static ulong Crc32(ulong crc, ulong data) => Crc32(crc, data); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.cs index 9c2a9a6aaf64b..d5423e5c6ec5a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.cs @@ -547,7 +547,7 @@ public static ContextualReflectionScope EnterContextualReflection(Assembly? acti /// Opaque disposable struct used to restore CurrentContextualReflectionContext /// - /// This is an implmentation detail of the AssemblyLoadContext.EnterContextualReflection APIs. + /// This is an implementation detail of the AssemblyLoadContext.EnterContextualReflection APIs. /// It is a struct, to avoid heap allocation. /// It is required to be public to avoid boxing. /// diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Decoder.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Decoder.cs index 0e4b927c0f2ed..8447ff61be03b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Decoder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Decoder.cs @@ -208,7 +208,7 @@ public virtual unsafe int GetChars(ReadOnlySpan bytes, Span chars, b // It will decode until it runs out of bytes, and then it will return // true if it the entire input was converted. In either case it // will also return the number of converted bytes and output characters used. - // It will only throw a buffer overflow exception if the entire lenght of chars[] is + // It will only throw a buffer overflow exception if the entire length of chars[] is // too small to store the next char. (like 0 or maybe 1 or 4 for some encodings) // We're done processing this buffer only if completed returns true. // diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Encoder.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Encoder.cs index 6cef4f28a25e9..dffd4be8a0a52 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Encoder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Encoder.cs @@ -205,7 +205,7 @@ public virtual unsafe int GetBytes(ReadOnlySpan chars, Span bytes, b // It will encode until it runs out of chars, and then it will return // true if it the entire input was converted. In either case it // will also return the number of converted chars and output bytes used. - // It will only throw a buffer overflow exception if the entire lenght of bytes[] is + // It will only throw a buffer overflow exception if the entire length of bytes[] is // too small to store the next byte. (like 0 or maybe 1 or 4 for some encodings) // We're done processing this buffer only if completed returns true. // diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.Validation.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.Validation.cs index 313cc74a87af2..dcf91f9d66192 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.Validation.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.Validation.cs @@ -272,7 +272,7 @@ internal static unsafe partial class Utf16Utility // If we're 64-bit, we can perform the zero-extension of the surrogate pairs count for // free right now, saving the extension step a few lines below. If we're 32-bit, the - // convertion to nuint immediately below is a no-op, and we'll pay the cost of the real + // conversion to nuint immediately below is a no-op, and we'll pay the cost of the real // 64 -bit extension a few lines below. nuint surrogatePairsCountNuint = (uint)BitOperations.PopCount(highSurrogatesMask); diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8Utility.Helpers.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8Utility.Helpers.cs index 01808058a89d7..12921c260eec9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8Utility.Helpers.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8Utility.Helpers.cs @@ -716,7 +716,7 @@ private static bool UInt32ThirdByteIsAscii(uint value) } /// - /// Given a DWORD which represents a buffer of 2 packed UTF-16 values in machine endianess, + /// Given a DWORD which represents a buffer of 2 packed UTF-16 values in machine endianness, /// converts those scalar values to their 3-byte UTF-8 representation and writes the /// resulting 6 bytes to the destination buffer. /// @@ -751,7 +751,7 @@ private static void WriteTwoUtf16CharsAsTwoUtf8ThreeByteSequences(ref byte outpu } /// - /// Given a DWORD which represents a buffer of 2 packed UTF-16 values in machine endianess, + /// Given a DWORD which represents a buffer of 2 packed UTF-16 values in machine endianness, /// converts the first UTF-16 value to its 3-byte UTF-8 representation and writes the /// resulting 3 bytes to the destination buffer. /// diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/UnicodeEncoding.cs b/src/libraries/System.Private.CoreLib/src/System/Text/UnicodeEncoding.cs index 016a8e78dfd45..d2299ee9a798b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/UnicodeEncoding.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/UnicodeEncoding.cs @@ -389,7 +389,7 @@ internal sealed override unsafe int GetByteCount(char* chars, int count, Encoder { // No fallback, maybe we can do it fast #if FASTLOOP - // If endianess is backwards then each pair of bytes would be backwards. + // If endianness is backwards then each pair of bytes would be backwards. if ((bigEndian ^ BitConverter.IsLittleEndian) && #if TARGET_64BIT (unchecked((long)chars) & 7) == 0 && @@ -672,7 +672,7 @@ internal sealed override unsafe int GetBytes( { // No fallback, maybe we can do it fast #if FASTLOOP - // If endianess is backwards then each pair of bytes would be backwards. + // If endianness is backwards then each pair of bytes would be backwards. if ((bigEndian ^ BitConverter.IsLittleEndian) && #if TARGET_64BIT (unchecked((long)chars) & 7) == 0 && diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WorkerThread.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WorkerThread.cs index 3d2dee0e495fa..e1f2271768c3f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WorkerThread.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WorkerThread.cs @@ -23,7 +23,7 @@ private static class WorkerThread private const int SemaphoreSpinCountDefault = SemaphoreSpinCountDefaultBaseline * 4; #endif - // This value represents an assumption of how much uncommited stack space a worker thread may use in the future. + // This value represents an assumption of how much uncommitted stack space a worker thread may use in the future. // Used in calculations to estimate when to throttle the rate of thread injection to reduce the possibility of // preexisting threads from running out of memory when using new stack space in low-memory situations. public const int EstimatedAdditionalStackUsagePerThreadBytes = 64 << 10; // 64 KB diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs index 62b5f17c26f14..97ebb29c0f503 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs @@ -4428,7 +4428,7 @@ internal void ContinueWithCore(Task continuationTask, if (!continuationTask.IsCompleted) { // We need additional correlation produced here to ensure that at least the continuation - // code will be correlatable to the currrent activity that initiated "this" task: + // code will be correlatable to the current activity that initiated "this" task: // . when the antecendent ("this") is a promise we have very little control over where // the code for the promise will run (e.g. it can be a task from a user provided // TaskCompletionSource or from a classic Begin/End async operation); this user or @@ -6921,7 +6921,7 @@ private void ProcessCompletedOuterTask(Task task) } /// Transfer the completion status from "task" to ourself. - /// The source task whose results should be transfered to this. + /// The source task whose results should be transferred to this. /// Whether or not to look for OperationCanceledExceptions in task's exceptions if it faults. /// true if the transfer was successful; otherwise, false. private bool TrySetFromTask(Task task, bool lookForOce) diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs index 3e164bc80ff17..80159dca5af52 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs @@ -1318,7 +1318,7 @@ public TZifHead(byte[] data, int index) // skip the 15 byte reserved field // don't use the BitConverter class which parses data - // based on the Endianess of the machine architecture. + // based on the Endianness of the machine architecture. // this data is expected to always be in "standard byte order", // regardless of the machine it is being processed on. diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBaseReader.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBaseReader.cs index b5adc97454351..158e62374292d 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBaseReader.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBaseReader.cs @@ -773,7 +773,7 @@ private void CheckAttributes(XmlAttributeNode[] attributeNodes, int attributeCou if (!_attributeSorter.Sort(attributeNodes, attributeCount)) { int attribute1, attribute2; - _attributeSorter.GetIndeces(out attribute1, out attribute2); + _attributeSorter.GetIndices(out attribute1, out attribute2); if (attributeNodes[attribute1].QNameType == QNameType.Xmlns) XmlExceptionHelper.ThrowDuplicateXmlnsAttribute(this, attributeNodes[attribute1].Namespace.Prefix.GetString(), xmlnsNamespace); else @@ -2571,7 +2571,7 @@ public XmlClosedNode(XmlBufferReader bufferReader) private sealed class AttributeSorter : IComparer { - private object[]? _indeces; + private object[]? _indices; private XmlAttributeNode[]? _attributeNodes; private int _attributeCount; private int _attributeIndex1; @@ -2589,7 +2589,7 @@ public bool Sort(XmlAttributeNode[] attributeNodes, int attributeCount) return sorted; } - public void GetIndeces(out int attributeIndex1, out int attributeIndex2) + public void GetIndices(out int attributeIndex1, out int attributeIndex2) { attributeIndex1 = _attributeIndex1; attributeIndex2 = _attributeIndex2; @@ -2597,9 +2597,9 @@ public void GetIndeces(out int attributeIndex1, out int attributeIndex2) public void Close() { - if (_indeces != null && _indeces.Length > 32) + if (_indices != null && _indices.Length > 32) { - _indeces = null; + _indices = null; } } @@ -2607,25 +2607,25 @@ private bool Sort() { // Optimistically use the last sort order and check to see if that works. This helps the case // where elements with large numbers of attributes are repeated. - if (_indeces != null && _indeces.Length == _attributeCount && IsSorted()) + if (_indices != null && _indices.Length == _attributeCount && IsSorted()) return true; - object[] newIndeces = new object[_attributeCount]; - for (int i = 0; i < newIndeces.Length; i++) - newIndeces[i] = i; - _indeces = newIndeces; - Array.Sort(_indeces, 0, _attributeCount, this); + object[] newIndices = new object[_attributeCount]; + for (int i = 0; i < newIndices.Length; i++) + newIndices[i] = i; + _indices = newIndices; + Array.Sort(_indices, 0, _attributeCount, this); return IsSorted(); } private bool IsSorted() { - for (int i = 0; i < _indeces!.Length - 1; i++) + for (int i = 0; i < _indices!.Length - 1; i++) { - if (Compare(_indeces[i], _indeces[i + 1]) >= 0) + if (Compare(_indices[i], _indices[i + 1]) >= 0) { - _attributeIndex1 = (int)_indeces[i]; - _attributeIndex2 = (int)_indeces[i + 1]; + _attributeIndex1 = (int)_indices[i]; + _attributeIndex2 = (int)_indices[i + 1]; return false; } } diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlCanonicalWriter.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlCanonicalWriter.cs index e7552f0e39c33..951bd780443cb 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlCanonicalWriter.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlCanonicalWriter.cs @@ -902,19 +902,19 @@ public AttributeSorter(XmlCanonicalWriter writer) public void Sort() { - object[] indeces = new object[_writer._attributeCount]; + object[] indices = new object[_writer._attributeCount]; - for (int i = 0; i < indeces.Length; i++) + for (int i = 0; i < indices.Length; i++) { - indeces[i] = i; + indices[i] = i; } - Array.Sort(indeces, this); + Array.Sort(indices, this); Attribute[] attributes = new Attribute[_writer._attributes!.Length]; - for (int i = 0; i < indeces.Length; i++) + for (int i = 0; i < indices.Length; i++) { - attributes[i] = _writer._attributes[(int)indeces[i]]; + attributes[i] = _writer._attributes[(int)indices[i]]; } _writer._attributes = attributes; diff --git a/src/libraries/System.Private.Uri/tests/ExtendedFunctionalTests/UriRelativeResolutionTest.cs b/src/libraries/System.Private.Uri/tests/ExtendedFunctionalTests/UriRelativeResolutionTest.cs index 5ad415ba616e0..127fac59094ba 100644 --- a/src/libraries/System.Private.Uri/tests/ExtendedFunctionalTests/UriRelativeResolutionTest.cs +++ b/src/libraries/System.Private.Uri/tests/ExtendedFunctionalTests/UriRelativeResolutionTest.cs @@ -148,9 +148,9 @@ public void Uri_Relative_BaseVsFileLikeUri_MissingRootSlash_ThrowsUriFormatExcep [Fact] public void Uri_Relative_BaseVsSingleDotSlashStartingCompressPath_ReturnsMergedPathsWithoutSingleDot() { - string compressable = "./"; + string compressible = "./"; string partialPath = "p1/p2/p3/p4/file1?AQuery#TheFragment"; - Uri resolved = new Uri(_fullBaseUri, compressable + partialPath); + Uri resolved = new Uri(_fullBaseUri, compressible + partialPath); string baseUri = _fullBaseUri.GetLeftPart(UriPartial.Path); string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + partialPath; @@ -160,9 +160,9 @@ public void Uri_Relative_BaseVsSingleDotSlashStartingCompressPath_ReturnsMergedP [Fact] public void Uri_Relative_BaseVsDoubleDotSlashStartingCompressPath_ReturnsBasePathBacksteppedOncePlusRelativePath() { - string compressable = "../"; + string compressible = "../"; string partialPath = "p1/p2/p3/p4/file1?AQuery#TheFragment"; - Uri resolved = new Uri(_fullBaseUri, compressable + partialPath); + Uri resolved = new Uri(_fullBaseUri, compressible + partialPath); string baseUri = _fullBaseUri.GetLeftPart(UriPartial.Path); baseUri = baseUri.Substring(0, baseUri.LastIndexOf("/")); @@ -173,9 +173,9 @@ public void Uri_Relative_BaseVsDoubleDotSlashStartingCompressPath_ReturnsBasePat [Fact] public void Uri_Relative_BaseVsDoubleDoubleDotSlashStartingCompressPath_ReturnsBasePathBacksteppedTwicePlusRelativePath() { - string compressable = "../../"; + string compressible = "../../"; string partialPath = "p1/p2/p3/p4/file1?AQuery#TheFragment"; - Uri resolved = new Uri(_fullBaseUri, compressable + partialPath); + Uri resolved = new Uri(_fullBaseUri, compressible + partialPath); string baseUri = _fullBaseUri.GetLeftPart(UriPartial.Path); baseUri = baseUri.Substring(0, baseUri.LastIndexOf("/")); @@ -187,9 +187,9 @@ public void Uri_Relative_BaseVsDoubleDoubleDotSlashStartingCompressPath_ReturnsB [Fact] public void Uri_Relative_BaseVsTrippleDoubleDotSlashStartingCompressPath_ReturnsBaseWithoutPathPlusRelativePath() { - string compressable = "../../../"; + string compressible = "../../../"; string partialPath = "p1/p2/p3/p4/file1?AQuery#TheFragment"; - Uri resolved = new Uri(_fullBaseUri, compressable + partialPath); + Uri resolved = new Uri(_fullBaseUri, compressible + partialPath); string baseUri = _fullBaseUri.GetLeftPart(UriPartial.Authority); string expectedResult = baseUri + "/" + partialPath; @@ -199,9 +199,9 @@ public void Uri_Relative_BaseVsTrippleDoubleDotSlashStartingCompressPath_Returns [Fact] public void Uri_Relative_BaseVsTooManyDoubleDotSlashStartingCompressPath_ReturnsBaseWithoutPathPlusRelativePath() { - string compressable = "../../../../"; + string compressible = "../../../../"; string partialPath = "p1/p2/p3/p4/file1?AQuery#TheFragment"; - Uri resolved = new Uri(_fullBaseUri, compressable + partialPath); + Uri resolved = new Uri(_fullBaseUri, compressible + partialPath); string baseUri = _fullBaseUri.GetLeftPart(UriPartial.Authority); string expectedResult = baseUri + "/" + partialPath; @@ -211,9 +211,9 @@ public void Uri_Relative_BaseVsTooManyDoubleDotSlashStartingCompressPath_Returns [Fact] public void Uri_Relative_BaseVsSingleDotSlashEndingCompressPath_ReturnsMergedPathsWithoutSingleDot() { - string compressable = "./"; + string compressible = "./"; string partialPath = "p1/p2/p3/p4/"; - Uri resolved = new Uri(_fullBaseUri, partialPath + compressable); + Uri resolved = new Uri(_fullBaseUri, partialPath + compressible); string baseUri = _fullBaseUri.GetLeftPart(UriPartial.Path); string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + partialPath; @@ -223,9 +223,9 @@ public void Uri_Relative_BaseVsSingleDotSlashEndingCompressPath_ReturnsMergedPat [Fact] public void Uri_Relative_BaseVsSingleDotEndingCompressPath_ReturnsMergedPathsWithoutSingleDot() { - string compressable = "."; + string compressible = "."; string partialPath = "p1/p2/p3/p4/"; - Uri resolved = new Uri(_fullBaseUri, partialPath + compressable); + Uri resolved = new Uri(_fullBaseUri, partialPath + compressible); string baseUri = _fullBaseUri.GetLeftPart(UriPartial.Path); string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + partialPath; @@ -235,8 +235,8 @@ public void Uri_Relative_BaseVsSingleDotEndingCompressPath_ReturnsMergedPathsWit [Fact] public void Uri_Relative_BaseVsSingleDot_ReturnsBasePathMinusFileWithoutSingleDot() { - string compressable = "."; - Uri resolved = new Uri(_fullBaseUri, compressable); + string compressible = "."; + Uri resolved = new Uri(_fullBaseUri, compressible); string baseUri = _fullBaseUri.GetLeftPart(UriPartial.Path); string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1); @@ -246,8 +246,8 @@ public void Uri_Relative_BaseVsSingleDot_ReturnsBasePathMinusFileWithoutSingleDo [Fact] public void Uri_Relative_BaseVsSlashDot_ReturnsBaseMinusPath() { - string compressable = "/."; - Uri resolved = new Uri(_fullBaseUri, compressable); + string compressible = "/."; + Uri resolved = new Uri(_fullBaseUri, compressible); string expectedResult = _fullBaseUri.GetLeftPart(UriPartial.Authority) + "/"; Assert.Equal(expectedResult, resolved.ToString()); @@ -256,8 +256,8 @@ public void Uri_Relative_BaseVsSlashDot_ReturnsBaseMinusPath() [Fact] public void Uri_Relative_BaseVsSlashDotSlashFile_ReturnsBasePlusRelativeFile() { - string compressable = "/./file"; - Uri resolved = new Uri(_fullBaseUri, compressable); + string compressible = "/./file"; + Uri resolved = new Uri(_fullBaseUri, compressible); string expectedResult = _fullBaseUri.GetLeftPart(UriPartial.Authority) + "/file"; Assert.Equal(expectedResult, resolved.ToString()); @@ -266,8 +266,8 @@ public void Uri_Relative_BaseVsSlashDotSlashFile_ReturnsBasePlusRelativeFile() [Fact] public void Uri_Relative_BaseVsSlashDoubleDotSlashFile_ReturnsBasePlusRelativeFile() { - string compressable = "/../file"; - Uri resolved = new Uri(_fullBaseUri, compressable); + string compressible = "/../file"; + Uri resolved = new Uri(_fullBaseUri, compressible); string expectedResult = _fullBaseUri.GetLeftPart(UriPartial.Authority) + "/file"; Assert.Equal(expectedResult, resolved.ToString()); @@ -276,105 +276,105 @@ public void Uri_Relative_BaseVsSlashDoubleDotSlashFile_ReturnsBasePlusRelativeFi [Fact] public void Uri_Relative_BaseVsCharDot_ReturnsBasePathPlusCharDot() { - string nonCompressable = "f."; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "f."; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); string baseUri = _fullBaseUri.GetLeftPart(UriPartial.Path); - string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressable; + string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsDotChar_ReturnsBasePathPlusDotChar() { - string nonCompressable = ".f"; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = ".f"; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); string baseUri = _fullBaseUri.GetLeftPart(UriPartial.Path); - string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressable; + string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsCharDoubleDot_ReturnsBasePathPlusCharDoubleDot() { - string nonCompressable = "f.."; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "f.."; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); string baseUri = _fullBaseUri.GetLeftPart(UriPartial.Path); - string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressable; + string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsDoubleDotChar_ReturnsBasePathPlusDoubleDotChar() { - string nonCompressable = "..f"; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "..f"; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); string baseUri = _fullBaseUri.GetLeftPart(UriPartial.Path); - string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressable; + string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsTrippleDot_ReturnsBasePathPlusTrippleDot() { - string nonCompressable = "..."; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "..."; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); string baseUri = _fullBaseUri.GetLeftPart(UriPartial.Path); - string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressable; + string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsCharDotSlash_ReturnsCharDotSlash() { - string nonCompressable = "/f./"; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "/f./"; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); - string expectedResult = _fullBaseUri.GetLeftPart(UriPartial.Authority) + nonCompressable; + string expectedResult = _fullBaseUri.GetLeftPart(UriPartial.Authority) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsSlashDotCharSlash_ReturnsSlashDotCharSlash() { - string nonCompressable = "/.f/"; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "/.f/"; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); - string expectedResult = _fullBaseUri.GetLeftPart(UriPartial.Authority) + nonCompressable; + string expectedResult = _fullBaseUri.GetLeftPart(UriPartial.Authority) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsCharDoubleDotSlash_ReturnsCharDoubleDotSlash() { - string nonCompressable = "/f../"; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "/f../"; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); - string expectedResult = _fullBaseUri.GetLeftPart(UriPartial.Authority) + nonCompressable; + string expectedResult = _fullBaseUri.GetLeftPart(UriPartial.Authority) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsSlashDoubleDotCharSlash_ReturnsSlashDoubleDotCharSlash() { - string nonCompressable = "/..f/"; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "/..f/"; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); - string expectedResult = _fullBaseUri.GetLeftPart(UriPartial.Authority) + nonCompressable; + string expectedResult = _fullBaseUri.GetLeftPart(UriPartial.Authority) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsSlashTrippleDotSlash_ReturnsSlashTrippleDotSlash() { - string nonCompressable = "/.../"; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "/.../"; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); - string expectedResult = _fullBaseUri.GetLeftPart(UriPartial.Authority) + nonCompressable; + string expectedResult = _fullBaseUri.GetLeftPart(UriPartial.Authority) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } diff --git a/src/libraries/System.Private.Uri/tests/FunctionalTests/IriRelativeFileResolutionTest.cs b/src/libraries/System.Private.Uri/tests/FunctionalTests/IriRelativeFileResolutionTest.cs index 7715d7669f8f4..c530a323fa406 100644 --- a/src/libraries/System.Private.Uri/tests/FunctionalTests/IriRelativeFileResolutionTest.cs +++ b/src/libraries/System.Private.Uri/tests/FunctionalTests/IriRelativeFileResolutionTest.cs @@ -19,7 +19,7 @@ public class IriRelativeFileResolutionTest private static readonly bool s_isWindowsSystem = PlatformDetection.IsWindows; [Fact] - public void IriRelativeResolution_CompareImplcitAndExplicitFileWithNoUnicode_AllPropertiesTheSame() + public void IriRelativeResolution_CompareImplicitAndExplicitFileWithNoUnicode_AllPropertiesTheSame() { string nonUnicodeImplicitTestFile = s_isWindowsSystem ? @"c:\path\path3\test.txt" : "/path/path3/test.txt"; string nonUnicodeImplicitFileBase = s_isWindowsSystem ? @"c:\path\file.txt" : "/path/file.txt"; @@ -30,7 +30,7 @@ public void IriRelativeResolution_CompareImplcitAndExplicitFileWithNoUnicode_All } [Fact] - public void IriRelativeResolution_CompareImplcitAndExplicitFileWithReservedChar_AllPropertiesTheSame() + public void IriRelativeResolution_CompareImplicitAndExplicitFileWithReservedChar_AllPropertiesTheSame() { string nonUnicodeImplicitTestFile = s_isWindowsSystem ? @"c:\path\path3\test.txt%25%" : "/path/path3/test.txt%25%"; string nonUnicodeImplicitFileBase = s_isWindowsSystem ? @"c:\path\file.txt" : "/path/file.txt"; @@ -42,7 +42,7 @@ public void IriRelativeResolution_CompareImplcitAndExplicitFileWithReservedChar_ } [Fact] - public void IriRelativeResolution_CompareImplcitAndExplicitFileWithUnicodeIriOn_AllPropertiesTheSame() + public void IriRelativeResolution_CompareImplicitAndExplicitFileWithUnicodeIriOn_AllPropertiesTheSame() { string unicodeImplicitTestFile = s_isWindowsSystem ? @"c:\path\\u30AF\path3\\u30EB\u30DE.text" : "/path//u30AF/path3//u30EB/u30DE.text"; string nonUnicodeImplicitFileBase = s_isWindowsSystem ? @"c:\path\file.txt" : "/path/file.txt"; @@ -53,7 +53,7 @@ public void IriRelativeResolution_CompareImplcitAndExplicitFileWithUnicodeIriOn_ } [Fact] - public void IriRelativeResolution_CompareImplcitAndExplicitFileWithUnicodeAndReservedCharIriOn_AllPropertiesTheSame() + public void IriRelativeResolution_CompareImplicitAndExplicitFileWithUnicodeAndReservedCharIriOn_AllPropertiesTheSame() { string unicodeImplicitTestFile = s_isWindowsSystem ? @"c:\path\\u30AF\path3\\u30EB\u30DE.text%25%" : "/path//u30AF/path3//u30EB/u30DE.text%25%"; string nonUnicodeImplicitFileBase = s_isWindowsSystem ? @"c:\path\file.txt" : "/path/file.txt"; @@ -65,7 +65,7 @@ public void IriRelativeResolution_CompareImplcitAndExplicitFileWithUnicodeAndRes } [Fact] - public void IriRelativeResolution_CompareImplcitAndExplicitUncWithNoUnicode_AllPropertiesTheSame() + public void IriRelativeResolution_CompareImplicitAndExplicitUncWithNoUnicode_AllPropertiesTheSame() { string nonUnicodeImplicitTestUnc = @"\\c\path\path3\test.txt"; string nonUnicodeImplicitUncBase = @"\\c/path/file.txt"; @@ -78,7 +78,7 @@ public void IriRelativeResolution_CompareImplcitAndExplicitUncWithNoUnicode_AllP [Fact] [PlatformSpecific(TestPlatforms.Windows)] // Unc paths must start with '\' on Unix - public void IriRelativeResolution_CompareImplcitAndExplicitUncForwardSlashesWithNoUnicode_AllPropertiesTheSame() + public void IriRelativeResolution_CompareImplicitAndExplicitUncForwardSlashesWithNoUnicode_AllPropertiesTheSame() { string nonUnicodeImplicitTestUnc = @"//c/path/path3/test.txt"; string nonUnicodeImplicitUncBase = @"//c/path/file.txt"; @@ -90,7 +90,7 @@ public void IriRelativeResolution_CompareImplcitAndExplicitUncForwardSlashesWith } [Fact] - public void IriRelativeResolution_CompareImplcitAndExplicitUncWithUnicodeIriOn_AllPropertiesTheSame() + public void IriRelativeResolution_CompareImplicitAndExplicitUncWithUnicodeIriOn_AllPropertiesTheSame() { string unicodeImplicitTestUnc = @"\\c\path\\u30AF\path3\\u30EB\u30DE.text"; string nonUnicodeImplicitUncBase = @"\\c\path\file.txt"; @@ -140,7 +140,7 @@ public static int RelatavizeRestoreCompareImplicitVsExplicitFiles(string origina } [Fact] - public void IriRelativeResolution_CompareImplcitAndOriginalFileWithNoUnicode_AllPropertiesTheSame() + public void IriRelativeResolution_CompareImplicitAndOriginalFileWithNoUnicode_AllPropertiesTheSame() { string nonUnicodeImplicitTestFile = s_isWindowsSystem ? @"c:\path\path3\test.txt" : "/path/path3/test.txt"; string nonUnicodeImplicitFileBase = s_isWindowsSystem ? @"c:\path\file.txt" : "/path/file.txt"; diff --git a/src/libraries/System.Private.Uri/tests/FunctionalTests/UriRelativeResolutionTest.cs b/src/libraries/System.Private.Uri/tests/FunctionalTests/UriRelativeResolutionTest.cs index fa4ee9299a830..73b51d1dd7e76 100644 --- a/src/libraries/System.Private.Uri/tests/FunctionalTests/UriRelativeResolutionTest.cs +++ b/src/libraries/System.Private.Uri/tests/FunctionalTests/UriRelativeResolutionTest.cs @@ -288,9 +288,9 @@ public void Uri_Relative_BaseVsFileLikeUri_MissingRootSlash_ThrowsUriFormatExcep [Fact] public void Uri_Relative_BaseVsSingleDotSlashStartingCompressPath_ReturnsMergedPathsWithoutSingleDot() { - string compressable = "./"; + string compressible = "./"; string partialPath = "p1/p2/p3/p4/file1?AQuery#TheFragment"; - Uri resolved = new Uri(_fullBaseUri, compressable + partialPath); + Uri resolved = new Uri(_fullBaseUri, compressible + partialPath); string baseUri = FullBaseUriGetLeftPart_Path; string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + partialPath; @@ -300,9 +300,9 @@ public void Uri_Relative_BaseVsSingleDotSlashStartingCompressPath_ReturnsMergedP [Fact] public void Uri_Relative_BaseVsDoubleDotSlashStartingCompressPath_ReturnsBasePathBacksteppedOncePlusRelativePath() { - string compressable = "../"; + string compressible = "../"; string partialPath = "p1/p2/p3/p4/file1?AQuery#TheFragment"; - Uri resolved = new Uri(_fullBaseUri, compressable + partialPath); + Uri resolved = new Uri(_fullBaseUri, compressible + partialPath); string baseUri = FullBaseUriGetLeftPart_Path; baseUri = baseUri.Substring(0, baseUri.LastIndexOf("/")); @@ -313,9 +313,9 @@ public void Uri_Relative_BaseVsDoubleDotSlashStartingCompressPath_ReturnsBasePat [Fact] public void Uri_Relative_BaseVsDoubleDoubleDotSlashStartingCompressPath_ReturnsBasePathBacksteppedTwicePlusRelativePath() { - string compressable = "../../"; + string compressible = "../../"; string partialPath = "p1/p2/p3/p4/file1?AQuery#TheFragment"; - Uri resolved = new Uri(_fullBaseUri, compressable + partialPath); + Uri resolved = new Uri(_fullBaseUri, compressible + partialPath); string baseUri = FullBaseUriGetLeftPart_Path; baseUri = baseUri.Substring(0, baseUri.LastIndexOf("/")); @@ -327,9 +327,9 @@ public void Uri_Relative_BaseVsDoubleDoubleDotSlashStartingCompressPath_ReturnsB [Fact] public void Uri_Relative_BaseVsTrippleDoubleDotSlashStartingCompressPath_ReturnsBaseWithoutPathPlusRelativePath() { - string compressable = "../../../"; + string compressible = "../../../"; string partialPath = "p1/p2/p3/p4/file1?AQuery#TheFragment"; - Uri resolved = new Uri(_fullBaseUri, compressable + partialPath); + Uri resolved = new Uri(_fullBaseUri, compressible + partialPath); string baseUri = FullBaseUriGetLeftPart_Authority; string expectedResult = baseUri + "/" + partialPath; @@ -339,9 +339,9 @@ public void Uri_Relative_BaseVsTrippleDoubleDotSlashStartingCompressPath_Returns [Fact] public void Uri_Relative_BaseVsTooManyDoubleDotSlashStartingCompressPath_ReturnsBaseWithoutPathPlusRelativePath() { - string compressable = "../../../../"; + string compressible = "../../../../"; string partialPath = "p1/p2/p3/p4/file1?AQuery#TheFragment"; - Uri resolved = new Uri(_fullBaseUri, compressable + partialPath); + Uri resolved = new Uri(_fullBaseUri, compressible + partialPath); string baseUri = FullBaseUriGetLeftPart_Authority; string expectedResult = baseUri + "/" + partialPath; @@ -351,9 +351,9 @@ public void Uri_Relative_BaseVsTooManyDoubleDotSlashStartingCompressPath_Returns [Fact] public void Uri_Relative_BaseVsSingleDotSlashEndingCompressPath_ReturnsMergedPathsWithoutSingleDot() { - string compressable = "./"; + string compressible = "./"; string partialPath = "p1/p2/p3/p4/"; - Uri resolved = new Uri(_fullBaseUri, partialPath + compressable); + Uri resolved = new Uri(_fullBaseUri, partialPath + compressible); string baseUri = FullBaseUriGetLeftPart_Path; string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + partialPath; @@ -363,9 +363,9 @@ public void Uri_Relative_BaseVsSingleDotSlashEndingCompressPath_ReturnsMergedPat [Fact] public void Uri_Relative_BaseVsSingleDotEndingCompressPath_ReturnsMergedPathsWithoutSingleDot() { - string compressable = "."; + string compressible = "."; string partialPath = "p1/p2/p3/p4/"; - Uri resolved = new Uri(_fullBaseUri, partialPath + compressable); + Uri resolved = new Uri(_fullBaseUri, partialPath + compressible); string baseUri = FullBaseUriGetLeftPart_Path; string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + partialPath; @@ -375,8 +375,8 @@ public void Uri_Relative_BaseVsSingleDotEndingCompressPath_ReturnsMergedPathsWit [Fact] public void Uri_Relative_BaseVsSingleDot_ReturnsBasePathMinusFileWithoutSingleDot() { - string compressable = "."; - Uri resolved = new Uri(_fullBaseUri, compressable); + string compressible = "."; + Uri resolved = new Uri(_fullBaseUri, compressible); string baseUri = FullBaseUriGetLeftPart_Path; string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1); @@ -386,8 +386,8 @@ public void Uri_Relative_BaseVsSingleDot_ReturnsBasePathMinusFileWithoutSingleDo [Fact] public void Uri_Relative_BaseVsSlashDot_ReturnsBaseMinusPath() { - string compressable = "/."; - Uri resolved = new Uri(_fullBaseUri, compressable); + string compressible = "/."; + Uri resolved = new Uri(_fullBaseUri, compressible); string expectedResult = FullBaseUriGetLeftPart_Authority + "/"; Assert.Equal(expectedResult, resolved.ToString()); @@ -396,8 +396,8 @@ public void Uri_Relative_BaseVsSlashDot_ReturnsBaseMinusPath() [Fact] public void Uri_Relative_BaseVsSlashDotSlashFile_ReturnsBasePlusRelativeFile() { - string compressable = "/./file"; - Uri resolved = new Uri(_fullBaseUri, compressable); + string compressible = "/./file"; + Uri resolved = new Uri(_fullBaseUri, compressible); string expectedResult = FullBaseUriGetLeftPart_Authority + "/file"; Assert.Equal(expectedResult, resolved.ToString()); @@ -406,8 +406,8 @@ public void Uri_Relative_BaseVsSlashDotSlashFile_ReturnsBasePlusRelativeFile() [Fact] public void Uri_Relative_BaseVsSlashDoubleDotSlashFile_ReturnsBasePlusRelativeFile() { - string compressable = "/../file"; - Uri resolved = new Uri(_fullBaseUri, compressable); + string compressible = "/../file"; + Uri resolved = new Uri(_fullBaseUri, compressible); string expectedResult = FullBaseUriGetLeftPart_Authority + "/file"; Assert.Equal(expectedResult, resolved.ToString()); @@ -416,105 +416,105 @@ public void Uri_Relative_BaseVsSlashDoubleDotSlashFile_ReturnsBasePlusRelativeFi [Fact] public void Uri_Relative_BaseVsCharDot_ReturnsBasePathPlusCharDot() { - string nonCompressable = "f."; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "f."; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); string baseUri = FullBaseUriGetLeftPart_Path; - string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressable; + string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsDotChar_ReturnsBasePathPlusDotChar() { - string nonCompressable = ".f"; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = ".f"; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); string baseUri = FullBaseUriGetLeftPart_Path; - string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressable; + string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsCharDoubleDot_ReturnsBasePathPlusCharDoubleDot() { - string nonCompressable = "f.."; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "f.."; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); string baseUri = FullBaseUriGetLeftPart_Path; - string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressable; + string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsDoubleDotChar_ReturnsBasePathPlusDoubleDotChar() { - string nonCompressable = "..f"; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "..f"; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); string baseUri = FullBaseUriGetLeftPart_Path; - string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressable; + string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsTrippleDot_ReturnsBasePathPlusTrippleDot() { - string nonCompressable = "..."; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "..."; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); string baseUri = FullBaseUriGetLeftPart_Path; - string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressable; + string expectedResult = baseUri.Substring(0, baseUri.LastIndexOf("/") + 1) + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsCharDotSlash_ReturnsCharDotSlash() { - string nonCompressable = "/f./"; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "/f./"; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); - string expectedResult = FullBaseUriGetLeftPart_Authority + nonCompressable; + string expectedResult = FullBaseUriGetLeftPart_Authority + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsSlashDotCharSlash_ReturnsSlashDotCharSlash() { - string nonCompressable = "/.f/"; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "/.f/"; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); - string expectedResult = FullBaseUriGetLeftPart_Authority + nonCompressable; + string expectedResult = FullBaseUriGetLeftPart_Authority + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsCharDoubleDotSlash_ReturnsCharDoubleDotSlash() { - string nonCompressable = "/f../"; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "/f../"; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); - string expectedResult = FullBaseUriGetLeftPart_Authority + nonCompressable; + string expectedResult = FullBaseUriGetLeftPart_Authority + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsSlashDoubleDotCharSlash_ReturnsSlashDoubleDotCharSlash() { - string nonCompressable = "/..f/"; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "/..f/"; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); - string expectedResult = FullBaseUriGetLeftPart_Authority + nonCompressable; + string expectedResult = FullBaseUriGetLeftPart_Authority + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } [Fact] public void Uri_Relative_BaseVsSlashTrippleDotSlash_ReturnsSlashTrippleDotSlash() { - string nonCompressable = "/.../"; - Uri resolved = new Uri(_fullBaseUri, nonCompressable); + string nonCompressible = "/.../"; + Uri resolved = new Uri(_fullBaseUri, nonCompressible); - string expectedResult = FullBaseUriGetLeftPart_Authority + nonCompressable; + string expectedResult = FullBaseUriGetLeftPart_Authority + nonCompressible; Assert.Equal(expectedResult, resolved.ToString()); } diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Schema/XNodeValidator.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Schema/XNodeValidator.cs index 5c989579639ef..3a18ff7e49845 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Schema/XNodeValidator.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Schema/XNodeValidator.cs @@ -73,7 +73,7 @@ public void Validate(XObject source, XmlSchemaObject? partialValidationType, boo validator.Initialize(); } - IXmlLineInfo orginal = SaveLineInfo(source); + IXmlLineInfo original = SaveLineInfo(source); if (nt == XmlNodeType.Attribute) { ValidateAttribute((XAttribute)source); @@ -83,7 +83,7 @@ public void Validate(XObject source, XmlSchemaObject? partialValidationType, boo ValidateElement((XElement)source); } validator.EndValidation(); - RestoreLineInfo(orginal); + RestoreLineInfo(original); } private XmlSchemaInfo GetDefaultAttributeSchemaInfo(XmlSchemaAttribute sa) @@ -262,7 +262,7 @@ private void ValidateAttribute(XAttribute a) private void ValidateAttributes(XElement e) { XAttribute? a = e.lastAttr; - IXmlLineInfo orginal = SaveLineInfo(a); + IXmlLineInfo original = SaveLineInfo(a); if (a != null) { do @@ -293,7 +293,7 @@ private void ValidateAttributes(XElement e) e.Add(a); } } - RestoreLineInfo(orginal); + RestoreLineInfo(original); } private void ValidateElement(XElement e) @@ -325,7 +325,7 @@ private void ValidateElement(XElement e) private void ValidateNodes(XElement e) { XNode? n = e.content as XNode; - IXmlLineInfo orginal = SaveLineInfo(n); + IXmlLineInfo original = SaveLineInfo(n); if (n != null) { do @@ -360,7 +360,7 @@ private void ValidateNodes(XElement e) validator!.ValidateText(s); } } - RestoreLineInfo(orginal); + RestoreLineInfo(original); } private void ValidationCallback(object? sender, ValidationEventArgs e) diff --git a/src/libraries/System.Private.Xml.Linq/tests/XDocument.Common/EventsHelper.cs b/src/libraries/System.Private.Xml.Linq/tests/XDocument.Common/EventsHelper.cs index b800517b42aba..3c299eaad8629 100644 --- a/src/libraries/System.Private.Xml.Linq/tests/XDocument.Common/EventsHelper.cs +++ b/src/libraries/System.Private.Xml.Linq/tests/XDocument.Common/EventsHelper.cs @@ -31,7 +31,7 @@ public EventsHelper(XObject x) _events = new Queue(); } - public void RemoveListners() + public void RemoveListeners() { _root.Changing -= new EventHandler(Changing); _root.Changed -= new EventHandler(Changed); @@ -39,7 +39,7 @@ public void RemoveListners() public void Dispose() { - this.RemoveListners(); + this.RemoveListeners(); } public void Changing(object sender, XObjectChangeEventArgs e) diff --git a/src/libraries/System.Private.Xml.Linq/tests/events/EventsName.cs b/src/libraries/System.Private.Xml.Linq/tests/events/EventsName.cs index 9190a623e0cfb..1084471eaf83e 100644 --- a/src/libraries/System.Private.Xml.Linq/tests/events/EventsName.cs +++ b/src/libraries/System.Private.Xml.Linq/tests/events/EventsName.cs @@ -72,7 +72,7 @@ private static void ChangingDelegate(object sender, XObjectChangeEventArgs e) { private static void ChangedDelegate(object sender, XObjectChangeEventArgs e) { } [Fact] - public void AddingRemovingNullListenersXElementRemoveNullEventListner() + public void AddingRemovingNullListenersXElementRemoveNullEventListener() { XDocument xDoc = new XDocument(InputSpace.GetElement(10, 10)); EventHandler d1 = ChangingDelegate; @@ -98,7 +98,7 @@ public void AddingRemovingNullListenersXElementRemoveNullEventListner() } [Fact] - public void RemoveBothEventListenersXElementRemoveBothEventListners() + public void RemoveBothEventListenersXElementRemoveBothEventListeners() { XDocument xDoc = new XDocument(InputSpace.GetElement(10, 10)); EventHandler d1 = ChangingDelegate; @@ -123,7 +123,7 @@ public void RemoveBothEventListenersXElementRemoveBothEventListners() } [Fact] - public void AddChangedListnerInPreEventAddListnerInPreEvent() + public void AddChangedListenerInPreEventAddListenerInPreEvent() { XElement element = XElement.Parse(""); element.Changing += new EventHandler( @@ -138,7 +138,7 @@ public void AddChangedListnerInPreEventAddListnerInPreEvent() } [Fact] - public void AddAndRemoveEventListnersXElementAddRemoveEventListners() + public void AddAndRemoveEventListenersXElementAddRemoveEventListeners() { XDocument xDoc = new XDocument(InputSpace.GetElement(10, 10)); EventsHelper docHelper = new EventsHelper(xDoc); @@ -146,14 +146,14 @@ public void AddAndRemoveEventListnersXElementAddRemoveEventListners() xDoc.Root.Add(new XElement("Add", "Me")); docHelper.Verify(XObjectChange.Add); eHelper.Verify(XObjectChange.Add); - eHelper.RemoveListners(); + eHelper.RemoveListeners(); xDoc.Root.Add(new XComment("Comment")); eHelper.Verify(0); docHelper.Verify(XObjectChange.Add); } [Fact] - public void AttachListnersAtEachLevelNestedElementsXElementAttachAtEachLevel() + public void AttachListenersAtEachLevelNestedElementsXElementAttachAtEachLevel() { XDocument xDoc = new XDocument(XElement.Parse(@"abccef")); EventsHelper[] listeners = new EventsHelper[xDoc.Descendants().Count()]; diff --git a/src/libraries/System.Private.Xml/src/System.Private.Xml.csproj b/src/libraries/System.Private.Xml/src/System.Private.Xml.csproj index 96b04330623da..e9b3d71a46843 100644 --- a/src/libraries/System.Private.Xml/src/System.Private.Xml.csproj +++ b/src/libraries/System.Private.Xml/src/System.Private.Xml.csproj @@ -305,7 +305,7 @@ - + diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/QueryOutputWriterV1.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/QueryOutputWriterV1.cs index e2ea18ca0fd9a..a3a61833b406c 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/QueryOutputWriterV1.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/QueryOutputWriterV1.cs @@ -10,7 +10,7 @@ namespace System.Xml { /// /// This writer wraps an XmlWriter that was not build using the XmlRawWriter architecture (such as XmlTextWriter or a custom XmlWriter) - /// for use in the XslCompilerTransform. Depending on the Xsl stylesheet output settings (which gets transfered to this writer via the + /// for use in the XslCompilerTransform. Depending on the Xsl stylesheet output settings (which gets transferred to this writer via the /// internal properties of XmlWriterSettings) this writer will inserts additional lexical information into the resulting Xml 1.0 document: /// /// 1. CData sections diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReader.cs index 67f2f4018c52b..0da996eca8259 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReader.cs @@ -317,7 +317,7 @@ public override bool CanReadValueChunk get { return false; } } - // Overriden helper methods + // Overridden helper methods public override string ReadString() { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReader.cs index ba97d84b7c114..e122b0711bf82 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReader.cs @@ -243,7 +243,7 @@ public override int ReadElementContentAsBinHex(byte[] buffer, int index, int cou return _impl.ReadElementContentAsBinHex(buffer, index, count); } - // Overriden helper methods + // Overridden helper methods public override string ReadString() { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReaderImpl.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReaderImpl.cs index 9017c36345417..fb9c148bcdb54 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReaderImpl.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReaderImpl.cs @@ -107,7 +107,7 @@ internal void RemoveHandler(ValidationEventHandler handler) // Outer XmlReader exposed to the user - either XmlValidatingReader or XmlValidatingReaderImpl (when created via XmlReader.Create). // Virtual methods called from within XmlValidatingReaderImpl must be called on the outer reader so in case the user overrides - // some of the XmlValidatingReader methods we will call the overriden version. + // some of the XmlValidatingReader methods we will call the overridden version. private XmlReader _outerReader; // diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReader.cs index 2926921c6cc73..6441b90ea6d32 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReader.cs @@ -741,7 +741,7 @@ public override object ReadContentAs(Type returnType, IXmlNamespaceResolver? nam { if (xmlType != null) { - // special-case convertions to DateTimeOffset; typedValue is by default a DateTime + // special-case conversions to DateTimeOffset; typedValue is by default a DateTime // which cannot preserve time zone, so we need to convert from the original string if (returnType == typeof(DateTimeOffset) && xmlType.Datatype is Datatype_dateTimeBase) { @@ -1075,7 +1075,7 @@ public override object ReadElementContentAs(Type returnType, IXmlNamespaceResolv { if (xmlType != null) { - // special-case convertions to DateTimeOffset; typedValue is by default a DateTime + // special-case conversions to DateTimeOffset; typedValue is by default a DateTime // which cannot preserve time zone, so we need to convert from the original string if (returnType == typeof(DateTimeOffset) && xmlType.Datatype is Datatype_dateTimeBase) { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReaderAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReaderAsync.cs index 4794bfd78f623..cff64301ddbc4 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReaderAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReaderAsync.cs @@ -92,7 +92,7 @@ public override async Task ReadContentAsAsync(Type returnType, IXmlNames { if (xmlType != null) { - // special-case convertions to DateTimeOffset; typedValue is by default a DateTime + // special-case conversions to DateTimeOffset; typedValue is by default a DateTime // which cannot preserve time zone, so we need to convert from the original string if (returnType == typeof(DateTimeOffset) && xmlType.Datatype is Datatype_dateTimeBase) { @@ -192,7 +192,7 @@ public override async Task ReadElementContentAsAsync(Type returnType, IX { if (xmlType != null) { - // special-case convertions to DateTimeOffset; typedValue is by default a DateTime + // special-case conversions to DateTimeOffset; typedValue is by default a DateTime // which cannot preserve time zone, so we need to convert from the original string if (returnType == typeof(DateTimeOffset) && xmlType.Datatype is Datatype_dateTimeBase) { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/MTNameTable.cs b/src/libraries/System.Private.Xml/src/System/Xml/MTNameTable.cs index e51f58c54b151..78b3a3a1089a0 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/MTNameTable.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/MTNameTable.cs @@ -444,7 +444,7 @@ private MTNameTableNode AddRight( MTNameTableNode node, ref MTNameTableName name } - private const int threshhold = 20; + private const int threshold = 20; // Promote the node into the parent's position (1 ply closer to the rootNode) private void Promote( MTNameTableNode node ) { @@ -452,14 +452,14 @@ private void Promote( MTNameTableNode node ) { node.counter++; if (node != rootNode && - node.counter > threshhold && + node.counter > threshold && node.counter > node.parentNode.counter * 2) { if (rwLock != null) { LockCookie lc = rwLock.UpgradeToWriterLock(timeout); // recheck for failsafe against race-condition if (node != rootNode && - node.counter > threshhold && + node.counter > threshold && node.counter > node.parentNode.counter * 2) { InternalPromote( node ); } diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParser.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParser.cs index 7936efc832a42..4b9d94743da4d 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParser.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParser.cs @@ -161,7 +161,7 @@ internal UndeclaredNotation(string name, int lineNo, int linePos) // scanning function for the next token private ScanningFunction _scanningFunction; - private ScanningFunction _nextScaningFunction; + private ScanningFunction _nextScanningFunction; private ScanningFunction _savedScanningFunction; // this one is used only for adding spaces around parameter entities // flag if whitespace seen before token @@ -430,7 +430,7 @@ private void ParseInDocumentDtd(bool saveInternalSubset) LoadParsingBuffer(); _scanningFunction = ScanningFunction.QName; - _nextScaningFunction = ScanningFunction.Doctype1; + _nextScanningFunction = ScanningFunction.Doctype1; // doctype name if (GetToken(false) != Token.QName) @@ -1709,7 +1709,7 @@ private Token ScanSubsetContent() } _curPos += 9; _scanningFunction = ScanningFunction.QName; - _nextScaningFunction = ScanningFunction.Element1; + _nextScanningFunction = ScanningFunction.Element1; return Token.ElementDecl; } else if (_chars[_curPos + 3] == 'N') @@ -1750,7 +1750,7 @@ private Token ScanSubsetContent() } _curPos += 9; _scanningFunction = ScanningFunction.QName; - _nextScaningFunction = ScanningFunction.Attlist1; + _nextScanningFunction = ScanningFunction.Attlist1; return Token.AttlistDecl; case 'N': @@ -1767,7 +1767,7 @@ private Token ScanSubsetContent() } _curPos += 10; _scanningFunction = ScanningFunction.Name; - _nextScaningFunction = ScanningFunction.Notation1; + _nextScanningFunction = ScanningFunction.Notation1; return Token.NotationDecl; case '[': @@ -1850,21 +1850,21 @@ private Token ScanSubsetContent() private Token ScanNameExpected() { ScanName(); - _scanningFunction = _nextScaningFunction; + _scanningFunction = _nextScanningFunction; return Token.Name; } private Token ScanQNameExpected() { ScanQName(); - _scanningFunction = _nextScaningFunction; + _scanningFunction = _nextScanningFunction; return Token.QName; } private Token ScanNmtokenExpected() { ScanNmtoken(); - _scanningFunction = _nextScaningFunction; + _scanningFunction = _nextScanningFunction; return Token.Nmtoken; } @@ -1877,7 +1877,7 @@ private Token ScanDoctype1() { Throw(_curPos, SR.Xml_ExpectExternalOrClose); } - _nextScaningFunction = ScanningFunction.Doctype2; + _nextScanningFunction = ScanningFunction.Doctype2; _scanningFunction = ScanningFunction.PublicId1; return Token.PUBLIC; case 'S': @@ -1885,7 +1885,7 @@ private Token ScanDoctype1() { Throw(_curPos, SR.Xml_ExpectExternalOrClose); } - _nextScaningFunction = ScanningFunction.Doctype2; + _nextScanningFunction = ScanningFunction.Doctype2; _scanningFunction = ScanningFunction.SystemId; return Token.SYSTEM; case '[': @@ -2087,7 +2087,7 @@ private Token ScanElement6() return Token.RightParen; case '|': _curPos++; - _nextScaningFunction = ScanningFunction.Element6; + _nextScanningFunction = ScanningFunction.Element6; _scanningFunction = ScanningFunction.QName; return Token.Or; default: @@ -2135,7 +2135,7 @@ private Token ScanAttlist2() case '(': _curPos++; _scanningFunction = ScanningFunction.Nmtoken; - _nextScaningFunction = ScanningFunction.Attlist5; + _nextScanningFunction = ScanningFunction.Attlist5; return Token.LeftParen; case 'C': if (_charsUsed - _curPos < 5) @@ -2264,7 +2264,7 @@ private Token ScanAttlist3() { _curPos++; _scanningFunction = ScanningFunction.Name; - _nextScaningFunction = ScanningFunction.Attlist4; + _nextScanningFunction = ScanningFunction.Attlist4; return Token.LeftParen; } else @@ -2285,7 +2285,7 @@ private Token ScanAttlist4() case '|': _curPos++; _scanningFunction = ScanningFunction.Name; - _nextScaningFunction = ScanningFunction.Attlist4; + _nextScanningFunction = ScanningFunction.Attlist4; return Token.Or; default: ThrowUnexpectedToken(_curPos, ")", "|"); @@ -2304,7 +2304,7 @@ private Token ScanAttlist5() case '|': _curPos++; _scanningFunction = ScanningFunction.Nmtoken; - _nextScaningFunction = ScanningFunction.Attlist5; + _nextScanningFunction = ScanningFunction.Attlist5; return Token.Or; default: ThrowUnexpectedToken(_curPos, ")", "|"); @@ -2656,7 +2656,7 @@ private Token ScanNotation1() { Throw(_curPos, SR.Xml_ExpectExternalOrClose); } - _nextScaningFunction = ScanningFunction.ClosingTag; + _nextScanningFunction = ScanningFunction.ClosingTag; _scanningFunction = ScanningFunction.PublicId1; return Token.PUBLIC; case 'S': @@ -2664,7 +2664,7 @@ private Token ScanNotation1() { Throw(_curPos, SR.Xml_ExpectExternalOrClose); } - _nextScaningFunction = ScanningFunction.ClosingTag; + _nextScanningFunction = ScanningFunction.ClosingTag; _scanningFunction = ScanningFunction.SystemId; return Token.SYSTEM; default: @@ -2682,7 +2682,7 @@ private Token ScanSystemId() ScanLiteral(LiteralType.SystemOrPublicID); - _scanningFunction = _nextScaningFunction; + _scanningFunction = _nextScanningFunction; return Token.Literal; } @@ -2691,7 +2691,7 @@ private Token ScanEntity1() if (_chars[_curPos] == '%') { _curPos++; - _nextScaningFunction = ScanningFunction.Entity2; + _nextScanningFunction = ScanningFunction.Entity2; _scanningFunction = ScanningFunction.Name; return Token.Percent; } @@ -2712,7 +2712,7 @@ private Token ScanEntity2() { Throw(_curPos, SR.Xml_ExpectExternalOrClose); } - _nextScaningFunction = ScanningFunction.Entity3; + _nextScanningFunction = ScanningFunction.Entity3; _scanningFunction = ScanningFunction.PublicId1; return Token.PUBLIC; case 'S': @@ -2720,7 +2720,7 @@ private Token ScanEntity2() { Throw(_curPos, SR.Xml_ExpectExternalOrClose); } - _nextScaningFunction = ScanningFunction.Entity3; + _nextScanningFunction = ScanningFunction.Entity3; _scanningFunction = ScanningFunction.SystemId; return Token.SYSTEM; @@ -2751,7 +2751,7 @@ private Token ScanEntity3() { _curPos += 5; _scanningFunction = ScanningFunction.Name; - _nextScaningFunction = ScanningFunction.ClosingTag; + _nextScanningFunction = ScanningFunction.ClosingTag; return Token.NData; } } @@ -2777,12 +2777,12 @@ private Token ScanPublicId2() { if (_chars[_curPos] != '"' && _chars[_curPos] != '\'') { - _scanningFunction = _nextScaningFunction; + _scanningFunction = _nextScanningFunction; return Token.None; } ScanLiteral(LiteralType.SystemOrPublicID); - _scanningFunction = _nextScaningFunction; + _scanningFunction = _nextScanningFunction; return Token.Literal; } @@ -2814,7 +2814,7 @@ private Token ScanCondSection1() { goto default; } - _nextScaningFunction = ScanningFunction.SubsetContent; + _nextScanningFunction = ScanningFunction.SubsetContent; _scanningFunction = ScanningFunction.CondSection2; _curPos += 6; return Token.INCLUDE; @@ -2825,7 +2825,7 @@ private Token ScanCondSection1() { goto default; } - _nextScaningFunction = ScanningFunction.CondSection3; + _nextScanningFunction = ScanningFunction.CondSection3; _scanningFunction = ScanningFunction.CondSection2; _curPos += 5; return Token.IGNORE; @@ -2848,7 +2848,7 @@ private Token ScanCondSection2() ThrowUnexpectedToken(_curPos, "["); } _curPos++; - _scanningFunction = _nextScaningFunction; + _scanningFunction = _nextScanningFunction; return Token.LeftBracket; } diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParserAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParserAsync.cs index dcb228e18bc79..8bc28f86cb469 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParserAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParserAsync.cs @@ -73,7 +73,7 @@ private async Task ParseInDocumentDtdAsync(bool saveInternalSubset) LoadParsingBuffer(); _scanningFunction = ScanningFunction.QName; - _nextScaningFunction = ScanningFunction.Doctype1; + _nextScanningFunction = ScanningFunction.Doctype1; // doctype name if (await GetTokenAsync(false).ConfigureAwait(false) != Token.QName) @@ -1337,7 +1337,7 @@ private async Task ScanSubsetContentAsync() } _curPos += 9; _scanningFunction = ScanningFunction.QName; - _nextScaningFunction = ScanningFunction.Element1; + _nextScanningFunction = ScanningFunction.Element1; return Token.ElementDecl; } else if (_chars[_curPos + 3] == 'N') @@ -1378,7 +1378,7 @@ private async Task ScanSubsetContentAsync() } _curPos += 9; _scanningFunction = ScanningFunction.QName; - _nextScaningFunction = ScanningFunction.Attlist1; + _nextScanningFunction = ScanningFunction.Attlist1; return Token.AttlistDecl; case 'N': @@ -1395,7 +1395,7 @@ private async Task ScanSubsetContentAsync() } _curPos += 10; _scanningFunction = ScanningFunction.Name; - _nextScaningFunction = ScanningFunction.Notation1; + _nextScanningFunction = ScanningFunction.Notation1; return Token.NotationDecl; case '[': @@ -1478,21 +1478,21 @@ private async Task ScanSubsetContentAsync() private async Task ScanNameExpectedAsync() { await ScanNameAsync().ConfigureAwait(false); - _scanningFunction = _nextScaningFunction; + _scanningFunction = _nextScanningFunction; return Token.Name; } private async Task ScanQNameExpectedAsync() { await ScanQNameAsync().ConfigureAwait(false); - _scanningFunction = _nextScaningFunction; + _scanningFunction = _nextScanningFunction; return Token.QName; } private async Task ScanNmtokenExpectedAsync() { await ScanNmtokenAsync().ConfigureAwait(false); - _scanningFunction = _nextScaningFunction; + _scanningFunction = _nextScanningFunction; return Token.Nmtoken; } @@ -1505,7 +1505,7 @@ private async Task ScanDoctype1Async() { Throw(_curPos, SR.Xml_ExpectExternalOrClose); } - _nextScaningFunction = ScanningFunction.Doctype2; + _nextScanningFunction = ScanningFunction.Doctype2; _scanningFunction = ScanningFunction.PublicId1; return Token.PUBLIC; case 'S': @@ -1513,7 +1513,7 @@ private async Task ScanDoctype1Async() { Throw(_curPos, SR.Xml_ExpectExternalOrClose); } - _nextScaningFunction = ScanningFunction.Doctype2; + _nextScanningFunction = ScanningFunction.Doctype2; _scanningFunction = ScanningFunction.SystemId; return Token.SYSTEM; case '[': @@ -1651,7 +1651,7 @@ private async Task ScanAttlist2Async() case '(': _curPos++; _scanningFunction = ScanningFunction.Nmtoken; - _nextScaningFunction = ScanningFunction.Attlist5; + _nextScanningFunction = ScanningFunction.Attlist5; return Token.LeftParen; case 'C': if (_charsUsed - _curPos < 5) @@ -2082,7 +2082,7 @@ private async Task ScanNotation1Async() { Throw(_curPos, SR.Xml_ExpectExternalOrClose); } - _nextScaningFunction = ScanningFunction.ClosingTag; + _nextScanningFunction = ScanningFunction.ClosingTag; _scanningFunction = ScanningFunction.PublicId1; return Token.PUBLIC; case 'S': @@ -2090,7 +2090,7 @@ private async Task ScanNotation1Async() { Throw(_curPos, SR.Xml_ExpectExternalOrClose); } - _nextScaningFunction = ScanningFunction.ClosingTag; + _nextScanningFunction = ScanningFunction.ClosingTag; _scanningFunction = ScanningFunction.SystemId; return Token.SYSTEM; default: @@ -2108,7 +2108,7 @@ private async Task ScanSystemIdAsync() await ScanLiteralAsync(LiteralType.SystemOrPublicID).ConfigureAwait(false); - _scanningFunction = _nextScaningFunction; + _scanningFunction = _nextScanningFunction; return Token.Literal; } @@ -2117,7 +2117,7 @@ private async Task ScanEntity1Async() if (_chars[_curPos] == '%') { _curPos++; - _nextScaningFunction = ScanningFunction.Entity2; + _nextScanningFunction = ScanningFunction.Entity2; _scanningFunction = ScanningFunction.Name; return Token.Percent; } @@ -2138,7 +2138,7 @@ private async Task ScanEntity2Async() { Throw(_curPos, SR.Xml_ExpectExternalOrClose); } - _nextScaningFunction = ScanningFunction.Entity3; + _nextScanningFunction = ScanningFunction.Entity3; _scanningFunction = ScanningFunction.PublicId1; return Token.PUBLIC; case 'S': @@ -2146,7 +2146,7 @@ private async Task ScanEntity2Async() { Throw(_curPos, SR.Xml_ExpectExternalOrClose); } - _nextScaningFunction = ScanningFunction.Entity3; + _nextScanningFunction = ScanningFunction.Entity3; _scanningFunction = ScanningFunction.SystemId; return Token.SYSTEM; @@ -2177,7 +2177,7 @@ private async Task ScanEntity3Async() { _curPos += 5; _scanningFunction = ScanningFunction.Name; - _nextScaningFunction = ScanningFunction.ClosingTag; + _nextScanningFunction = ScanningFunction.ClosingTag; return Token.NData; } } @@ -2203,12 +2203,12 @@ private async Task ScanPublicId2Async() { if (_chars[_curPos] != '"' && _chars[_curPos] != '\'') { - _scanningFunction = _nextScaningFunction; + _scanningFunction = _nextScanningFunction; return Token.None; } await ScanLiteralAsync(LiteralType.SystemOrPublicID).ConfigureAwait(false); - _scanningFunction = _nextScaningFunction; + _scanningFunction = _nextScanningFunction; return Token.Literal; } @@ -2240,7 +2240,7 @@ private async Task ScanCondSection1Async() { goto default; } - _nextScaningFunction = ScanningFunction.SubsetContent; + _nextScanningFunction = ScanningFunction.SubsetContent; _scanningFunction = ScanningFunction.CondSection2; _curPos += 6; return Token.INCLUDE; @@ -2251,7 +2251,7 @@ private async Task ScanCondSection1Async() { goto default; } - _nextScaningFunction = ScanningFunction.CondSection3; + _nextScanningFunction = ScanningFunction.CondSection3; _scanningFunction = ScanningFunction.CondSection2; _curPos += 5; return Token.IGNORE; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaCollectionCompiler.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaCollectionCompiler.cs index 30981fa3c4e06..a1f642b93d04f 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaCollectionCompiler.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaCollectionCompiler.cs @@ -513,7 +513,7 @@ private void CompileGroup(XmlSchemaGroup group) else { group.IsProcessing = true; - group.CanonicalParticle ??= CannonicalizeParticle(group.Particle, true, true); + group.CanonicalParticle ??= CanonicalizeParticle(group.Particle, true, true); Debug.Assert(group.CanonicalParticle != null); group.IsProcessing = false; } @@ -958,7 +958,7 @@ private void CompileComplexContentExtension(XmlSchemaComplexType complexType, Xm CompileLocalAttributes(baseType, complexType, complexExtension.Attributes, complexExtension.AnyAttribute, XmlSchemaDerivationMethod.Extension); XmlSchemaParticle baseParticle = baseType.ContentTypeParticle; - XmlSchemaParticle extendedParticle = CannonicalizeParticle(complexExtension.Particle, true, true); + XmlSchemaParticle extendedParticle = CanonicalizeParticle(complexExtension.Particle, true, true); if (baseParticle != XmlSchemaParticle.Empty) { if (extendedParticle != XmlSchemaParticle.Empty) @@ -1055,7 +1055,7 @@ private void CheckParticleDerivation(XmlSchemaComplexType complexType) private XmlSchemaParticle CompileContentTypeParticle(XmlSchemaParticle? particle, bool substitution) { - XmlSchemaParticle ctp = CannonicalizeParticle(particle, true, substitution); + XmlSchemaParticle ctp = CanonicalizeParticle(particle, true, substitution); XmlSchemaChoice? choice = ctp as XmlSchemaChoice; if (choice != null && choice.Items.Count == 0) { @@ -1068,7 +1068,7 @@ private XmlSchemaParticle CompileContentTypeParticle(XmlSchemaParticle? particle return ctp; } - private XmlSchemaParticle CannonicalizeParticle(XmlSchemaParticle? particle, bool root, bool substitution) + private XmlSchemaParticle CanonicalizeParticle(XmlSchemaParticle? particle, bool root, bool substitution) { if (particle == null || particle.IsEmpty) { @@ -1076,23 +1076,23 @@ private XmlSchemaParticle CannonicalizeParticle(XmlSchemaParticle? particle, boo } else if (particle is XmlSchemaElement) { - return CannonicalizeElement((XmlSchemaElement)particle, substitution); + return CanonicalizeElement((XmlSchemaElement)particle, substitution); } else if (particle is XmlSchemaGroupRef) { - return CannonicalizeGroupRef((XmlSchemaGroupRef)particle, root, substitution); + return CanonicalizeGroupRef((XmlSchemaGroupRef)particle, root, substitution); } else if (particle is XmlSchemaAll) { - return CannonicalizeAll((XmlSchemaAll)particle, root, substitution); + return CanonicalizeAll((XmlSchemaAll)particle, root, substitution); } else if (particle is XmlSchemaChoice) { - return CannonicalizeChoice((XmlSchemaChoice)particle, root, substitution); + return CanonicalizeChoice((XmlSchemaChoice)particle, root, substitution); } else if (particle is XmlSchemaSequence) { - return CannonicalizeSequence((XmlSchemaSequence)particle, root, substitution); + return CanonicalizeSequence((XmlSchemaSequence)particle, root, substitution); } else { @@ -1100,7 +1100,7 @@ private XmlSchemaParticle CannonicalizeParticle(XmlSchemaParticle? particle, boo } } - private XmlSchemaParticle CannonicalizeElement(XmlSchemaElement element, bool substitution) + private XmlSchemaParticle CanonicalizeElement(XmlSchemaElement element, bool substitution) { if (!element.RefName.IsEmpty && substitution && (element.BlockResolved & XmlSchemaDerivationMethod.Substitution) == 0) { @@ -1123,7 +1123,7 @@ private XmlSchemaParticle CannonicalizeElement(XmlSchemaElement element, bool su } } - private XmlSchemaParticle CannonicalizeGroupRef(XmlSchemaGroupRef groupRef, bool root, bool substitution) + private XmlSchemaParticle CanonicalizeGroupRef(XmlSchemaGroupRef groupRef, bool root, bool substitution) { XmlSchemaGroup? group; if (groupRef.Redefined != null) @@ -1184,7 +1184,7 @@ private XmlSchemaParticle CannonicalizeGroupRef(XmlSchemaGroupRef groupRef, bool return groupRefBase; } - private XmlSchemaParticle CannonicalizeAll(XmlSchemaAll all, bool root, bool substitution) + private XmlSchemaParticle CanonicalizeAll(XmlSchemaAll all, bool root, bool substitution) { if (all.Items.Count > 0) { @@ -1196,7 +1196,7 @@ private XmlSchemaParticle CannonicalizeAll(XmlSchemaAll all, bool root, bool sub newAll.LinePosition = all.LinePosition; for (int i = 0; i < all.Items.Count; ++i) { - XmlSchemaParticle p = CannonicalizeParticle((XmlSchemaElement)all.Items[i], false, substitution); + XmlSchemaParticle p = CanonicalizeParticle((XmlSchemaElement)all.Items[i], false, substitution); if (p != XmlSchemaParticle.Empty) { newAll.Items.Add(p); @@ -1231,7 +1231,7 @@ private XmlSchemaParticle CannonicalizeAll(XmlSchemaAll all, bool root, bool sub } } - private XmlSchemaParticle CannonicalizeChoice(XmlSchemaChoice choice, bool root, bool substitution) + private XmlSchemaParticle CanonicalizeChoice(XmlSchemaChoice choice, bool root, bool substitution) { XmlSchemaChoice oldChoice = choice; if (choice.Items.Count > 0) @@ -1241,7 +1241,7 @@ private XmlSchemaParticle CannonicalizeChoice(XmlSchemaChoice choice, bool root, newChoice.MaxOccurs = choice.MaxOccurs; for (int i = 0; i < choice.Items.Count; ++i) { - XmlSchemaParticle p1 = CannonicalizeParticle((XmlSchemaParticle)choice.Items[i], false, substitution); + XmlSchemaParticle p1 = CanonicalizeParticle((XmlSchemaParticle)choice.Items[i], false, substitution); if (p1 != XmlSchemaParticle.Empty) { if (p1.MinOccurs == decimal.One && p1.MaxOccurs == decimal.One && p1 is XmlSchemaChoice) @@ -1278,7 +1278,7 @@ private XmlSchemaParticle CannonicalizeChoice(XmlSchemaChoice choice, bool root, } } - private XmlSchemaParticle CannonicalizeSequence(XmlSchemaSequence sequence, bool root, bool substitution) + private XmlSchemaParticle CanonicalizeSequence(XmlSchemaSequence sequence, bool root, bool substitution) { if (sequence.Items.Count > 0) { @@ -1287,7 +1287,7 @@ private XmlSchemaParticle CannonicalizeSequence(XmlSchemaSequence sequence, bool newSequence.MaxOccurs = sequence.MaxOccurs; for (int i = 0; i < sequence.Items.Count; ++i) { - XmlSchemaParticle p1 = CannonicalizeParticle((XmlSchemaParticle)sequence.Items[i], false, substitution); + XmlSchemaParticle p1 = CanonicalizeParticle((XmlSchemaParticle)sequence.Items[i], false, substitution); if (p1 != XmlSchemaParticle.Empty) { if (p1.MinOccurs == decimal.One && p1.MaxOccurs == decimal.One && p1 is XmlSchemaSequence) @@ -2468,7 +2468,7 @@ private void DumpContentModelTo(StringBuilder sb, XmlSchemaParticle particle) else if (particle is XmlSchemaGroupBase gb) { sb.Append('('); - string delimeter = (particle is XmlSchemaChoice) ? " | " : ", "; + string delimiter = (particle is XmlSchemaChoice) ? " | " : ", "; bool first = true; for (int i = 0; i < gb.Items.Count; ++i) { @@ -2478,7 +2478,7 @@ private void DumpContentModelTo(StringBuilder sb, XmlSchemaParticle particle) } else { - sb.Append(delimeter); + sb.Append(delimiter); } DumpContentModelTo(sb, (XmlSchemaParticle)gb.Items[i]); } diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaSetCompiler.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaSetCompiler.cs index 82e55eb9e06e1..c13e1df97a436 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaSetCompiler.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaSetCompiler.cs @@ -562,8 +562,8 @@ private void RecursivelyCheckRedefinedGroups(XmlSchemaGroup redefinedGroup, XmlS if (redefinedGroup.SelfReferenceCount == 0) { - baseGroup.CanonicalParticle ??= CannonicalizeParticle(baseGroup.Particle, true); - redefinedGroup.CanonicalParticle ??= CannonicalizeParticle(redefinedGroup.Particle, true); + baseGroup.CanonicalParticle ??= CanonicalizeParticle(baseGroup.Particle, true); + redefinedGroup.CanonicalParticle ??= CanonicalizeParticle(redefinedGroup.Particle, true); CompileParticleElements(redefinedGroup.CanonicalParticle); CompileParticleElements(baseGroup.CanonicalParticle); @@ -595,9 +595,9 @@ private void CompileGroup(XmlSchemaGroup group) else { group.IsProcessing = true; - group.CanonicalParticle ??= CannonicalizeParticle(group.Particle, true); + group.CanonicalParticle ??= CanonicalizeParticle(group.Particle, true); Debug.Assert(group.CanonicalParticle != null); - group.IsProcessing = false; //Not enclosung in try -finally as cannonicalizeParticle will not throw exception + group.IsProcessing = false; //Not enclosung in try -finally as canonicalizeParticle will not throw exception } } @@ -1034,7 +1034,7 @@ private void CompileComplexContentExtension(XmlSchemaComplexType complexType, Xm CompileLocalAttributes(baseType, complexType, complexExtension.Attributes, complexExtension.AnyAttribute, XmlSchemaDerivationMethod.Extension); XmlSchemaParticle baseParticle = baseType.ContentTypeParticle; - XmlSchemaParticle extendedParticle = CannonicalizeParticle(complexExtension.Particle, true); + XmlSchemaParticle extendedParticle = CanonicalizeParticle(complexExtension.Particle, true); if (baseParticle != XmlSchemaParticle.Empty) { if (extendedParticle != XmlSchemaParticle.Empty) @@ -1131,8 +1131,8 @@ private void CheckParticleDerivation(XmlSchemaComplexType complexType) _restrictionErrorMsg = null; if (baseType != null && baseType != XmlSchemaComplexType.AnyType && complexType.DerivedBy == XmlSchemaDerivationMethod.Restriction) { - XmlSchemaParticle derivedParticle = CannonicalizePointlessRoot(complexType.ContentTypeParticle); - XmlSchemaParticle baseParticle = CannonicalizePointlessRoot(baseType.ContentTypeParticle); + XmlSchemaParticle derivedParticle = CanonicalizePointlessRoot(complexType.ContentTypeParticle); + XmlSchemaParticle baseParticle = CanonicalizePointlessRoot(baseType.ContentTypeParticle); if (!IsValidRestriction(derivedParticle, baseParticle)) { if (_restrictionErrorMsg != null) @@ -1167,8 +1167,8 @@ private void CheckParticleDerivation(XmlSchemaComplexType complexType) private void CheckParticleDerivation(XmlSchemaParticle derivedParticle, XmlSchemaParticle baseParticle) { _restrictionErrorMsg = null; - derivedParticle = CannonicalizePointlessRoot(derivedParticle); - baseParticle = CannonicalizePointlessRoot(baseParticle); + derivedParticle = CanonicalizePointlessRoot(derivedParticle); + baseParticle = CanonicalizePointlessRoot(baseParticle); if (!IsValidRestriction(derivedParticle, baseParticle)) { if (_restrictionErrorMsg != null) @@ -1184,7 +1184,7 @@ private void CheckParticleDerivation(XmlSchemaParticle derivedParticle, XmlSchem private XmlSchemaParticle CompileContentTypeParticle(XmlSchemaParticle? particle) { - XmlSchemaParticle ctp = CannonicalizeParticle(particle, true); + XmlSchemaParticle ctp = CanonicalizeParticle(particle, true); XmlSchemaChoice? choice = ctp as XmlSchemaChoice; if (choice != null && choice.Items.Count == 0) { @@ -1198,7 +1198,7 @@ private XmlSchemaParticle CompileContentTypeParticle(XmlSchemaParticle? particle return ctp; } - private XmlSchemaParticle CannonicalizeParticle(XmlSchemaParticle? particle, bool root) + private XmlSchemaParticle CanonicalizeParticle(XmlSchemaParticle? particle, bool root) { if (particle == null || particle.IsEmpty) { @@ -1206,24 +1206,24 @@ private XmlSchemaParticle CannonicalizeParticle(XmlSchemaParticle? particle, boo } else if (particle is XmlSchemaElement) { - //return CannonicalizeElement((XmlSchemaElement)particle, substitution); + //return CanonicalizeElement((XmlSchemaElement)particle, substitution); return particle; } else if (particle is XmlSchemaGroupRef) { - return CannonicalizeGroupRef((XmlSchemaGroupRef)particle, root); + return CanonicalizeGroupRef((XmlSchemaGroupRef)particle, root); } else if (particle is XmlSchemaAll) { - return CannonicalizeAll((XmlSchemaAll)particle, root); + return CanonicalizeAll((XmlSchemaAll)particle, root); } else if (particle is XmlSchemaChoice) { - return CannonicalizeChoice((XmlSchemaChoice)particle, root); + return CanonicalizeChoice((XmlSchemaChoice)particle, root); } else if (particle is XmlSchemaSequence) { - return CannonicalizeSequence((XmlSchemaSequence)particle, root); + return CanonicalizeSequence((XmlSchemaSequence)particle, root); } else { @@ -1231,7 +1231,7 @@ private XmlSchemaParticle CannonicalizeParticle(XmlSchemaParticle? particle, boo } } - private XmlSchemaParticle CannonicalizeElement(XmlSchemaElement element) + private XmlSchemaParticle CanonicalizeElement(XmlSchemaElement element) { if (!element.RefName.IsEmpty && (element.ElementDecl!.Block & XmlSchemaDerivationMethod.Substitution) == 0) { @@ -1259,7 +1259,7 @@ private XmlSchemaParticle CannonicalizeElement(XmlSchemaElement element) } } - private XmlSchemaParticle CannonicalizeGroupRef(XmlSchemaGroupRef groupRef, bool root) + private XmlSchemaParticle CanonicalizeGroupRef(XmlSchemaGroupRef groupRef, bool root) { XmlSchemaGroup? group; if (groupRef.Redefined != null) @@ -1330,7 +1330,7 @@ private XmlSchemaParticle CannonicalizeGroupRef(XmlSchemaGroupRef groupRef, bool return groupRefBase; } - private XmlSchemaParticle CannonicalizeAll(XmlSchemaAll all, bool root) + private XmlSchemaParticle CanonicalizeAll(XmlSchemaAll all, bool root) { if (all.Items.Count > 0) { @@ -1340,7 +1340,7 @@ private XmlSchemaParticle CannonicalizeAll(XmlSchemaAll all, bool root) CopyPosition(newAll, all, true); for (int i = 0; i < all.Items.Count; ++i) { - XmlSchemaParticle p = CannonicalizeParticle((XmlSchemaElement)all.Items[i], false); + XmlSchemaParticle p = CanonicalizeParticle((XmlSchemaElement)all.Items[i], false); if (p != XmlSchemaParticle.Empty) { newAll.Items.Add(p); @@ -1363,7 +1363,7 @@ private XmlSchemaParticle CannonicalizeAll(XmlSchemaAll all, bool root) } } - private XmlSchemaParticle CannonicalizeChoice(XmlSchemaChoice choice, bool root) + private XmlSchemaParticle CanonicalizeChoice(XmlSchemaChoice choice, bool root) { XmlSchemaChoice oldChoice = choice; if (choice.Items.Count > 0) @@ -1374,7 +1374,7 @@ private XmlSchemaParticle CannonicalizeChoice(XmlSchemaChoice choice, bool root) CopyPosition(newChoice, choice, true); for (int i = 0; i < choice.Items.Count; ++i) { - XmlSchemaParticle p1 = CannonicalizeParticle((XmlSchemaParticle)choice.Items[i], false); + XmlSchemaParticle p1 = CanonicalizeParticle((XmlSchemaParticle)choice.Items[i], false); if (p1 != XmlSchemaParticle.Empty) { if (p1.MinOccurs == decimal.One && p1.MaxOccurs == decimal.One && p1 is XmlSchemaChoice) @@ -1411,7 +1411,7 @@ private XmlSchemaParticle CannonicalizeChoice(XmlSchemaChoice choice, bool root) } } - private XmlSchemaParticle CannonicalizeSequence(XmlSchemaSequence sequence, bool root) + private XmlSchemaParticle CanonicalizeSequence(XmlSchemaSequence sequence, bool root) { if (sequence.Items.Count > 0) { @@ -1421,7 +1421,7 @@ private XmlSchemaParticle CannonicalizeSequence(XmlSchemaSequence sequence, bool CopyPosition(newSequence, sequence, true); for (int i = 0; i < sequence.Items.Count; ++i) { - XmlSchemaParticle p1 = CannonicalizeParticle((XmlSchemaParticle)sequence.Items[i], false); + XmlSchemaParticle p1 = CanonicalizeParticle((XmlSchemaParticle)sequence.Items[i], false); if (p1 != XmlSchemaParticle.Empty) { XmlSchemaSequence p1Sequence = (p1 as XmlSchemaSequence)!; @@ -1455,7 +1455,7 @@ private XmlSchemaParticle CannonicalizeSequence(XmlSchemaSequence sequence, bool } [return: NotNullIfNotNull("particle")] - private static XmlSchemaParticle? CannonicalizePointlessRoot(XmlSchemaParticle particle) + private static XmlSchemaParticle? CanonicalizePointlessRoot(XmlSchemaParticle particle) { if (particle == null) { @@ -1529,12 +1529,12 @@ private bool IsValidRestriction(XmlSchemaParticle derivedParticle, XmlSchemaPart } if (derivedParticle is XmlSchemaElement derivedElem) { //check for derived element being head of substitutionGroup - derivedParticle = CannonicalizeElement(derivedElem); + derivedParticle = CanonicalizeElement(derivedElem); } if (baseParticle is XmlSchemaElement baseElem) { XmlSchemaParticle newBaseParticle; - newBaseParticle = CannonicalizeElement(baseElem); + newBaseParticle = CanonicalizeElement(baseElem); if (newBaseParticle is XmlSchemaChoice) { //Base Element is subs grp head. return IsValidRestriction(derivedParticle, newBaseParticle); diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/ExtensionQuery.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/ExtensionQuery.cs index a3fc80014209e..b3e7b72a1b9dc 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/ExtensionQuery.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/ExtensionQuery.cs @@ -13,7 +13,7 @@ internal abstract class ExtensionQuery : Query protected string prefix; protected string name; protected XsltContext? xsltContext; - private ResetableIterator? _queryIterator; + private ResettableIterator? _queryIterator; public ExtensionQuery(string prefix, string name) : base() { @@ -25,7 +25,7 @@ protected ExtensionQuery(ExtensionQuery other) : base(other) this.prefix = other.prefix; this.name = other.name; this.xsltContext = other.xsltContext; - _queryIterator = (ResetableIterator?)Clone(other._queryIterator); + _queryIterator = (ResettableIterator?)Clone(other._queryIterator); } public override void Reset() @@ -88,12 +88,12 @@ public override int CurrentPosition return this; // We map null to NodeSet to let $null/foo work well. } - ResetableIterator? resetable = value as ResetableIterator; - if (resetable != null) + ResettableIterator? resettable = value as ResettableIterator; + if (resettable != null) { // We need Clone() value because variable may be used several times // and they shouldn't - _queryIterator = (ResetableIterator)resetable.Clone(); + _queryIterator = (ResettableIterator)resettable.Clone(); return this; } XPathNodeIterator? nodeIterator = value as XPathNodeIterator; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/Query.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/Query.cs index d79bde89ac977..d94090693b3fb 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/Query.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/Query.cs @@ -27,7 +27,7 @@ internal enum QueryProps // Turn off DebuggerDisplayAttribute. in subclasses of Query. // Calls to Current in the XPathNavigator.DebuggerDisplayProxy may change state or throw [DebuggerDisplay("{ToString()}")] - internal abstract class Query : ResetableIterator + internal abstract class Query : ResettableIterator { public Query() { } protected Query(Query other) : base(other) { } diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/ResetableIterator.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/ResettableIterator.cs similarity index 82% rename from src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/ResetableIterator.cs rename to src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/ResettableIterator.cs index d88410000e399..6f9128b9a7c47 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/ResetableIterator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/ResettableIterator.cs @@ -5,14 +5,14 @@ namespace MS.Internal.Xml.XPath { - internal abstract class ResetableIterator : XPathNodeIterator + internal abstract class ResettableIterator : XPathNodeIterator { // the best place for this constructors to be is XPathNodeIterator, to avoid DCR at this time let's ground them here - public ResetableIterator() + public ResettableIterator() { base.count = -1; } - protected ResetableIterator(ResetableIterator other) + protected ResettableIterator(ResettableIterator other) { base.count = other.count; } diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathArrayIterator.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathArrayIterator.cs index f7d35ddfc40d1..6bfaa682e9319 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathArrayIterator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathArrayIterator.cs @@ -11,7 +11,7 @@ namespace MS.Internal.Xml.XPath { [DebuggerDisplay("Position={CurrentPosition}, Current={debuggerDisplayProxy, nq}")] - internal class XPathArrayIterator : ResetableIterator + internal class XPathArrayIterator : ResettableIterator { protected IList list; protected int index; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathEmptyIterator.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathEmptyIterator.cs index c58f7447519d3..6c9f61662249c 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathEmptyIterator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathEmptyIterator.cs @@ -5,7 +5,7 @@ namespace MS.Internal.Xml.XPath { - internal sealed class XPathEmptyIterator : ResetableIterator + internal sealed class XPathEmptyIterator : ResettableIterator { private XPathEmptyIterator() { } public override XPathNodeIterator Clone() { return this; } diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathMultyIterator.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathMultyIterator.cs index edc35a6ce0cd7..aadb4b25698c4 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathMultyIterator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathMultyIterator.cs @@ -10,16 +10,16 @@ namespace MS.Internal.Xml.XPath { - internal sealed class XPathMultyIterator : ResetableIterator + internal sealed class XPathMultyIterator : ResettableIterator { - private ResetableIterator[] arr; + private ResettableIterator[] arr; private int firstNotEmpty; private int position; public XPathMultyIterator(ArrayList inputArray) { // NOTE: We do not clone the passed inputArray supposing that it is not changed outside of this class - this.arr = new ResetableIterator[inputArray.Count]; + this.arr = new ResettableIterator[inputArray.Count]; for (int i = 0; i < this.arr.Length; i++) { var iterator = (ArrayList?)inputArray[i]; @@ -51,7 +51,7 @@ private bool Advance(int pos) { if (firstNotEmpty != pos) { - ResetableIterator empty = arr[pos]; + ResettableIterator empty = arr[pos]; Array.Copy(arr, firstNotEmpty, arr, firstNotEmpty + 1, pos - firstNotEmpty); arr[firstNotEmpty] = empty; } @@ -67,10 +67,10 @@ private bool Advance(int pos) private bool SiftItem(int item) { Debug.Assert(firstNotEmpty <= item && item < arr.Length); - ResetableIterator it = arr[item]; + ResettableIterator it = arr[item]; while (item + 1 < arr.Length) { - ResetableIterator itNext = arr[item + 1]; + ResettableIterator itNext = arr[item + 1]; Debug.Assert(it.Current != null && itNext.Current != null); XmlNodeOrder order = Query.CompareNodes(it.Current, itNext.Current); if (order == XmlNodeOrder.Before) @@ -110,7 +110,7 @@ public override void Reset() public XPathMultyIterator(XPathMultyIterator it) { - this.arr = (ResetableIterator[])it.arr.Clone(); + this.arr = (ResettableIterator[])it.arr.Clone(); this.firstNotEmpty = it.firstNotEmpty; this.position = it.position; } diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathSelectionIterator.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathSelectionIterator.cs index ab2d689a977e5..cca0d030e95b0 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathSelectionIterator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathSelectionIterator.cs @@ -8,7 +8,7 @@ namespace MS.Internal.Xml.XPath // We need this wrapper object to: // 1. Calculate position // 2. Protect internal query.Current from user who may call MoveNext(). - internal sealed class XPathSelectionIterator : ResetableIterator + internal sealed class XPathSelectionIterator : ResettableIterator { private XPathNavigator _nav; private readonly Query _query; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathSingletonIterator.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathSingletonIterator.cs index 9c62162089b4a..6f60d483c18ac 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathSingletonIterator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathSingletonIterator.cs @@ -6,7 +6,7 @@ namespace MS.Internal.Xml.XPath { - internal sealed class XPathSingletonIterator : ResetableIterator + internal sealed class XPathSingletonIterator : ResettableIterator { private readonly XPathNavigator _nav; private int _position; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNodeIterator.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNodeIterator.cs index 4bd27407e99b1..f02047d875ee6 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNodeIterator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNodeIterator.cs @@ -38,7 +38,7 @@ public virtual IEnumerator GetEnumerator() private object? debuggerDisplayProxy { get { return Current == null ? null : (object)new XPathNavigator.DebuggerDisplayProxy(Current); } } /// - /// Implementation of a resetable enumerator that is linked to the XPathNodeIterator used to create it. + /// Implementation of a resettable enumerator that is linked to the XPathNodeIterator used to create it. /// private sealed class Enumerator : IEnumerator { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XmlComplianceUtil.cs b/src/libraries/System.Private.Xml/src/System/Xml/XmlComplianceUtil.cs index 7af21f8e2c459..6d032d39f4d2e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XmlComplianceUtil.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XmlComplianceUtil.cs @@ -10,7 +10,7 @@ namespace System.Xml internal static class XmlComplianceUtil { // Replaces \r\n, \n, \r and \t with single space (0x20) and then removes spaces - // at the beggining and the end of the string and replaces sequences of spaces + // at the beginning and the end of the string and replaces sequences of spaces // with a single space. public static string NonCDataNormalize(string value) { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XPath/XPathBuilder.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XPath/XPathBuilder.cs index 64feb4c55600a..2ce5e63643658 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XPath/XPathBuilder.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XPath/XPathBuilder.cs @@ -423,7 +423,7 @@ private QilNode BuildAxis(XPathAxis xpathAxis, XPathNodeType nodeType, string? n { result = _f.BaseFactory.DocOrderDistinct(result); // To make grouping operator NOP we should always return path expressions in DOD. - // I can't use Pattern factory here becasue Predicate() depends on fact that DOD() is + // I can't use Pattern factory here because Predicate() depends on fact that DOD() is // outmost node in reverse steps } return result; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/QilGenerator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/QilGenerator.cs index 043f0f78a8af7..e9583f50351b8 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/QilGenerator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/QilGenerator.cs @@ -946,7 +946,7 @@ private QilNode CompileAttribute(NodeCtor node) else { nsUri = (string)(QilLiteral)qilNs; - // if both name and ns are non AVT and this ns is already bind to the same prefix we can avoid reseting ns management + // if both name and ns are non AVT and this ns is already bind to the same prefix we can avoid resetting ns management explicitNamespace = true; } // Check the case diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltLoader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltLoader.cs index a7ab6fd2c0ccf..a77d24a3c1d47 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltLoader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltLoader.cs @@ -2704,7 +2704,7 @@ private QilName ParseModeListAttribute(int attNum) } if (1 < modes.Count) { - ReportNYI("Multipe modes"); + ReportNYI("Multiple modes"); return nullMode; } if (modes.Count == 0) @@ -3086,7 +3086,7 @@ internal static XslNode SetInfo(XslNode to, List? content, ContextInfo // NOTE! We inverting namespace order that is irelevant for namespace of the same node, but // for included styleseets we don't keep stylesheet as a node and adding it's namespaces to // each toplevel element by MergeNamespaces(). - // Namespaces of stylesheet can be overriden in template and to make this works correclety we + // Namespaces of stylesheet can be overridden in template and to make this works correclety we // should attache them after NsDec of top level elements. // Toplevel element almost never contais NsDecl and in practice node duplication will not happened, but if they have // we should copy NsDecls of stylesheet locally in toplevel elements. diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ActionFrame.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ActionFrame.cs index 3a9d084827284..c13c3fbbc6f59 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ActionFrame.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ActionFrame.cs @@ -24,13 +24,13 @@ internal sealed class ActionFrame private XPathNodeIterator? _newNodeSet; // Node set for processing children or other templates // Variables to store action data between states: - private PrefixQName? _calulatedName; // Used in ElementAction and AttributeAction + private PrefixQName? _calculatedName; // Used in ElementAction and AttributeAction private string? _storedOutput; // Used in NumberAction, CopyOfAction, ValueOfAction and ProcessingInstructionAction - internal PrefixQName? CalulatedName + internal PrefixQName? CalculatedName { - get { return _calulatedName; } - set { _calulatedName = value; } + get { return _calculatedName; } + set { _calculatedName = value; } } internal string? StoredOutput diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/AttributeAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/AttributeAction.cs index 41fec1df934db..bd0d73ec0f9c3 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/AttributeAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/AttributeAction.cs @@ -122,16 +122,16 @@ internal override void Execute(Processor processor, ActionFrame frame) case Initialized: if (_qname != null) { - frame.CalulatedName = _qname; + frame.CalculatedName = _qname; } else { - frame.CalulatedName = CreateAttributeQName( + frame.CalculatedName = CreateAttributeQName( _nameAvt == null ? _name! : _nameAvt.Evaluate(processor, frame), _nsAvt == null ? _nsUri : _nsAvt.Evaluate(processor, frame), _manager ); - if (frame.CalulatedName == null) + if (frame.CalculatedName == null) { // name == "xmlns" case. Ignore xsl:attribute frame.Finished(); @@ -141,7 +141,7 @@ internal override void Execute(Processor processor, ActionFrame frame) goto case NameDone; case NameDone: { - PrefixQName qname = frame.CalulatedName!; + PrefixQName qname = frame.CalculatedName!; if (processor.BeginEvent(XPathNodeType.Attribute, qname.Prefix, qname.Name, qname.Namespace, false) == false) { // Come back later diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ElementAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ElementAction.cs index 6cbb62a79499b..a19d15990cbb4 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ElementAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ElementAction.cs @@ -107,11 +107,11 @@ internal override void Execute(Processor processor, ActionFrame frame) case Initialized: if (_qname != null) { - frame.CalulatedName = _qname; + frame.CalculatedName = _qname; } else { - frame.CalulatedName = CreateElementQName( + frame.CalculatedName = CreateElementQName( _nameAvt == null ? _name! : _nameAvt.Evaluate(processor, frame), _nsAvt == null ? _nsUri : _nsAvt.Evaluate(processor, frame), _manager @@ -121,7 +121,7 @@ internal override void Execute(Processor processor, ActionFrame frame) case NameDone: { - PrefixQName qname = frame.CalulatedName!; + PrefixQName qname = frame.CalculatedName!; if (processor.BeginEvent(XPathNodeType.Element, qname.Prefix, qname.Name, qname.Namespace, _empty) == false) { // Come back later diff --git a/src/libraries/System.Private.Xml/tests/Writers/XmlWriterApi/TCCheckChars.cs b/src/libraries/System.Private.Xml/tests/Writers/XmlWriterApi/TCCheckChars.cs index 5c248988bfe76..dedc03e7af571 100644 --- a/src/libraries/System.Private.Xml/tests/Writers/XmlWriterApi/TCCheckChars.cs +++ b/src/libraries/System.Private.Xml/tests/Writers/XmlWriterApi/TCCheckChars.cs @@ -314,7 +314,7 @@ public void checkChars_4(XmlWriterUtils utils, string tokenType, bool checkChara } /*============================================================================= - The writer contructor will throw XmlException when CheckCharacters=true and + The writer constructor will throw XmlException when CheckCharacters=true and - IndentChars or NewLineChars contains non-whitespace character when NewLineOnAttributes=true or - IndentChars or NewLineChars contains <, &, ]]> or an invalid surrogate character when NewLineOnAttributes=false diff --git a/src/libraries/System.Private.Xml/tests/Writers/XmlWriterApi/TCFullEndElement.cs b/src/libraries/System.Private.Xml/tests/Writers/XmlWriterApi/TCFullEndElement.cs index d50456ce37461..92eafd29afc4b 100644 --- a/src/libraries/System.Private.Xml/tests/Writers/XmlWriterApi/TCFullEndElement.cs +++ b/src/libraries/System.Private.Xml/tests/Writers/XmlWriterApi/TCFullEndElement.cs @@ -1559,7 +1559,7 @@ public void CData_11(XmlWriterUtils utils) public void CData_12(XmlWriterUtils utils) { // WriteCData with empty string when the write buffer looks like - // aaaaaaa.... (currently lenght is 2048 * 3 - len("aaaaaaa.... (currently length is 2048 * 3 - len(""; string xml3 = "(value, diff --git a/src/libraries/System.Private.Xml/tests/Xslt/TestFiles/TestData/XsltApi/MyObject_FnExists.xsl b/src/libraries/System.Private.Xml/tests/Xslt/TestFiles/TestData/XsltApi/MyObject_FnExists.xsl index 2f92661b695ca..0fdb8edff0737 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/TestFiles/TestData/XsltApi/MyObject_FnExists.xsl +++ b/src/libraries/System.Private.Xml/tests/Xslt/TestFiles/TestData/XsltApi/MyObject_FnExists.xsl @@ -5,7 +5,7 @@ DoNothing Function Test Pass - Construtor Function Test Pass + Constructor Function Test Pass Return Int Function Test Pass Return String Function Test Pass ReturnInt Function Test Pass diff --git a/src/libraries/System.Private.Xml/tests/Xslt/TestFiles/TestData/XsltScenarios/Schematron/schematron-message.xsl b/src/libraries/System.Private.Xml/tests/Xslt/TestFiles/TestData/XsltScenarios/Schematron/schematron-message.xsl index 995f22702fc77..d9951b03cd3a2 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/TestFiles/TestData/XsltScenarios/Schematron/schematron-message.xsl +++ b/src/libraries/System.Private.Xml/tests/Xslt/TestFiles/TestData/XsltScenarios/Schematron/schematron-message.xsl @@ -1,5 +1,5 @@ - @@ -502,10 +502,10 @@ Possible constructors are: '{2}'. Must set 'language' attribute for grammars with scripts. - + Attribute 'method' in 'script' defined more than once. - + Attribute 'rule' in 'script' defined more than once. diff --git a/src/libraries/System.Speech/src/SRID.cs b/src/libraries/System.Speech/src/SRID.cs index 09f92a177573a..70909add16721 100644 --- a/src/libraries/System.Speech/src/SRID.cs +++ b/src/libraries/System.Speech/src/SRID.cs @@ -132,8 +132,8 @@ internal enum SRID UnsupportedLexicon, InvalidScriptAttribute, NoLanguageSet, - MethodAttributeDefinedMultipeTimes, - RuleAttributeDefinedMultipeTimes, + MethodAttributeDefinedMultipleTimes, + RuleAttributeDefinedMultipleTimes, InvalidAssemblyReferenceAttribute, InvalidImportNamespaceAttribute, NoUriForSpecialRuleRef, diff --git a/src/libraries/System.Speech/src/Synthesis/TTSEngine/SAPIEngineTypes.cs b/src/libraries/System.Speech/src/Synthesis/TTSEngine/SAPIEngineTypes.cs index de52edeb4c820..5ffde0d34b67e 100644 --- a/src/libraries/System.Speech/src/Synthesis/TTSEngine/SAPIEngineTypes.cs +++ b/src/libraries/System.Speech/src/Synthesis/TTSEngine/SAPIEngineTypes.cs @@ -114,7 +114,7 @@ internal enum SPVACTIONS internal enum SPPARTOFSPEECH { //--- SAPI5 public POS category values (bits 28-31) - SPPS_NotOverriden = -1, + SPPS_NotOverridden = -1, SPPS_Unknown = 0, SPPS_Noun = 0x1000, SPPS_Verb = 0x2000, diff --git a/src/libraries/System.Text.Encoding/tests/Encoder/EncoderGetBytes2.cs b/src/libraries/System.Text.Encoding/tests/Encoder/EncoderGetBytes2.cs index 718983a988c99..6619fdc6ca465 100644 --- a/src/libraries/System.Text.Encoding/tests/Encoder/EncoderGetBytes2.cs +++ b/src/libraries/System.Text.Encoding/tests/Encoder/EncoderGetBytes2.cs @@ -123,7 +123,7 @@ static void encoderGetBytesMixedInput(Encoder encoder, char[] chars, int length, VerificationFixedEncodingHelper(encoder, chars, length, b, byteLength); } - // Bytes does not have enough capacity to accomodate result + // Bytes does not have enough capacity to accommodate result string s = "T\uD83D\uDE01est"; char[] c = s.ToCharArray(); @@ -138,7 +138,7 @@ static void encoderGetBytesMixedInput(Encoder encoder, char[] chars, int length, [MemberData(nameof(Encoders_MixedInput))] public void EncoderGetBytesMixedInputBufferTooSmall(Encoder encoder, int asciiSize, int unicodeSize0, int unicodeSize1) { - // Bytes does not have enough capacity to accomodate result + // Bytes does not have enough capacity to accommodate result string s = "T\uD83D\uDE01est"; char[] c = s.ToCharArray(); diff --git a/src/libraries/System.Text.Encoding/tests/NegativeEncodingTests.cs b/src/libraries/System.Text.Encoding/tests/NegativeEncodingTests.cs index 4137212b99fa5..1754d8771ab44 100644 --- a/src/libraries/System.Text.Encoding/tests/NegativeEncodingTests.cs +++ b/src/libraries/System.Text.Encoding/tests/NegativeEncodingTests.cs @@ -124,7 +124,7 @@ public static unsafe void GetBytes_Invalid(Encoding encoding) AssertExtensions.Throws("byteIndex", () => encoding.GetBytes("a", 0, 1, new byte[1], 2)); AssertExtensions.Throws("byteIndex", () => encoding.GetBytes(new char[1], 0, 1, new byte[1], 2)); - // Bytes does not have enough capacity to accomodate result + // Bytes does not have enough capacity to accommodate result AssertExtensions.Throws("bytes", () => encoding.GetBytes("a", 0, 1, new byte[0], 0)); AssertExtensions.Throws("bytes", () => encoding.GetBytes("abc", 0, 3, new byte[1], 0)); AssertExtensions.Throws("bytes", () => encoding.GetBytes("\uD800\uDC00", 0, 2, new byte[1], 0)); @@ -151,7 +151,7 @@ public static unsafe void GetBytes_Invalid(Encoding encoding) AssertExtensions.Throws("charCount", () => encoding.GetBytes(pCharsLocal, -1, pBytesLocal, bytes.Length)); AssertExtensions.Throws("byteCount", () => encoding.GetBytes(pCharsLocal, chars.Length, pBytesLocal, -1)); - // Bytes does not have enough capacity to accomodate result + // Bytes does not have enough capacity to accommodate result AssertExtensions.Throws("bytes", () => encoding.GetBytes(pCharsLocal, chars.Length, pSmallBytesLocal, smallBytes.Length)); } } @@ -221,7 +221,7 @@ public static unsafe void GetChars_Invalid(Encoding encoding) AssertExtensions.Throws("charIndex", () => encoding.GetChars(new byte[4], 0, 4, new char[1], -1)); AssertExtensions.Throws("charIndex", () => encoding.GetChars(new byte[4], 0, 4, new char[1], 2)); - // Chars does not have enough capacity to accomodate result + // Chars does not have enough capacity to accommodate result AssertExtensions.Throws("chars", () => encoding.GetChars(new byte[4], 0, 4, new char[1], 1)); byte[] bytes = new byte[encoding.GetMaxByteCount(2)]; @@ -243,7 +243,7 @@ public static unsafe void GetChars_Invalid(Encoding encoding) AssertExtensions.Throws("byteCount", () => encoding.GetChars(pBytesLocal, -1, pCharsLocal, chars.Length)); AssertExtensions.Throws("charCount", () => encoding.GetChars(pBytesLocal, bytes.Length, pCharsLocal, -1)); - // Chars does not have enough capacity to accomodate result + // Chars does not have enough capacity to accommodate result AssertExtensions.Throws("chars", () => encoding.GetChars(pBytesLocal, bytes.Length, pSmallCharsLocal, smallChars.Length)); } } diff --git a/src/libraries/System.Text.Encoding/tests/UTF8Encoding/UTF8EncodingEncode.cs b/src/libraries/System.Text.Encoding/tests/UTF8Encoding/UTF8EncodingEncode.cs index b7c89a7fe681b..bf922b277e0fa 100644 --- a/src/libraries/System.Text.Encoding/tests/UTF8Encoding/UTF8EncodingEncode.cs +++ b/src/libraries/System.Text.Encoding/tests/UTF8Encoding/UTF8EncodingEncode.cs @@ -172,7 +172,7 @@ public static IEnumerable Encode_InvalidChars_TestData() public static unsafe void GetBytes_ValidASCIIUnicode() { Encoding encoding = Encoding.UTF8; - // Bytes has enough capacity to accomodate result + // Bytes has enough capacity to accommodate result string s = "T\uD83D\uDE01est"; Assert.Equal(4, encoding.GetBytes(s, 0, 2, new byte[4], 0)); Assert.Equal(5, encoding.GetBytes(s, 0, 3, new byte[5], 0)); @@ -200,7 +200,7 @@ public static unsafe void GetBytes_ValidASCIIUnicode() public static unsafe void GetBytes_InvalidASCIIUnicode() { Encoding encoding = Encoding.UTF8; - // Bytes does not have enough capacity to accomodate result + // Bytes does not have enough capacity to accommodate result string s = "T\uD83D\uDE01est"; AssertExtensions.Throws("bytes", () => encoding.GetBytes(s, 0, 2, new byte[3], 0)); AssertExtensions.Throws("bytes", () => encoding.GetBytes(s, 0, 3, new byte[4], 0)); diff --git a/src/libraries/System.Text.Json/docs/ParameterizedCtorSpec.md b/src/libraries/System.Text.Json/docs/ParameterizedCtorSpec.md index 01830385f5dfb..ad98d3c715e23 100644 --- a/src/libraries/System.Text.Json/docs/ParameterizedCtorSpec.md +++ b/src/libraries/System.Text.Json/docs/ParameterizedCtorSpec.md @@ -69,7 +69,7 @@ namespace System.Text.Json.Serialization /// /// When placed on a constructor, indicates that the constructor should be used to create /// instances of the type on deserialization. - /// The construtor must be public. The attribute cannot be placed on multiple constructors. + /// The constructor must be public. The attribute cannot be placed on multiple constructors. /// [AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false)] public sealed partial class JsonConstructorAttribute : JsonAttribute diff --git a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs index f16cfeedaa642..ca04dff1fc839 100644 --- a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs +++ b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs @@ -1031,7 +1031,7 @@ private TypeGenerationSpec GetOrAddTypeGenerationSpec(Type type, JsonSourceGener bool isVirtual = propertyInfo.IsVirtual(); if (propertyInfo.GetIndexParameters().Length > 0 || - PropertyIsOverridenAndIgnored(propertyInfo.Name, propertyInfo.PropertyType, isVirtual, ignoredMembers)) + PropertyIsOverriddenAndIgnored(propertyInfo.Name, propertyInfo.PropertyType, isVirtual, ignoredMembers)) { continue; } @@ -1042,7 +1042,7 @@ private TypeGenerationSpec GetOrAddTypeGenerationSpec(Type type, JsonSourceGener foreach (FieldInfo fieldInfo in currentType.GetFields(bindingFlags)) { - if (PropertyIsOverridenAndIgnored(fieldInfo.Name, fieldInfo.FieldType, currentMemberIsVirtual: false, ignoredMembers)) + if (PropertyIsOverriddenAndIgnored(fieldInfo.Name, fieldInfo.FieldType, currentMemberIsVirtual: false, ignoredMembers)) { continue; } @@ -1163,7 +1163,7 @@ private static void CacheMember( private static bool PropertyIsConstructorParameter(PropertyGenerationSpec propSpec, ParameterGenerationSpec[]? paramGenSpecArray) => paramGenSpecArray != null && paramGenSpecArray.Any(paramSpec => propSpec.ClrName.Equals(paramSpec.ParameterInfo.Name, StringComparison.OrdinalIgnoreCase)); - private static bool PropertyIsOverridenAndIgnored( + private static bool PropertyIsOverriddenAndIgnored( string currentMemberName, Type currentMemberType, bool currentMemberIsVirtual, diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/JsonHelpers.Date.cs b/src/libraries/System.Text.Json/src/System/Text/Json/JsonHelpers.Date.cs index 9ee0205b61511..4c277685b6d7e 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/JsonHelpers.Date.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/JsonHelpers.Date.cs @@ -216,7 +216,7 @@ private static bool TryParseDateTimeOffset(ReadOnlySpan source, out DateTi // Decimal fractions are allowed for hours, minutes and seconds (5.3.14). // We only allow fractions for seconds currently. Lower order components // can't follow, i.e. you can have T23.3, but not T23.3:04. There must be - // one digit, but the max number of digits is implemenation defined. We + // one digit, but the max number of digits is implementation defined. We // currently allow up to 16 digits of fractional seconds only. While we // support 16 fractional digits we only parse the first seven, anything // past that is considered a zero. This is to stay compatible with the diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterFactory.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterFactory.cs index f9bcd6e7b4878..fbc407b4a347f 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterFactory.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterFactory.cs @@ -15,7 +15,7 @@ namespace System.Text.Json.Serialization public abstract class JsonConverterFactory : JsonConverter { /// - /// When overidden, constructs a new instance. + /// When overridden, constructs a new instance. /// protected JsonConverterFactory() { } diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs index da4963acdb823..02021bdc8eb9f 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs @@ -14,7 +14,7 @@ namespace System.Text.Json.Serialization public abstract partial class JsonConverter : JsonConverter { /// - /// When overidden, constructs a new instance. + /// When overridden, constructs a new instance. /// protected internal JsonConverter() { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/CustomJsonTypeInfoOfT.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/CustomJsonTypeInfoOfT.cs index 4b48d7b2d72ae..a997ee01d021b 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/CustomJsonTypeInfoOfT.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/CustomJsonTypeInfoOfT.cs @@ -25,7 +25,7 @@ internal CustomJsonTypeInfo(JsonConverter converter, JsonSerializerOptions optio internal override JsonParameterInfoValues[] GetParameterInfoValues() { - // Parametrized constructors not supported yet for custom types + // Parameterized constructors not supported yet for custom types return Array.Empty(); } } diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonMetadataServices.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonMetadataServices.cs index 9451d98df35f4..bdaec174b731b 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonMetadataServices.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonMetadataServices.cs @@ -18,7 +18,7 @@ public static partial class JsonMetadataServices /// The type that the converter for the property returns or accepts when converting JSON data. /// The to initialize the metadata with. /// Provides serialization metadata about the property or field. - /// A instance intialized with the provided metadata. + /// A instance initialized with the provided metadata. /// This API is for use by the output of the System.Text.Json source generator and should not be called directly. public static JsonPropertyInfo CreatePropertyInfo(JsonSerializerOptions options, JsonPropertyInfoValues propertyInfo) { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/PolymorphicTypeResolver.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/PolymorphicTypeResolver.cs index 11f988190785f..9fd1cd15469ef 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/PolymorphicTypeResolver.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/PolymorphicTypeResolver.cs @@ -195,7 +195,7 @@ public static bool IsSupportedDerivedType(Type baseType, Type? derivedType) => DerivedJsonTypeInfo? result = null; - // First, walk up the class hierarchy for any suported types. + // First, walk up the class hierarchy for any supported types. for (Type? candidate = type.BaseType; BaseType.IsAssignableFrom(candidate); candidate = candidate.BaseType) { Debug.Assert(candidate != null); diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionJsonTypeInfoOfT.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionJsonTypeInfoOfT.cs index 224d0c2b4616c..042493e5806b7 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionJsonTypeInfoOfT.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionJsonTypeInfoOfT.cs @@ -79,7 +79,7 @@ private void AddPropertiesAndParametersUsingReflection() // Ignore indexers and virtual properties that have overrides that were [JsonIgnore]d. if (propertyInfo.GetIndexParameters().Length > 0 || - PropertyIsOverridenAndIgnored(propertyName, propertyInfo.PropertyType, propertyInfo.IsVirtual(), ignoredMembers)) + PropertyIsOverriddenAndIgnored(propertyName, propertyInfo.PropertyType, propertyInfo.IsVirtual(), ignoredMembers)) { continue; } @@ -109,7 +109,7 @@ private void AddPropertiesAndParametersUsingReflection() { string fieldName = fieldInfo.Name; - if (PropertyIsOverridenAndIgnored(fieldName, fieldInfo.FieldType, currentMemberIsVirtual: false, ignoredMembers)) + if (PropertyIsOverriddenAndIgnored(fieldName, fieldInfo.FieldType, currentMemberIsVirtual: false, ignoredMembers)) { continue; } @@ -208,7 +208,7 @@ private void CacheMember( return numberHandlingAttribute?.Handling; } - private static bool PropertyIsOverridenAndIgnored( + private static bool PropertyIsOverriddenAndIgnored( string currentMemberName, Type currentMemberType, bool currentMemberIsVirtual, diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Transcoding.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Transcoding.cs index 1dbe6c3be18df..dcaaea4dc8acb 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Transcoding.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Transcoding.cs @@ -47,7 +47,7 @@ public static unsafe OperationStatus ToUtf8(ReadOnlySpan utf16Source, Span // number of characters, and the slow encoding loop typically ends up running for the last few // characters anyway since the fast encoding loop needs 5 characters on input at least. // Thus don't use the fast decoding loop at all if we don't have enough characters. The threashold - // was choosen based on performance testing. + // was chosen based on performance testing. // Note that if we don't have enough bytes, pStop will prevent us from entering the fast loop. while (pEnd - pSrc > 13) { @@ -102,7 +102,7 @@ public static unsafe OperationStatus ToUtf8(ReadOnlySpan utf16Source, Span goto LongCodeWithMask; } - // Unfortunately, this is endianess sensitive + // Unfortunately, this is endianness sensitive if (!BitConverter.IsLittleEndian) { *pTarget = (byte)(ch >> 16); diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/MetadataTests/DefaultJsonTypeInfoResolverTests.JsonTypeInfo.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/MetadataTests/DefaultJsonTypeInfoResolverTests.JsonTypeInfo.cs index 9ee30514c7c8f..b66c4b1ceb01b 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/MetadataTests/DefaultJsonTypeInfoResolverTests.JsonTypeInfo.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/MetadataTests/DefaultJsonTypeInfoResolverTests.JsonTypeInfo.cs @@ -24,7 +24,7 @@ public static partial class DefaultJsonTypeInfoResolverTests [InlineData(typeof(ListWrapper))] public static void TypeInfoPropertiesDefaults(Type type) { - bool usingParametrizedConstructor = type.GetConstructors() + bool usingParameterizedConstructor = type.GetConstructors() .FirstOrDefault(ctor => ctor.GetParameters().Length != 0 && ctor.GetCustomAttribute() != null) != null; DefaultJsonTypeInfoResolver r = new(); @@ -36,7 +36,7 @@ public static void TypeInfoPropertiesDefaults(Type type) Assert.Same(o, ti.Options); Assert.NotNull(ti.Properties); - if (ti.Kind == JsonTypeInfoKind.Object && usingParametrizedConstructor) + if (ti.Kind == JsonTypeInfoKind.Object && usingParameterizedConstructor) { Assert.Null(ti.CreateObject); Func createObj = () => Activator.CreateInstance(type); @@ -763,57 +763,57 @@ public static void JsonConstructorAttributeIsOverriddenWhenCreateObjectIsSet() DefaultJsonTypeInfoResolver resolver = new(); resolver.Modifiers.Add(ti => { - if (ti.Type == typeof(ClassWithParametrizedConstructorAndReadOnlyProperties)) + if (ti.Type == typeof(ClassWithParameterizedConstructorAndReadOnlyProperties)) { Assert.Null(ti.CreateObject); - ti.CreateObject = () => new ClassWithParametrizedConstructorAndReadOnlyProperties(1, "test", dummyParam: true); + ti.CreateObject = () => new ClassWithParameterizedConstructorAndReadOnlyProperties(1, "test", dummyParam: true); } }); JsonSerializerOptions o = new() { TypeInfoResolver = resolver }; string json = """{"A":2,"B":"foo"}"""; - var deserialized = JsonSerializer.Deserialize(json, o); + var deserialized = JsonSerializer.Deserialize(json, o); Assert.NotNull(deserialized); Assert.Equal(1, deserialized.A); Assert.Equal("test", deserialized.B); } - private class ClassWithParametrizedConstructorAndReadOnlyProperties + private class ClassWithParameterizedConstructorAndReadOnlyProperties { public int A { get; } public string B { get; } - public ClassWithParametrizedConstructorAndReadOnlyProperties(int a, string b, bool dummyParam) + public ClassWithParameterizedConstructorAndReadOnlyProperties(int a, string b, bool dummyParam) { A = a; B = b; } [JsonConstructor] - public ClassWithParametrizedConstructorAndReadOnlyProperties(int a, string b) + public ClassWithParameterizedConstructorAndReadOnlyProperties(int a, string b) { Assert.Fail("this ctor should not be used"); } } [Fact] - public static void JsonConstructorAttributeIsOverridenAndPropertiesAreSetWhenCreateObjectIsSet() + public static void JsonConstructorAttributeIsOverriddenAndPropertiesAreSetWhenCreateObjectIsSet() { DefaultJsonTypeInfoResolver resolver = new(); resolver.Modifiers.Add(ti => { - if (ti.Type == typeof(ClassWithParametrizedConstructorAndWritableProperties)) + if (ti.Type == typeof(ClassWithParameterizedConstructorAndWritableProperties)) { Assert.Null(ti.CreateObject); - ti.CreateObject = () => new ClassWithParametrizedConstructorAndWritableProperties(); + ti.CreateObject = () => new ClassWithParameterizedConstructorAndWritableProperties(); } }); JsonSerializerOptions o = new() { TypeInfoResolver = resolver }; string json = """{"A":2,"B":"foo","C":"bar"}"""; - var deserialized = JsonSerializer.Deserialize(json, o); + var deserialized = JsonSerializer.Deserialize(json, o); Assert.NotNull(deserialized); Assert.Equal(2, deserialized.A); @@ -821,16 +821,16 @@ public static void JsonConstructorAttributeIsOverridenAndPropertiesAreSetWhenCre Assert.Equal("bar", deserialized.C); } - private class ClassWithParametrizedConstructorAndWritableProperties + private class ClassWithParameterizedConstructorAndWritableProperties { public int A { get; set; } public string B { get; set; } public string C { get; set; } - public ClassWithParametrizedConstructorAndWritableProperties() { } + public ClassWithParameterizedConstructorAndWritableProperties() { } [JsonConstructor] - public ClassWithParametrizedConstructorAndWritableProperties(int a, string b) + public ClassWithParameterizedConstructorAndWritableProperties(int a, string b) { Assert.Fail("this ctor should not be used"); } @@ -901,7 +901,7 @@ public PocoWithConstructor(string parameter) } [Fact] - public static void JsonConstructorAttributeIsOverridenAndPropertiesAreSetWhenCreateObjectIsSet_LargeConstructor() + public static void JsonConstructorAttributeIsOverriddenAndPropertiesAreSetWhenCreateObjectIsSet_LargeConstructor() { DefaultJsonTypeInfoResolver resolver = new(); resolver.Modifiers.Add(ti => diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexRunner.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexRunner.cs index 80c07d2072338..6995c6a27632e 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexRunner.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexRunner.cs @@ -25,7 +25,7 @@ public abstract class RegexRunner // from runtextbeg to runtextend, which means that runtextbeg is now always 0 except // for CompiledToAssembly scenario which works over the original input. protected internal int runtextend; // End of text to search. Because we now pass in a sliced span of the input into Scan, - // the runtextend will always match the length of that passed in span except for CompileToAssemby + // the runtextend will always match the length of that passed in span except for CompileToAssembly // scenario, which still works over the original input. protected internal int runtextstart; // starting point for search diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/BDD.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/BDD.cs index aac389edaabc3..d17907ff144e0 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/BDD.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/BDD.cs @@ -118,7 +118,7 @@ public ulong GetMin() // starting from all 0, bits will be flipped to 1 as necessary ulong result = 0; - // follow the minimum path throught the branches to a True leaf + // follow the minimum path through the branches to a True leaf while (!set.IsLeaf) { if (set.Zero.IsEmpty) //the bit must be set to 1 diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/SymbolicRegexThresholds.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/SymbolicRegexThresholds.cs index 92d9236e3c9ce..6057827e1d53f 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/SymbolicRegexThresholds.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/SymbolicRegexThresholds.cs @@ -43,7 +43,7 @@ internal static class SymbolicRegexThresholds /// Gets the value of the environment variable whose name is /// given by /// or else returns - /// if the environment variable is undefined, incorrectly formated, or not a positive integer. + /// if the environment variable is undefined, incorrectly formatted, or not a positive integer. /// /// /// The value is queried from AppContext diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/SegmentStringBuilder.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/SegmentStringBuilder.cs index eb19c8574858c..c23e1ce83d28b 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/SegmentStringBuilder.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/SegmentStringBuilder.cs @@ -41,7 +41,7 @@ public void Add(ReadOnlyMemory segment) } } - /// Grows the builder to accomodate another segment. + /// Grows the builder to accommodate another segment. /// [MethodImpl(MethodImplOptions.NoInlining)] private void GrowAndAdd(ReadOnlyMemory segment) diff --git a/src/libraries/System.Threading.RateLimiting/tests/SlidingWindowRateLimiterTests.cs b/src/libraries/System.Threading.RateLimiting/tests/SlidingWindowRateLimiterTests.cs index 522e792a32d24..ff838e9a44e86 100644 --- a/src/libraries/System.Threading.RateLimiting/tests/SlidingWindowRateLimiterTests.cs +++ b/src/libraries/System.Threading.RateLimiting/tests/SlidingWindowRateLimiterTests.cs @@ -67,7 +67,7 @@ public async Task CanAcquireMultipleRequestsAsync() { // This test verifies the following behavior // 1. when we have available permits after replenish to serve the queued requests - // 2. when the oldest item from queue is remove to accomodate new requests (QueueProcessingOrder: NewestFirst) + // 2. when the oldest item from queue is remove to accommodate new requests (QueueProcessingOrder: NewestFirst) var limiter = new SlidingWindowRateLimiter(new SlidingWindowRateLimiterOptions(4, QueueProcessingOrder.NewestFirst, 4, TimeSpan.Zero, 3, autoReplenishment: false)); diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/TargetCore.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/TargetCore.cs index 9bf3494fb5c43..cd7a24d44133d 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/TargetCore.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/TargetCore.cs @@ -194,7 +194,7 @@ internal DataflowMessageStatus OfferMessage(DataflowMessageHeader messageHeader, // We can directly accept the message if: // 1) we are not bounding, OR - // 2) we are bounding AND there is room available AND there are no postponed messages AND no messages are currently being transfered to the input queue. + // 2) we are bounding AND there is room available AND there are no postponed messages AND no messages are currently being transferred to the input queue. // (If there were any postponed messages, we would need to postpone so that ordering would be maintained.) // (Unlike all other blocks, TargetCore can accept messages while processing, because // input message IDs are properly assigned and the correct order is preserved.) diff --git a/src/libraries/System.Threading/src/System/Threading/ReaderWriterLock.cs b/src/libraries/System.Threading/src/System/Threading/ReaderWriterLock.cs index 1d49a2cfae236..eb14b86dd9aaa 100644 --- a/src/libraries/System.Threading/src/System/Threading/ReaderWriterLock.cs +++ b/src/libraries/System.Threading/src/System/Threading/ReaderWriterLock.cs @@ -243,7 +243,7 @@ public void AcquireReaderLock(int millisecondsTimeout) readerEvent.Reset(); Interlocked.Add(ref _state, LockStates.Reader - LockStates.ReaderSignaled); - // Honor the orginal status + // Honor the original status ++threadLocalLockEntry._readerLevel; ReleaseReaderLock(); } @@ -414,7 +414,7 @@ public void AcquireWriterLock(int millisecondsTimeout) Debug.Assert((knownState & LockStates.WriterSignaled) != 0); Debug.Assert((knownState & LockStates.Writer) == 0); - // Honor the orginal status + // Honor the original status _writerID = threadID; Debug.Assert(_writerLevel == 0); _writerLevel = 1; diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs index a6f89d45fcc59..82f55db360e9d 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs @@ -153,7 +153,7 @@ public override bool Equals(object? obj) Type a = args[i]; Type b = other.args[i]; /* - We must cannonicalize as much as we can. Using equals means that some resulting types + We must canonicalize as much as we can. Using equals means that some resulting types won't have the exact same types as the argument ones. For example, flyweight types used array, pointer and byref will should this behavior. MCS seens to be resilient to this problem so hopefully this won't show up. @@ -360,11 +360,11 @@ public override Module[] GetModules(bool getResourceModules) public override Module[] GetLoadedModules(bool getResourceModules) => GetModules(getResourceModules); - //FIXME MS has issues loading satelite assemblies from SRE + //FIXME MS has issues loading satellite assemblies from SRE [System.Security.DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod public override Assembly GetSatelliteAssembly(CultureInfo culture) => GetSatelliteAssembly(culture, null); - //FIXME MS has issues loading satelite assemblies from SRE + //FIXME MS has issues loading satellite assemblies from SRE [System.Security.DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod public override Assembly GetSatelliteAssembly(CultureInfo culture, Version? version) => RuntimeAssembly.InternalGetSatelliteAssembly(this, culture, version, true)!; diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.Mono.cs index 8458d9cfc8951..486def27e3e88 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.Mono.cs @@ -209,7 +209,7 @@ private void Initialize(ConstructorInfo con, object?[] constructorArgs, if (!(fi.FieldType is TypeBuilder) && !fi.FieldType.IsEnum && !fi.FieldType.IsInstanceOfType(fieldValues[i])) { // - // mcs allways uses object[] for array types and + // mcs always uses object[] for array types and // MS.NET allows this // if (!fi.FieldType.IsArray) diff --git a/src/mono/dlls/mscordbi/cordb-value.cpp b/src/mono/dlls/mscordbi/cordb-value.cpp index 0010ece0bd435..3078c682eea28 100644 --- a/src/mono/dlls/mscordbi/cordb-value.cpp +++ b/src/mono/dlls/mscordbi/cordb-value.cpp @@ -179,8 +179,8 @@ HRESULT STDMETHODCALLTYPE CordbReferenceValue::GetExactType(ICorDebugType** ppTy { LOG((LF_CORDB, LL_INFO1000000, "CordbReferenceValue - GetExactType - IMPLEMENTED\n")); HRESULT hr = S_OK; - EX_TRY - { + EX_TRY + { if (m_pCordbType) { m_pCordbType->QueryInterface(IID_ICorDebugType, (void**)ppType); @@ -291,7 +291,7 @@ HRESULT STDMETHODCALLTYPE CordbReferenceValue::GetExactType(ICorDebugType** ppTy m_pCordbType->QueryInterface(IID_ICorDebugType, (void**)ppType); } EX_CATCH_HRESULT(hr); -__Exit: +__Exit: return hr; } @@ -476,8 +476,8 @@ HRESULT STDMETHODCALLTYPE CordbObjectValue::GetVirtualMethodAndType(mdMemberRef HRESULT STDMETHODCALLTYPE CordbObjectValue::GetLength(ULONG32* pcchString) { HRESULT hr = S_OK; - EX_TRY - { + EX_TRY + { if (m_debuggerId == -1) hr = S_FALSE; else if (m_type == ELEMENT_TYPE_STRING) @@ -505,8 +505,8 @@ HRESULT STDMETHODCALLTYPE CordbObjectValue::GetLength(ULONG32* pcchString) HRESULT STDMETHODCALLTYPE CordbObjectValue::GetString(ULONG32 cchString, ULONG32* pcchString, WCHAR szString[]) { HRESULT hr = S_OK; - EX_TRY - { + EX_TRY + { if (m_debuggerId == -1) hr = S_FALSE; else if (m_type == ELEMENT_TYPE_STRING) @@ -541,11 +541,11 @@ HRESULT STDMETHODCALLTYPE CordbObjectValue::GetString(ULONG32 cchString, ULONG32 } hr = S_OK; } - else + else hr = E_NOTIMPL; } EX_CATCH_HRESULT(hr); - return hr; + return hr; } HRESULT STDMETHODCALLTYPE CordbObjectValue::CreateHandle(CorDebugHandleType type, ICorDebugHandleValue** ppHandle) @@ -618,8 +618,8 @@ HRESULT STDMETHODCALLTYPE CordbObjectValue::GetFieldValue(ICorDebugClass* pClas { LOG((LF_CORDB, LL_INFO1000000, "CordbObjectValue - GetFieldValue - IMPLEMENTED\n")); HRESULT hr = S_OK; - EX_TRY - { + EX_TRY + { if (m_debuggerId == -1) hr = S_FALSE; else { @@ -672,8 +672,8 @@ int CordbObjectValue::GetTypeSize(int type) HRESULT CordbObjectValue::CreateCordbValue(Connection* conn, MdbgProtBuffer* pReply, ICorDebugValue** ppValue) { HRESULT hr = S_OK; - EX_TRY - { + EX_TRY + { CorElementType type = (CorElementType)m_dbgprot_decode_byte(pReply->p, &pReply->p, pReply->end); CordbContent value; @@ -1132,8 +1132,8 @@ HRESULT STDMETHODCALLTYPE CordbArrayValue::GetRank(ULONG32* pnRank) { LOG((LF_CORDB, LL_INFO1000000, "CordbArrayValue - GetRank - IMPLEMENTED\n")); HRESULT hr = S_OK; - EX_TRY - { + EX_TRY + { MdbgProtBuffer localbuf; m_dbgprot_buffer_init(&localbuf, 128); m_dbgprot_buffer_add_id(&localbuf, m_debuggerId); @@ -1153,8 +1153,8 @@ HRESULT STDMETHODCALLTYPE CordbArrayValue::GetRank(ULONG32* pnRank) HRESULT STDMETHODCALLTYPE CordbArrayValue::GetCount(ULONG32* pnCount) { HRESULT hr = S_OK; - EX_TRY - { + EX_TRY + { MdbgProtBuffer localbuf; m_dbgprot_buffer_init(&localbuf, 128); m_dbgprot_buffer_add_id(&localbuf, m_debuggerId); @@ -1180,15 +1180,15 @@ HRESULT STDMETHODCALLTYPE CordbArrayValue::GetDimensions(ULONG32 cdim, ULONG32 d return S_OK; } -HRESULT STDMETHODCALLTYPE CordbArrayValue::HasBaseIndicies(BOOL* pbHasBaseIndicies) +HRESULT STDMETHODCALLTYPE CordbArrayValue::HasBaseIndices(BOOL* pbHasBaseIndices) { - LOG((LF_CORDB, LL_INFO100000, "CordbArrayValue - HasBaseIndicies - NOT IMPLEMENTED\n")); + LOG((LF_CORDB, LL_INFO100000, "CordbArrayValue - HasBaseIndices - NOT IMPLEMENTED\n")); return S_OK; } -HRESULT STDMETHODCALLTYPE CordbArrayValue::GetBaseIndicies(ULONG32 cdim, ULONG32 indicies[]) +HRESULT STDMETHODCALLTYPE CordbArrayValue::GetBaseIndices(ULONG32 cdim, ULONG32 indices[]) { - LOG((LF_CORDB, LL_INFO100000, "CordbArrayValue - GetBaseIndicies - NOT IMPLEMENTED\n")); + LOG((LF_CORDB, LL_INFO100000, "CordbArrayValue - GetBaseIndices - NOT IMPLEMENTED\n")); return E_NOTIMPL; } @@ -1196,7 +1196,7 @@ HRESULT STDMETHODCALLTYPE CordbArrayValue::GetElement(ULONG32 cdim, ULONG32 indi { LOG((LF_CORDB, LL_INFO1000000, "CordbArrayValue - GetElement - IMPLEMENTED\n")); HRESULT hr = S_OK; - EX_TRY + EX_TRY { MdbgProtBuffer localbuf; m_dbgprot_buffer_init(&localbuf, 128); diff --git a/src/mono/dlls/mscordbi/cordb-value.h b/src/mono/dlls/mscordbi/cordb-value.h index fa43cc1464807..0e6ec70b03c24 100644 --- a/src/mono/dlls/mscordbi/cordb-value.h +++ b/src/mono/dlls/mscordbi/cordb-value.h @@ -239,8 +239,8 @@ class CordbArrayValue : public CordbBaseMono, HRESULT STDMETHODCALLTYPE GetRank(ULONG32* pnRank); HRESULT STDMETHODCALLTYPE GetCount(ULONG32* pnCount); HRESULT STDMETHODCALLTYPE GetDimensions(ULONG32 cdim, ULONG32 dims[]); - HRESULT STDMETHODCALLTYPE HasBaseIndicies(BOOL* pbHasBaseIndicies); - HRESULT STDMETHODCALLTYPE GetBaseIndicies(ULONG32 cdim, ULONG32 indicies[]); + HRESULT STDMETHODCALLTYPE HasBaseIndices(BOOL* pbHasBaseIndices); + HRESULT STDMETHODCALLTYPE GetBaseIndices(ULONG32 cdim, ULONG32 indices[]); HRESULT STDMETHODCALLTYPE GetElement(ULONG32 cdim, ULONG32 indices[], ICorDebugValue** ppValue); HRESULT STDMETHODCALLTYPE GetElementAtPosition(ULONG32 nPosition, ICorDebugValue** ppValue); }; diff --git a/src/mono/mono/component/hot_reload.c b/src/mono/mono/component/hot_reload.c index e9aeb67ea73c9..369426c0be553 100644 --- a/src/mono/mono/component/hot_reload.c +++ b/src/mono/mono/component/hot_reload.c @@ -826,7 +826,7 @@ delta_info_initialize_mutants (const MonoImage *base, const BaselineInfo *base_i } /* The invariant is that once we made a copy in any previous generation, we'll make * a copy in this generation. So subsequent generations can copy either from the - * immediately preceeding generation or from the baseline if the preceeding + * immediately preceding generation or from the baseline if the preceding * generation didn't make a copy. */ guint32 rows = count->prev_gen_rows + count->inserted_rows; @@ -1620,8 +1620,8 @@ apply_enclog_pass1 (MonoImage *image_base, MonoImage *image_dmeta, DeltaInfo *de /* * So the way a non-default func_code works is that it's attached to the EnCLog - * record preceeding the new member defintion (so e.g. an addMethod code will be on - * the preceeding MONO_TABLE_TYPEDEF enc record that identifies the parent type). + * record preceding the new member defintion (so e.g. an addMethod code will be on + * the preceding MONO_TABLE_TYPEDEF enc record that identifies the parent type). */ switch (func_code) { case ENC_FUNC_DEFAULT: /* default */ diff --git a/src/mono/mono/eventpipe/ep-rt-mono.c b/src/mono/mono/eventpipe/ep-rt-mono.c index 36ee962b8c581..fd55d488ab327 100644 --- a/src/mono/mono/eventpipe/ep-rt-mono.c +++ b/src/mono/mono/eventpipe/ep-rt-mono.c @@ -4853,7 +4853,7 @@ mono_profiler_fire_event_enter (void) old_state = mono_profiler_volatile_load_gc_state_t (&_ep_rt_mono_profiler_gc_state); if (MONO_PROFILER_GC_STATE_IS_GC_IN_PROGRESS (old_state)) { // GC in progress and thread tries to fire event (this should be an unlikely scenario). Wait until GC is done. - ep_rt_spin_lock_aquire (&_ep_rt_mono_profiler_gc_state_lock); + ep_rt_spin_lock_acquire (&_ep_rt_mono_profiler_gc_state_lock); ep_rt_spin_lock_release (&_ep_rt_mono_profiler_gc_state_lock); old_state = mono_profiler_volatile_load_gc_state_t (&_ep_rt_mono_profiler_gc_state); } @@ -4883,7 +4883,7 @@ mono_profiler_gc_in_progress_start (void) mono_profiler_gc_state_t new_state = 0; // Make sure fire event calls will block and wait for GC completion. - ep_rt_spin_lock_aquire (&_ep_rt_mono_profiler_gc_state_lock); + ep_rt_spin_lock_acquire (&_ep_rt_mono_profiler_gc_state_lock); // Set gc in progress state, preventing new fire event requests. do { @@ -5148,14 +5148,14 @@ void mono_profiler_trigger_heap_collect (MonoProfiler *prof) { if (mono_profiler_gc_heap_collect_requested ()) { - ep_rt_spin_lock_aquire (&_ep_rt_mono_profiler_gc_state_lock); + ep_rt_spin_lock_acquire (&_ep_rt_mono_profiler_gc_state_lock); mono_profiler_gc_heap_collect_requests_dec (); mono_profiler_gc_heap_collect_in_progress_start (); ep_rt_spin_lock_release (&_ep_rt_mono_profiler_gc_state_lock); mono_gc_collect (mono_gc_max_generation ()); - ep_rt_spin_lock_aquire (&_ep_rt_mono_profiler_gc_state_lock); + ep_rt_spin_lock_acquire (&_ep_rt_mono_profiler_gc_state_lock); mono_profiler_pop_gc_heap_collect_param_request_value (); mono_profiler_gc_heap_collect_in_progress_stop (); ep_rt_spin_lock_release (&_ep_rt_mono_profiler_gc_state_lock); diff --git a/src/mono/mono/eventpipe/ep-rt-mono.h b/src/mono/mono/eventpipe/ep-rt-mono.h index 095266b20d1f1..26ba70d407978 100644 --- a/src/mono/mono/eventpipe/ep-rt-mono.h +++ b/src/mono/mono/eventpipe/ep-rt-mono.h @@ -719,9 +719,9 @@ ep_rt_shutdown (void) static inline bool -ep_rt_config_aquire (void) +ep_rt_config_acquire (void) { - return ep_rt_spin_lock_aquire (ep_rt_mono_config_lock_get ()); + return ep_rt_spin_lock_acquire (ep_rt_mono_config_lock_get ()); } static @@ -1557,7 +1557,7 @@ ep_rt_os_environment_get_utf16 (ep_rt_env_array_utf16_t *env_array) static bool -ep_rt_lock_aquire (ep_rt_lock_handle_t *lock) +ep_rt_lock_acquire (ep_rt_lock_handle_t *lock) { EP_UNREACHABLE ("Not implemented on Mono."); } @@ -1653,7 +1653,7 @@ ep_rt_spin_lock_free (ep_rt_spin_lock_handle_t *spin_lock) static inline bool -ep_rt_spin_lock_aquire (ep_rt_spin_lock_handle_t *spin_lock) +ep_rt_spin_lock_acquire (ep_rt_spin_lock_handle_t *spin_lock) { if (spin_lock && spin_lock->lock) { mono_coop_mutex_lock (spin_lock->lock); diff --git a/src/mono/mono/eventpipe/test/ep-buffer-manager-tests.c b/src/mono/mono/eventpipe/test/ep-buffer-manager-tests.c index 126b04740c0b2..5538d7532917b 100644 --- a/src/mono/mono/eventpipe/test/ep-buffer-manager-tests.c +++ b/src/mono/mono/eventpipe/test/ep-buffer-manager-tests.c @@ -499,8 +499,8 @@ test_buffer_manager_perf (void) bool write_result = false; uint32_t events_written = 0; uint32_t total_events_written = 0; - int64_t accumulted_buffer_manager_write_time_ticks = 0; - int64_t accumulted_buffer_to_null_file_time_ticks = 0; + int64_t accumulated_buffer_manager_write_time_ticks = 0; + int64_t accumulated_buffer_to_null_file_time_ticks = 0; StreamWriter null_stream_writer; StreamWriter *current_null_stream_writer = NULL; EventPipeFile *null_file = NULL; @@ -528,7 +528,7 @@ test_buffer_manager_perf (void) write_result = write_events (buffer_manager, thread_handle, session, ep_event, 10 * 1000 * 1000, &events_written); int64_t stop = ep_perf_timestamp_get (); - accumulted_buffer_manager_write_time_ticks += stop - start; + accumulated_buffer_manager_write_time_ticks += stop - start; total_events_written += events_written; if (write_result || (total_events_written > 10 * 1000 * 1000)) { done = true; @@ -538,7 +538,7 @@ test_buffer_manager_perf (void) ep_buffer_manager_write_all_buffers_to_file (buffer_manager, null_file, ep_perf_timestamp_get (), &ignore_events_written); int64_t stop = ep_perf_timestamp_get (); - accumulted_buffer_to_null_file_time_ticks += stop - start; + accumulated_buffer_to_null_file_time_ticks += stop - start; } } @@ -548,24 +548,24 @@ test_buffer_manager_perf (void) test_location = 4; - float accumulted_buffer_manager_write_time_sec = ((float)accumulted_buffer_manager_write_time_ticks / (float)ep_perf_frequency_query ()); - float buffer_manager_events_written_per_sec = (float)total_events_written / (accumulted_buffer_manager_write_time_sec ? accumulted_buffer_manager_write_time_sec : 1.0); + float accumulated_buffer_manager_write_time_sec = ((float)accumulated_buffer_manager_write_time_ticks / (float)ep_perf_frequency_query ()); + float buffer_manager_events_written_per_sec = (float)total_events_written / (accumulated_buffer_manager_write_time_sec ? accumulated_buffer_manager_write_time_sec : 1.0); - float accumulted_buffer_to_null_file_time_sec = ((float)accumulted_buffer_to_null_file_time_ticks / (float)ep_perf_frequency_query ()); - float null_file_events_written_per_sec = (float)total_events_written / (accumulted_buffer_to_null_file_time_sec ? accumulted_buffer_to_null_file_time_sec : 1.0); + float accumulated_buffer_to_null_file_time_sec = ((float)accumulated_buffer_to_null_file_time_ticks / (float)ep_perf_frequency_query ()); + float null_file_events_written_per_sec = (float)total_events_written / (accumulated_buffer_to_null_file_time_sec ? accumulated_buffer_to_null_file_time_sec : 1.0); - float total_accumulted_time_sec = accumulted_buffer_manager_write_time_sec + accumulted_buffer_to_null_file_time_sec; - float total_events_written_per_sec = (float)total_events_written / (total_accumulted_time_sec ? total_accumulted_time_sec : 1.0); + float total_accumulated_time_sec = accumulated_buffer_manager_write_time_sec + accumulated_buffer_to_null_file_time_sec; + float total_events_written_per_sec = (float)total_events_written / (total_accumulated_time_sec ? total_accumulated_time_sec : 1.0); // Measured number of events/second for one thread. // TODO: Setup acceptable pass/failure metrics. printf ("\n\tPerformance stats:\n"); printf ("\t\tTotal number of events: %i\n", total_events_written); - printf ("\t\tTotal time in sec: %.2f\n\t\tTotal number of events written per sec/core: %.2f\n", total_accumulted_time_sec, total_events_written_per_sec); + printf ("\t\tTotal time in sec: %.2f\n\t\tTotal number of events written per sec/core: %.2f\n", total_accumulated_time_sec, total_events_written_per_sec); printf ("\t\tep_buffer_manager_write_event:\n"); - printf ("\t\t\tTotal time in sec: %.2f\n\t\t\tEvents written per sec/core: %.2f\n", accumulted_buffer_manager_write_time_sec, buffer_manager_events_written_per_sec); + printf ("\t\t\tTotal time in sec: %.2f\n\t\t\tEvents written per sec/core: %.2f\n", accumulated_buffer_manager_write_time_sec, buffer_manager_events_written_per_sec); printf ("\t\tep_buffer_manager_write_all_buffers_to_file:\n"); - printf ("\t\t\tTotal time in sec: %.2f\n\t\t\tEvents written per sec/core: %.2f\n\t", accumulted_buffer_to_null_file_time_sec, null_file_events_written_per_sec); + printf ("\t\t\tTotal time in sec: %.2f\n\t\t\tEvents written per sec/core: %.2f\n\t", accumulated_buffer_to_null_file_time_sec, null_file_events_written_per_sec); ep_on_exit: ep_file_free (null_file); diff --git a/src/mono/mono/eventpipe/test/ep-buffer-tests.c b/src/mono/mono/eventpipe/test/ep-buffer-tests.c index 9ffaf9a258d1d..b50546a013362 100644 --- a/src/mono/mono/eventpipe/test/ep-buffer-tests.c +++ b/src/mono/mono/eventpipe/test/ep-buffer-tests.c @@ -601,7 +601,7 @@ test_check_buffer_perf (void) uint32_t events_written = 0; uint32_t number_of_buffers = 1; uint32_t total_events_written = 0; - int64_t accumulted_time_ticks = 0; + int64_t accumulated_time_ticks = 0; bool done = false; while (!done) { @@ -609,7 +609,7 @@ test_check_buffer_perf (void) load_result = load_buffer (buffer, session, ep_event, 10 * 1000 * 1000, true, &events_written); int64_t stop = ep_perf_timestamp_get (); - accumulted_time_ticks += stop - start; + accumulated_time_ticks += stop - start; total_events_written += events_written; if (load_result || (total_events_written > 10 * 1000 * 1000)) { done = true; @@ -622,15 +622,15 @@ test_check_buffer_perf (void) test_location = 4; - float accumulted_time_sec = ((float)accumulted_time_ticks / (float)ep_perf_frequency_query ()); - float events_per_sec = (float)total_events_written / (accumulted_time_sec ? accumulted_time_sec : 1.0); + float accumulated_time_sec = ((float)accumulated_time_ticks / (float)ep_perf_frequency_query ()); + float events_per_sec = (float)total_events_written / (accumulated_time_sec ? accumulated_time_sec : 1.0); // Measured number of events/second for one thread. // Only measure loading data into pre-allocated buffer. // TODO: Setup acceptable pass/failure metrics. printf ("\n\tPerformance stats:\n"); printf ("\t\tTotal number of events: %i\n", total_events_written); - printf ("\t\tTotal time in sec: %.2f\n", accumulted_time_sec); + printf ("\t\tTotal time in sec: %.2f\n", accumulated_time_sec); printf ("\t\tTotal number of events written per sec/core: %.2f\n", events_per_sec); printf ("\t\tTotal number of used buffers: %i\n\t", number_of_buffers); diff --git a/src/mono/mono/eventpipe/test/ep-file-tests.c b/src/mono/mono/eventpipe/test/ep-file-tests.c index 0edc18d9b44cc..742d38399b3e4 100644 --- a/src/mono/mono/eventpipe/test/ep-file-tests.c +++ b/src/mono/mono/eventpipe/test/ep-file-tests.c @@ -115,7 +115,7 @@ test_file_write_event (EventPipeSerializationFormat format, bool write_event, bo ep_delete_provider (provider); ep_event_free (ep_event); ep_event_instance_free (ep_event_instance); - ep_event_metdata_event_free (metadata_event); + ep_event_metadata_event_free (metadata_event); ep_file_free (file); ep_file_stream_writer_free (file_stream_writer); diff --git a/src/mono/mono/eventpipe/test/ep-tests.c b/src/mono/mono/eventpipe/test/ep-tests.c index f7eab1c96b963..ddb0f4a703b43 100644 --- a/src/mono/mono/eventpipe/test/ep-tests.c +++ b/src/mono/mono/eventpipe/test/ep-tests.c @@ -703,7 +703,7 @@ test_build_event_metadata (void) ep_delete_provider (provider); ep_event_free (ep_event); ep_event_instance_free (ep_event_instance); - ep_event_metdata_event_free (metadata_event); + ep_event_metadata_event_free (metadata_event); return result; @@ -1271,7 +1271,7 @@ test_write_event_perf (void) EventPipeSessionID session_id = 0; EventPipeProviderConfiguration provider_config; EventPipeProviderConfiguration *current_provider_config = NULL; - int64_t accumulted_write_time_ticks = 0; + int64_t accumulated_write_time_ticks = 0; uint32_t events_written = 0; current_provider_config = ep_provider_config_init (&provider_config, TEST_PROVIDER_NAME, 1, EP_EVENT_LEVEL_LOGALWAYS, ""); @@ -1305,7 +1305,7 @@ test_write_event_perf (void) for (uint32_t i = 0; i < 1000; i++) ep_write_event_2 (ep_event, data, ARRAY_SIZE (data), NULL, NULL); int64_t stop = ep_perf_timestamp_get (); - accumulted_write_time_ticks += stop - start; + accumulated_write_time_ticks += stop - start; // Drain events to not end up in having buffer manager OOM. while (ep_get_next_event (session_id)); @@ -1313,14 +1313,14 @@ test_write_event_perf (void) ep_event_data_fini (data); - float accumulted_write_time_sec = ((float)accumulted_write_time_ticks / (float)ep_perf_frequency_query ()); - float events_written_per_sec = (float)events_written / (accumulted_write_time_sec ? accumulted_write_time_sec : 1.0); + float accumulated_write_time_sec = ((float)accumulated_write_time_ticks / (float)ep_perf_frequency_query ()); + float events_written_per_sec = (float)events_written / (accumulated_write_time_sec ? accumulated_write_time_sec : 1.0); // Measured number of events/second for one thread. // TODO: Setup acceptable pass/failure metrics. printf ("\n\tPerformance stats:\n"); printf ("\t\tTotal number of events: %i\n", events_written); - printf ("\t\tTotal time in sec: %.2f\n\t\tTotal number of events written per sec/core: %.2f\n\t", accumulted_write_time_sec, events_written_per_sec); + printf ("\t\tTotal time in sec: %.2f\n\t\tTotal number of events written per sec/core: %.2f\n\t", accumulated_write_time_sec, events_written_per_sec); ep_on_exit: ep_disable (session_id); diff --git a/src/mono/mono/eventpipe/test/ep-thread-tests.c b/src/mono/mono/eventpipe/test/ep-thread-tests.c index a08568c1bfc0d..eebd10673fe79 100644 --- a/src/mono/mono/eventpipe/test/ep-thread-tests.c +++ b/src/mono/mono/eventpipe/test/ep-thread-tests.c @@ -288,7 +288,7 @@ test_thread_lock (void) ep_thread_requires_lock_not_held (thread); - ep_rt_spin_lock_aquire (ep_thread_get_rt_lock_ref (thread)); + ep_rt_spin_lock_acquire (ep_thread_get_rt_lock_ref (thread)); ep_thread_requires_lock_held (thread); @@ -409,7 +409,7 @@ test_thread_session_state (void) test_location = 3; - ep_rt_spin_lock_aquire (ep_thread_get_rt_lock_ref (thread)); + ep_rt_spin_lock_acquire (ep_thread_get_rt_lock_ref (thread)); session_state = ep_thread_get_or_create_session_state (thread, session); ep_rt_spin_lock_release (ep_thread_get_rt_lock_ref (thread)); @@ -420,7 +420,7 @@ test_thread_session_state (void) test_location = 4; - ep_rt_spin_lock_aquire (ep_thread_get_rt_lock_ref (thread)); + ep_rt_spin_lock_acquire (ep_thread_get_rt_lock_ref (thread)); EventPipeThreadSessionState *current_session_state = ep_thread_get_or_create_session_state (thread, session); ep_rt_spin_lock_release (ep_thread_get_rt_lock_ref (thread)); @@ -431,7 +431,7 @@ test_thread_session_state (void) test_location = 5; - ep_rt_spin_lock_aquire (ep_thread_get_rt_lock_ref (thread)); + ep_rt_spin_lock_acquire (ep_thread_get_rt_lock_ref (thread)); current_session_state = ep_thread_get_session_state (thread, session); ep_rt_spin_lock_release (ep_thread_get_rt_lock_ref (thread)); @@ -442,7 +442,7 @@ test_thread_session_state (void) ep_on_exit: if (thread && session_state) { - ep_rt_spin_lock_aquire (ep_thread_get_rt_lock_ref (thread)); + ep_rt_spin_lock_acquire (ep_thread_get_rt_lock_ref (thread)); ep_thread_delete_session_state (thread, session); ep_rt_spin_lock_release (ep_thread_get_rt_lock_ref (thread)); } diff --git a/src/mono/mono/metadata/boehm-gc.c b/src/mono/mono/metadata/boehm-gc.c index 0784b78142fe0..718849dfc1059 100644 --- a/src/mono/mono/metadata/boehm-gc.c +++ b/src/mono/mono/metadata/boehm-gc.c @@ -1230,9 +1230,9 @@ mono_gc_toggleref_add (MonoObject *object, mono_bool strong_ref) } void -mono_gc_toggleref_register_callback (MonoToggleRefStatus (*proccess_toggleref) (MonoObject *obj)) +mono_gc_toggleref_register_callback (MonoToggleRefStatus (*process_toggleref) (MonoObject *obj)) { - GC_set_toggleref_func ((GC_ToggleRefStatus (*) (GC_PTR obj)) proccess_toggleref); + GC_set_toggleref_func ((GC_ToggleRefStatus (*) (GC_PTR obj)) process_toggleref); } /* Test support code */ diff --git a/src/mono/mono/metadata/class-setup-vtable.c b/src/mono/mono/metadata/class-setup-vtable.c index 17c8496b5ecba..ae29cc58a47d0 100644 --- a/src/mono/mono/metadata/class-setup-vtable.c +++ b/src/mono/mono/metadata/class-setup-vtable.c @@ -1573,7 +1573,7 @@ signature_is_subsumed (MonoMethod *impl_method, MonoMethod *decl_method, MonoErr static gboolean check_signature_covariant (MonoClass *klass, MonoMethod *impl, MonoMethod *decl) { - TRACE_INTERFACE_VTABLE (printf (" checking covariant signature compatability on behalf of %s: '%s' overriding '%s'\n", mono_type_full_name (m_class_get_byval_arg (klass)), mono_method_full_name (impl, 1), mono_method_full_name (decl, 1))); + TRACE_INTERFACE_VTABLE (printf (" checking covariant signature compatibility on behalf of %s: '%s' overriding '%s'\n", mono_type_full_name (m_class_get_byval_arg (klass)), mono_method_full_name (impl, 1), mono_method_full_name (decl, 1))); ERROR_DECL (local_error); gboolean subsumed = signature_is_subsumed (impl, decl, local_error); if (!is_ok (local_error) || !subsumed) { @@ -2099,7 +2099,7 @@ mono_class_setup_vtable_general (MonoClass *klass, MonoMethod **overrides, int o /* * If a method occupies more than one place in the vtable, and it is - * overriden, then change the other occurrences too. + * overridden, then change the other occurrences too. */ if (override_map) { MonoMethod *cm; diff --git a/src/mono/mono/metadata/class.c b/src/mono/mono/metadata/class.c index 9fa34305f8def..0454956b68cd1 100644 --- a/src/mono/mono/metadata/class.c +++ b/src/mono/mono/metadata/class.c @@ -319,7 +319,7 @@ escape_special_chars (const char* identifier) * \returns The name in external form, that is with escaping backslashes. * * The displayed form of an identifier has the characters ,+&*[]\ - * that have special meaning in type names escaped with a preceeding + * that have special meaning in type names escaped with a preceding * backslash (\) character. */ char* @@ -1179,7 +1179,7 @@ mono_class_inflate_generic_method_full_checked (MonoMethod *method, MonoClass *k /* * A method only needs to be inflated if the context has argument for which it is - * parametric. Eg: + * parameteric. Eg: * * class Foo { void Bar(); } - doesn't need to be inflated if only mvars' are supplied * class Foo { void Bar (); } - doesn't need to be if only vars' are supplied @@ -1422,7 +1422,7 @@ mono_method_set_verification_success (MonoMethod *method) } /** - * mono_method_get_verification_sucess: + * mono_method_get_verification_success: * * Returns \c TRUE if the method has been verified successfully. * @@ -3813,7 +3813,7 @@ mono_byref_type_is_assignable_from (MonoType *type, MonoType *ctype, gboolean si if (m_class_is_valuetype (klassc)) return FALSE; /* - * assignment compatability for location types, ECMA I.8.7.2 - two managed pointer types T& and U& are + * assignment compatibility for location types, ECMA I.8.7.2 - two managed pointer types T& and U& are * assignment compatible if the verification types of T and U are identical. */ if (signature_assignment) @@ -3860,12 +3860,12 @@ mono_class_is_assignable_from (MonoClass *klass, MonoClass *oklass) } /* - * ECMA I.8.7.3 general assignment compatability is defined in terms of an "intermediate type" - * whereas ECMA I.8.7.1 assignment compatability for signature types is defined in terms of a "reduced type". + * ECMA I.8.7.3 general assignment compatibility is defined in terms of an "intermediate type" + * whereas ECMA I.8.7.1 assignment compatibility for signature types is defined in terms of a "reduced type". * * This matters when we're comparing arrays of IntPtr. IntPtr[] is generally * assignable to int[] or long[], depending on architecture. But for signature - * compatability, IntPtr[] is distinct from both of them. + * compatibility, IntPtr[] is distinct from both of them. * * Similarly for ulong* and IntPtr*, etc. */ @@ -4162,7 +4162,7 @@ mono_class_is_assignable_from_general (MonoClass *klass, MonoClass *oklass, gboo * if both klass and oklass are fnptr, and they're equal, we would have returned at the * beginning. */ - /* Is this right? or do we need to look at signature compatability? */ + /* Is this right? or do we need to look at signature compatibility? */ *result = FALSE; return; } diff --git a/src/mono/mono/metadata/gc.c b/src/mono/mono/metadata/gc.c index 61a1b73e149d1..0c3b1cecf30a0 100644 --- a/src/mono/mono/metadata/gc.c +++ b/src/mono/mono/metadata/gc.c @@ -105,7 +105,7 @@ static MonoCoopMutex pending_done_mutex; static void object_register_finalizer (MonoObject *obj, void (*callback)(void *, void*)); -static void reference_queue_proccess_all (void); +static void reference_queue_process_all (void); static void mono_reference_queue_cleanup (void); static void reference_queue_clear_for_domain (MonoDomain *domain); static void mono_runtime_do_background_work (void); @@ -862,7 +862,7 @@ mono_runtime_do_background_work (void) mono_threads_join_threads (); - reference_queue_proccess_all (); + reference_queue_process_all (); hazard_free_queue_pump (); } @@ -1067,7 +1067,7 @@ ref_list_push (RefQueueEntry **head, RefQueueEntry *value) } static void -reference_queue_proccess (MonoReferenceQueue *queue) +reference_queue_process (MonoReferenceQueue *queue) { RefQueueEntry **iter = &queue->queue; RefQueueEntry *entry; @@ -1084,12 +1084,12 @@ reference_queue_proccess (MonoReferenceQueue *queue) } static void -reference_queue_proccess_all (void) +reference_queue_process_all (void) { MonoReferenceQueue **iter; MonoReferenceQueue *queue = ref_queues; for (; queue; queue = queue->next) - reference_queue_proccess (queue); + reference_queue_process (queue); restart: mono_coop_mutex_lock (&reference_queue_mutex); @@ -1101,7 +1101,7 @@ reference_queue_proccess_all (void) } if (queue->queue) { mono_coop_mutex_unlock (&reference_queue_mutex); - reference_queue_proccess (queue); + reference_queue_process (queue); goto restart; } *iter = queue->next; @@ -1116,7 +1116,7 @@ mono_reference_queue_cleanup (void) MonoReferenceQueue *queue = ref_queues; for (; queue; queue = queue->next) queue->should_be_deleted = TRUE; - reference_queue_proccess_all (); + reference_queue_process_all (); } static void diff --git a/src/mono/mono/metadata/icall.c b/src/mono/mono/metadata/icall.c index bae99d743f7db..ff3c843cd8942 100644 --- a/src/mono/mono/metadata/icall.c +++ b/src/mono/mono/metadata/icall.c @@ -3246,7 +3246,7 @@ init_io_stream_slots (void) static MonoBoolean -stream_has_overriden_begin_or_end_method (MonoObjectHandle stream, int begin_slot, int end_slot, MonoError *error) +stream_has_overridden_begin_or_end_method (MonoObjectHandle stream, int begin_slot, int end_slot, MonoError *error) { MonoClass* curr_klass = MONO_HANDLE_GET_CLASS (stream); MonoClass* base_klass = mono_class_try_get_stream_class (); @@ -3261,10 +3261,10 @@ stream_has_overriden_begin_or_end_method (MonoObjectHandle stream, int begin_slo // in this case we can safely assume the methods are not overridden // otherwise - check vtable MonoMethod **curr_klass_vtable = m_class_get_vtable (curr_klass); - gboolean begin_is_overriden = begin_slot != -1 && curr_klass_vtable [begin_slot] != NULL && curr_klass_vtable [begin_slot]->klass != base_klass; - gboolean end_is_overriden = end_slot != -1 && curr_klass_vtable [end_slot] != NULL && curr_klass_vtable [end_slot]->klass != base_klass; + gboolean begin_is_overridden = begin_slot != -1 && curr_klass_vtable [begin_slot] != NULL && curr_klass_vtable [begin_slot]->klass != base_klass; + gboolean end_is_overridden = end_slot != -1 && curr_klass_vtable [end_slot] != NULL && curr_klass_vtable [end_slot]->klass != base_klass; - return begin_is_overriden || end_is_overriden; + return begin_is_overridden || end_is_overridden; } MonoBoolean @@ -3273,8 +3273,8 @@ ves_icall_System_IO_Stream_HasOverriddenBeginEndRead (MonoObjectHandle stream, M if (!io_stream_slots_set) init_io_stream_slots (); - // return true if BeginRead or EndRead were overriden - return stream_has_overriden_begin_or_end_method (stream, io_stream_begin_read_slot, io_stream_end_read_slot, error); + // return true if BeginRead or EndRead were overridden + return stream_has_overridden_begin_or_end_method (stream, io_stream_begin_read_slot, io_stream_end_read_slot, error); } MonoBoolean @@ -3283,8 +3283,8 @@ ves_icall_System_IO_Stream_HasOverriddenBeginEndWrite (MonoObjectHandle stream, if (!io_stream_slots_set) init_io_stream_slots (); - // return true if BeginWrite or EndWrite were overriden - return stream_has_overriden_begin_or_end_method (stream, io_stream_begin_write_slot, io_stream_end_write_slot, error); + // return true if BeginWrite or EndWrite were overridden + return stream_has_overridden_begin_or_end_method (stream, io_stream_begin_write_slot, io_stream_end_write_slot, error); } MonoBoolean @@ -6221,7 +6221,7 @@ ves_icall_System_ArgIterator_IntGetNextArgWithType (MonoArgIterator *iter, MonoT continue; res->type = iter->sig->params [i]; res->klass = mono_class_from_mono_type_internal (res->type); - /* FIXME: endianess issue... */ + /* FIXME: endianness issue... */ arg_size = mono_type_stack_size (res->type, &align); #if defined(__arm__) iter->args = (guint8*)(((gsize)iter->args + (align) - 1) & ~(align - 1)); diff --git a/src/mono/mono/metadata/marshal-ilgen.c b/src/mono/mono/metadata/marshal-ilgen.c index 6601943bbcf13..f251c34fdcdff 100644 --- a/src/mono/mono/metadata/marshal-ilgen.c +++ b/src/mono/mono/metadata/marshal-ilgen.c @@ -492,7 +492,7 @@ emit_marshal_array_ilgen (EmitMarshalContext *m, int argnum, MonoType *t, /* Create managed array */ /* * The LPArray marshalling spec says that sometimes param_num starts - * from 1, sometimes it starts from 0. But MS seems to allways start + * from 1, sometimes it starts from 0. But MS seems to always start * from 0. */ diff --git a/src/mono/mono/metadata/native-library.h b/src/mono/mono/metadata/native-library.h index 60259949b2410..9108a86ae7546 100644 --- a/src/mono/mono/metadata/native-library.h +++ b/src/mono/mono/metadata/native-library.h @@ -22,7 +22,7 @@ typedef enum { * callers convert it to a MonoError. * * Don't expose this type to the runtime. It's just an implementation - * detail for backward compatability. + * detail for backward compatibility. */ typedef struct MonoLookupPInvokeStatus { MonoLookupPInvokeErr err_code; diff --git a/src/mono/mono/metadata/object.c b/src/mono/mono/metadata/object.c index df63130a75f50..a4299fc6437fd 100644 --- a/src/mono/mono/metadata/object.c +++ b/src/mono/mono/metadata/object.c @@ -6200,7 +6200,7 @@ mono_string_new_internal (const char *text) MonoString *res = NULL; res = mono_string_new_checked (text, error); if (!is_ok (error)) { - /* Mono API compatability: assert on Out of Memory errors, + /* Mono API compatibility: assert on Out of Memory errors, * return NULL otherwise (most likely an invalid UTF-8 byte * sequence). */ if (mono_error_get_error_code (error) == MONO_ERROR_OUT_OF_MEMORY) diff --git a/src/mono/mono/metadata/sgen-toggleref.c b/src/mono/mono/metadata/sgen-toggleref.c index 9a5d98e29339d..35a84b8e3bb3f 100644 --- a/src/mono/mono/metadata/sgen-toggleref.c +++ b/src/mono/mono/metadata/sgen-toggleref.c @@ -38,7 +38,7 @@ sgen_process_togglerefs (void) int i, w; int toggle_ref_counts [3] = { 0, 0, 0 }; - SGEN_LOG (4, "Proccessing ToggleRefs %d", toggleref_array_size); + SGEN_LOG (4, "Processing ToggleRefs %d", toggleref_array_size); for (i = w = 0; i < toggleref_array_size; ++i) { int res; @@ -75,7 +75,7 @@ sgen_process_togglerefs (void) toggleref_array_size = w; - SGEN_LOG (4, "Done Proccessing ToggleRefs dropped %d strong %d weak %d final size %d", + SGEN_LOG (4, "Done Processing ToggleRefs dropped %d strong %d weak %d final size %d", toggle_ref_counts [MONO_TOGGLE_REF_DROP], toggle_ref_counts [MONO_TOGGLE_REF_STRONG], toggle_ref_counts [MONO_TOGGLE_REF_WEAK], @@ -206,9 +206,9 @@ mono_gc_toggleref_add (MonoObject *object, mono_bool strong_ref) * gchandles, storing to reference fields or interacting with other threads that might perform such operations. */ void -mono_gc_toggleref_register_callback (MonoToggleRefStatus (*proccess_toggleref) (MonoObject *obj)) +mono_gc_toggleref_register_callback (MonoToggleRefStatus (*process_toggleref) (MonoObject *obj)) { - toggleref_callback = proccess_toggleref; + toggleref_callback = process_toggleref; } static MonoToggleRefStatus @@ -238,7 +238,7 @@ sgen_register_test_toggleref_callback (void) #else void -mono_gc_toggleref_register_callback (MonoToggleRefStatus (*proccess_toggleref) (MonoObject *obj)) +mono_gc_toggleref_register_callback (MonoToggleRefStatus (*process_toggleref) (MonoObject *obj)) { } diff --git a/src/mono/mono/metadata/sgen-toggleref.h b/src/mono/mono/metadata/sgen-toggleref.h index 77b622bed79a8..3c9741017ed0e 100644 --- a/src/mono/mono/metadata/sgen-toggleref.h +++ b/src/mono/mono/metadata/sgen-toggleref.h @@ -23,7 +23,7 @@ typedef enum { MONO_TOGGLE_REF_WEAK } MonoToggleRefStatus; -MONO_API void mono_gc_toggleref_register_callback (MonoToggleRefStatus (*proccess_toggleref) (MonoObject *obj)); +MONO_API void mono_gc_toggleref_register_callback (MonoToggleRefStatus (*process_toggleref) (MonoObject *obj)); MONO_API MONO_RT_EXTERNAL_ONLY void mono_gc_toggleref_add (MonoObject *object, mono_bool strong_ref); #endif diff --git a/src/mono/mono/metadata/verify.c b/src/mono/mono/metadata/verify.c index 537a53b7d0d47..660f6226eb009 100644 --- a/src/mono/mono/metadata/verify.c +++ b/src/mono/mono/metadata/verify.c @@ -33,7 +33,7 @@ #include /* - * Returns TURE if @type is VAR or MVAR + * Returns TRUE if @type is VAR or MVAR */ static gboolean mono_type_is_generic_argument (MonoType *type) diff --git a/src/mono/mono/mini/aot-compiler.c b/src/mono/mono/mini/aot-compiler.c index 3f08e0b96ea89..b942e7a676040 100644 --- a/src/mono/mono/mini/aot-compiler.c +++ b/src/mono/mono/mini/aot-compiler.c @@ -6871,7 +6871,7 @@ encode_patch (MonoAotCompile *acfg, MonoJumpInfo *patch_info, guint8 *buf, guint guint32 offset; /* - * entry->d.klass/method has a lenghtly encoding and multiple rgctx_fetch entries + * entry->d.klass/method has a lengthly encoding and multiple rgctx_fetch entries * reference the same klass/method, so encode it only once. * For patches which refer to got entries, this sharing is done by get_got_offset, but * these are not got entries. @@ -12289,7 +12289,7 @@ emit_unwind_info_sections_win32 (MonoAotCompile *acfg, const char *function_star * If a method has at least one generic parameter constrained to a reference type, then REF shared method must be generated. * On the other hand, if a method has at least one generic parameter constrained to a value type, then GSHAREDVT method must be generated. * A special case, when extra methods are always generated, is for generic methods of generic types. - * + * * Returns: TRUE - extra method should be generated, otherwise FALSE */ static gboolean diff --git a/src/mono/mono/mini/aot-runtime.c b/src/mono/mono/mini/aot-runtime.c index aa05ba13ce89f..76f1a7d821b28 100644 --- a/src/mono/mono/mini/aot-runtime.c +++ b/src/mono/mono/mini/aot-runtime.c @@ -5641,7 +5641,7 @@ get_new_trampoline_from_page (int tramp_type) page->trampolines += specific_trampoline_size; mono_aot_page_unlock (); - /* Register the generic part at the beggining of the trampoline page */ + /* Register the generic part at the beginning of the trampoline page */ gen_info = mono_tramp_info_create (NULL, (guint8*)taddr, amodule->info.tramp_page_code_offsets [tramp_type], NULL, NULL); read_page_trampoline_uwinfo (gen_info, tramp_type, TRUE); mono_aot_tramp_info_register (gen_info, NULL); diff --git a/src/mono/mono/mini/basic-float.cs b/src/mono/mono/mini/basic-float.cs index b4004ee1104af..48553ad70d8bf 100644 --- a/src/mono/mono/mini/basic-float.cs +++ b/src/mono/mono/mini/basic-float.cs @@ -38,7 +38,7 @@ public static int Main (string[] args) { return TestDriver.RunTests (typeof (Tests), args); } #endif - + public static int test_0_beq () { double a = 2.0; if (a != 2.0) @@ -189,39 +189,39 @@ public static int test_5_conv_r8 () { public static int test_5_add () { double a = 2.0; - double b = 3.0; + double b = 3.0; return (int)(a + b); } public static int test_5_sub () { double a = 8.0; - double b = 3.0; + double b = 3.0; return (int)(a - b); - } + } public static int test_24_mul () { double a = 8.0; - double b = 3.0; + double b = 3.0; return (int)(a * b); - } + } public static int test_4_div () { double a = 8.0; - double b = 2.0; + double b = 2.0; return (int)(a / b); - } + } public static int test_2_rem () { double a = 8.0; - double b = 3.0; + double b = 3.0; return (int)(a % b); - } + } public static int test_2_neg () { - double a = -2.0; + double a = -2.0; return (int)(-a); } - + public static int test_46_float_add_spill () { // we overflow the FP stack double a = 1; @@ -377,7 +377,7 @@ public static int test_16_float_cmp () { double b = 1.0; int result = 0; bool val; - + val = a == a; if (!val) return result; @@ -466,7 +466,7 @@ public static int test_15_float_cmp_un () { double b = 1.0; int result = 0; bool val; - + val = a == a; if (val) return result; @@ -549,7 +549,7 @@ public static int test_15_float_branch () { double a = 2.0; double b = 1.0; int result = 0; - + if (!(a == a)) return result; result++; @@ -617,7 +617,7 @@ public static int test_15_float_branch_un () { double a = Double.NaN; double b = 1.0; int result = 0; - + if (a == a) return result; result++; @@ -683,7 +683,7 @@ public static int test_15_float_branch_un () { public static int test_0_float_precision () { float f1 = 3.40282346638528859E+38f; - float f2 = 3.40282346638528859E+38f; + float f2 = 3.40282346638528859E+38f; float PositiveInfinity = (float)(1.0f / 0.0f); float f = (float)(f1 + f2); @@ -715,7 +715,7 @@ public static int test_0_long_to_double_conversion () public static int INT_VAL = 0x13456799; - public static int test_0_int4_to_float_convertion () + public static int test_0_int4_to_float_conversion () { double d = (double)(float)INT_VAL; @@ -724,7 +724,7 @@ public static int test_0_int4_to_float_convertion () return 0; } - public static int test_0_int8_to_float_convertion () + public static int test_0_int8_to_float_conversion () { double d = (double)(float)(long)INT_VAL; diff --git a/src/mono/mono/mini/branch-opts.c b/src/mono/mono/mini/branch-opts.c index 1d473d14cfc60..5d14e517c5f09 100644 --- a/src/mono/mono/mini/branch-opts.c +++ b/src/mono/mono/mini/branch-opts.c @@ -24,7 +24,7 @@ static gboolean mono_bb_is_fall_through (MonoCompile *cfg, MonoBasicBlock *bb) { - return bb->next_bb && bb->next_bb->region == bb->region && /*fall throught between regions is not really interesting or useful*/ + return bb->next_bb && bb->next_bb->region == bb->region && /*fallthrough between regions is not really interesting or useful*/ (bb->last_ins == NULL || !MONO_IS_BRANCH_OP (bb->last_ins)); /*and the last op can't be a branch too*/ } diff --git a/src/mono/mono/mini/cpu-amd64.mdesc b/src/mono/mono/mini/cpu-amd64.mdesc index 0c298d0bfe742..38c1b98232df4 100644 --- a/src/mono/mono/mini/cpu-amd64.mdesc +++ b/src/mono/mono/mini/cpu-amd64.mdesc @@ -22,7 +22,7 @@ # c register which can be used as a byte register (RAX..RDX) # A - first arg reg (rdi/rcx) # -# len:number describe the maximun length in bytes of the instruction +# len:number describe the maximum length in bytes of the instruction # number is a positive integer. If the length is not specified # it defaults to zero. But lengths are only checked if the given opcode # is encountered during compilation. Some opcodes, like CONV_U4 are diff --git a/src/mono/mono/mini/cpu-arm.mdesc b/src/mono/mono/mini/cpu-arm.mdesc index 728172afb50a7..43bf61f5ccfdb 100644 --- a/src/mono/mono/mini/cpu-arm.mdesc +++ b/src/mono/mono/mini/cpu-arm.mdesc @@ -21,7 +21,7 @@ # f floating point register # g floating point register returned in r0:r1 for soft-float mode # -# len:number describe the maximun length in bytes of the instruction +# len:number describe the maximum length in bytes of the instruction # number is a positive integer # # cost:number describe how many cycles are needed to complete the instruction (unused) diff --git a/src/mono/mono/mini/cpu-arm64.mdesc b/src/mono/mono/mini/cpu-arm64.mdesc index 073d1eeb13cc0..82d345be9ec07 100644 --- a/src/mono/mono/mini/cpu-arm64.mdesc +++ b/src/mono/mono/mini/cpu-arm64.mdesc @@ -21,7 +21,7 @@ # f floating point register # g floating point register returned in r0:r1 for soft-float mode # -# len:number describe the maximun length in bytes of the instruction +# len:number describe the maximum length in bytes of the instruction # number is a positive integer # # cost:number describe how many cycles are needed to complete the instruction (unused) diff --git a/src/mono/mono/mini/cpu-ppc.mdesc b/src/mono/mono/mini/cpu-ppc.mdesc index 23b4a64d2309c..7857a0361bf58 100644 --- a/src/mono/mono/mini/cpu-ppc.mdesc +++ b/src/mono/mono/mini/cpu-ppc.mdesc @@ -17,7 +17,7 @@ # b base register (used in address references) # f floating point register # -# len:number describe the maximun length in bytes of the instruction +# len:number describe the maximum length in bytes of the instruction # number is a positive integer # # cost:number describe how many cycles are needed to complete the instruction (unused) diff --git a/src/mono/mono/mini/cpu-ppc64.mdesc b/src/mono/mono/mini/cpu-ppc64.mdesc index f59e1ee1b8519..fab76a6ac080d 100644 --- a/src/mono/mono/mini/cpu-ppc64.mdesc +++ b/src/mono/mono/mini/cpu-ppc64.mdesc @@ -17,7 +17,7 @@ # b base register (used in address references) # f floating point register # -# len:number describe the maximun length in bytes of the instruction +# len:number describe the maximum length in bytes of the instruction # number is a positive integer # # cost:number describe how many cycles are needed to complete the instruction (unused) diff --git a/src/mono/mono/mini/cpu-s390x.mdesc b/src/mono/mono/mini/cpu-s390x.mdesc index 0053fa3a1ecc6..7e7d9d4b58423 100644 --- a/src/mono/mono/mini/cpu-s390x.mdesc +++ b/src/mono/mono/mini/cpu-s390x.mdesc @@ -17,7 +17,7 @@ # b base register (used in address references) # f floating point register # -# len:number describe the maximun length in bytes of the instruction +# len:number describe the maximum length in bytes of the instruction # number is a positive integer # # cost:number describe how many cycles are needed to complete the instruction (unused) diff --git a/src/mono/mono/mini/cpu-x86.mdesc b/src/mono/mono/mini/cpu-x86.mdesc index 6a2f370996a47..944b9663aff66 100644 --- a/src/mono/mono/mini/cpu-x86.mdesc +++ b/src/mono/mono/mini/cpu-x86.mdesc @@ -23,7 +23,7 @@ # y the reg needs to be one of EAX,EBX,ECX,EDX (sete opcodes) # x XMM reg (XMM0 - X007) # -# len:number describe the maximun length in bytes of the instruction +# len:number describe the maximum length in bytes of the instruction # number is a positive integer. If the length is not specified # it defaults to zero. But lengths are only checked if the given opcode # is encountered during compilation. Some opcodes, like CONV_U4 are diff --git a/src/mono/mono/mini/interp/interp.c b/src/mono/mono/mini/interp/interp.c index 0e3618606add5..2105e471683a3 100644 --- a/src/mono/mono/mini/interp/interp.c +++ b/src/mono/mono/mini/interp/interp.c @@ -2622,7 +2622,7 @@ do_jit_call (ThreadContext *context, stackval *ret_sp, stackval *sp, InterpFrame cinfo = (JitCallInfo*)rmethod->jit_call_info; /* - * Convert the arguments on the interpeter stack to the format expected by the gsharedvt_out wrapper. + * Convert the arguments on the interpreter stack to the format expected by the gsharedvt_out wrapper. */ gpointer args [32]; int pindex = 0; @@ -3501,7 +3501,7 @@ method_entry (ThreadContext *context, InterpFrame *frame, return slow; } -/* Save the state of the interpeter main loop into FRAME */ +/* Save the state of the interpreter main loop into FRAME */ #define SAVE_INTERP_STATE(frame) do { \ frame->state.ip = ip; \ } while (0) @@ -7368,7 +7368,7 @@ interp_parse_options (const char *options) /* * interp_set_resume_state: * - * Set the state the interpeter will continue to execute from after execution returns to the interpreter. + * Set the state the interpreter will continue to execute from after execution returns to the interpreter. * If INTERP_FRAME is NULL, that means the exception is caught in an AOTed frame and the interpreter needs to * unwind back to AOT code. */ diff --git a/src/mono/mono/mini/mini-amd64.c b/src/mono/mono/mini/mini-amd64.c index 1393ec8b3d0da..cf1c43d101515 100644 --- a/src/mono/mono/mini/mini-amd64.c +++ b/src/mono/mono/mini/mini-amd64.c @@ -672,7 +672,7 @@ add_valuetype (MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type, } if (pass_on_stack) { - /* Allways pass in memory */ + /* Always pass in memory */ ainfo->offset = GINT32_TO_INT16 (*stack_size); *stack_size += ALIGN_TO (size, 8); ainfo->storage = is_return ? ArgValuetypeAddrInIReg : ArgOnStack; @@ -983,7 +983,7 @@ get_call_info (MonoMemPool *mp, MonoMethodSignature *sig) #endif if (!sig->pinvoke && (sig->call_convention == MONO_CALL_VARARG) && (i == sig->sentinelpos)) { - /* We allways pass the sig cookie on the stack for simplicity */ + /* We always pass the sig cookie on the stack for simplicity */ /* * Prevent implicit arguments + the sig cookie from being passed * in registers. @@ -4140,7 +4140,7 @@ mono_emit_stack_alloc (MonoCompile *cfg, guchar *code, MonoInst* tree) * Under Windows, it is necessary to allocate one page at a time, * "touching" stack after each successful sub-allocation. This is * because of the way stack growth is implemented - there is a - * guard page before the lowest stack page that is currently commited. + * guard page before the lowest stack page that is currently committed. * Stack normally grows sequentially so OS traps access to the * guard page and commits more pages when needed. */ diff --git a/src/mono/mono/mini/mini-exceptions.c b/src/mono/mono/mini/mini-exceptions.c index 1ffebf327b142..a21c1acba98dd 100644 --- a/src/mono/mono/mini/mini-exceptions.c +++ b/src/mono/mono/mini/mini-exceptions.c @@ -2498,7 +2498,7 @@ mono_handle_exception_internal (MonoContext *ctx, MonoObject *obj, gboolean resu /* * ctx->pc points into the interpreter, after the call which transitioned to * JITted code. Store the unwind state into the - * interpeter state, then resume, the interpreter will unwind itself until + * interpreter state, then resume, the interpreter will unwind itself until * it reaches the target frame and will continue execution from there. * The resuming is kinda hackish, from the native code standpoint, it looks * like the call which transitioned to JITted code has succeeded, but the diff --git a/src/mono/mono/mini/mini-ops.h b/src/mono/mono/mini/mini-ops.h index 4322e1132a47e..5981917a49be7 100644 --- a/src/mono/mono/mini/mini-ops.h +++ b/src/mono/mono/mini/mini-ops.h @@ -764,7 +764,7 @@ MINI_OP(OP_BOUNDS_CHECK, "bounds_check", NONE, IREG, IREG) /* type checks */ MINI_OP(OP_ISINST, "isinst", IREG, IREG, NONE) MINI_OP(OP_CASTCLASS, "castclass", IREG, IREG, NONE) -/* get adress of element in a 2D array */ +/* get address of element in a 2D array */ MINI_OP(OP_LDELEMA2D, "ldelema2d", NONE, NONE, NONE) /* inlined small memcpy with constant length */ MINI_OP(OP_MEMCPY, "memcpy", NONE, NONE, NONE) diff --git a/src/mono/mono/mini/mini-ppc.c b/src/mono/mono/mini/mini-ppc.c index b88fe67498429..5f014f921145a 100644 --- a/src/mono/mono/mini/mini-ppc.c +++ b/src/mono/mono/mini/mini-ppc.c @@ -4624,7 +4624,7 @@ mono_arch_register_lowlevel_calls (void) __load [9] = ((guint64)(gsize)(val)) & 0xffff; \ } while (0) #else -#error huh? No endianess defined by compiler +#error huh? No endianness defined by compiler #endif #else #define patch_load_sequence(ip,val) do {\ diff --git a/src/mono/mono/mini/mini-x86.c b/src/mono/mono/mini/mini-x86.c index 42451234e8a98..4bc4f91fb3db8 100644 --- a/src/mono/mono/mini/mini-x86.c +++ b/src/mono/mono/mini/mini-x86.c @@ -436,7 +436,7 @@ get_call_info_internal (CallInfo *cinfo, MonoMethodSignature *sig) MonoType *ptype; if (!sig->pinvoke && (sig->call_convention == MONO_CALL_VARARG) && (i == sig->sentinelpos)) { - /* We allways pass the sig cookie on the stack for simplicity */ + /* We always pass the sig cookie on the stack for simplicity */ /* * Prevent implicit arguments + the sig cookie from being passed * in registers. @@ -2129,7 +2129,7 @@ mono_emit_stack_alloc (MonoCompile *cfg, guchar *code, MonoInst* tree) * Under Windows, it is necessary to allocate one page at a time, * "touching" stack after each successful sub-allocation. This is * because of the way stack growth is implemented - there is a - * guard page before the lowest stack page that is currently commited. + * guard page before the lowest stack page that is currently committed. * Stack normally grows sequentially so OS traps access to the * guard page and commits more pages when needed. */ diff --git a/src/mono/mono/mini/mini.c b/src/mono/mono/mini/mini.c index 73f7f01513d54..61cce8cbf4e92 100644 --- a/src/mono/mono/mini/mini.c +++ b/src/mono/mono/mini/mini.c @@ -1237,7 +1237,7 @@ mono_allocate_stack_slots2 (MonoCompile *cfg, gboolean backward, guint32 *stack_ if (slot == 0xffffff) { /* - * Allways allocate valuetypes to sizeof (target_mgreg_t) to allow more + * Always allocate valuetypes to sizeof (target_mgreg_t) to allow more * efficient copying (and to work around the fact that OP_MEMCPY * and OP_MEMSET ignores alignment). */ @@ -1491,7 +1491,7 @@ mono_allocate_stack_slots (MonoCompile *cfg, gboolean backward, guint32 *stack_s if (slot == 0xffffff) { /* - * Allways allocate valuetypes to sizeof (target_mgreg_t) to allow more + * Always allocate valuetypes to sizeof (target_mgreg_t) to allow more * efficient copying (and to work around the fact that OP_MEMCPY * and OP_MEMSET ignores alignment). */ @@ -3780,7 +3780,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, JitFlags flags, int parts g_assert (cfg->got_var_allocated); /* - * Allways allocate the GOT var to a register, because keeping it + * Always allocate the GOT var to a register, because keeping it * in memory will increase the number of live temporaries in some * code created by inssel.brg, leading to the well known spills+ * branches problem. Testcase: mcs crash in diff --git a/src/mono/mono/mini/ssa.c b/src/mono/mono/mini/ssa.c index 054eb4e4b5040..4481f65d3c9b2 100644 --- a/src/mono/mono/mini/ssa.c +++ b/src/mono/mono/mini/ssa.c @@ -1499,7 +1499,7 @@ mono_ssa_loop_invariant_code_motion (MonoCompile *cfg) continue; MONO_BB_FOR_EACH_INS_SAFE (bb, n, ins) { /* - * Try to move instructions out of loop headers into the preceeding bblock. + * Try to move instructions out of loop headers into the preceding bblock. */ if (ins->opcode == OP_LDLEN || ins->opcode == OP_STRLEN || ins->opcode == OP_CHECK_THIS || ins->opcode == OP_AOTCONST || ins->opcode == OP_GENERIC_CLASS_INIT) { MonoInst *tins; diff --git a/src/mono/mono/mini/tramp-arm.c b/src/mono/mono/mini/tramp-arm.c index 0ea6a306dcb95..f9f27a8f05085 100644 --- a/src/mono/mono/mini/tramp-arm.c +++ b/src/mono/mono/mini/tramp-arm.c @@ -181,7 +181,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf /* * For page trampolines the data is in r1, so just move it, otherwise use the got slot as below. * The trampoline contains a pc-relative offset to the got slot - * preceeding the got slot where the value is stored. The offset can be + * preceding the got slot where the value is stored. The offset can be * found at [lr + 0]. */ /* See if emit_trampolines () in aot-compiler.c for the '2' */ diff --git a/src/mono/mono/mini/unwind.c b/src/mono/mono/mini/unwind.c index 409799b9a1f6c..0d2d2c9a2eac8 100644 --- a/src/mono/mono/mini/unwind.c +++ b/src/mono/mono/mini/unwind.c @@ -1041,7 +1041,7 @@ mono_unwind_decode_fde (guint8 *fde, guint32 *out_len, guint32 *code_len, MonoJi /* Decode FDE */ p = fde; - // FIXME: Endianess ? + // FIXME: Endianness ? fde_len = *(guint32*)p; g_assert (fde_len != 0xffffffff && fde_len != 0); p += 4; diff --git a/src/mono/mono/sgen/sgen-descriptor.h b/src/mono/mono/sgen/sgen-descriptor.h index faa9abb8a1dd1..169024e9630b0 100644 --- a/src/mono/mono/sgen/sgen-descriptor.h +++ b/src/mono/mono/sgen/sgen-descriptor.h @@ -186,7 +186,7 @@ sgen_gc_descr_has_references (SgenDescriptor desc) } while (0) /* a bitmap desc means that there are pointer references or we'd have - * choosen run-length, instead: add an assert to check. + * chosen run-length, instead: add an assert to check. */ #ifdef __GNUC__ #define OBJ_BITMAP_FOREACH_PTR(desc,obj) do { \ diff --git a/src/mono/mono/sgen/sgen-gc.c b/src/mono/mono/sgen/sgen-gc.c index 6866bf20688dd..ea3102c983225 100644 --- a/src/mono/mono/sgen/sgen-gc.c +++ b/src/mono/mono/sgen/sgen-gc.c @@ -81,7 +81,7 @@ this can be done just for locals as a start, so that at least part of the stack is handled precisely. - *) test/fix endianess issues + *) test/fix endianness issues *) Implement a card table as the write barrier instead of remembered sets? Card tables are not easy to implement with our current @@ -1179,7 +1179,7 @@ finish_gray_stack (int generation, ScanCopyContext ctx) /* Do the first bridge step here, as the collector liveness state will become useless after that. - An important optimization is to only proccess the possibly dead part of the object graph and skip + An important optimization is to only process the possibly dead part of the object graph and skip over all live objects as we transitively know everything they point must be alive too. The above invariant is completely wrong if we let the gray queue be drained and mark/copy everything. diff --git a/src/mono/mono/tests/appdomain-unload-asmload.cs b/src/mono/mono/tests/appdomain-unload-asmload.cs index 5f79890ca53a7..7b04b0eaa9530 100644 --- a/src/mono/mono/tests/appdomain-unload-asmload.cs +++ b/src/mono/mono/tests/appdomain-unload-asmload.cs @@ -36,7 +36,7 @@ class AppDomainTestDriver : MarshalByRefObject static AppDomainTestDriver() { // Needs a callback so that the runtime fires the - // AssembyLoad event for this domain and materializes a System.Reflection.Assembly + // AssemblyLoad event for this domain and materializes a System.Reflection.Assembly AppDomain.CurrentDomain.AssemblyLoad += CurrentDomain_AssemblyLoad; } diff --git a/src/mono/mono/tests/assemblyresolve_event7.cs b/src/mono/mono/tests/assemblyresolve_event7.cs index 9049b4bbe8228..39f66fb76dc12 100644 --- a/src/mono/mono/tests/assemblyresolve_event7.cs +++ b/src/mono/mono/tests/assemblyresolve_event7.cs @@ -102,7 +102,7 @@ static int Main(string[] args) Console.WriteLine("Test is OK"); if (ExcCount>0) - throw new Exception("Resolving assembly parametrs and original parametrs are not equal in AssemblyResolveTest7"); + throw new Exception("Resolving assembly parameters and original parameters are not equal in AssemblyResolveTest7"); return 0; } @@ -122,7 +122,7 @@ private static Assembly MyResolveEventHandler(object sender, ResolveEventArgs ar ExcCount++; return null; //bug: An exception is not raised! - //throw new Exception("Resolving assembly parametrs and original parametrs are not equal"); + //throw new Exception("Resolving assembly parameters and original parameters are not equal"); } } } diff --git a/src/mono/mono/tests/libtest.c b/src/mono/mono/tests/libtest.c index 46f9ad5985c1f..62abe74727816 100644 --- a/src/mono/mono/tests/libtest.c +++ b/src/mono/mono/tests/libtest.c @@ -7725,7 +7725,7 @@ StringParameterRef(/*ref*/ char **s, int index) { marshal_free (*s); } - // overwrite the orginal + // overwrite the original *s = (char *)(marshal_alloc (sizeof(char)* (strLength + 1))); memcpy(*s, pszTextutf8, strLength); (*s)[strLength] = '\0'; diff --git a/src/mono/mono/tests/metadata-verifier/cli-tables-tests.mdv b/src/mono/mono/tests/metadata-verifier/cli-tables-tests.mdv index 5412ec803ef0e..e6e942985bf97 100644 --- a/src/mono/mono/tests/metadata-verifier/cli-tables-tests.mdv +++ b/src/mono/mono/tests/metadata-verifier/cli-tables-tests.mdv @@ -165,7 +165,7 @@ typedef-table { invalid offset table-row ( 2 1 ) + 8 set-ushort 0x01 invalid offset table-row ( 2 1 ) + 8 set-ushort 0x02 - #make type 1 an inteface but let it remain extending something + #make type 1 an interface but let it remain extending something invalid offset table-row ( 2 1 ) or-uint 0x20 #interface must extend nothing valid offset table-row ( 2 1 ) or-uint 0xA0 , offset table-row ( 2 1 ) + 8 set-ushort 0x0 @@ -341,7 +341,7 @@ methoddef-table { invalid offset table-row ( 6 2 ) + 8 set-ushort 0x9999 #Interface cannot have .ctors (15) - #method 3 belongs to an inteface + #method 3 belongs to an interface invalid offset table-row ( 6 3 ) + 8 set-ushort read.ushort ( table-row ( 6 0 ) + 8 ) #Interface methods can't be static invalid offset table-row ( 6 3 ) + 6 or-ushort 0x0010 diff --git a/src/mono/mono/tests/metadata-verifier/header-tests.mdv b/src/mono/mono/tests/metadata-verifier/header-tests.mdv index 4ce8616a6a74c..74007855a4cdc 100644 --- a/src/mono/mono/tests/metadata-verifier/header-tests.mdv +++ b/src/mono/mono/tests/metadata-verifier/header-tests.mdv @@ -105,11 +105,11 @@ pe-optional-header-standard-fields { valid offset pe-optional-header + 4 set-uint 0 valid offset pe-optional-header + 4 set-uint 0x999999 - #Intialized data size is just an informative field as well, nobody cares + #Initialized data size is just an informative field as well, nobody cares valid offset pe-optional-header + 8 set-uint 0 valid offset pe-optional-header + 8 set-uint 0x999999 - #Unintialized data size is just an informative field as well, nobody cares + #Uninitialized data size is just an informative field as well, nobody cares valid offset pe-optional-header + 12 set-uint 0 valid offset pe-optional-header + 12 set-uint 0x999999 diff --git a/src/mono/mono/tests/module-cctor.il b/src/mono/mono/tests/module-cctor.il index 38854d97d2551..27127479ee27f 100644 --- a/src/mono/mono/tests/module-cctor.il +++ b/src/mono/mono/tests/module-cctor.il @@ -1,12 +1,12 @@ .assembly TestDll { } .assembly extern mscorlib { } -.method assembly specialname rtspecialname static +.method assembly specialname rtspecialname static void .cctor() cil managed { ldc.i4 1 stsfld int32 NS.TestClass::TestField - ldstr "Module contructor executed" + ldstr "Module constructor executed" call void [mscorlib]System.Console::WriteLine(string) ret } @@ -16,7 +16,7 @@ .class public TestClass extends [mscorlib]System.Object { .field public static int32 TestField - + .method public static void TestMethod() cil managed { ldstr "TestMethod executed" diff --git a/src/mono/mono/tests/pinvoke-utf8.cs b/src/mono/mono/tests/pinvoke-utf8.cs index d9162d6711c54..99df54473692a 100644 --- a/src/mono/mono/tests/pinvoke-utf8.cs +++ b/src/mono/mono/tests/pinvoke-utf8.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; -// UTF8 +// UTF8 class UTF8StringTests { [DllImport("libtest", CallingConvention = CallingConvention.Cdecl)] @@ -17,11 +17,11 @@ public static bool TestInOutStringParameter(string orgString, int index) { string passedString = orgString; string expectedNativeString = passedString; - + string nativeString = StringParameterInOut(passedString, index); if (!(nativeString == expectedNativeString)) { - Console.WriteLine("StringParameterInOut: nativeString != expecedNativeString "); + Console.WriteLine("StringParameterInOut: nativeString != expectedNativeString "); return false; } return true; @@ -33,11 +33,11 @@ public static bool TestInOutStringParameter(string orgString, int index) public static bool TestOutStringParameter(string orgString, int index) { string passedString = orgString; - string expecedNativeString = passedString; + string expectedNativeString = passedString; string nativeString = StringParameterInOut(passedString, index); - if (!(nativeString == expecedNativeString)) + if (!(nativeString == expectedNativeString)) { - Console.WriteLine("StringParameterInOut: nativeString != expecedNativeString "); + Console.WriteLine("StringParameterInOut: nativeString != expectedNativeString "); return false; } return true; @@ -47,7 +47,7 @@ public static bool TestOutStringParameter(string orgString, int index) public static extern void StringParameterRefOut([MarshalAs(UnmanagedType.LPUTF8Str)]out string s, int index); public static bool TestStringPassByOut(string orgString, int index) { - // out string + // out string string expectedNative = string.Empty; StringParameterRefOut(out expectedNative, index); if (orgString != expectedNative) @@ -88,34 +88,34 @@ class UTF8StringBuilderTests public static bool TestInOutStringBuilderParameter(string expectedString, int index) { StringBuilder nativeStrBuilder = new StringBuilder(expectedString); - + StringBuilderParameterInOut(nativeStrBuilder, index); - + if (!nativeStrBuilder.ToString().Equals(expectedString)) { - Console.WriteLine($"TestInOutStringBuilderParameter: nativeString != expecedNativeString index={index} got={nativeStrBuilder} and expected={expectedString} "); + Console.WriteLine($"TestInOutStringBuilderParameter: nativeString != expectedNativeString index={index} got={nativeStrBuilder} and expected={expectedString} "); return false; } return true; } - + [DllImport("libtest", CallingConvention = CallingConvention.Cdecl)] public static extern void StringBuilderParameterOut([Out][MarshalAs(UnmanagedType.LPUTF8Str)]StringBuilder s, int index); public static bool TestOutStringBuilderParameter(string expectedString, int index) { // string builder capacity StringBuilder nativeStringBuilder = new StringBuilder(expectedString.Length); - + StringBuilderParameterOut(nativeStringBuilder, index); - + if (!nativeStringBuilder.ToString().Equals(expectedString)) { - Console.WriteLine("TestOutStringBuilderParameter: string != expecedString "); + Console.WriteLine("TestOutStringBuilderParameter: string != expectedString "); return false; } return true; } - + [DllImport("libtest", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.LPUTF8Str,SizeConst = 512)] @@ -125,7 +125,7 @@ public static bool TestReturnStringBuilder(string expectedReturn, int index) StringBuilder nativeString = StringBuilderParameterReturn(index); if (!expectedReturn.Equals(nativeString.ToString())) { - Console.WriteLine(string.Format( "TestReturnStringBuilder: nativeString {0} != expecedNativeString {1}",nativeString.ToString(),expectedReturn) ); + Console.WriteLine(string.Format( "TestReturnStringBuilder: nativeString {0} != expectedNativeString {1}",nativeString.ToString(),expectedReturn) ); return false; } return true; @@ -165,16 +165,16 @@ class UTF8DelegateMarshalling [DllImport("libtest", CallingConvention = CallingConvention.Cdecl)] public static extern void Utf8DelegateAsParameter(DelegateUTF8Parameter param); - + static bool failed; public static bool TestUTF8DelegateMarshalling() { failed = false; Utf8DelegateAsParameter(new DelegateUTF8Parameter(Utf8StringCallback)); - + return !failed; } - + public static void Utf8StringCallback(string nativeString, int index) { if (string.CompareOrdinal(nativeString, Test.utf8Strings[index]) != 0) @@ -197,36 +197,36 @@ class Test "Τη γλώσσα μου έδωσαν ελληνική", null, }; - + public static int Main(string[] args) { // Test string as [In,Out] parameter for (int i = 0; i < utf8Strings.Length; i++) if (!UTF8StringTests.TestInOutStringParameter(utf8Strings[i], i)) return i+1; - + // Test string as [Out] parameter for (int i = 0; i < utf8Strings.Length; i++) if (!UTF8StringTests.TestOutStringParameter(utf8Strings[i], i)) return i+100; - + for (int i = 0; i < utf8Strings.Length - 1; i++) if (!UTF8StringTests.TestStringPassByOut(utf8Strings[i], i)) return i+200; - + for (int i = 0; i < utf8Strings.Length - 1; i++) if (!UTF8StringTests.TestStringPassByRef(utf8Strings[i], i)) return i+300; - - + + // Test StringBuilder as [In,Out] parameter for (int i = 0; i < utf8Strings.Length - 1; i++) if (!UTF8StringBuilderTests.TestInOutStringBuilderParameter(utf8Strings[i], i)) return i+400; - + #if NOT_YET // This requires support for [Out] in StringBuilder - + // Test StringBuilder as [Out] parameter for (int i = 0; i < utf8Strings.Length - 1; i++){ if (!UTF8StringBuilderTests.TestOutStringBuilderParameter(utf8Strings[i], i)) @@ -234,7 +234,7 @@ public static int Main(string[] args) } #endif - + // utf8 string as struct fields if (!UTF8StructMarshalling.TestUTF8StructMarshalling(utf8Strings)) return 600; diff --git a/src/mono/mono/tests/pinvoke_ppcc.cs b/src/mono/mono/tests/pinvoke_ppcc.cs index da90ba1c35f5c..73d90de32cc4b 100644 --- a/src/mono/mono/tests/pinvoke_ppcc.cs +++ b/src/mono/mono/tests/pinvoke_ppcc.cs @@ -4,7 +4,7 @@ // // The Power ABI version 2 allows for special parameter // passing and returning optimizations for certain -// structures of homogenous composition (like all ints). +// structures of homogeneous composition (like all ints). // This set of tests checks all the possible combinations // that use the special parm/return rules and one beyond. // @@ -125,7 +125,7 @@ public struct sbyte17 { } // This structure has nested structures within it but they are - // homogenous and thus should still use the special rules. + // homogeneous and thus should still use the special rules. public struct sbyte16_nested1 { public sbyte f1; }; diff --git a/src/mono/mono/tests/pinvoke_ppcd.cs b/src/mono/mono/tests/pinvoke_ppcd.cs index 602706345e91e..e7df92672bcf1 100644 --- a/src/mono/mono/tests/pinvoke_ppcd.cs +++ b/src/mono/mono/tests/pinvoke_ppcd.cs @@ -4,7 +4,7 @@ // // The Power ABI version 2 allows for special parameter // passing and returning optimizations for certain -// structures of homogenous composition (like all ints). +// structures of homogeneous composition (like all ints). // This set of tests checks all the possible combinations // that use the special parm/return rules and one beyond. // @@ -79,7 +79,7 @@ public struct double9 { } // This structure has nested structures within it but they are - // homogenous and thus should still use the special rules. + // homogeneous and thus should still use the special rules. public struct double2_nested1 { public double f1; }; diff --git a/src/mono/mono/tests/pinvoke_ppcf.cs b/src/mono/mono/tests/pinvoke_ppcf.cs index a7f519e557cef..b0a4afee939eb 100644 --- a/src/mono/mono/tests/pinvoke_ppcf.cs +++ b/src/mono/mono/tests/pinvoke_ppcf.cs @@ -4,7 +4,7 @@ // // The Power ABI version 2 allows for special parameter // passing and returning optimizations for certain -// structures of homogenous composition (like all ints). +// structures of homogeneous composition (like all ints). // This set of tests checks all the possible combinations // that use the special parm/return rules and one beyond. // @@ -79,7 +79,7 @@ public struct float9 { } // This structure has nested structures within it but they are - // homogenous and thus should still use the special rules. + // homogeneous and thus should still use the special rules. public struct float4_nested1 { public float f1; }; diff --git a/src/mono/mono/tests/pinvoke_ppci.cs b/src/mono/mono/tests/pinvoke_ppci.cs index 34021e0b053a6..65890aab12dfd 100644 --- a/src/mono/mono/tests/pinvoke_ppci.cs +++ b/src/mono/mono/tests/pinvoke_ppci.cs @@ -4,7 +4,7 @@ // // The Power ABI version 2 allows for special parameter // passing and returning optimizations for certain -// structures of homogenous composition (like all ints). +// structures of homogeneous composition (like all ints). // This set of tests checks all the possible combinations // that use the special parm/return rules and one beyond. // @@ -53,7 +53,7 @@ public struct int5 { } // This structure has nested structures within it but they are - // homogenous and thus should still use the special rules. + // homogeneous and thus should still use the special rules. public struct int4_nested1 { public int f1; }; diff --git a/src/mono/mono/tests/pinvoke_ppcs.cs b/src/mono/mono/tests/pinvoke_ppcs.cs index 08ad1d6eccd40..a0368bce9cee7 100644 --- a/src/mono/mono/tests/pinvoke_ppcs.cs +++ b/src/mono/mono/tests/pinvoke_ppcs.cs @@ -4,7 +4,7 @@ // // The Power ABI version 2 allows for special parameter // passing and returning optimizations for certain -// structures of homogenous composition (like all ints). +// structures of homogeneous composition (like all ints). // This set of tests checks all the possible combinations // that use the special parm/return rules and one beyond. // @@ -77,7 +77,7 @@ public struct short9 { } // This structure has nested structures within it but they are - // homogenous and thus should still use the special rules. + // homogeneous and thus should still use the special rules. public struct short8_nested1 { public short f1; }; diff --git a/src/mono/mono/tests/verifier/make_tests.sh b/src/mono/mono/tests/verifier/make_tests.sh index 1ef63a5f9d53c..8f0a7cbde1b1c 100755 --- a/src/mono/mono/tests/verifier/make_tests.sh +++ b/src/mono/mono/tests/verifier/make_tests.sh @@ -3485,7 +3485,7 @@ done ./make_ldvirtftn_test.sh ldvirtftn_ctor unverifiable "ldvirtftn void class Test::.ctor()" "newobj void class Test::.ctor()" ./make_ldvirtftn_test.sh ldvirtftn_static_method unverifiable "ldvirtftn void class Test::StaticMethod()" "newobj void class Test::.ctor()" -./make_ldvirtftn_test.sh ldvirtftn_method_not_present invalid "ldvirtftn void class Test::NonExistant()" "newobj void Test::.ctor()" +./make_ldvirtftn_test.sh ldvirtftn_method_not_present invalid "ldvirtftn void class Test::NonExistent()" "newobj void Test::.ctor()" ./make_ldvirtftn_test.sh ldvirtftn_method_stack_type_obj_compatible_1 valid "ldvirtftn instance string object::ToString()" "newobj void Test::.ctor()" diff --git a/src/mono/mono/utils/dlmalloc.c b/src/mono/mono/utils/dlmalloc.c index 48da5b15ea5f9..a904e71608f07 100644 --- a/src/mono/mono/utils/dlmalloc.c +++ b/src/mono/mono/utils/dlmalloc.c @@ -4193,7 +4193,7 @@ void* dlmalloc(size_t bytes) { void dlfree(void* mem) { /* - Consolidate freed chunks with preceeding or succeeding bordering + Consolidate freed chunks with preceding or succeeding bordering free chunks, if they exist, and then place in a bin. Intermixed with special cases for top, dv, mmapped chunks, and usage errors. */ @@ -5037,7 +5037,7 @@ int mspace_mallopt(int param_number, int value) { Wolfram Gloger (Gloger@lrz.uni-muenchen.de). * Use last_remainder in more cases. * Pack bins using idea from colin@nyx10.cs.du.edu - * Use ordered bins instead of best-fit threshhold + * Use ordered bins instead of best-fit threshold * Eliminate block-local decls to simplify tracing and debugging. * Support another case of realloc via move into top * Fix error occurring when initial sbrk_base not word-aligned. diff --git a/src/mono/mono/utils/mono-threads-coop.c b/src/mono/mono/utils/mono-threads-coop.c index 6f3783c47596b..4ed659d66058c 100644 --- a/src/mono/mono/utils/mono-threads-coop.c +++ b/src/mono/mono/utils/mono-threads-coop.c @@ -594,7 +594,7 @@ static gboolean hasenv_obsolete (const char *name, const char* newval) { // If they already set MONO_THREADS_SUSPEND to something, maybe they're keeping - // the old var set for compatability with old Mono - in that case don't nag. + // the old var set for compatibility with old Mono - in that case don't nag. // FIXME: but maybe nag if MONO_THREADS_SUSPEND isn't set to "newval"? static int quiet = -1; if (g_hasenv (name)) { diff --git a/src/mono/mono/utils/mono-threads-state-machine.c b/src/mono/mono/utils/mono-threads-state-machine.c index c335fedc625cf..2765b8bfd2012 100644 --- a/src/mono/mono/utils/mono-threads-state-machine.c +++ b/src/mono/mono/utils/mono-threads-state-machine.c @@ -433,7 +433,7 @@ STATE_BLOCKING_SELF_SUSPENDED: Poll is a local state transition. No VM activitie Try to resume a suspended thread. Returns one of the following values: -- Sucess: The thread was resumed. +- Success: The thread was resumed. - Error: The thread was not suspended in the first place. [2] - InitSelfResume: The thread is blocked on self suspend and should be resumed - InitAsyncResume: The thread is blocked on async suspend and should be resumed @@ -716,7 +716,7 @@ That state only works as long as the only managed state touched is blitable and It returns the action the caller must perform: -- Continue: Entered blocking state sucessfully; +- Continue: Entered blocking state successfully; - PollAndRetry: Async suspend raced and won, try to suspend and then retry; */ diff --git a/src/mono/mono/utils/mono-threads-windows.c b/src/mono/mono/utils/mono-threads-windows.c index 58b17bc117a56..8e1670fec134c 100644 --- a/src/mono/mono/utils/mono-threads-windows.c +++ b/src/mono/mono/utils/mono-threads-windows.c @@ -492,9 +492,9 @@ mono_threads_platform_get_stack_bounds (guint8 **staddr, size_t *stsize) *stsize = high - low; #else // Win7 and older (or newer, still works, but much slower). MEMORY_BASIC_INFORMATION info; - // Windows stacks are commited on demand, one page at time. + // Windows stacks are committed on demand, one page at time. // teb->StackBase is the top from which it grows down. - // teb->StackLimit is commited, the lowest it has gone so far. + // teb->StackLimit is committed, the lowest it has gone so far. // info.AllocationBase is reserved, the lowest it can go. // VirtualQuery (&info, &info, sizeof (info)); diff --git a/src/mono/mono/utils/mono-threads.h b/src/mono/mono/utils/mono-threads.h index acd3d6e66b71c..04f8623e7813b 100644 --- a/src/mono/mono/utils/mono-threads.h +++ b/src/mono/mono/utils/mono-threads.h @@ -98,7 +98,7 @@ typedef struct { } MonoThreadHandle; /* -THREAD_INFO_TYPE is a way to make the mono-threads module parametric - or sort of. +THREAD_INFO_TYPE is a way to make the mono-threads module parameteric - or sort of. The GC using mono-threads might extend the MonoThreadInfo struct to add its own data, this avoid a pointer indirection on what is on a lot of hot paths. diff --git a/src/mono/wasm/debugger/BrowserDebugProxy/MemberReferenceResolver.cs b/src/mono/wasm/debugger/BrowserDebugProxy/MemberReferenceResolver.cs index fa928ab990328..5a8226e0c7dc3 100644 --- a/src/mono/wasm/debugger/BrowserDebugProxy/MemberReferenceResolver.cs +++ b/src/mono/wasm/debugger/BrowserDebugProxy/MemberReferenceResolver.cs @@ -443,7 +443,7 @@ public async Task Resolve(ElementAccessExpressionSyntax elementAccess, } } - public async Task<(JObject, string)> ResolveInvokationInfo(InvocationExpressionSyntax method, CancellationToken token) + public async Task<(JObject, string)> ResolveInvocationInfo(InvocationExpressionSyntax method, CancellationToken token) { var methodName = ""; try @@ -475,7 +475,7 @@ public async Task Resolve(ElementAccessExpressionSyntax elementAccess, public async Task Resolve(InvocationExpressionSyntax method, Dictionary memberAccessValues, CancellationToken token) { - (JObject rootObject, string methodName) = await ResolveInvokationInfo(method, token); + (JObject rootObject, string methodName) = await ResolveInvocationInfo(method, token); if (rootObject == null) throw new ReturnAsErrorException($"Failed to resolve root object for {method}", "ReferenceError"); diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/ArrayTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/ArrayTests.cs index 602fc39b465a3..6c1c96cc18173 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/ArrayTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/ArrayTests.cs @@ -610,12 +610,12 @@ public async Task InvalidAccessors() => await CheckInspectLocalsAtBreakpointSite X = TNumber(5) }, "pf_arr0_props", num_fields: 4); - var invalid_accessors = new object[] { "NonExistant", "10000", "-2", 10000, -2, null, String.Empty }; + var invalid_accessors = new object[] { "NonExistent", "10000", "-2", 10000, -2, null, String.Empty }; foreach (var invalid_accessor in invalid_accessors) { // var res = await InvokeGetter (JObject.FromObject (new { value = new { objectId = obj_id } }), invalid_accessor, expect_ok: true); res = await InvokeGetter(pf_arr, invalid_accessor, expect_ok: true); - AssertEqual("undefined", res.Value["result"]?["type"]?.ToString(), "Expected to get undefined result for non-existant accessor"); + AssertEqual("undefined", res.Value["result"]?["type"]?.ToString(), "Expected to get undefined result for non-existent accessor"); } }); diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/BadHarnessInitTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/BadHarnessInitTests.cs index 24b484ae5fbeb..c0450fd053162 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/BadHarnessInitTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/BadHarnessInitTests.cs @@ -23,7 +23,7 @@ public BadHarnessInitTests(ITestOutputHelper testOutput) : base(testOutput) [ConditionalFact(nameof(RunningOnChrome))] public async Task InvalidInitCommands() { - var bad_cmd_name = "non-existant.command"; + var bad_cmd_name = "non-existent.command"; Func)>> fn = (client, token) => new List<(string, Task)> diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs index e016c7ab12934..86bce55dfc670 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs @@ -196,7 +196,7 @@ await EvaluateAndCheck( { "invoke_add()", "IntAdd", "foo.bar", false }, { "invoke_add()", "IntAdd", "Math.IntAdd()", false }, { "invoke_add()", "IntAdd", "c == \"xyz\"", false }, - { "invoke_add()", "IntAdd", "Math.NonExistantProperty", false }, + { "invoke_add()", "IntAdd", "Math.NonExistentProperty", false }, { "invoke_add()", "IntAdd", "g == 40", false }, { "invoke_add()", "IntAdd", "null", false }, }; @@ -629,7 +629,7 @@ public async Task StepThroughOrNonUserCodeAttributeStepInWithBp( bp_init.Value["locations"][0]["columnNumber"].Value(), "DebuggerAttribute." + evalFunName ); - + await SetJustMyCode(justMyCodeEnabled); if (!justMyCodeEnabled && funName == "") { @@ -689,12 +689,12 @@ public async Task StepThroughOrNonUserCodeAttributeResumeWithBp(bool justMyCodeE [InlineData(true, "Debugger.resume", "RunStepThroughWithNonUserCode", "RunStepThroughWithNonUserCode", -1, 8, "RunStepThroughWithNonUserCode", -1, 4)] public async Task StepThroughOrNonUserCodeAttributeWithUserBp( bool justMyCodeEnabled, string debuggingFunction, string evalFunName, - string functionNameCheck1, int line1, int col1, + string functionNameCheck1, int line1, int col1, string functionNameCheck2, int line2, int col2) { var bp_init = await SetBreakpointInMethod("debugger-test.dll", "DebuggerAttribute", evalFunName, 2); var bp_outside_decorated_fun = await SetBreakpointInMethod("debugger-test.dll", "DebuggerAttribute", evalFunName, 3); - + var init_location = await EvaluateAndCheck( $"window.setTimeout(function() {{ invoke_static_method('[debugger-test] DebuggerAttribute:{evalFunName}'); }}, 1);", "dotnet://debugger-test.dll/debugger-test.cs", @@ -708,7 +708,7 @@ public async Task StepThroughOrNonUserCodeAttributeWithUserBp( line1 = bp_outside_decorated_fun.Value["locations"][0]["lineNumber"].Value() - 1; if (line2 == -1) line2 = bp_outside_decorated_fun.Value["locations"][0]["lineNumber"].Value(); - + await SendCommandAndCheck(null, debuggingFunction, "dotnet://debugger-test.dll/debugger-test.cs", line1, col1, "DebuggerAttribute." + functionNameCheck1); await SendCommandAndCheck(null, debuggingFunction, "dotnet://debugger-test.dll/debugger-test.cs", line2, col2, "DebuggerAttribute." + functionNameCheck2); } @@ -727,7 +727,7 @@ public async Task StepperBoundary( { // behavior of StepperBoundary is the same for JMC enabled and disabled // but the effect of NonUserCode escape is better visible for JMC: enabled - await SetJustMyCode(true); + await SetJustMyCode(true); var bp_init = await SetBreakpointInMethod("debugger-test.dll", className, evalFunName, lineBpInit); var init_location = await EvaluateAndCheck( $"window.setTimeout(function() {{ invoke_static_method('[debugger-test] {className}:{evalFunName}'); }}, {lineBpInit});", @@ -746,7 +746,7 @@ public async Task StepperBoundary( } if (isTestingUserBp) await SendCommandAndCheck(null, debuggingAction, "dotnet://debugger-test.dll/debugger-test.cs", 879, 8, decoratedMethodClassName + ".BoundaryUserBp"); - + var line = bp_final.Value["locations"][0]["lineNumber"].Value(); var col = bp_final.Value["locations"][0]["columnNumber"].Value(); await SendCommandAndCheck(null, debuggingAction, "dotnet://debugger-test.dll/debugger-test.cs", line, col, className + "." + evalFunName); @@ -855,7 +855,7 @@ public async Task BreakInDefaultInterfaceMethod( bpFunCalledFromDim.Value["locations"][0]["lineNumber"].Value(), bpFunCalledFromDim.Value["locations"][0]["columnNumber"].Value(), "DefaultInterfaceMethod." + funCalledFromDim); - + string prevFrameFromDim = dimName; Assert.Equal(pauseInFunCalledFromDim["callFrames"][1]["functionName"].Value(), dimClassName + "." + prevFrameFromDim); Assert.Equal(pauseInFunCalledFromDim["callFrames"][1]["location"]["lineNumber"].Value(), dimAsPrevFrameLine); diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/CallFunctionOnTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/CallFunctionOnTests.cs index 6d9564f988c35..aea983d986910 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/CallFunctionOnTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/CallFunctionOnTests.cs @@ -833,11 +833,11 @@ public async Task InvalidPropertyGetters(string eval_fn, string bp_loc, int line var ptd = GetAndAssertObjectWithName(frame_locals, "ptd"); var ptd_id = ptd["value"]["objectId"].Value(); - var invalid_args = new object[] { "NonExistant", String.Empty, null, 12310 }; + var invalid_args = new object[] { "NonExistent", String.Empty, null, 12310 }; foreach (var invalid_arg in invalid_args) { var getter_res = await InvokeGetter(JObject.FromObject(new { value = new { objectId = ptd_id } }), invalid_arg); - AssertEqual("undefined", getter_res.Value["result"]?["type"]?.ToString(), $"Expected to get undefined result for non-existant accessor - {invalid_arg}"); + AssertEqual("undefined", getter_res.Value["result"]?["type"]?.ToString(), $"Expected to get undefined result for non-existent accessor - {invalid_arg}"); } } diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/EvaluateOnCallFrameTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/EvaluateOnCallFrameTests.cs index e0bc3a941971d..250df7ef9e027 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/EvaluateOnCallFrameTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/EvaluateOnCallFrameTests.cs @@ -459,7 +459,7 @@ await EvaluateOnCallFrameFail(id, ("me.foo", "ReferenceError"), - ("this.a + non_existant", "ReferenceError"), + ("this.a + non_existent", "ReferenceError"), ("this.NullIfAIsNotZero.foo", "ReferenceError"), ("NullIfAIsNotZero.foo", "ReferenceError")); @@ -711,14 +711,14 @@ await EvaluateOnCallFrameAndCheck(id, [InlineData("DebuggerTests.EvaluateNonStaticClassWithStaticFields", "RunStaticAsync", "DebuggerTests", "EvaluateNonStaticClassWithStaticFields", 1, 7, true)] [InlineData("DebuggerTests.EvaluateNonStaticClassWithStaticFields", "Run", "DebuggerTests", "EvaluateNonStaticClassWithStaticFields", 1, 7)] [InlineData("DebuggerTests.EvaluateNonStaticClassWithStaticFields", "RunAsync", "DebuggerTests", "EvaluateNonStaticClassWithStaticFields", 1, 7, true)] - public async Task EvaluateStaticFields(string bpLocation, string bpMethod, string namespaceName, string className, int bpLine, int expectedInt, bool isAsync = false) => + public async Task EvaluateStaticFields(string bpLocation, string bpMethod, string namespaceName, string className, int bpLine, int expectedInt, bool isAsync = false) => await CheckInspectLocalsAtBreakpointSite( bpLocation, bpMethod, bpLine, $"{bpLocation}.{bpMethod}", "window.setTimeout(function() { invoke_static_method ('[debugger-test] DebuggerTests.EvaluateMethodTestsClass:EvaluateMethods'); })", wait_for_event_fn: async (pause_location) => { var id = pause_location["callFrames"][0]["callFrameId"].Value(); - await EvaluateOnCallFrameAndCheck(id, + await EvaluateOnCallFrameAndCheck(id, ($"{namespaceName}.{className}.StaticField1", TNumber(expectedInt * 10)), ($"{namespaceName}.{className}.StaticProperty1", TString($"StaticProperty{expectedInt}")), ($"{namespaceName}.{className}.StaticPropertyWithError", TString($"System.Exception: not implemented {expectedInt}")), @@ -1241,7 +1241,7 @@ await EvaluateOnCallFrameAndCheck(id, ); var (_, res) = await EvaluateOnCallFrame(id, "test.GetDefaultAndRequiredParamMixedTypes(\"a\", 23, true, 1.23f)", expect_ok: false); - AssertEqual("Unable to evaluate method 'GetDefaultAndRequiredParamMixedTypes'. Too many arguments passed.", + AssertEqual("Unable to evaluate method 'GetDefaultAndRequiredParamMixedTypes'. Too many arguments passed.", res.Error["result"]["description"]?.Value(), "wrong error message"); }); @@ -1265,7 +1265,7 @@ public async Task EvaluateNullObjectPropertiesPositive() => await CheckInspectLo { var id = pause_location["callFrames"][0]["callFrameId"].Value(); - // we have no way of returning int? for null values, + // we have no way of returning int? for null values, // so we return the last non-null class name await EvaluateOnCallFrameAndCheck(id, ("list.Count", TNumber(1)), @@ -1342,7 +1342,7 @@ await EvaluateOnCallFrameAndCheck(id, }); [Fact] - public async Task EvaluateMethodsOnPrimitiveTypesReturningPrimitivesCultureDependant() => + public async Task EvaluateMethodsOnPrimitiveTypesReturningPrimitivesCultureDependant() => await CheckInspectLocalsAtBreakpointSite( "DebuggerTests.PrimitiveTypeMethods", "Evaluate", 11, "DebuggerTests.PrimitiveTypeMethods.Evaluate", "window.setTimeout(function() { invoke_static_method ('[debugger-test] DebuggerTests.PrimitiveTypeMethods:Evaluate'); })", @@ -1354,7 +1354,7 @@ await CheckInspectLocalsAtBreakpointSite( var (floatLocalVal, _) = await EvaluateOnCallFrame(id, "localFloat"); var (doubleLocalVal, _) = await EvaluateOnCallFrame(id, "localDouble"); - // expected value depends on the debugger's user culture and is equal to + // expected value depends on the debugger's user culture and is equal to // description of the number that also respects user's culture settings await EvaluateOnCallFrameAndCheck(id, ("test.propFloat.ToString()", TString(floatMemberVal["description"]?.Value())), diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/HarnessTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/HarnessTests.cs index c7dd4e4e7cedf..ad2dabd4637e4 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/HarnessTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/HarnessTests.cs @@ -30,8 +30,8 @@ public async Task TimedOutWaitingForInvalidBreakpoint() public async Task ExceptionThrown() { var ae = await Assert.ThrowsAsync( - async () => await EvaluateAndCheck("window.setTimeout(function() { non_existant_fn(); }, 3000);", null, -1, -1, null)); - Assert.Contains("non_existant_fn is not defined", ae.Message); + async () => await EvaluateAndCheck("window.setTimeout(function() { non_existent_fn(); }, 3000);", null, -1, -1, null)); + Assert.Contains("non_existent_fn is not defined", ae.Message); } [ConditionalFact(nameof(RunningOnChrome))] diff --git a/src/mono/wasm/debugger/tests/debugger-test/debugger-driver.html b/src/mono/wasm/debugger/tests/debugger-test/debugger-driver.html index 2513830fddd28..239039451ccdd 100644 --- a/src/mono/wasm/debugger/tests/debugger-test/debugger-driver.html +++ b/src/mono/wasm/debugger/tests/debugger-test/debugger-driver.html @@ -58,7 +58,7 @@ } function invoke_bad_js_test () { console.log ("js: In invoke_bad_js_test"); - App.non_existant (); + App.non_existent (); console.log ("js: After.. shouldn't reach here"); } function invoke_outer_method () { diff --git a/src/mono/wasm/runtime/buffers.ts b/src/mono/wasm/runtime/buffers.ts index cf23c6baca9c7..ccbc7dcbbd6b9 100644 --- a/src/mono/wasm/runtime/buffers.ts +++ b/src/mono/wasm/runtime/buffers.ts @@ -10,7 +10,7 @@ import { Int32Ptr, TypedArray, VoidPtr } from "./types/emscripten"; import { mono_wasm_new_external_root } from "./roots"; // Creates a new typed array from pinned array address from pinned_array allocated on the heap to the typed array. -// adress of managed pinned array -> copy from heap -> typed array memory +// address of managed pinned array -> copy from heap -> typed array memory function typed_array_from(pinned_array: MonoArray, begin: number, end: number, bytes_per_element: number, type: number) { // typed array @@ -96,7 +96,7 @@ function typedarray_copy_to(typed_array: TypedArray, pinned_array: MonoArray, be } // Copy the pinned array address from pinned_array allocated on the heap to the typed array. -// adress of managed pinned array -> copy from heap -> typed array memory +// address of managed pinned array -> copy from heap -> typed array memory function typedarray_copy_from(typed_array: TypedArray, pinned_array: MonoArray, begin: number, end: number, bytes_per_element: number) { // JavaScript typed arrays are array-like objects and provide a mechanism for accessing diff --git a/src/mono/wasm/runtime/modularize-dotnet.md b/src/mono/wasm/runtime/modularize-dotnet.md index 37ece4177213b..edb83dfb3f047 100644 --- a/src/mono/wasm/runtime/modularize-dotnet.md +++ b/src/mono/wasm/runtime/modularize-dotnet.md @@ -25,7 +25,7 @@ In `src\mono\wasm\runtime\CMakeLists.txt` which links only in-tree, we use same - Executed second (2) - Applied only when linking ES6 - Will check that it was passed `moduleFactory` callback. Because of emscripten reasons it has confusing `createDotnetRuntime` name here. -- Will validate `Module.ready` is left un-overriden. +- Will validate `Module.ready` is left un-overridden. # runtime.*.iffe.js - Executed third (3) @@ -33,7 +33,7 @@ In `src\mono\wasm\runtime\CMakeLists.txt` which links only in-tree, we use same # dotnet.*.post.js - Executed last (4) -- When `onRuntimeInitialized` is overriden it would wait for emscriptens `Module.ready` +- When `onRuntimeInitialized` is overridden it would wait for emscriptens `Module.ready` - Otherwise it would wait for MonoVM to load all assets and assemblies. - It would pass on the API exports diff --git a/src/mono/wasm/runtime/startup.ts b/src/mono/wasm/runtime/startup.ts index 3b3ec8f14869f..c49ceea0d6f03 100644 --- a/src/mono/wasm/runtime/startup.ts +++ b/src/mono/wasm/runtime/startup.ts @@ -56,7 +56,7 @@ export function configure_emscripten_startup(module: DotnetModule, exportedAPI: } } - // these could be overriden on DotnetModuleConfig + // these could be overridden on DotnetModuleConfig if (!module.preInit) { module.preInit = []; } else if (typeof module.preInit === "function") { @@ -787,7 +787,7 @@ export type DownloadAssetsContext = { /// 2. Emscripten does not run the preInit or preRun functions in the workers. /// 3. At the point when this executes there is no pthread assigned to the worker yet. async function mono_wasm_pthread_worker_init(): Promise { - // This is a good place for subsystems to attach listeners for pthreads_worker.currrentWorkerThreadEvents + // This is a good place for subsystems to attach listeners for pthreads_worker.currentWorkerThreadEvents console.debug("mono_wasm_pthread_worker_init"); pthreads_worker.currentWorkerThreadEvents.addEventListener(pthreads_worker.dotnetPthreadCreated, (ev) => { console.debug("thread created", ev.pthread_ptr); diff --git a/src/mono/wasm/runtime/workers/dotnet-crypto-worker.js b/src/mono/wasm/runtime/workers/dotnet-crypto-worker.js index f93256c169ad2..e831deec516f9 100644 --- a/src/mono/wasm/runtime/workers/dotnet-crypto-worker.js +++ b/src/mono/wasm/runtime/workers/dotnet-crypto-worker.js @@ -73,7 +73,7 @@ var ChannelWorker = { if (state === this.STATE_SHUTDOWN) break; if (state === this.STATE_RESET) - console.debug(`caller failed, reseting worker`); + console.debug(`caller failed, resetting worker`); } else { console.error(`Worker failed to handle the request: ${_stringify_err(err)}`); this._change_state_locked(this.STATE_REQ_FAILED); @@ -360,7 +360,7 @@ async function handle_req_async(msg) { if (req.func === "digest") { return await call_digest(req.type, new Uint8Array(req.data)); - } + } else if (req.func === "sign") { return await sign(req.type, new Uint8Array(req.key), new Uint8Array(req.data)); } diff --git a/src/native/corehost/bundle/extractor.cpp b/src/native/corehost/bundle/extractor.cpp index d24641cefb2cf..a96dcc5220f31 100644 --- a/src/native/corehost/bundle/extractor.cpp +++ b/src/native/corehost/bundle/extractor.cpp @@ -32,7 +32,7 @@ pal::string_t& extractor_t::extraction_dir() // m_extraction_dir = $DOTNET_BUNDLE_EXTRACT_BASE_DIR///... // // If DOTNET_BUNDLE_EXTRACT_BASE_DIR is not set in the environment, - // a default is choosen within the temporary directory. + // a default is chosen within the temporary directory. if (!pal::getenv(_X("DOTNET_BUNDLE_EXTRACT_BASE_DIR"), &m_extraction_dir)) { diff --git a/src/native/corehost/bundle/header.h b/src/native/corehost/bundle/header.h index 1bc9241429c23..4fdb04727e495 100644 --- a/src/native/corehost/bundle/header.h +++ b/src/native/corehost/bundle/header.h @@ -12,8 +12,8 @@ namespace bundle { // The Bundle Header (v1) // Fixed size thunk (header_fixed_t) - // - Major Version - // - Minor Version + // - Major Version + // - Minor Version // - Number of embedded files // Variable size portion: // - Bundle ID (7-bit extension encoded length prefixed string) @@ -53,7 +53,7 @@ namespace bundle bool is_valid() const { return offset != 0; } }; - // header_fixed_v2_t is available in single-file apps targetting .net5+ frameworks. + // header_fixed_v2_t is available in single-file apps targeting .net5+ frameworks. // It stores information that facilitates the host to process contents of the bundle without extraction. // // The location of deps.json and runtimeconfig.json is already available in the Bundle manifest. diff --git a/src/native/corehost/hostmisc/pal.unix.cpp b/src/native/corehost/hostmisc/pal.unix.cpp index a961a981e0f79..f996defd40fdd 100644 --- a/src/native/corehost/hostmisc/pal.unix.cpp +++ b/src/native/corehost/hostmisc/pal.unix.cpp @@ -755,7 +755,7 @@ pal::string_t pal::get_current_os_rid_platform() #else // For some distros, we don't want to use the full version from VERSION_ID. One example is // Red Hat Enterprise Linux, which includes a minor version in their VERSION_ID but minor -// versions are backwards compatable. +// versions are backwards compatible. // // In this case, we'll normalized RIDs like 'rhel.7.2' and 'rhel.7.3' to a generic // 'rhel.7'. This brings RHEL in line with other distros like CentOS or Debian which diff --git a/src/native/eventpipe/ds-eventpipe-protocol.c b/src/native/eventpipe/ds-eventpipe-protocol.c index 2f7ccd504a9d2..8f28a00388c2a 100644 --- a/src/native/eventpipe/ds-eventpipe-protocol.c +++ b/src/native/eventpipe/ds-eventpipe-protocol.c @@ -205,7 +205,7 @@ eventpipe_collect_tracing_command_try_parse_config ( EventPipeProviderConfiguration provider_config; if (ep_provider_config_init (&provider_config, provider_name_utf8, keywords, (EventPipeEventLevel)log_level, filter_data_utf8)) { if (ep_rt_provider_config_array_append (result, provider_config)) { - // Ownership transfered. + // Ownership transferred. provider_name_utf8 = NULL; filter_data_utf8 = NULL; } diff --git a/src/native/eventpipe/ep-buffer-manager.c b/src/native/eventpipe/ep-buffer-manager.c index b31cf2461b6b4..52ef6bbf1693b 100644 --- a/src/native/eventpipe/ep-buffer-manager.c +++ b/src/native/eventpipe/ep-buffer-manager.c @@ -1188,7 +1188,7 @@ ep_buffer_manager_write_all_buffers_to_file_v4 ( // need an arbitrarily large cache in the reader to store all the events, however there is a fair amount of slop // in the current scheme. In the worst case you could imagine N threads, each of which was already allocated a // max size buffer (currently 1MB) but only an insignificant portion has been used. Even if the trigger - // threshhold is a modest amount such as 10MB, the threads could first write 1MB * N bytes to the stream + // threshold is a modest amount such as 10MB, the threads could first write 1MB * N bytes to the stream // beforehand. I'm betting on these extreme cases being very rare and even something like 1GB isn't an unreasonable // amount of virtual memory to use on to parse an extreme trace. However if I am wrong we can control // both the allocation policy and the triggering instrumentation. Nothing requires us to give out 1MB buffers to diff --git a/src/native/eventpipe/ep-config.c b/src/native/eventpipe/ep-config.c index 626e07b5ffcaf..649a84cd3dae5 100644 --- a/src/native/eventpipe/ep-config.c +++ b/src/native/eventpipe/ep-config.c @@ -358,11 +358,11 @@ ep_config_build_event_metadata_event ( uint32_t payload_data_len = ep_event_get_metadata_len (source_event); uint32_t provider_name_len = (uint32_t)((ep_rt_utf16_string_len (provider_name_utf16) + 1) * sizeof (ep_char16_t)); uint32_t instance_payload_size = sizeof (metadata_id) + provider_name_len + payload_data_len; - + // Allocate the payload. instance_payload = ep_rt_byte_array_alloc (instance_payload_size); ep_raise_error_if_nok (instance_payload != NULL); - + // Fill the buffer with the payload. uint8_t *current; current = instance_payload; @@ -375,7 +375,7 @@ ep_config_build_event_metadata_event ( memcpy(current, payload_data, payload_data_len); // Construct the metadata event instance. - instance = ep_event_metdata_event_alloc ( + instance = ep_event_metadata_event_alloc ( config->metadata_event, ep_rt_current_processor_get_number (), ep_rt_thread_id_t_to_uint64_t (ep_rt_current_thread_get_id ()), @@ -469,7 +469,7 @@ config_create_provider ( EP_ASSERT (provider_name != NULL); ep_requires_lock_held (); - + EventPipeProvider *provider = ep_provider_alloc (config, provider_name, callback_func, callback_data_free_func, callback_data); ep_raise_error_if_nok (provider != NULL); @@ -593,7 +593,7 @@ config_enable_disable ( */ EventPipeEventMetadataEvent * -ep_event_metdata_event_alloc ( +ep_event_metadata_event_alloc ( EventPipeEvent *ep_event, uint32_t proc_num, uint64_t thread_id, @@ -622,13 +622,13 @@ ep_event_metdata_event_alloc ( return instance; ep_on_error: - ep_event_metdata_event_free (instance); + ep_event_metadata_event_free (instance); instance = NULL; ep_exit_error_handler (); } void -ep_event_metdata_event_free (EventPipeEventMetadataEvent *metadata_event) +ep_event_metadata_event_free (EventPipeEventMetadataEvent *metadata_event) { ep_return_void_if_nok (metadata_event != NULL); diff --git a/src/native/eventpipe/ep-config.h b/src/native/eventpipe/ep-config.h index 65f6acb94bb63..41768128d05c5 100644 --- a/src/native/eventpipe/ep-config.h +++ b/src/native/eventpipe/ep-config.h @@ -107,7 +107,7 @@ struct _EventPipeEventMetadataEvent { #endif EventPipeEventMetadataEvent * -ep_event_metdata_event_alloc ( +ep_event_metadata_event_alloc ( EventPipeEvent *ep_event, uint32_t proc_num, uint64_t thread_id, @@ -117,7 +117,7 @@ ep_event_metdata_event_alloc ( const uint8_t *related_activity_id); void -ep_event_metdata_event_free (EventPipeEventMetadataEvent *metadata_event); +ep_event_metadata_event_free (EventPipeEventMetadataEvent *metadata_event); #endif /* ENABLE_PERFTRACING */ #endif /* __EVENTPIPE_CONFIGURATION_H__ */ diff --git a/src/native/eventpipe/ep-file.c b/src/native/eventpipe/ep-file.c index 04291bee5a85c..96d6ab23bdec5 100644 --- a/src/native/eventpipe/ep-file.c +++ b/src/native/eventpipe/ep-file.c @@ -457,7 +457,7 @@ ep_file_write_event ( file_write_event_to_block (file, event_instance, metadata_id, capture_thread_id, sequence_number, stack_id, is_sorted_event); ep_on_exit: - ep_event_metdata_event_free (metadata_instance); + ep_event_metadata_event_free (metadata_instance); return; ep_on_error: diff --git a/src/native/eventpipe/ep-rt.h b/src/native/eventpipe/ep-rt.h index efd681fdeec10..57ab08369d0f8 100644 --- a/src/native/eventpipe/ep-rt.h +++ b/src/native/eventpipe/ep-rt.h @@ -249,7 +249,7 @@ ep_rt_shutdown (void); static bool -ep_rt_config_aquire (void); +ep_rt_config_acquire (void); static bool @@ -658,7 +658,7 @@ ep_rt_runtime_version_get_utf8 (void); static bool -ep_rt_lock_aquire (ep_rt_lock_handle_t *lock); +ep_rt_lock_acquire (ep_rt_lock_handle_t *lock); static bool @@ -691,7 +691,7 @@ ep_rt_spin_lock_free (ep_rt_spin_lock_handle_t *spin_lock); static bool -ep_rt_spin_lock_aquire (ep_rt_spin_lock_handle_t *spin_lock); +ep_rt_spin_lock_acquire (ep_rt_spin_lock_handle_t *spin_lock); static bool @@ -961,7 +961,7 @@ ep_rt_volatile_store_ptr_without_barrier ( #define EP_SPIN_LOCK_ENTER(expr, section_name) \ { \ ep_rt_spin_lock_requires_lock_not_held (expr); \ - ep_rt_spin_lock_aquire (expr); \ + ep_rt_spin_lock_acquire (expr); \ bool _no_error_ ##section_name = false; #define EP_SPIN_LOCK_EXIT(expr, section_name) \ @@ -985,7 +985,7 @@ _ep_on_spinlock_exit_ ##section_name : \ #define EP_LOCK_ENTER(section_name) \ { \ ep_requires_lock_not_held (); \ - bool _owns_config_lock_ ##section_name = ep_rt_config_aquire (); \ + bool _owns_config_lock_ ##section_name = ep_rt_config_acquire (); \ bool _no_config_error_ ##section_name = false; \ if (EP_UNLIKELY((!_owns_config_lock_ ##section_name))) \ goto _ep_on_config_lock_exit_ ##section_name; diff --git a/src/native/eventpipe/ep-stream.c b/src/native/eventpipe/ep-stream.c index cad5516adbcff..fc62fa3adf794 100644 --- a/src/native/eventpipe/ep-stream.c +++ b/src/native/eventpipe/ep-stream.c @@ -45,7 +45,7 @@ static void fast_serializer_write_serialization_type ( FastSerializer *fast_serializer, - FastSerializableObject *fast_serializable_ojbect); + FastSerializableObject *fast_serializable_object); /* * FastSerializableObject. @@ -71,61 +71,61 @@ ep_fast_serializable_object_init ( } void -ep_fast_serializable_object_fini (FastSerializableObject *fast_serializable_ojbect) +ep_fast_serializable_object_fini (FastSerializableObject *fast_serializable_object) { ; } void -ep_fast_serializable_object_free_vcall (FastSerializableObject *fast_serializable_ojbect) +ep_fast_serializable_object_free_vcall (FastSerializableObject *fast_serializable_object) { - ep_return_void_if_nok (fast_serializable_ojbect != NULL); + ep_return_void_if_nok (fast_serializable_object != NULL); - EP_ASSERT (fast_serializable_ojbect->vtable != NULL); - FastSerializableObjectVtable *vtable = fast_serializable_ojbect->vtable; + EP_ASSERT (fast_serializable_object->vtable != NULL); + FastSerializableObjectVtable *vtable = fast_serializable_object->vtable; EP_ASSERT (vtable->free_func != NULL); - vtable->free_func (fast_serializable_ojbect); + vtable->free_func (fast_serializable_object); } void ep_fast_serializable_object_fast_serialize_vcall ( - FastSerializableObject *fast_serializable_ojbect, + FastSerializableObject *fast_serializable_object, FastSerializer *fast_serializer) { - EP_ASSERT (fast_serializable_ojbect != NULL); - EP_ASSERT (fast_serializable_ojbect->vtable != NULL); + EP_ASSERT (fast_serializable_object != NULL); + EP_ASSERT (fast_serializable_object->vtable != NULL); - FastSerializableObjectVtable *vtable = fast_serializable_ojbect->vtable; + FastSerializableObjectVtable *vtable = fast_serializable_object->vtable; EP_ASSERT (vtable->fast_serialize_func != NULL); - vtable->fast_serialize_func (fast_serializable_ojbect, fast_serializer); + vtable->fast_serialize_func (fast_serializable_object, fast_serializer); } const ep_char8_t * -ep_fast_serializable_object_get_type_name_vcall (FastSerializableObject *fast_serializable_ojbect) +ep_fast_serializable_object_get_type_name_vcall (FastSerializableObject *fast_serializable_object) { - EP_ASSERT (fast_serializable_ojbect != NULL); - EP_ASSERT (fast_serializable_ojbect->vtable != NULL); + EP_ASSERT (fast_serializable_object != NULL); + EP_ASSERT (fast_serializable_object->vtable != NULL); - FastSerializableObjectVtable *vtable = fast_serializable_ojbect->vtable; + FastSerializableObjectVtable *vtable = fast_serializable_object->vtable; EP_ASSERT (vtable->get_type_name_func != NULL); - return vtable->get_type_name_func (fast_serializable_ojbect); + return vtable->get_type_name_func (fast_serializable_object); } void ep_fast_serializable_object_fast_serialize ( - FastSerializableObject *fast_serializable_ojbect, + FastSerializableObject *fast_serializable_object, FastSerializer *fast_serializer) { - ep_fast_serializable_object_fast_serialize_vcall (fast_serializable_ojbect, fast_serializer); + ep_fast_serializable_object_fast_serialize_vcall (fast_serializable_object, fast_serializer); } const ep_char8_t * -ep_fast_serializable_object_get_type_name (FastSerializableObject *fast_serializable_ojbect) +ep_fast_serializable_object_get_type_name (FastSerializableObject *fast_serializable_object) { - return ep_fast_serializable_object_get_type_name_vcall (fast_serializable_ojbect); + return ep_fast_serializable_object_get_type_name_vcall (fast_serializable_object); } /* @@ -170,7 +170,7 @@ ep_fast_serializer_alloc (StreamWriter *stream_writer) FastSerializer *instance = ep_rt_object_alloc (FastSerializer); ep_raise_error_if_nok (instance != NULL); - // Ownership transfered. + // Ownership transferred. instance->stream_writer = stream_writer; instance->required_padding = 0; instance->write_error_encountered = false; @@ -247,17 +247,17 @@ ep_fast_serializer_write_system_time ( void ep_fast_serializer_write_object ( FastSerializer *fast_serializer, - FastSerializableObject *fast_serializable_ojbect) + FastSerializableObject *fast_serializable_object) { EP_ASSERT (fast_serializer != NULL); - EP_ASSERT (fast_serializable_ojbect != NULL); + EP_ASSERT (fast_serializable_object != NULL); - ep_fast_serializer_write_tag (fast_serializer, fast_serializable_ojbect->is_private ? FAST_SERIALIZER_TAGS_BEGIN_PRIVATE_OBJECT : FAST_SERIALIZER_TAGS_BEGIN_OBJECT, NULL, 0); + ep_fast_serializer_write_tag (fast_serializer, fast_serializable_object->is_private ? FAST_SERIALIZER_TAGS_BEGIN_PRIVATE_OBJECT : FAST_SERIALIZER_TAGS_BEGIN_OBJECT, NULL, 0); - fast_serializer_write_serialization_type (fast_serializer, fast_serializable_ojbect); + fast_serializer_write_serialization_type (fast_serializer, fast_serializable_object); // Ask the object to serialize itself using the current serializer. - ep_fast_serializable_object_fast_serialize_vcall (fast_serializable_ojbect, fast_serializer); + ep_fast_serializable_object_fast_serialize_vcall (fast_serializable_object, fast_serializer); ep_fast_serializer_write_tag (fast_serializer, FAST_SERIALIZER_TAGS_END_OBJECT, NULL, 0); } @@ -582,7 +582,7 @@ ep_ipc_stream_writer_alloc ( &instance->stream_writer, &ipc_stream_writer_vtable) != NULL); - //Ownership transfered. + //Ownership transferred. instance->ipc_stream = stream; ep_on_exit: diff --git a/src/native/eventpipe/ep-stream.h b/src/native/eventpipe/ep-stream.h index 52c1023c5f3e8..fdb41aef7d372 100644 --- a/src/native/eventpipe/ep-stream.h +++ b/src/native/eventpipe/ep-stream.h @@ -131,21 +131,21 @@ ep_fast_serializable_object_fini (FastSerializableObject *fast_serializable_obje void ep_fast_serializable_object_fast_serialize ( - FastSerializableObject *fast_serializable_ojbect, + FastSerializableObject *fast_serializable_object, FastSerializer *fast_serializer); const ep_char8_t * -ep_fast_serializable_object_get_type_name (FastSerializableObject *fast_serializable_ojbect); +ep_fast_serializable_object_get_type_name (FastSerializableObject *fast_serializable_object); void -ep_fast_serializable_object_free_vcall (FastSerializableObject *fast_serializable_ojbect); +ep_fast_serializable_object_free_vcall (FastSerializableObject *fast_serializable_object); const ep_char8_t * -ep_fast_serializable_object_get_type_name_vcall (FastSerializableObject *fast_serializable_ojbect); +ep_fast_serializable_object_get_type_name_vcall (FastSerializableObject *fast_serializable_object); void ep_fast_serializable_object_fast_serialize_vcall ( - FastSerializableObject *fast_serializable_ojbect, + FastSerializableObject *fast_serializable_object, FastSerializer *fast_serializer); /* @@ -225,7 +225,7 @@ ep_fast_serializer_write_system_time ( void ep_fast_serializer_write_object ( FastSerializer *fast_serializer, - FastSerializableObject *fast_serializable_ojbect); + FastSerializableObject *fast_serializable_object); void ep_fast_serializer_write_string ( diff --git a/src/native/eventpipe/ep-thread.c b/src/native/eventpipe/ep-thread.c index 5146961a3a898..0f2eac6d78949 100644 --- a/src/native/eventpipe/ep-thread.c +++ b/src/native/eventpipe/ep-thread.c @@ -116,7 +116,7 @@ ep_thread_register (EventPipeThread *thread) ep_thread_addref (thread); - ep_rt_spin_lock_aquire (&_ep_threads_lock); + ep_rt_spin_lock_acquire (&_ep_threads_lock); result = ep_rt_thread_list_append (&_ep_threads, thread); ep_rt_spin_lock_release (&_ep_threads_lock); diff --git a/src/native/libs/System.Security.Cryptography.Native/entrypoints.c b/src/native/libs/System.Security.Cryptography.Native/entrypoints.c index d5614264d25da..f739c5ab10958 100644 --- a/src/native/libs/System.Security.Cryptography.Native/entrypoints.c +++ b/src/native/libs/System.Security.Cryptography.Native/entrypoints.c @@ -162,7 +162,7 @@ static const Entry s_cryptoNative[] = DllImportEntry(CryptoNative_EvpSha256) DllImportEntry(CryptoNative_EvpSha384) DllImportEntry(CryptoNative_EvpSha512) - DllImportEntry(CryptoNative_ExtendedKeyUsageDestory) + DllImportEntry(CryptoNative_ExtendedKeyUsageDestroy) DllImportEntry(CryptoNative_GetAsn1IntegerDerSize) DllImportEntry(CryptoNative_GetAsn1StringBytes) DllImportEntry(CryptoNative_GetBigNumBytes) @@ -271,7 +271,7 @@ static const Entry s_cryptoNative[] = DllImportEntry(CryptoNative_X509StoreCtxReset) DllImportEntry(CryptoNative_X509StoreCtxResetForSignatureError) DllImportEntry(CryptoNative_X509StoreCtxSetVerifyCallback) - DllImportEntry(CryptoNative_X509StoreDestory) + DllImportEntry(CryptoNative_X509StoreDestroy) DllImportEntry(CryptoNative_X509StoreSetRevocationFlag) DllImportEntry(CryptoNative_X509StoreSetVerifyTime) DllImportEntry(CryptoNative_X509UpRef) diff --git a/src/native/libs/System.Security.Cryptography.Native/opensslshim.h b/src/native/libs/System.Security.Cryptography.Native/opensslshim.h index 554f4144852b5..1fbf3ce666042 100644 --- a/src/native/libs/System.Security.Cryptography.Native/opensslshim.h +++ b/src/native/libs/System.Security.Cryptography.Native/opensslshim.h @@ -9,7 +9,7 @@ #pragma once // All the openssl includes need to be here to ensure that the APIs we use -// are overriden to be called through our function pointers. +// are overridden to be called through our function pointers. #include #include #include diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_x509.c b/src/native/libs/System.Security.Cryptography.Native/pal_x509.c index c238fe012f8cc..3681d1f3cb301 100644 --- a/src/native/libs/System.Security.Cryptography.Native/pal_x509.c +++ b/src/native/libs/System.Security.Cryptography.Native/pal_x509.c @@ -225,7 +225,7 @@ ASN1_OCTET_STRING* CryptoNative_X509FindExtensionData(X509* x, int32_t nid) return X509_EXTENSION_get_data(ext); } -void CryptoNative_X509StoreDestory(X509_STORE* v) +void CryptoNative_X509StoreDestroy(X509_STORE* v) { if (v != NULL) { diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_x509.h b/src/native/libs/System.Security.Cryptography.Native/pal_x509.h index 0168f750114f4..bcee51f069dfb 100644 --- a/src/native/libs/System.Security.Cryptography.Native/pal_x509.h +++ b/src/native/libs/System.Security.Cryptography.Native/pal_x509.h @@ -215,7 +215,7 @@ PALEXPORT ASN1_OCTET_STRING* CryptoNative_X509FindExtensionData(X509* x, int32_t /* Shims the X509_STORE_free method. */ -PALEXPORT void CryptoNative_X509StoreDestory(X509_STORE* v); +PALEXPORT void CryptoNative_X509StoreDestroy(X509_STORE* v); /* Shims the X509_STORE_add_crl method. diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_x509ext.c b/src/native/libs/System.Security.Cryptography.Native/pal_x509ext.c index 908477ae5ecd8..f9ecec6fb5497 100644 --- a/src/native/libs/System.Security.Cryptography.Native/pal_x509ext.c +++ b/src/native/libs/System.Security.Cryptography.Native/pal_x509ext.c @@ -84,7 +84,7 @@ EXTENDED_KEY_USAGE* CryptoNative_DecodeExtendedKeyUsage(const uint8_t* buf, int3 return d2i_EXTENDED_KEY_USAGE(NULL, &buf, len); } -void CryptoNative_ExtendedKeyUsageDestory(EXTENDED_KEY_USAGE* a) +void CryptoNative_ExtendedKeyUsageDestroy(EXTENDED_KEY_USAGE* a) { if (a != NULL) { diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_x509ext.h b/src/native/libs/System.Security.Cryptography.Native/pal_x509ext.h index 1fb436e209cb9..65d76a4e76b07 100644 --- a/src/native/libs/System.Security.Cryptography.Native/pal_x509ext.h +++ b/src/native/libs/System.Security.Cryptography.Native/pal_x509ext.h @@ -62,4 +62,4 @@ No-op if a is null. The given EXTENDED_KEY_USAGE pointer is invalid after this call. Always succeeds. */ -PALEXPORT void CryptoNative_ExtendedKeyUsageDestory(EXTENDED_KEY_USAGE* a); +PALEXPORT void CryptoNative_ExtendedKeyUsageDestroy(EXTENDED_KEY_USAGE* a); diff --git a/src/native/public/README.md b/src/native/public/README.md index 252274169ba5a..3320579fd9f24 100644 --- a/src/native/public/README.md +++ b/src/native/public/README.md @@ -23,7 +23,7 @@ new public API function incurs a maintenance cost. Care should be taken. The headers `mono-private-unstable.h` in each subdirectory are an exception to the above guarantees. Functions added to these headers represent "work in progress" and may break API semantics or ABI -compatability. Clients using these functions are generally tightly coupled to the development of +compatibility. Clients using these functions are generally tightly coupled to the development of the runtime and take on responsibility for any breaking changes. diff --git a/src/native/public/mono/jit/details/jit-types.h b/src/native/public/mono/jit/details/jit-types.h index ba364b54f937b..53b7c3ddb6341 100644 --- a/src/native/public/mono/jit/details/jit-types.h +++ b/src/native/public/mono/jit/details/jit-types.h @@ -30,7 +30,7 @@ typedef enum { MONO_AOT_MODE_INTERP, /* Same as INTERP, but use only llvm compiled code */ MONO_AOT_MODE_INTERP_LLVMONLY, - /* Use only llvm compiled code, fall back to the interpeter */ + /* Use only llvm compiled code, fall back to the interpreter */ MONO_AOT_MODE_LLVMONLY_INTERP, /* Same as --interp */ MONO_AOT_MODE_INTERP_ONLY, diff --git a/src/tasks/WasmBuildTasks/GenerateAOTProps.cs b/src/tasks/WasmBuildTasks/GenerateAOTProps.cs index 83d2901a0f455..d9b0309a08501 100644 --- a/src/tasks/WasmBuildTasks/GenerateAOTProps.cs +++ b/src/tasks/WasmBuildTasks/GenerateAOTProps.cs @@ -25,7 +25,7 @@ public class GenerateAOTProps : Task private const string s_originalItemNameMetadata = "OriginalItemName__"; private const string s_conditionToUseMetadata = "ConditionToUse__"; - private static readonly HashSet s_metdataNamesToSkip = new() + private static readonly HashSet s_metadataNamesToSkip = new() { "FullPath", "RootDir", @@ -91,7 +91,7 @@ public override bool Execute() foreach (string mdName in item.MetadataNames) { - if (!s_metdataNamesToSkip.Contains(mdName)) + if (!s_metadataNamesToSkip.Contains(mdName)) sb.AppendLine($"\t\t\t{mdName}=\"{item.GetMetadataValueEscaped(mdName)}\""); } diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/CleanTests.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/CleanTests.cs index 6a8ca8ce204d0..bbd0f0106e89b 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/CleanTests.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/CleanTests.cs @@ -45,7 +45,7 @@ public void Blazor_BuildThenClean_NativeRelinking(string config) .ExecuteWithCapturedOutput("build", "-t:Clean", $"-p:Configuration={config}", $"-bl:{logPath}") .EnsureSuccessful(); - AssertEmptyOrNonExistantDirectory(relinkDir); + AssertEmptyOrNonExistentDirectory(relinkDir); } [Theory] @@ -92,9 +92,9 @@ private void Blazor_BuildNativeNonNative_ThenCleanTest(string config, bool first .ExecuteWithCapturedOutput("build", "-t:Clean", $"-p:Configuration={config}", $"-bl:{logPath}") .EnsureSuccessful(); - AssertEmptyOrNonExistantDirectory(relinkDir); + AssertEmptyOrNonExistentDirectory(relinkDir); } - private void AssertEmptyOrNonExistantDirectory(string dirPath) + private void AssertEmptyOrNonExistentDirectory(string dirPath) { _testOutput.WriteLine($"dirPath: {dirPath}"); if (!Directory.Exists(dirPath)) diff --git a/src/tests/Common/scripts/arm32_ci_script.sh b/src/tests/Common/scripts/arm32_ci_script.sh index 986152f911d16..397bb34b86a13 100755 --- a/src/tests/Common/scripts/arm32_ci_script.sh +++ b/src/tests/Common/scripts/arm32_ci_script.sh @@ -493,9 +493,9 @@ do esac done -#Check if there are any uncommited changes in the source directory as git adds and removes patches +#Check if there are any uncommitted changes in the source directory as git adds and removes patches if [[ -n $(git status -s) ]]; then - echo 'ERROR: There are some uncommited changes. To avoid losing these changes commit them and try again.' + echo 'ERROR: There are some uncommitted changes. To avoid losing these changes commit them and try again.' echo '' git status exit 1 diff --git a/src/tests/Common/scripts/crossgen2_comparison.py b/src/tests/Common/scripts/crossgen2_comparison.py index f22b16c7c2a6e..d63dd835f0029 100644 --- a/src/tests/Common/scripts/crossgen2_comparison.py +++ b/src/tests/Common/scripts/crossgen2_comparison.py @@ -246,7 +246,7 @@ def run_to_completion(self, async_callback, *extra_args): """ reset_env = os.environ.copy() - + loop = asyncio.get_event_loop() loop.run_until_complete(self.__run_to_completion__(async_callback, *extra_args)) loop.close() @@ -559,7 +559,7 @@ async def _run_with_args(self, args): stdout = None stderr = None - proc = await asyncio.create_subprocess_shell(" ".join(args), + proc = await asyncio.create_subprocess_shell(" ".join(args), stdin=asyncio.subprocess.PIPE, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE) @@ -878,7 +878,7 @@ def compare_results(args): root.appendChild(assemblies) assembly = root.createElement('assembly') - assembly.setAttribute('name', 'crossgen2_comparison_job_targetting_{0}'.format(args.target_arch_os)) + assembly.setAttribute('name', 'crossgen2_comparison_job_targeting_{0}'.format(args.target_arch_os)) assembly.setAttribute('total', '{0}'.format(len(both_assemblies))) assembly.setAttribute('passed', '{0}'.format(len(both_assemblies) - num_omitted_results - num_mismatched_results)) assembly.setAttribute('failed', '{0}'.format(num_omitted_results+num_mismatched_results)) @@ -886,7 +886,7 @@ def compare_results(args): assemblies.appendChild(assembly) collection = root.createElement('collection') - collection.setAttribute('name', 'crossgen2_comparison_job_targetting_{0}'.format(args.target_arch_os)) + collection.setAttribute('name', 'crossgen2_comparison_job_targeting_{0}'.format(args.target_arch_os)) collection.setAttribute('total', '{0}'.format(len(both_assemblies))) collection.setAttribute('passed', '{0}'.format(len(both_assemblies) - num_omitted_results - num_mismatched_results)) collection.setAttribute('failed', '{0}'.format(num_omitted_results+num_mismatched_results)) @@ -941,7 +941,7 @@ def compare_results(args): base_result = base_results_by_name[assembly_name] diff_result = diff_results_by_name[assembly_name] base_diff_are_equal = True - + if base_result.returncode != diff_result.returncode: base_diff_are_equal = False elif base_result.returncode == 0 and diff_result.returncode == 0: @@ -981,11 +981,11 @@ def compare_results(args): failureXml.appendChild(messageXml) - xml_str = root.toprettyxml(indent ="\t") + xml_str = root.toprettyxml(indent ="\t") if output_file_type == FileTypes.NativeOrReadyToRunImage: with open(args.testresultsxml, "w") as f: - f.write(xml_str) + f.write(xml_str) if not did_compare: sys.exit(1) diff --git a/src/tests/Common/scripts/x86_ci_script.sh b/src/tests/Common/scripts/x86_ci_script.sh index 1a6832d894ae9..f4e0fee25bceb 100755 --- a/src/tests/Common/scripts/x86_ci_script.sh +++ b/src/tests/Common/scripts/x86_ci_script.sh @@ -16,9 +16,9 @@ do esac done -#Check if there are any uncommited changes in the source directory as git adds and removes patches +#Check if there are any uncommitted changes in the source directory as git adds and removes patches if [[ -n $(git status -s) ]]; then - echo 'ERROR: There are some uncommited changes. To avoid losing these changes commit them and try again.' + echo 'ERROR: There are some uncommitted changes. To avoid losing these changes commit them and try again.' echo '' git status exit 1 diff --git a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj index 35b9ea7172a9d..3c604b39a4a85 100644 --- a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj +++ b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj @@ -4,7 +4,7 @@ false - $(CORE_ROOT)\runtimepack-non-existant + $(CORE_ROOT)\runtimepack-non-existent $(CORE_ROOT)\runtimepack $(NetCoreAppCurrent) $(MSBuildThisFileDirectory)\obj\$(Configuration)\wasm diff --git a/src/tests/CoreMangLib/system/delegate/delegate/delegatecombine1.cs b/src/tests/CoreMangLib/system/delegate/delegate/delegatecombine1.cs index 4472f720ce6d3..2f8332bb94c78 100644 --- a/src/tests/CoreMangLib/system/delegate/delegate/delegatecombine1.cs +++ b/src/tests/CoreMangLib/system/delegate/delegate/delegatecombine1.cs @@ -9,7 +9,7 @@ namespace DelegateTest { delegate bool booldelegate(); delegate void voiddelegate(); - delegate void delegatecombine(booldelegate delgate1, booldelegate delgate2); + delegate void delegatecombine(booldelegate delegate1, booldelegate delegate2); public class DelegateCombine1 { @@ -78,7 +78,7 @@ public bool PosTest1() TestLibrary.TestFramework.LogError("001", "delegate combine is not successful "); retVal = false; } - + } catch (Exception e) { @@ -98,13 +98,13 @@ public bool PosTest2() try { - + if (GetInvocationListFlag(identify_null.c_Start_null_true, identify_null.c_Working_null_false ) != c_Working) { TestLibrary.TestFramework.LogError("003", "delegate combine is not successful "); retVal = false; } - + } catch (Exception e) @@ -125,13 +125,13 @@ public bool PosTest3() try { - + if (GetInvocationListFlag( identify_null.c_Start_null_false, identify_null.c_Working_null_true ) != c_StartWrok) { TestLibrary.TestFramework.LogError("005", "delegate combine is not successful "); retVal = false; } - + } catch (Exception e) @@ -157,7 +157,7 @@ public bool PosTest4() TestLibrary.TestFramework.LogError("007", "delegate combine is not successful "); retVal = false; } - + } catch (Exception e) @@ -187,11 +187,11 @@ public bool NegTest1() TestLibrary.TestFramework.LogError("009", "a ArgumentException should be throw "); retVal = false; - + } catch (ArgumentException) { - + } catch (Exception e) @@ -206,7 +206,7 @@ private string GetInvocationListFlag(identify_null start,identify_null working) { DelegateCombine1 delctor = new DelegateCombine1(); TestClass testinstance = new TestClass(); - + string sFlag = string.Empty; if (start == identify_null.c_Start_null_false) { @@ -245,7 +245,7 @@ private string GetInvocationListFlag(identify_null start,identify_null working) combine(); return sFlag; } - + } //create testclass for provding test method and test target. class TestClass @@ -263,7 +263,7 @@ public bool Working_Bool() public void CompleteWork_Void() { TestLibrary.TestFramework.LogInformation("CompleteWork_Void method is running ."); - + } } diff --git a/src/tests/CoreMangLib/system/delegate/delegate/delegatecombineimpl.cs b/src/tests/CoreMangLib/system/delegate/delegate/delegatecombineimpl.cs index aaa7fe7a94a7a..ed61a6cfc34b6 100644 --- a/src/tests/CoreMangLib/system/delegate/delegate/delegatecombineimpl.cs +++ b/src/tests/CoreMangLib/system/delegate/delegate/delegatecombineimpl.cs @@ -9,7 +9,7 @@ namespace DelegateTest { delegate bool booldelegate(); delegate void voiddelegate(); - + public class DelegateCombineImpl { const string c_StartWrok = "Start"; @@ -20,7 +20,7 @@ enum identify_null c_Start_null_false, c_Working_null_true, c_Working_null_false, - c_Start_null_false_duplicate + c_Start_null_false_duplicate } booldelegate starkWork; @@ -71,13 +71,13 @@ public bool PosTest1() try { - booldelegate delgate = new booldelegate(new TestClass().Working_Bool); - if (!CombineImpl(delgate,identify_null.c_Start_null_false)) + booldelegate delegate = new booldelegate(new TestClass().Working_Bool); + if (!CombineImpl(delegate,identify_null.c_Start_null_false)) { TestLibrary.TestFramework.LogError("001", "delegate combineimpl is not successful "); retVal = false; } - + } catch (Exception e) { @@ -98,13 +98,13 @@ public bool PosTest2() try { - booldelegate delgate = null; - if (!CombineImpl(delgate, identify_null.c_Working_null_false)) + booldelegate delegate = null; + if (!CombineImpl(delegate, identify_null.c_Working_null_false)) { TestLibrary.TestFramework.LogError("003", "delegate combine is not successful "); retVal = false; } - + } catch (Exception e) @@ -126,13 +126,13 @@ public bool PosTest3() try { - booldelegate delgate = new booldelegate(new TestClass().StartWork_Bool); - if (!CombineImpl(delgate, identify_null.c_Working_null_true )) + booldelegate delegate = new booldelegate(new TestClass().StartWork_Bool); + if (!CombineImpl(delegate, identify_null.c_Working_null_true )) { TestLibrary.TestFramework.LogError("005", "delegate combine is not successful "); retVal = false; } - + } catch (Exception e) @@ -153,13 +153,13 @@ public bool PosTest4() try { - booldelegate delgate = null; - if (!CombineImpl(delgate, identify_null.c_Working_null_true)) + booldelegate delegate = null; + if (!CombineImpl(delegate, identify_null.c_Working_null_true)) { TestLibrary.TestFramework.LogError("007", "delegate combine is not successful "); retVal = false; } - + } catch (Exception e) @@ -180,8 +180,8 @@ public bool PosTest5() try { - booldelegate delgate = new booldelegate(new TestClass().Working_Bool); - if (!CombineImpl(delgate, identify_null.c_Start_null_false_duplicate )) + booldelegate delegate = new booldelegate(new TestClass().Working_Bool); + if (!CombineImpl(delegate, identify_null.c_Start_null_false_duplicate )) { TestLibrary.TestFramework.LogError("009", "delegate combine is not successful "); retVal = false; @@ -200,7 +200,7 @@ private bool CombineImpl(booldelegate delegatesrc,identify_null start) { DelegateCombineImpl delctor = new DelegateCombineImpl(); TestClass testinstance = new TestClass(); - + string sFlag = string.Empty; string sFlagAdd=string.Empty ; booldelegate combineImpl = delegatesrc; @@ -209,7 +209,7 @@ private bool CombineImpl(booldelegate delegatesrc,identify_null start) delctor.starkWork = new booldelegate(testinstance.StartWork_Bool); combineImpl += (booldelegate)delctor.starkWork; sFlagAdd = c_StartWrok; - + } else if (start == identify_null.c_Start_null_false_duplicate ) { @@ -236,7 +236,7 @@ private bool CombineImpl(booldelegate delegatesrc,identify_null start) delctor.working = null; combineImpl += (booldelegate)delctor.working; } - + if (combineImpl == null) { return true; @@ -245,7 +245,7 @@ private bool CombineImpl(booldelegate delegatesrc,identify_null start) for (IEnumerator itr = combineImpl.GetInvocationList().GetEnumerator(); itr.MoveNext(); ) { booldelegate bd = (booldelegate)itr.Current; - //the filter is to get the delegate which is appended through equals method. + //the filter is to get the delegate which is appended through equals method. if (bd.Equals(delctor.starkWork)) { sFlag += c_StartWrok; @@ -256,14 +256,14 @@ private bool CombineImpl(booldelegate delegatesrc,identify_null start) } } combineImpl(); - //judge delegate is appended to the end of the invocation list of the current + //judge delegate is appended to the end of the invocation list of the current if (sFlag == sFlagAdd) return true; else return false; - + } - + } //create testclass for provding test method and test target. class TestClass @@ -281,7 +281,7 @@ public bool Working_Bool() public void CompleteWork_Void() { TestLibrary.TestFramework.LogInformation("CompleteWork_Void method is running ."); - + } } diff --git a/src/tests/CoreMangLib/system/multicastdelegate/delegatedefinitions.cs b/src/tests/CoreMangLib/system/multicastdelegate/delegatedefinitions.cs index b525b5803c776..f2e15acd495fd 100644 --- a/src/tests/CoreMangLib/system/multicastdelegate/delegatedefinitions.cs +++ b/src/tests/CoreMangLib/system/multicastdelegate/delegatedefinitions.cs @@ -36,7 +36,7 @@ public class DelegateDefinitions #region Public Constaints public const int c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER = 1; public const int c_DELEGATE_TEST_ADDITIONAL_VALUE_PARAMETER = 2; - public const string c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER = "abcdefg"; + public const string c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER = "abcdefg"; #endregion #region Public Properties @@ -246,11 +246,11 @@ public static void TestValueParameterVoidStaticCallback(int val) public static void TestReferenceParameterVoidStaticCallback(object val) { - if (!val.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER)) + if (!val.Equals(c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER)) VerificationAgent.ThrowVerificationException( "Input reference parameter is not expected", val, - c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER); + c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER); } public static void TestVoidParameterVoidStaticCallback() @@ -277,11 +277,11 @@ public static int TestValueParameterValueStaticCallback(int val) public static object TestReferenceValueParameterReferenceStaticCallback(object val1, int val2) { - if (!val1.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER)) + if (!val1.Equals(c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER)) VerificationAgent.ThrowVerificationException( "First input reference parameter is not expected", val1, - c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER); + c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER); if (c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER != val2) VerificationAgent.ThrowVerificationException( @@ -289,7 +289,7 @@ public static object TestReferenceValueParameterReferenceStaticCallback(object v val2, c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER); - return c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER; + return c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER; } #endregion @@ -306,11 +306,11 @@ public void TestValueParameterVoidCallback(int val) public void TestReferenceParameterVoidCallback(object val) { - if (!val.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER)) + if (!val.Equals(c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER)) VerificationAgent.ThrowVerificationException( "Input reference parameter is not expected", val, - c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER); + c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER); } public void TestVoidParameterVoidCallback() @@ -332,13 +332,13 @@ public int TestValueParameterValueCallback(int val) public object TestReferenceParameterReferenceCallback(object val) { - if (!val.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER)) + if (!val.Equals(c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER)) VerificationAgent.ThrowVerificationException( "Input reference parameter is not expected", val, - c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER); + c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER); - return c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER; + return c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER; } public object TestValueParameterReferenceCallback(int val) @@ -349,16 +349,16 @@ public object TestValueParameterReferenceCallback(int val) val, c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER); - return c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER; + return c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER; } public int TestReferenceParameterValueCallback(object val) { - if (!val.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER)) + if (!val.Equals(c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER)) VerificationAgent.ThrowVerificationException( "Input reference parameter is not expected", val, - c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER); + c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER); return c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER; } @@ -370,7 +370,7 @@ public int TestVoidParameterValueCallback() public object TestVoidParameterReferenceCallback() { - return c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER; + return c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER; } public void TestTwoValueParameterVoidCallback(int val1, int val2) @@ -396,20 +396,20 @@ public void TestValueReferenceParameterVoidCallback(int val1, object val2) val1, c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER); - if (!val2.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER)) + if (!val2.Equals(c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER)) VerificationAgent.ThrowVerificationException( "Second input reference parameter is not expected", val2, - c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER); + c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER); } public void TestReferenceValueParameterVoidCallback(object val1, int val2) { - if (!val1.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER)) + if (!val1.Equals(c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER)) VerificationAgent.ThrowVerificationException( "First input reference parameter is not expected", val1, - c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER); + c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER); if (c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER != val2) VerificationAgent.ThrowVerificationException( @@ -420,11 +420,11 @@ public void TestReferenceValueParameterVoidCallback(object val1, int val2) public object TestReferenceValueParameterReferenceCallback(object val1, int val2) { - if (!val1.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER)) + if (!val1.Equals(c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER)) VerificationAgent.ThrowVerificationException( "First input reference parameter is not expected", val1, - c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER); + c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER); if (c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER != val2) VerificationAgent.ThrowVerificationException( @@ -432,7 +432,7 @@ public object TestReferenceValueParameterReferenceCallback(object val1, int val2 val2, c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER); - return c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER; + return c_DELEGATE_TEST_DEFAULT_REFERENCE_PARAMETER; } #endregion diff --git a/src/tests/GC/Scenarios/FinalNStruct/nstructtun.cs b/src/tests/GC/Scenarios/FinalNStruct/nstructtun.cs index 2af634b714f8a..2f60a42c07512 100644 --- a/src/tests/GC/Scenarios/FinalNStruct/nstructtun.cs +++ b/src/tests/GC/Scenarios/FinalNStruct/nstructtun.cs @@ -24,14 +24,14 @@ public CreateObj(int Rep) } [MethodImplAttribute(MethodImplOptions.NoInlining)] - public void DestoryStrmap() + public void DestroyStrmap() { Strmap = null; - } + } public bool RunTest() { - DestoryStrmap(); + DestroyStrmap(); GC.Collect(); GC.WaitForPendingFinalizers(); GC.Collect(); diff --git a/src/tests/GC/Scenarios/Samples/gc.cs b/src/tests/GC/Scenarios/Samples/gc.cs index 0de82a0dd3a34..660313fbe6f43 100644 --- a/src/tests/GC/Scenarios/Samples/gc.cs +++ b/src/tests/GC/Scenarios/Samples/gc.cs @@ -54,20 +54,20 @@ public void Display(String status) { // If possible, do not have a Finalize method for your class. Finalize // methods usually run when the heap is low on available storage - // and needs to be garbage collected. This can hurt application + // and needs to be garbage collected. This can hurt application // performance significantly. // If you must implement a Finalize method, make it run fast, avoid - // synchronizing on other threads, do not block, and - // avoid raising any exceptions (although the Finalizer thread + // synchronizing on other threads, do not block, and + // avoid raising any exceptions (although the Finalizer thread // automatically recovers from any unhandled exceptions). - // NOTE: In the future, exceptions may be caught using an + // NOTE: In the future, exceptions may be caught using an // AppDomain-registered unhandled Finalize Exception Handler // While discouraged, you may call methods on object's referred // to by this object. However, you must be aware that the other - // objects may have already had their Finalize method called + // objects may have already had their Finalize method called // causing these objects to be in an unpredictable state. // This is because the system does not guarantees that // Finalizers will be called in any particular order. @@ -79,8 +79,8 @@ public void Display(String status) { // This class shows how to derive a class from another class and how base class -// Finalize methods are NOT automatically called. By contrast, base class -// destructors (in unmanaged code) are automatically called. +// Finalize methods are NOT automatically called. By contrast, base class +// destructors (in unmanaged code) are automatically called. // This is one example of how destructors and Finalize methods differ. public class DerivedObj : BaseObj { public DerivedObj(String s) : base(s) { @@ -88,13 +88,13 @@ public DerivedObj(String s) : base(s) { } //protected override void Finalize() { - ~DerivedObj() { + ~DerivedObj() { Display("DerivedObj Finalize"); - // The GC has a special thread dedicated to executing Finalize - // methods. You can tell that this thread is different from the + // The GC has a special thread dedicated to executing Finalize + // methods. You can tell that this thread is different from the // application's main thread by comparing the thread's hash codes. - Display("Finalize thread's hash code: " + Display("Finalize thread's hash code: " + Thread.CurrentThread.GetHashCode()); // BaseObj's Finalize is NOT called unless you execute the line below @@ -129,10 +129,10 @@ public void SetResurrection(Boolean allowResurrection) { Application.ResObjHolder = this; // When the GC calls an object's Finalize method, it assumes that - // there is no need to ever call it again. However, we've now + // there is no need to ever call it again. However, we've now // resurrected this object and the line below forces the GC to call // this object's Finalize again when the object is destroyed again. - // BEWARE: If ReRegisterForFinalize is called multiple times, the + // BEWARE: If ReRegisterForFinalize is called multiple times, the // object's Finalize method will be called multiple times. GC.ReRegisterForFinalize(this); @@ -142,7 +142,7 @@ public void SetResurrection(Boolean allowResurrection) { // the referenced object to be resurrected as well. This object // can continue to use the referenced object even though it was // finalized. - + } else { Display("This object is NOT being resurrected"); } @@ -174,7 +174,7 @@ public DisposeObj(String s) : base(s) { Display("DisposeObj Constructor"); } - // When an object of this type wants to be explicitly cleaned-up, the user + // When an object of this type wants to be explicitly cleaned-up, the user // of this object should call Dispose at the desired code location. public void Dispose() { Display("DisposeObj Dispose"); @@ -205,7 +205,7 @@ public void Dispose() { class Application { static private int indent = 0; - static public void Display(String s) { + static public void Display(String s) { for (int x = 0; x < indent * 3; x++) Console.Write(" "); Console.WriteLine(s); @@ -246,10 +246,10 @@ private static void Introduction() { // The object is unreachable so forcing a GC causes it to be finalized. Collect(); - // Wait for the GC's Finalize thread to finish + // Wait for the GC's Finalize thread to finish // executing all queued Finalize methods. WaitForFinalizers(); - // NOTE: The GC calls the most-derived (farthest away from + // NOTE: The GC calls the most-derived (farthest away from // the Object base class) Finalize only. // Base class Finalize functions are called only if the most-derived // Finalize method explicitly calls its base class's Finalize method. @@ -258,9 +258,9 @@ private static void Introduction() { obj = new DerivedObj("Introduction"); // obj = null; // Variation: this line is commented out Collect(); - WaitForFinalizers(); - // Notice that we get identical results as above: the Finalize method - // runs because the jitter's optimizer knows that obj is not + WaitForFinalizers(); + // Notice that we get identical results as above: the Finalize method + // runs because the jitter's optimizer knows that obj is not // referenced later in this function. Display(-1, "Demo stop: Introduction to Garbage Collection.", 0); @@ -292,15 +292,15 @@ private static void ResurrectionDemo() { Collect(); WaitForFinalizers(); // You should see the Finalize method called. - // However, the ResurrectionObj's Finalize method - // resurrects the object keeping it alive. It does this by placing a + // However, the ResurrectionObj's Finalize method + // resurrects the object keeping it alive. It does this by placing a // reference to the dying-object in Application.ResObjHolder // You can see that ResurrectionObj still exists because // the following line doesn't raise an exception. ResObjHolder.Display("Still alive after Finalize called"); - // Prevent the ResurrectionObj object from resurrecting itself again, + // Prevent the ResurrectionObj object from resurrecting itself again, ResObjHolder.SetResurrection(false); // Now, let's destroy this last reference to the ResurrectionObj @@ -334,13 +334,13 @@ private static void DisposeDemo() { // This method demonstrates the unbalanced nature of ReRegisterForFinalize // and SuppressFinalize. The main point is if your code makes multiple - // calls to ReRegisterForFinalize (without intervening calls to + // calls to ReRegisterForFinalize (without intervening calls to // SuppressFinalize) the Finalize method may get called multiple times. private static void FinalizationQDemo() { Display(0, "\n\nDemo start: Suppressing and ReRegistering for Finalize.", +1); - // Since this object has a Finalize method, a reference to the object + // Since this object has a Finalize method, a reference to the object // will be added to the finalization queue. - BaseObj obj = new BaseObj("Finalization Queue"); + BaseObj obj = new BaseObj("Finalization Queue"); // Add another 2 references onto the finalization queue // NOTE: Don't do this in a normal app. This is only for demo purposes. @@ -353,7 +353,7 @@ private static void FinalizationQDemo() { GC.SuppressFinalize(obj); // There are now 3 references to this object on the finalization queue. - // If the object were unreachable, the 1st call to this object's Finalize + // If the object were unreachable, the 1st call to this object's Finalize // method will be discarded but the 2nd & 3rd calls to Finalize will execute. // Sets the same bit effectively doing nothing! @@ -364,7 +364,7 @@ private static void FinalizationQDemo() { // Force a GC so that the object gets finalized Collect(); // NOTE: Finalize is called twice because only the 1st call is suppressed! - WaitForFinalizers(); + WaitForFinalizers(); Display(-1, "Demo stop: Suppressing and ReRegistering for Finalize.", 0); } @@ -412,7 +412,7 @@ private static void GenerationDemo() { // This method demonstrates how weak references (WR) work. A WR allows // the GC to collect objects if the managed heap is low on memory. // WRs are useful to apps that have large amounts of easily-reconstructed - // data that they want to keep around to improve performance. But, if the + // data that they want to keep around to improve performance. But, if the // system is low on memory, the objects can be destroyed and replaced when // the app knows that it needs it again. private static void WeakRefDemo(Boolean trackResurrection) { @@ -449,7 +449,7 @@ private static void WeakRefDemo(Boolean trackResurrection) { // If wr is tracking resurrection, wr thinks the object is still alive // NOTE: If the object referred to by wr doesn't have a Finalize method, - // then wr would think that the object is dead regardless of whether + // then wr would think that the object is dead regardless of whether // wr is tracking resurrection or not. For example: // Object obj = new Object(); // Object doesn't have a Finalize method // WeakReference wr = new WeakReference(obj, true); @@ -463,7 +463,7 @@ private static void WeakRefDemo(Boolean trackResurrection) { Display("Strong reference to object obtained: " + (obj != null)); if (obj != null) { - // The strong reference was obtained so this wr must be + // The strong reference was obtained so this wr must be // tracking resurrection. At this point we have a strong // reference to an object that has been finalized but its memory // has not yet been reclaimed by the collector. @@ -471,9 +471,9 @@ private static void WeakRefDemo(Boolean trackResurrection) { obj = null; // Destroy the strong reference to the object - // Collect reclaims the object's memory since this object + // Collect reclaims the object's memory since this object // has no Finalize method registered for it anymore. - Collect(); + Collect(); WaitForFinalizers(); // We should see nothing here obj = (BaseObj) wr.Target; // This now returns null @@ -482,21 +482,21 @@ private static void WeakRefDemo(Boolean trackResurrection) { // Cleanup everything about this demo so there is no affect on the next demo obj = null; // Destroy strong reference (if it exists) - wr = null; // Destroy the WeakReference object (optional) + wr = null; // Destroy the WeakReference object (optional) Collect(); WaitForFinalizers(); // NOTE: You are dicouraged from using the WeakReference.IsAlive property // because the object may be killed immediately after IsAlive returns - // making the return value incorrect. If the Target property returns + // making the return value incorrect. If the Target property returns // a non-null value, then the object is alive and will stay alive // since you have a reference to it. If Target returns null, then the // object is dead. - Display(-1, String.Format("Demo stop: WeakReferences that {0}track resurrections.", + Display(-1, String.Format("Demo stop: WeakReferences that {0}track resurrections.", trackResurrection ? "" : "do not "), 0); } - + public static int Main(String[] args) { // Environment.ExitCode = 1; Display("To fully understand this sample, you should step through the"); @@ -511,10 +511,10 @@ public static int Main(String[] args) { DisposeDemo(); // Demos the use of Dispose & Finalize FinalizationQDemo(); // Demos the use of SuppressFinalize & ReRegisterForFinalize GenerationDemo(); // Demos GC generations - WeakRefDemo(false); // Demos WeakReferences without resurrection tracking - WeakRefDemo(true); // Demos WeakReferences with resurrection tracking - - // Demos Finalize on Shutdown symantics (this demo is inline) + WeakRefDemo(false); // Demos WeakReferences without resurrection tracking + WeakRefDemo(true); // Demos WeakReferences with resurrection tracking + + // Demos Finalize on Shutdown semantics (this demo is inline) Display(0, "\n\nDemo start: Finalize on shutdown.", +1); // When Main returns, obj will have its Finalize method called. @@ -522,7 +522,7 @@ public static int Main(String[] args) { // This is the last line of code executed before the application terminates. Display(-1, "Demo stop: Finalize on shutdown (application is now terminating)", 0); - + return 100; } } diff --git a/src/tests/GC/Stress/Framework/ReliabilityFramework.cs b/src/tests/GC/Stress/Framework/ReliabilityFramework.cs index 379d709ecd4dd..1b6e21499c4e9 100644 --- a/src/tests/GC/Stress/Framework/ReliabilityFramework.cs +++ b/src/tests/GC/Stress/Framework/ReliabilityFramework.cs @@ -294,10 +294,10 @@ private void OomExceptionCausedDebugBreak() /// /// Runs the reliability tests. Called from Main with the name of the configuration file we should be using. - /// All code in here runs in our starting app domain. + /// All code in here runs in our starting app domain. /// /// configuration file to use - /// 100 on sucess, another number on failure. + /// 100 on success, another number on failure. public int RunReliabilityTests(string testConfig, bool doReplay) { _totalSuccess = true; @@ -321,7 +321,7 @@ public int RunReliabilityTests(string testConfig, bool doReplay) // save the current directory string curDir = Directory.GetCurrentDirectory(); - // Enumerator through all the test sets... + // Enumerator through all the test sets... foreach (ReliabilityTestSet testSet in _reliabilityConfig) { if (testSet.InstallDetours) @@ -541,7 +541,7 @@ internal static void MyDebugBreak(string extraData) DebugBreak(); } { - // We need to stop the process now, + // We need to stop the process now, // but all the threads are still running try { @@ -585,14 +585,14 @@ private int CalculateTestsToRun() /// /// TestStarter monitors the current situation and starts tests as appropriate. /// - /// + /// private void TestStarter() { int totalTestsToRun = CalculateTestsToRun(); int lastTestStarted = 0; // this is our index into the array of tests, this ensures fair distribution over all the tests. DateTime lastStart = DateTime.Now; // keeps track of when we last started a test TimeSpan minTimeToStartTest = new TimeSpan(0, 5, 0); // after 5 minutes if we haven't started a test we're having problems... - int cpuAdjust = 0, memAdjust = 0; // if we discover that we're not starting new tests quick enough we adjust the CPU/Mem percentages + int cpuAdjust = 0, memAdjust = 0; // if we discover that we're not starting new tests quick enough we adjust the CPU/Mem percentages // so we start new tests sooner (so they start BEFORE we drop below our minimum CPU) //Console.WriteLine("RF - TestStarter found {0} tests to run", totalTestsToRun); @@ -647,7 +647,7 @@ private void TestStarter() { startTest = true; // the more we adjust the adjuster the harder we make to adjust it in the future. We have to fall out - // of the range of 1/4 of the adjuster value to increment it again. (so, if mem %==50, and memAdjust==8, + // of the range of 1/4 of the adjuster value to increment it again. (so, if mem %==50, and memAdjust==8, // we need to fall below 48 before we'll adjust it again) if (memVal < (_curTestSet.MinPercentMem - (memAdjust >> 2)) && memAdjust < 25) { @@ -659,7 +659,7 @@ private void TestStarter() { startTest = true; // the more we adjust the adjuster the harder we make to adjust it in the future. We have to fall out - // of the range of 1/4 of the adjuster value to increment it again. (so, if cpu %==50, and cpuAdjust==8, + // of the range of 1/4 of the adjuster value to increment it again. (so, if cpu %==50, and cpuAdjust==8, // we need to fall below 48 before we'll adjust it again) if (cpuVal < (_curTestSet.GetCurrentMinPercentCPU(timeRunning) - (cpuAdjust >> 2)) && cpuAdjust < 25) { @@ -1024,8 +1024,8 @@ private void StartTestWorker(object test) // HACKHACK: VSWhidbey bug #113535: Breaking change. Tests that return a value via Environment.ExitCode // will not have their value propagated back properly via AppDomain.ExecuteAssembly. These tests will - // typically have a return value of 0 (because they have a void entry point). We will check - // Environment.ExitCode and if it's not zero, we'll treat that as our return value (then reset + // typically have a return value of 0 (because they have a void entry point). We will check + // Environment.ExitCode and if it's not zero, we'll treat that as our return value (then reset // Env.ExitCode back to 0). if (exitCode == 0 && Environment.ExitCode != 0) @@ -1141,7 +1141,7 @@ private void StartTestWorker(object test) if (_curTestSet.AssemblyLoadContextLoaderMode == AssemblyLoadContextLoaderMode.FullIsolation || _curTestSet.AssemblyLoadContextLoaderMode == AssemblyLoadContextLoaderMode.Lazy) { - // we're in full isolation & have test runs left. we need to + // we're in full isolation & have test runs left. we need to // recreate the AssemblyLoadContext so that we don't die on statics. lock (daTest) { @@ -1366,8 +1366,8 @@ void UnloadAssemblyLoadContext(ReliabilityTest test) /// /// Pre-loads a test into the correct AssemblyLoadContext for the current loader mode. /// This method behaves in the same way as the TestPreLoader_AppDomain, the difference - /// (besides the AssemblyLoadContext vs AppDomain creation differences) is that it uses - /// reflection to get and invoke the methods on the LoaderClass loaded into + /// (besides the AssemblyLoadContext vs AppDomain creation differences) is that it uses + /// reflection to get and invoke the methods on the LoaderClass loaded into /// the AssemblyLoadContext. /// /// @@ -1554,7 +1554,7 @@ private void TestPreLoader_Process(ReliabilityTest test, string[] paths) /// This method will send a failure message to the test owner that their test has failed. /// /// the test case which failed - /// return code of the test, -1 for none provided + /// return code of the test, -1 for none provided private void SendFailMail(ReliabilityTest testCase, string message) { //SendFailMail(testCase, message, null, null, null); @@ -1640,17 +1640,17 @@ void SendFailMail(ReliabilityTest testCase, string message, string subject, stri Comments : {3} -

If you are listed on the To: line, you have test failures to investigate. +

If you are listed on the To: line, you have test failures to investigate. -

For all failures please find the machine listed above on the CLR Stress Details Web Page and open a tracking bug if one has not already been created for this stress run. +

For all failures please find the machine listed above on the CLR Stress Details Web Page and open a tracking bug if one has not already been created for this stress run. -

If this is a product failure please e-mail the +

If this is a product failure please e-mail the CLR Quick Response Dev Team with the failure information and tracking bug number. The QRT will then open a product bug if appropriate and resolve the tracking bug as a duplicate.

If this is a test failure please open a tracking bug via the CLR Stress Details web page and assign if to yourself. Resolve the bug once you have fixed the test issue.

If this is a stress harness issue please contact the stress developers. - + Thanks for contributing to CLR Stress!

", Environment.MachineName, testCase == null ? "None" : testCase.Assembly, testCase == null ? "None" : testCase.Arguments, message); } diff --git a/src/tests/GC/Stress/Tests/StressAllocator.cs b/src/tests/GC/Stress/Tests/StressAllocator.cs index d435ee600f93c..d090d98b37978 100644 --- a/src/tests/GC/Stress/Tests/StressAllocator.cs +++ b/src/tests/GC/Stress/Tests/StressAllocator.cs @@ -8,13 +8,13 @@ // Purpose of program: exercise the GC, with various object sizes and lifetimes. // Allocate objects that have an expiration time specified. When the object's lifetime expires, it is made garbage and then other new objects are created. -// +// // Each object has a lifetime attached to it (in ObjectWrapper). New objects are added to a collection. When the lifetime is expired, the object is removed from the collection and subject to GC. // There are several threads which access the collection in random positions and if there is no object in that position they will create a new one. //One thread is responsible to updating the objects'age and removing expired objects. //The lifetime and the objects'size can be set by command line arguments. //The objects'size is organized in buckets (size ranges), the user can specify the percentage for each bucket. -//Collection type can be array or binary tree. +//Collection type can be array or binary tree. @@ -51,7 +51,7 @@ public SizeBucket(int min, int max, float percentObj) private const int BUCKETS_MAX = 80000; ////// //// DEFAULT PARAMETERS - //These parameters may be overriden by command line parameters + //These parameters may be overridden by command line parameters public const int DEFAULT_MINLIFE = 3; //milliseconds public const int DEFAULT_MAXLIFE = 30; //milliseconds public const int DEFAULT_OBJCOUNT = 2000; //object count @@ -112,7 +112,7 @@ public SizeBucket(int min, int max, float percentObj) //for status output: //keep track of the collection count for generations 0, 1, 2 public static int[] currentCollections = new int[3]; - public static int outputFrequency = 0; //after how many iterations the data is printed + public static int outputFrequency = 0; //after how many iterations the data is printed public static System.TimeSpan totalTime; //weak ref array that keeps track of all objects public static WeakReferenceCollection WR_All = new WeakReferenceCollection(); @@ -122,7 +122,7 @@ public SizeBucket(int min, int max, float percentObj) public static Random Rand; - //This is because Random is not thread safe and it stops returning a random number after a while + //This is because Random is not thread safe and it stops returning a random number after a while //public static int GetRandomNumber(int min, int max) //{ // lock(objLock) @@ -160,7 +160,7 @@ private static ObjectWrapper CreateObject() } int references = Rand.Next(1, maxRef); - //decide if to make this object pinned + //decide if to make this object pinned bool pin = false; if ((LOHpin && isLOHObject) || !LOHpin) @@ -851,7 +851,7 @@ public int Size } } - //One pass through the collection, updates objects'age + //One pass through the collection, updates objects'age public void UpdateObjectsAge(long elapsedMsec) { for (int i = 0; i < _size; i++) diff --git a/src/tests/Interop/COM/NETClients/Primitives/StringTests.cs b/src/tests/Interop/COM/NETClients/Primitives/StringTests.cs index 65ede3c6f1f0f..6c90ef7184db5 100644 --- a/src/tests/Interop/COM/NETClients/Primitives/StringTests.cs +++ b/src/tests/Interop/COM/NETClients/Primitives/StringTests.cs @@ -32,12 +32,12 @@ class StringTests Tuple.Create("123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901") }; - private readonly IEnumerable reversableStrings = new string[] + private readonly IEnumerable reversibleStrings = new string[] { "", "a", "abc", - "reversable string", + "reversible string", "Unicode 相反 Unicode", // Long string optimization validation @@ -86,7 +86,7 @@ private void Marshal_LPString() Assert.Equal(expected, actual); } - foreach (var s in reversableStrings) + foreach (var s in reversibleStrings) { if (!AllAscii(s)) { @@ -117,7 +117,7 @@ private void Marshal_LPString() Assert.Equal(local, actual); } - foreach (var s in reversableStrings) + foreach (var s in reversibleStrings) { if (!AllAscii(s)) { @@ -171,7 +171,7 @@ private void Marshal_LPWString() Assert.Equal(expected, actual); } - foreach (var s in reversableStrings) + foreach (var s in reversibleStrings) { string local = s; string expected = Reverse(local); @@ -195,7 +195,7 @@ private void Marshal_LPWString() Assert.Throws( () => this.server.Reverse_LPWStr_OutAttr(local, actual)); } - foreach (var s in reversableStrings) + foreach (var s in reversibleStrings) { var local = new StringBuilder(s); string expected = Reverse(local.ToString()); @@ -243,7 +243,7 @@ private void Marshal_BStrString() Assert.Equal(expected, actual); } - foreach (var s in reversableStrings) + foreach (var s in reversibleStrings) { string local = s; string expected = Reverse(local); @@ -272,7 +272,7 @@ private void Marshal_BStrString() private void Marshal_LCID() { Console.WriteLine("Marshal LCID"); - foreach (var s in reversableStrings) + foreach (var s in reversibleStrings) { string local = s; string expected = Reverse(local); diff --git a/src/tests/Interop/COM/NativeClients/Primitives/StringTests.cpp b/src/tests/Interop/COM/NativeClients/Primitives/StringTests.cpp index 67ecb0755025e..81c2dfa39af8b 100644 --- a/src/tests/Interop/COM/NativeClients/Primitives/StringTests.cpp +++ b/src/tests/Interop/COM/NativeClients/Primitives/StringTests.cpp @@ -224,7 +224,7 @@ namespace rev.push_back(STR{ "" }); rev.push_back(STR{ "a" }); rev.push_back(STR{ "abc" }); - rev.push_back(STR{ "reversable string" }); + rev.push_back(STR{ "reversible string" }); // Long string optimization validation rev.push_back(STR{ "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901" }); @@ -256,8 +256,8 @@ namespace THROW_FAIL_IF_FALSE(expected.EqualTo(actual)); } - auto reversable = GetReversableStrings(); - for (const auto &r : reversable) + auto reversible = GetReversableStrings(); + for (const auto &r : reversible) { if (!r.AllAscii()) { @@ -316,8 +316,8 @@ namespace THROW_FAIL_IF_FALSE(expected.EqualTo(actual)); } - auto reversable = GetReversableStrings(); - for (const auto &r : reversable) + auto reversible = GetReversableStrings(); + for (const auto &r : reversible) { LPWSTR tmp; WStr local{ r }; @@ -370,8 +370,8 @@ namespace THROW_FAIL_IF_FALSE(expected.EqualTo(actual)); } - auto reversable = GetReversableStrings(); - for (const auto &r : reversable) + auto reversible = GetReversableStrings(); + for (const auto &r : reversible) { BSTR tmp; BStr local{ r }; diff --git a/src/tests/Interop/StringMarshalling/UTF8/UTF8Test.cs b/src/tests/Interop/StringMarshalling/UTF8/UTF8Test.cs index 6338b1dd86676..deb4c9f94a77a 100644 --- a/src/tests/Interop/StringMarshalling/UTF8/UTF8Test.cs +++ b/src/tests/Interop/StringMarshalling/UTF8/UTF8Test.cs @@ -6,7 +6,7 @@ using System.Text; using System.Collections.Generic; -// UTF8 +// UTF8 class UTF8StringTests { [DllImport("UTF8TestNative", CallingConvention = CallingConvention.Cdecl)] @@ -20,7 +20,7 @@ public static void TestInOutStringParameter(string orgString, int index) string nativeString = StringParameterInOut(passedString, index); if (!(nativeString == expectedNativeString)) { - throw new Exception("StringParameterInOut: nativeString != expecedNativeString "); + throw new Exception("StringParameterInOut: nativeString != expectedNativeString "); } } @@ -30,11 +30,11 @@ public static void TestInOutStringParameter(string orgString, int index) public static void TestOutStringParameter(string orgString, int index) { string passedString = orgString; - string expecedNativeString = passedString; + string expectedNativeString = passedString; string nativeString = StringParameterInOut(passedString, index); - if (!(nativeString == expecedNativeString)) + if (!(nativeString == expectedNativeString)) { - throw new Exception("StringParameterInOut: nativeString != expecedNativeString "); + throw new Exception("StringParameterInOut: nativeString != expectedNativeString "); } } @@ -42,7 +42,7 @@ public static void TestOutStringParameter(string orgString, int index) public static extern void StringParameterRefOut([MarshalAs(UnmanagedType.LPUTF8Str)]out string s, int index); public static void TestStringPassByOut(string orgString, int index) { - // out string + // out string string expectedNative = string.Empty; StringParameterRefOut(out expectedNative, index); if (orgString != expectedNative) @@ -82,8 +82,8 @@ public static void TestInOutStringBuilderParameter(string expectedString, int in if (!nativeStrBuilder.ToString().Equals(expectedString)) { - throw new Exception("TestInOutStringBuilderParameter: nativeString != expecedNativeString "); - } + throw new Exception("TestInOutStringBuilderParameter: nativeString != expectedNativeString "); + } } [DllImport("UTF8TestNative", CallingConvention = CallingConvention.Cdecl)] @@ -96,7 +96,7 @@ public static void TestOutStringBuilderParameter(string expectedString, int inde if (!nativeStringBuilder.ToString().Equals(expectedString)) { - throw new Exception("TestOutStringBuilderParameter: string != expecedString "); + throw new Exception("TestOutStringBuilderParameter: string != expectedString "); } } @@ -109,7 +109,7 @@ public static void TestReturnStringBuilder(string expectedReturn, int index) StringBuilder nativeString = StringBuilderParameterReturn(index); if (!expectedReturn.Equals(nativeString.ToString())) { - throw new Exception(string.Format( "TestReturnStringBuilder: nativeString {0} != expecedNativeString {1}",nativeString.ToString(),expectedReturn) ); + throw new Exception(string.Format( "TestReturnStringBuilder: nativeString {0} != expectedNativeString {1}",nativeString.ToString(),expectedReturn) ); } } } @@ -163,7 +163,7 @@ public static void TestUTF8StructMarshalling(string[] utf8Strings) throw new Exception("Incorrect UTF8 string marshalled back from native to managed."); } } - + unsafe static void CompareWithUTF8Encoding() { // Compare results with UTF8Encoding @@ -177,8 +177,8 @@ unsafe static void CompareWithUTF8Encoding() IntPtr ptr = (IntPtr)(&ums); ManagedStruct ms = Marshal.PtrToStructure(ptr); - string actual = ms.str; - + string actual = ms.str; + UTF8Encoding uTF8Encoding = new UTF8Encoding(); byte [] b = new byte[5]; b[0] = 0xFF; @@ -206,9 +206,9 @@ class UTF8DelegateMarshalling [DllImport("UTF8TestNative", CallingConvention = CallingConvention.Cdecl)] public static extern void Utf8DelegateAsParameter(DelegateUTF8Parameter param); - + public static void TestUTF8DelegateMarshalling() - { + { Utf8DelegateAsParameter(new DelegateUTF8Parameter(Utf8StringCallback)); } @@ -273,7 +273,7 @@ public static int Main(string[] args) // String.Empty tests UTF8StringTests.EmptyStringTest(); - + return 100; } } diff --git a/src/tests/Interop/StringMarshalling/UTF8/UTF8TestNative.cpp b/src/tests/Interop/StringMarshalling/UTF8/UTF8TestNative.cpp index bf50373737bdf..11eb92075b7c2 100644 --- a/src/tests/Interop/StringMarshalling/UTF8/UTF8TestNative.cpp +++ b/src/tests/Interop/StringMarshalling/UTF8/UTF8TestNative.cpp @@ -274,7 +274,7 @@ extern "C" DLL_EXPORT void __cdecl StringParameterRef(/*ref*/ char **s, int inde { CoreClrFree(*s); } - // overwrite the orginal + // overwrite the original *s = (LPSTR)(CoreClrAlloc(sizeof(char)* (strLength + 1))); memcpy(*s, pszTextutf8, strLength); (*s)[strLength] = '\0'; diff --git a/src/tests/Interop/StructMarshalling/ReversePInvoke/Helper.cs b/src/tests/Interop/StructMarshalling/ReversePInvoke/Helper.cs index 007a1806f80d8..4a61dabbe84a2 100644 --- a/src/tests/Interop/StructMarshalling/ReversePInvoke/Helper.cs +++ b/src/tests/Interop/StructMarshalling/ReversePInvoke/Helper.cs @@ -14,8 +14,8 @@ public class Helper { #region methods for InnerSequential struct - - // Return new InnerSequential instance + + // Return new InnerSequential instance public static InnerSequential NewInnerSequential(int f1, float f2, string f3) { InnerSequential inner_seq = new InnerSequential(); @@ -24,15 +24,15 @@ public static InnerSequential NewInnerSequential(int f1, float f2, string f3) inner_seq.f3 = f3; return inner_seq; } - - // Prints InnerSequential + + // Prints InnerSequential public static void PrintInnerSequential(InnerSequential inner_seq, string name) { Console.WriteLine("\t{0}.f1 = {1}", name, inner_seq.f1); Console.WriteLine("\t{0}.f2 = {1}", name, inner_seq.f2); Console.WriteLine("\t{0}.f3 = {1}", name, inner_seq.f3); } - + public static bool ValidateInnerSequential(InnerSequential s1, InnerSequential s2, string methodName) { if (s1.f1 != s2.f1 || s1.f2 != s2.f2 || s1.f3 != s2.f3) @@ -54,8 +54,8 @@ public static bool ValidateInnerSequential(InnerSequential s1, InnerSequential s #endregion #region methods for INNER2 struct - - // Return new INNER2 instance + + // Return new INNER2 instance public static INNER2 NewINNER2(int f1, float f2, string f3) { INNER2 inner = new INNER2(); @@ -64,15 +64,15 @@ public static INNER2 NewINNER2(int f1, float f2, string f3) inner.f3 = f3; return inner; } - - // Prints INNER2 + + // Prints INNER2 public static void PrintINNER2(INNER2 inner, string name) { Console.WriteLine("\t{0}.f1 = {1}", name, inner.f1); Console.WriteLine("\t{0}.f2 = {1}", name, inner.f2); Console.WriteLine("\t{0}.f3 = {1}", name, inner.f3); } - + public static bool ValidateINNER2(INNER2 inner1, INNER2 inner2, string methodName) { if (inner1.f1 != inner2.f1 || inner1.f2 != inner2.f2 || inner1.f3 != inner2.f3) @@ -94,8 +94,8 @@ public static bool ValidateINNER2(INNER2 inner1, INNER2 inner2, string methodNam #endregion #region methods for InnerExplicit struct - - // Return new InnerExplicit instance + + // Return new InnerExplicit instance public static InnerExplicit NewInnerExplicit(int f1, float f2, string f3) { InnerExplicit inner = new InnerExplicit(); @@ -104,15 +104,15 @@ public static InnerExplicit NewInnerExplicit(int f1, float f2, string f3) inner.f3 = f3; return inner; } - - // Prints InnerExplicit + + // Prints InnerExplicit public static void PrintInnerExplicit(InnerExplicit inner, string name) { Console.WriteLine("\t{0}.f1 = {1}", name, inner.f1); Console.WriteLine("\t{0}.f2 = {1}", name, inner.f2); Console.WriteLine("\t{0}.f3 = {1}", name, inner.f3); } - + public static bool ValidateInnerExplicit(InnerExplicit inner1, InnerExplicit inner2, string methodName) { if (inner1.f1 != inner2.f1 || inner1.f2 != inner2.f2 || inner1.f3 != inner2.f3) @@ -134,8 +134,8 @@ public static bool ValidateInnerExplicit(InnerExplicit inner1, InnerExplicit inn #endregion #region methods for InnerArraySequential struct - - // Returns new OUTER instance; the params are the fields of INNER; + + // Returns new OUTER instance; the params are the fields of INNER; // all the INNER elements have the same field values public static InnerArraySequential NewInnerArraySequential(int f1, float f2, string f3) { @@ -149,7 +149,7 @@ public static InnerArraySequential NewInnerArraySequential(int f1, float f2, str } return outer; } - + // Prints InnerArraySequential public static void PrintInnerArraySequential(InnerArraySequential outer, string name) { @@ -160,7 +160,7 @@ public static void PrintInnerArraySequential(InnerArraySequential outer, string Console.WriteLine("\t{0}.arr[{1}].f3 = {2}", name, i, outer.arr[i].f3); } } - + // Returns true if the two params have the same fields public static bool ValidateInnerArraySequential(InnerArraySequential outer1, InnerArraySequential outer2, string methodName) { @@ -189,8 +189,8 @@ public static bool ValidateInnerArraySequential(InnerArraySequential outer1, Inn #endregion #region methods for InnerArrayExplicit struct - - // Returns new InnerArrayExplicit instance; the params are the fields of INNER; + + // Returns new InnerArrayExplicit instance; the params are the fields of INNER; // all the INNER elements have the same field values public static InnerArrayExplicit NewInnerArrayExplicit(int f1, float f2, string f3, string f4) { @@ -205,7 +205,7 @@ public static InnerArrayExplicit NewInnerArrayExplicit(int f1, float f2, string outer.f4 = f4; return outer; } - + // Prints InnerArrayExplicit public static void PrintInnerArrayExplicit(InnerArrayExplicit outer, string name) { @@ -217,7 +217,7 @@ public static void PrintInnerArrayExplicit(InnerArrayExplicit outer, string name } Console.WriteLine("\t{0}.f4 = {1}", name, outer.f4); } - + // Returns true if the two params have the same fields public static bool ValidateInnerArrayExplicit(InnerArrayExplicit outer1, InnerArrayExplicit InnerArrayExplicit, string methodName) { @@ -249,8 +249,8 @@ public static bool ValidateInnerArrayExplicit(InnerArrayExplicit outer1, InnerAr #endregion #region methods for OUTER3 struct - - // Returns new OUTER3 instance; the params are the fields of INNER; + + // Returns new OUTER3 instance; the params are the fields of INNER; // all the INNER elements have the same field values public static OUTER3 NewOUTER3(int f1, float f2, string f3, string f4) { @@ -265,7 +265,7 @@ public static OUTER3 NewOUTER3(int f1, float f2, string f3, string f4) outer.f4 = f4; return outer; } - + // Prints OUTER3 public static void PrintOUTER3(OUTER3 outer, string name) { @@ -277,7 +277,7 @@ public static void PrintOUTER3(OUTER3 outer, string name) } Console.WriteLine("\t{0}.f4 = {1}", name, outer.f4); } - + // Returns true if the two params have the same fields public static bool ValidateOUTER3(OUTER3 outer1, OUTER3 InnerArrayExplicit, string methodName) { @@ -315,7 +315,7 @@ public static bool ValidateOUTER3(OUTER3 outer1, OUTER3 InnerArrayExplicit, stri #endregion #region methods for CharSetAnsiSequential struct - + //return CharSetAnsiSequential struct instance public static CharSetAnsiSequential NewCharSetAnsiSequential(string f1, char f2) { @@ -324,14 +324,14 @@ public static CharSetAnsiSequential NewCharSetAnsiSequential(string f1, char f2) str1.f2 = f2; return str1; } - + //print the struct CharSetAnsiSequential element public static void PrintCharSetAnsiSequential(CharSetAnsiSequential str1, string name) { Console.WriteLine("\t{0}.f1 = {1}", name, str1.f1); Console.WriteLine("\t{0}.f2 = {1}", name, str1.f2); } - + // Returns true if the two params have the same fields public static bool ValidateCharSetAnsiSequential(CharSetAnsiSequential str1, CharSetAnsiSequential str2, string methodName) { @@ -354,7 +354,7 @@ public static bool ValidateCharSetAnsiSequential(CharSetAnsiSequential str1, Cha #endregion #region methods for CharSetUnicodeSequential struct - + //return the struct CharSetUnicodeSequential instance public static CharSetUnicodeSequential NewCharSetUnicodeSequential(string f1, char f2) { @@ -363,14 +363,14 @@ public static CharSetUnicodeSequential NewCharSetUnicodeSequential(string f1, ch str1.f2 = f2; return str1; } - + //print the struct CharSetUnicodeSequential element public static void PrintCharSetUnicodeSequential(CharSetUnicodeSequential str1, string name) { Console.WriteLine("\t{0}.f1 = {1}", name, str1.f1); Console.WriteLine("\t{0}.f2 = {1}", name, str1.f2); } - + // Returns true if the two params have the same fields public static bool ValidateCharSetUnicodeSequential(CharSetUnicodeSequential str1, CharSetUnicodeSequential str2, string methodName) { @@ -393,7 +393,7 @@ public static bool ValidateCharSetUnicodeSequential(CharSetUnicodeSequential str #endregion #region methods for NumberSequential struct - + public static NumberSequential NewNumberSequential(int i32, uint ui32, short s1, ushort us1, Byte b, SByte sb, Int16 i16, UInt16 ui16, Int64 i64, UInt64 ui64, Single sgl, Double d) { @@ -412,7 +412,7 @@ public static NumberSequential NewNumberSequential(int i32, uint ui32, short s1, str1.d = d; return str1; } - + public static void PrintNumberSequential(NumberSequential str1, string name) { Console.WriteLine("\t{0}.i32 = {1}", name, str1.i32); @@ -428,7 +428,7 @@ public static void PrintNumberSequential(NumberSequential str1, string name) Console.WriteLine("\t{0}.sgl = {1}", name, str1.sgl); Console.WriteLine("\t{0}.d = {1}", name, str1.d); } - + public static bool ValidateNumberSequential(NumberSequential str1, NumberSequential str2, string methodName) { if (str1.i32 != str2.i32 || str1.ui32 != str2.ui32 || str1.s1 != str2.s1 || @@ -453,7 +453,7 @@ public static bool ValidateNumberSequential(NumberSequential str1, NumberSequent #endregion #region methods for S3 struct - + public static void InitialArray(int[] iarr, int[] icarr) { for (int i = 0; i < iarr.Length; i++) @@ -485,7 +485,7 @@ public static void PrintS3(S3 str1, string name) Console.WriteLine("\t{0}.vals[{1}] = {2}", name, i, str1.vals[i]); } } - + public static bool ValidateS3(S3 str1, S3 str2, string methodName) { int iflag = 0; @@ -523,7 +523,7 @@ public static bool ValidateS3(S3 str1, S3 str2, string methodName) #endregion #region methods for S5 struct - + public static S5 NewS5(int age, string name, Enum1 ef) { S4 s4 = new S4(); @@ -536,14 +536,14 @@ public static S5 NewS5(int age, string name, Enum1 ef) return s5; } - + public static void PrintS5(S5 str1, string name) { Console.WriteLine("\t{0}.s4.age = {1}", str1.s4.age); Console.WriteLine("\t{0}.s4.name = {1}", str1.s4.name); Console.WriteLine("\t{0}.ef = {1}", str1.ef.ToString()); } - + public static bool ValidateS5(S5 str1, S5 str2, string methodName) { if (str1.s4.age != str2.s4.age || str1.s4.name != str2.s4.name) @@ -573,7 +573,7 @@ public static bool ValidateS5(S5 str1, S5 str2, string methodName) #endregion #region methods for StringStructSequentialAnsi struct - + public static StringStructSequentialAnsi NewStringStructSequentialAnsi(string first, string last) { StringStructSequentialAnsi s6 = new StringStructSequentialAnsi(); @@ -582,13 +582,13 @@ public static StringStructSequentialAnsi NewStringStructSequentialAnsi(string fi return s6; } - + public static void PrintStringStructSequentialAnsi(StringStructSequentialAnsi str1, string name) { Console.WriteLine("\t{0}.first = {1}", name, str1.first); Console.WriteLine("\t{0}.last = {1}", name, str1.last); } - + public static bool ValidateStringStructSequentialAnsi(StringStructSequentialAnsi str1, StringStructSequentialAnsi str2, string methodName) { if (str1.first != str2.first || str1.last != str2.last) @@ -610,7 +610,7 @@ public static bool ValidateStringStructSequentialAnsi(StringStructSequentialAnsi #endregion #region methods for StringStructSequentialUnicode struct - + public static StringStructSequentialUnicode NewStringStructSequentialUnicode(string first, string last) { StringStructSequentialUnicode s7 = new StringStructSequentialUnicode(); @@ -619,13 +619,13 @@ public static StringStructSequentialUnicode NewStringStructSequentialUnicode(str return s7; } - + public static void PrintStringStructSequentialUnicode(StringStructSequentialUnicode str1, string name) { Console.WriteLine("\t{0}.first = {1}", name, str1.first); Console.WriteLine("\t{0}.last = {1}", name, str1.last); } - + public static bool ValidateStringStructSequentialUnicode(StringStructSequentialUnicode str1, StringStructSequentialUnicode str2, string methodName) { if (str1.first != str2.first || str1.last != str2.last) @@ -647,7 +647,7 @@ public static bool ValidateStringStructSequentialUnicode(StringStructSequentialU #endregion #region methods for S8 struct - + public static S8 NewS8(string name, bool gender, UInt16 jobNum, int i32, uint ui32, sbyte mySByte) { S8 s8 = new S8(); @@ -659,7 +659,7 @@ public static S8 NewS8(string name, bool gender, UInt16 jobNum, int i32, uint ui s8.mySByte = mySByte; return s8; } - + public static void PrintS8(S8 str1, string name) { Console.WriteLine("\t{0}.name = {1}", name, str1.name); @@ -669,7 +669,7 @@ public static void PrintS8(S8 str1, string name) Console.WriteLine("\t{0}.ui32 = {1}", name, str1.ui32); Console.WriteLine("\t{0}.mySByte = {1}", name, str1.mySByte); } - + public static bool ValidateS8(S8 str1, S8 str2, string methodName) { if (str1.name != str2.name || str1.gender != str2.gender || @@ -691,7 +691,7 @@ public static bool ValidateS8(S8 str1, S8 str2, string methodName) #endregion #region methods for S9 struct - + public static S9 NewS9(int i32, TestDelegate1 testDel1) { S9 s9 = new S9(); @@ -699,7 +699,7 @@ public static S9 NewS9(int i32, TestDelegate1 testDel1) s9.myDelegate1 = testDel1; return s9; } - + public static bool ValidateS9(S9 str1, S9 str2, string methodName) { if (str1.i32 != str2.i32 || str1.myDelegate1 != str2.myDelegate1) @@ -719,31 +719,31 @@ public static bool ValidateS9(S9 str1, S9 str2, string methodName) #endregion - #region methods for IncludeOuterIntergerStructSequential struct - - public static IncludeOuterIntergerStructSequential NewIncludeOuterIntergerStructSequential(int i321, int i322) + #region methods for IncludeOuterIntegerStructSequential struct + + public static IncludeOuterIntegerStructSequential NewIncludeOuterIntegerStructSequential(int i321, int i322) { - IncludeOuterIntergerStructSequential s10 = new IncludeOuterIntergerStructSequential(); + IncludeOuterIntegerStructSequential s10 = new IncludeOuterIntegerStructSequential(); s10.s.s_int.i = i321; s10.s.i = i322; return s10; } - - public static void PrintIncludeOuterIntergerStructSequential(IncludeOuterIntergerStructSequential str1, string name) + + public static void PrintIncludeOuterIntegerStructSequential(IncludeOuterIntegerStructSequential str1, string name) { Console.WriteLine("\t{0}.s.s_int.i = {1}", name, str1.s.s_int.i); Console.WriteLine("\t{0}.s.i = {1}", name, str1.s.i); } - - public static bool ValidateIncludeOuterIntergerStructSequential(IncludeOuterIntergerStructSequential str1, IncludeOuterIntergerStructSequential str2, string methodName) + + public static bool ValidateIncludeOuterIntegerStructSequential(IncludeOuterIntegerStructSequential str1, IncludeOuterIntegerStructSequential str2, string methodName) { if (str1.s.s_int.i != str2.s.s_int.i || str1.s.i != str2.s.i) { Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); Console.WriteLine("\tThe Actual is..."); - PrintIncludeOuterIntergerStructSequential(str1, str1.ToString()); + PrintIncludeOuterIntegerStructSequential(str1, str1.ToString()); Console.WriteLine("\tThe Expected is..."); - PrintIncludeOuterIntergerStructSequential(str2, str2.ToString()); + PrintIncludeOuterIntegerStructSequential(str2, str2.ToString()); return false; } else @@ -756,13 +756,13 @@ public static bool ValidateIncludeOuterIntergerStructSequential(IncludeOuterInte #endregion #region methods for S11 struct - + unsafe public static void PrintS11(S11 str1, string name) { Console.WriteLine("\t{0}.i32 = {1}", name, (int)(str1.i32)); Console.WriteLine("\t{0}.i = {1}", name, str1.i); } - + unsafe public static S11 NewS11(int* i32, int i) { S11 s11 = new S11(); @@ -770,7 +770,7 @@ unsafe public static S11 NewS11(int* i32, int i) s11.i = i; return s11; } - + unsafe public static bool ValidateS11(S11 str1, S11 str2, string methodName) { if (str1.i32 != str2.i32 || str1.i != str2.i) @@ -789,7 +789,7 @@ unsafe public static bool ValidateS11(S11 str1, S11 str2, string methodName) #endregion #region methods for U struct - + public static U NewU(int i32, uint ui32, IntPtr iPtr, UIntPtr uiPtr, short s, ushort us, byte b, sbyte sb, long l, ulong ul, float f, double d) { U u = new U(); @@ -808,7 +808,7 @@ public static U NewU(int i32, uint ui32, IntPtr iPtr, UIntPtr uiPtr, short s, us return u; } - + public static void PrintU(U str1, string name) { Console.WriteLine("\t{0}.i32 = {1}", name, str1.i32); @@ -824,7 +824,7 @@ public static void PrintU(U str1, string name) Console.WriteLine("\t{0}.f = {1}", name, str1.f); Console.WriteLine("\t{0}.d = {1}", name, str1.d); } - + public static bool ValidateU(U str1, U str2, string methodName) { if (str1.i32 != str2.i32 || str1.ui32 != str2.ui32 || str1.iPtr != str2.iPtr || @@ -846,7 +846,7 @@ public static bool ValidateU(U str1, U str2, string methodName) #endregion #region methods for ByteStructPack2Explicit struct - + public static ByteStructPack2Explicit NewByteStructPack2Explicit(byte b1, byte b2) { ByteStructPack2Explicit u1 = new ByteStructPack2Explicit(); @@ -855,13 +855,13 @@ public static ByteStructPack2Explicit NewByteStructPack2Explicit(byte b1, byte b return u1; } - + public static void PrintByteStructPack2Explicit(ByteStructPack2Explicit str1, string name) { Console.WriteLine("\t{0}.b1 = {1}", name, str1.b1); Console.WriteLine("\t{0}.b2 = {1}", name, str1.b2); } - + public static bool ValidateByteStructPack2Explicit(ByteStructPack2Explicit str1, ByteStructPack2Explicit str2, string methodName) { if (str1.b1 != str2.b1 || str1.b2 != str2.b2) @@ -883,7 +883,7 @@ public static bool ValidateByteStructPack2Explicit(ByteStructPack2Explicit str1, #endregion #region methods for ShortStructPack4Explicit struct - + public static ShortStructPack4Explicit NewShortStructPack4Explicit(short s1, short s2) { ShortStructPack4Explicit u2 = new ShortStructPack4Explicit(); @@ -920,7 +920,7 @@ public static bool ValidateShortStructPack4Explicit(ShortStructPack4Explicit str #endregion #region methods for IntStructPack8Explicit struct - + public static IntStructPack8Explicit NewIntStructPack8Explicit(int i1, int i2) { IntStructPack8Explicit u3 = new IntStructPack8Explicit(); @@ -957,7 +957,7 @@ public static bool ValidateIntStructPack8Explicit(IntStructPack8Explicit str1, I #endregion #region methods for LongStructPack16Explicit struct - + public static LongStructPack16Explicit NewLongStructPack16Explicit(long l1, long l2) { LongStructPack16Explicit u4 = new LongStructPack16Explicit(); @@ -966,13 +966,13 @@ public static LongStructPack16Explicit NewLongStructPack16Explicit(long l1, long return u4; } - + public static void PrintLongStructPack16Explicit(LongStructPack16Explicit str1, string name) { Console.WriteLine("\t{0}.l1 = {1}", name, str1.l1); Console.WriteLine("\t{0}.l2 = {1}", name, str1.l2); } - + public static bool ValidateLongStructPack16Explicit(LongStructPack16Explicit str1, LongStructPack16Explicit str2, string methodName) { if (str1.l1 != str2.l1 || str1.l2 != str2.l2) @@ -1028,27 +1028,27 @@ public static bool ValidateByteStruct3Byte(ByteStruct3Byte str1, ByteStruct3Byte } #endregion - #region methods for IntergerStructSequential struct - public static IntergerStructSequential NewIntergerStructSequential(int i1) + #region methods for IntegerStructSequential struct + public static IntegerStructSequential NewIntegerStructSequential(int i1) { - IntergerStructSequential u1 = new IntergerStructSequential(); + IntegerStructSequential u1 = new IntegerStructSequential(); u1.i = i1; return u1; } - public static void PrintIntergerStructSequential(IntergerStructSequential str1, string name) + public static void PrintIntegerStructSequential(IntegerStructSequential str1, string name) { Console.WriteLine("\t{0}.i = {1}", name, str1.i); } - public static bool ValidateIntergerStructSequential(IntergerStructSequential str1, IntergerStructSequential str2, string methodName) + public static bool ValidateIntegerStructSequential(IntegerStructSequential str1, IntegerStructSequential str2, string methodName) { if (str1.i != str2.i) { Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected."); Console.WriteLine("\tThe Actual is..."); - PrintIntergerStructSequential(str1, str1.ToString()); + PrintIntegerStructSequential(str1, str1.ToString()); Console.WriteLine("\tThe Expected is..."); - PrintIntergerStructSequential(str2, str2.ToString()); + PrintIntegerStructSequential(str2, str2.ToString()); return false; } else @@ -1083,11 +1083,11 @@ public static class Logging #if (!WIN_8_P) static TextWriter loggingFile = null; -#endif +#endif public static void SetConsole(string fileName) { -#if (!WIN_8_P) +#if (!WIN_8_P) FileStream fs = new FileStream(fileName, FileMode.Append, FileAccess.Write, FileShare.ReadWrite); loggingFile = new StreamWriter(fs, Encoding.Unicode); Console.SetOut(loggingFile); diff --git a/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/DelegatePInvoke/DelegatePInvokeTest.cs b/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/DelegatePInvoke/DelegatePInvokeTest.cs index c2b3e36749b2d..33b897d58eba7 100644 --- a/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/DelegatePInvoke/DelegatePInvokeTest.cs +++ b/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/DelegatePInvoke/DelegatePInvokeTest.cs @@ -28,7 +28,7 @@ enum StructID StringStructSequentialUnicodeId, S8Id, S9Id, - IncludeOuterIntergerStructSequentialId, + IncludeOuterIntegerStructSequentialId, S11Id, ComplexStructId } @@ -610,29 +610,29 @@ private static void testMethod(S9 s9) #endregion - #region Methods for the struct IncludeOuterIntergerStructSequential declaration + #region Methods for the struct IncludeOuterIntegerStructSequential declaration #region PassByRef //For Delegate Pinvoke ByRef [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool IncludeOuterIntergerStructSequentialByRefDelegateCdecl([In, Out]ref IncludeOuterIntergerStructSequential argStr); + public delegate bool IncludeOuterIntegerStructSequentialByRefDelegateCdecl([In, Out]ref IncludeOuterIntegerStructSequential argStr); [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool IncludeOuterIntergerStructSequentialByRefDelegateStdCall([In, Out]ref IncludeOuterIntergerStructSequential argStr); + public delegate bool IncludeOuterIntegerStructSequentialByRefDelegateStdCall([In, Out]ref IncludeOuterIntegerStructSequential argStr); //Pinvoke,cdecl [DllImport("SeqPInvokeNative", CallingConvention = CallingConvention.Cdecl)] - public static extern bool MarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl([In, Out]ref IncludeOuterIntergerStructSequential argStr); + public static extern bool MarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl([In, Out]ref IncludeOuterIntegerStructSequential argStr); //Delegate PInvoke,cdecl [DllImport("SeqPInvokeNative", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.FunctionPtr)] - public static extern IncludeOuterIntergerStructSequentialByRefDelegateCdecl Get_MarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl_FuncPtr(); + public static extern IncludeOuterIntegerStructSequentialByRefDelegateCdecl Get_MarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl_FuncPtr(); //Pinvoke,stdcall [DllImport("SeqPInvokeNative", CallingConvention = CallingConvention.StdCall)] - public static extern bool MarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall([In, Out]ref IncludeOuterIntergerStructSequential argStr); + public static extern bool MarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall([In, Out]ref IncludeOuterIntegerStructSequential argStr); //Delegate PInvoke,stdcall [DllImport("SeqPInvokeNative", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.FunctionPtr)] - public static extern IncludeOuterIntergerStructSequentialByRefDelegateStdCall Get_MarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall_FuncPtr(); + public static extern IncludeOuterIntegerStructSequentialByRefDelegateStdCall Get_MarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall_FuncPtr(); #endregion @@ -640,23 +640,23 @@ private static void testMethod(S9 s9) //For Delegate Pinvoke ByVal [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool IncludeOuterIntergerStructSequentialByValDelegateCdecl([In, Out] IncludeOuterIntergerStructSequential argStr); + public delegate bool IncludeOuterIntegerStructSequentialByValDelegateCdecl([In, Out] IncludeOuterIntegerStructSequential argStr); [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool IncludeOuterIntergerStructSequentialByValDelegateStdCall([In, Out] IncludeOuterIntergerStructSequential argStr); + public delegate bool IncludeOuterIntegerStructSequentialByValDelegateStdCall([In, Out] IncludeOuterIntegerStructSequential argStr); //Pinvoke,cdecl [DllImport("SeqPInvokeNative", CallingConvention = CallingConvention.Cdecl)] - public static extern bool MarshalStructIncludeOuterIntergerStructSequentialByVal_Cdecl([In, Out] IncludeOuterIntergerStructSequential argStr); + public static extern bool MarshalStructIncludeOuterIntegerStructSequentialByVal_Cdecl([In, Out] IncludeOuterIntegerStructSequential argStr); //Delegate PInvoke,cdecl [DllImport("SeqPInvokeNative", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.FunctionPtr)] - public static extern IncludeOuterIntergerStructSequentialByValDelegateCdecl Get_MarshalStructIncludeOuterIntergerStructSequentialByVal_Cdecl_FuncPtr(); + public static extern IncludeOuterIntegerStructSequentialByValDelegateCdecl Get_MarshalStructIncludeOuterIntegerStructSequentialByVal_Cdecl_FuncPtr(); //Pinvoke,stdcall [DllImport("SeqPInvokeNative", CallingConvention = CallingConvention.StdCall)] - public static extern bool MarshalStructIncludeOuterIntergerStructSequentialByVal_StdCall([In, Out] IncludeOuterIntergerStructSequential argStr); + public static extern bool MarshalStructIncludeOuterIntegerStructSequentialByVal_StdCall([In, Out] IncludeOuterIntegerStructSequential argStr); //Delegate PInvoke,stdcall [DllImport("SeqPInvokeNative", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.FunctionPtr)] - public static extern IncludeOuterIntergerStructSequentialByValDelegateStdCall Get_MarshalStructIncludeOuterIntergerStructSequentialByVal_StdCall_FuncPtr(); + public static extern IncludeOuterIntegerStructSequentialByValDelegateStdCall Get_MarshalStructIncludeOuterIntegerStructSequentialByVal_StdCall_FuncPtr(); #endregion @@ -883,14 +883,14 @@ unsafe private static void TestMethod_DelegatePInvoke_MarshalByRef_Cdecl(StructI Assert.True(caller12(ref sourceS9)); Assert.True(Helper.ValidateS9(sourceS9, changeS9, "DelegatePInvoke_MarshalStructS9ByRef_Cdecl")); break; - case StructID.IncludeOuterIntergerStructSequentialId: - IncludeOuterIntergerStructSequential sourceIncludeOuterIntergerStructSequential = Helper.NewIncludeOuterIntergerStructSequential(32, 32); - IncludeOuterIntergerStructSequential changeIncludeOuterIntergerStructSequential = Helper.NewIncludeOuterIntergerStructSequential(64, 64); - Console.WriteLine("Calling DelegatePInvoke_MarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl..."); - IncludeOuterIntergerStructSequentialByRefDelegateCdecl caller13 = Get_MarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl_FuncPtr(); - Assert.True(caller13(ref sourceIncludeOuterIntergerStructSequential)); - Assert.True(Helper.ValidateIncludeOuterIntergerStructSequential(sourceIncludeOuterIntergerStructSequential, - changeIncludeOuterIntergerStructSequential, "DelegatePInvoke_MarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl")); + case StructID.IncludeOuterIntegerStructSequentialId: + IncludeOuterIntegerStructSequential sourceIncludeOuterIntegerStructSequential = Helper.NewIncludeOuterIntegerStructSequential(32, 32); + IncludeOuterIntegerStructSequential changeIncludeOuterIntegerStructSequential = Helper.NewIncludeOuterIntegerStructSequential(64, 64); + Console.WriteLine("Calling DelegatePInvoke_MarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl..."); + IncludeOuterIntegerStructSequentialByRefDelegateCdecl caller13 = Get_MarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl_FuncPtr(); + Assert.True(caller13(ref sourceIncludeOuterIntegerStructSequential)); + Assert.True(Helper.ValidateIncludeOuterIntegerStructSequential(sourceIncludeOuterIntegerStructSequential, + changeIncludeOuterIntegerStructSequential, "DelegatePInvoke_MarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl")); break; case StructID.S11Id: S11 sourceS11 = Helper.NewS11((int*)(32), 32); @@ -1025,14 +1025,14 @@ unsafe private static void TestMethod_DelegatePInvoke_MarshalByRef_StdCall(Struc Assert.True(caller12(ref sourceS9)); Assert.True(Helper.ValidateS9(sourceS9, changeS9, "DelegatePInvoke_MarshalStructS9ByRef_StdCall")); break; - case StructID.IncludeOuterIntergerStructSequentialId: - IncludeOuterIntergerStructSequential sourceIncludeOuterIntergerStructSequential = Helper.NewIncludeOuterIntergerStructSequential(32, 32); - IncludeOuterIntergerStructSequential changeIncludeOuterIntergerStructSequential = Helper.NewIncludeOuterIntergerStructSequential(64, 64); - Console.WriteLine("Calling DelegatePInvoke_MarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall..."); - IncludeOuterIntergerStructSequentialByRefDelegateStdCall caller13 = Get_MarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall_FuncPtr(); - Assert.True(caller13(ref sourceIncludeOuterIntergerStructSequential)); - Assert.True(Helper.ValidateIncludeOuterIntergerStructSequential(sourceIncludeOuterIntergerStructSequential, - changeIncludeOuterIntergerStructSequential, "DelegatePInvoke_MarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall")); + case StructID.IncludeOuterIntegerStructSequentialId: + IncludeOuterIntegerStructSequential sourceIncludeOuterIntegerStructSequential = Helper.NewIncludeOuterIntegerStructSequential(32, 32); + IncludeOuterIntegerStructSequential changeIncludeOuterIntegerStructSequential = Helper.NewIncludeOuterIntegerStructSequential(64, 64); + Console.WriteLine("Calling DelegatePInvoke_MarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall..."); + IncludeOuterIntegerStructSequentialByRefDelegateStdCall caller13 = Get_MarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall_FuncPtr(); + Assert.True(caller13(ref sourceIncludeOuterIntegerStructSequential)); + Assert.True(Helper.ValidateIncludeOuterIntegerStructSequential(sourceIncludeOuterIntegerStructSequential, + changeIncludeOuterIntegerStructSequential, "DelegatePInvoke_MarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall")); break; case StructID.S11Id: S11 sourceS11 = Helper.NewS11((int*)(32), 32); @@ -1167,14 +1167,14 @@ unsafe private static void TestMethod_DelegatePInvoke_MarshalByVal_Cdecl(StructI Assert.True(caller12(sourceS9)); Assert.True(Helper.ValidateS9(sourceS9, cloneS9, "DelegatePInvoke_MarshalStructS9ByVal_Cdecl")); break; - case StructID.IncludeOuterIntergerStructSequentialId: - IncludeOuterIntergerStructSequential sourceIncludeOuterIntergerStructSequential = Helper.NewIncludeOuterIntergerStructSequential(32, 32); - IncludeOuterIntergerStructSequential cloneIncludeOuterIntergerStructSequential = Helper.NewIncludeOuterIntergerStructSequential(32, 32); - Console.WriteLine("Calling DelegatePInvoke_MarshalStructIncludeOuterIntergerStructSequentialByVal_Cdecl..."); - IncludeOuterIntergerStructSequentialByValDelegateCdecl caller13 = Get_MarshalStructIncludeOuterIntergerStructSequentialByVal_Cdecl_FuncPtr(); - Assert.True(caller13(sourceIncludeOuterIntergerStructSequential)); - Assert.True(Helper.ValidateIncludeOuterIntergerStructSequential(sourceIncludeOuterIntergerStructSequential, - cloneIncludeOuterIntergerStructSequential, "DelegatePInvoke_MarshalStructIncludeOuterIntergerStructSequentialByVal_Cdecl")); + case StructID.IncludeOuterIntegerStructSequentialId: + IncludeOuterIntegerStructSequential sourceIncludeOuterIntegerStructSequential = Helper.NewIncludeOuterIntegerStructSequential(32, 32); + IncludeOuterIntegerStructSequential cloneIncludeOuterIntegerStructSequential = Helper.NewIncludeOuterIntegerStructSequential(32, 32); + Console.WriteLine("Calling DelegatePInvoke_MarshalStructIncludeOuterIntegerStructSequentialByVal_Cdecl..."); + IncludeOuterIntegerStructSequentialByValDelegateCdecl caller13 = Get_MarshalStructIncludeOuterIntegerStructSequentialByVal_Cdecl_FuncPtr(); + Assert.True(caller13(sourceIncludeOuterIntegerStructSequential)); + Assert.True(Helper.ValidateIncludeOuterIntegerStructSequential(sourceIncludeOuterIntegerStructSequential, + cloneIncludeOuterIntegerStructSequential, "DelegatePInvoke_MarshalStructIncludeOuterIntegerStructSequentialByVal_Cdecl")); break; case StructID.S11Id: S11 sourceS11 = Helper.NewS11((int*)(32), 32); @@ -1309,14 +1309,14 @@ unsafe private static void TestMethod_DelegatePInvoke_MarshalByVal_StdCall(Struc Assert.True(caller12(sourceS9)); Assert.True(Helper.ValidateS9(sourceS9, cloneS9, "DelegatePInvoke_MarshalStructS9ByVal_StdCall")); break; - case StructID.IncludeOuterIntergerStructSequentialId: - IncludeOuterIntergerStructSequential sourceIncludeOuterIntergerStructSequential = Helper.NewIncludeOuterIntergerStructSequential(32, 32); - IncludeOuterIntergerStructSequential cloneIncludeOuterIntergerStructSequential = Helper.NewIncludeOuterIntergerStructSequential(32, 32); - Console.WriteLine("Calling DelegatePInvoke_MarshalStructIncludeOuterIntergerStructSequentialByVal_StdCall..."); - IncludeOuterIntergerStructSequentialByValDelegateStdCall caller13 = Get_MarshalStructIncludeOuterIntergerStructSequentialByVal_StdCall_FuncPtr(); - Assert.True(caller13(sourceIncludeOuterIntergerStructSequential)); - Assert.True(Helper.ValidateIncludeOuterIntergerStructSequential(sourceIncludeOuterIntergerStructSequential, - cloneIncludeOuterIntergerStructSequential, "DelegatePInvoke_MarshalStructIncludeOuterIntergerStructSequentialByVal_StdCall")); + case StructID.IncludeOuterIntegerStructSequentialId: + IncludeOuterIntegerStructSequential sourceIncludeOuterIntegerStructSequential = Helper.NewIncludeOuterIntegerStructSequential(32, 32); + IncludeOuterIntegerStructSequential cloneIncludeOuterIntegerStructSequential = Helper.NewIncludeOuterIntegerStructSequential(32, 32); + Console.WriteLine("Calling DelegatePInvoke_MarshalStructIncludeOuterIntegerStructSequentialByVal_StdCall..."); + IncludeOuterIntegerStructSequentialByValDelegateStdCall caller13 = Get_MarshalStructIncludeOuterIntegerStructSequentialByVal_StdCall_FuncPtr(); + Assert.True(caller13(sourceIncludeOuterIntegerStructSequential)); + Assert.True(Helper.ValidateIncludeOuterIntegerStructSequential(sourceIncludeOuterIntegerStructSequential, + cloneIncludeOuterIntegerStructSequential, "DelegatePInvoke_MarshalStructIncludeOuterIntegerStructSequentialByVal_StdCall")); break; case StructID.S11Id: S11 sourceS11 = Helper.NewS11((int*)(32), 32); @@ -1349,7 +1349,7 @@ unsafe private static void Run_TestMethod_DelegatePInvoke_MarshalByRef_Cdecl() TestMethod_DelegatePInvoke_MarshalByRef_Cdecl(StructID.StringStructSequentialUnicodeId); TestMethod_DelegatePInvoke_MarshalByRef_Cdecl(StructID.S8Id); TestMethod_DelegatePInvoke_MarshalByRef_Cdecl(StructID.S9Id); - TestMethod_DelegatePInvoke_MarshalByRef_Cdecl(StructID.IncludeOuterIntergerStructSequentialId); + TestMethod_DelegatePInvoke_MarshalByRef_Cdecl(StructID.IncludeOuterIntegerStructSequentialId); TestMethod_DelegatePInvoke_MarshalByRef_Cdecl(StructID.S11Id); } @@ -1367,7 +1367,7 @@ unsafe private static void Run_TestMethod_DelegatePInvoke_MarshalByRef_StdCall() TestMethod_DelegatePInvoke_MarshalByRef_StdCall(StructID.StringStructSequentialUnicodeId); TestMethod_DelegatePInvoke_MarshalByRef_StdCall(StructID.S8Id); TestMethod_DelegatePInvoke_MarshalByRef_StdCall(StructID.S9Id); - TestMethod_DelegatePInvoke_MarshalByRef_StdCall(StructID.IncludeOuterIntergerStructSequentialId); + TestMethod_DelegatePInvoke_MarshalByRef_StdCall(StructID.IncludeOuterIntegerStructSequentialId); TestMethod_DelegatePInvoke_MarshalByRef_StdCall(StructID.S11Id); } @@ -1389,7 +1389,7 @@ unsafe private static void Run_TestMethod_DelegatePInvoke_MarshalByVal_Cdecl() TestMethod_DelegatePInvoke_MarshalByVal_Cdecl(StructID.StringStructSequentialUnicodeId); TestMethod_DelegatePInvoke_MarshalByVal_Cdecl(StructID.S8Id); TestMethod_DelegatePInvoke_MarshalByVal_Cdecl(StructID.S9Id); - TestMethod_DelegatePInvoke_MarshalByVal_Cdecl(StructID.IncludeOuterIntergerStructSequentialId); + TestMethod_DelegatePInvoke_MarshalByVal_Cdecl(StructID.IncludeOuterIntegerStructSequentialId); TestMethod_DelegatePInvoke_MarshalByVal_Cdecl(StructID.S11Id); } @@ -1407,7 +1407,7 @@ unsafe private static void Run_TestMethod_DelegatePInvoke_MarshalByVal_StdCall() TestMethod_DelegatePInvoke_MarshalByVal_StdCall(StructID.StringStructSequentialUnicodeId); TestMethod_DelegatePInvoke_MarshalByVal_StdCall(StructID.S8Id); TestMethod_DelegatePInvoke_MarshalByVal_StdCall(StructID.S9Id); - TestMethod_DelegatePInvoke_MarshalByVal_StdCall(StructID.IncludeOuterIntergerStructSequentialId); + TestMethod_DelegatePInvoke_MarshalByVal_StdCall(StructID.IncludeOuterIntegerStructSequentialId); TestMethod_DelegatePInvoke_MarshalByVal_StdCall(StructID.S11Id); } diff --git a/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/ReversePInvoke/ReversePInvokeTest_.cs b/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/ReversePInvoke/ReversePInvokeTest_.cs index 3ef07668dd131..b5f213e0847fc 100644 --- a/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/ReversePInvoke/ReversePInvokeTest_.cs +++ b/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/ReversePInvoke/ReversePInvokeTest_.cs @@ -28,7 +28,7 @@ enum StructID StringStructSequentialUnicodeId, S8Id, S9Id, - IncludeOuterIntergerStructSequentialId, + IncludeOuterIntegerStructSequentialId, S11Id, ComplexStructId, ByteStruct3Byte @@ -1092,20 +1092,20 @@ private static bool TestMethodForStructS9_ReversePInvokeByVal_StdCall(S9 argstr) #endregion - #region Methods for the struct IncludeOuterIntergerStructSequential declaration + #region Methods for the struct IncludeOuterIntegerStructSequential declaration #region PassByRef //For Reverse Pinvoke ByRef [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate bool IncludeOuterIntergerStructSequentialByRefCdeclcaller([In, Out]ref IncludeOuterIntergerStructSequential argStr); - private static bool TestMethodForStructIncludeOuterIntergerStructSequential_ReversePInvokeByRef_Cdecl(ref IncludeOuterIntergerStructSequential argstr) + public delegate bool IncludeOuterIntegerStructSequentialByRefCdeclcaller([In, Out]ref IncludeOuterIntegerStructSequential argStr); + private static bool TestMethodForStructIncludeOuterIntegerStructSequential_ReversePInvokeByRef_Cdecl(ref IncludeOuterIntegerStructSequential argstr) { Console.WriteLine("ReversePinvoke,By Ref,Cdecl"); - IncludeOuterIntergerStructSequential changeIncludeOuterIntergerStructSequential = Helper.NewIncludeOuterIntergerStructSequential(64, 64); + IncludeOuterIntegerStructSequential changeIncludeOuterIntegerStructSequential = Helper.NewIncludeOuterIntegerStructSequential(64, 64); //Check the input - Assert.True(Helper.ValidateIncludeOuterIntergerStructSequential(argstr, - changeIncludeOuterIntergerStructSequential, "TestMethodForStructIncludeOuterIntergerStructSequential_ReversePInvokeByRef_Cdecl")); + Assert.True(Helper.ValidateIncludeOuterIntegerStructSequential(argstr, + changeIncludeOuterIntegerStructSequential, "TestMethodForStructIncludeOuterIntegerStructSequential_ReversePInvokeByRef_Cdecl")); //Chanage the value argstr.s.s_int.i = 32; argstr.s.i = 32; @@ -1113,14 +1113,14 @@ private static bool TestMethodForStructIncludeOuterIntergerStructSequential_Reve } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool IncludeOuterIntergerStructSequentialByRefStdCallcaller([In, Out]ref IncludeOuterIntergerStructSequential argStr); - private static bool TestMethodForStructIncludeOuterIntergerStructSequential_ReversePInvokeByRef_StdCall(ref IncludeOuterIntergerStructSequential argstr) + public delegate bool IncludeOuterIntegerStructSequentialByRefStdCallcaller([In, Out]ref IncludeOuterIntegerStructSequential argStr); + private static bool TestMethodForStructIncludeOuterIntegerStructSequential_ReversePInvokeByRef_StdCall(ref IncludeOuterIntegerStructSequential argstr) { Console.WriteLine("ReversePinvoke,By Ref,StdCall"); - IncludeOuterIntergerStructSequential changeIncludeOuterIntergerStructSequential = Helper.NewIncludeOuterIntergerStructSequential(64, 64); + IncludeOuterIntegerStructSequential changeIncludeOuterIntegerStructSequential = Helper.NewIncludeOuterIntegerStructSequential(64, 64); //Check the input - Assert.True(Helper.ValidateIncludeOuterIntergerStructSequential(argstr, - changeIncludeOuterIntergerStructSequential, "TestMethodForStructIncludeOuterIntergerStructSequential_ReversePInvokeByRef_Cdecl")); + Assert.True(Helper.ValidateIncludeOuterIntegerStructSequential(argstr, + changeIncludeOuterIntegerStructSequential, "TestMethodForStructIncludeOuterIntegerStructSequential_ReversePInvokeByRef_Cdecl")); //Chanage the value argstr.s.s_int.i = 32; argstr.s.i = 32; @@ -1129,10 +1129,10 @@ private static bool TestMethodForStructIncludeOuterIntergerStructSequential_Reve //Reverse Pinvoke,cdecl [DllImport("SeqPInvokeNative", CallingConvention = CallingConvention.Cdecl)] - public static extern bool DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl(IncludeOuterIntergerStructSequentialByRefCdeclcaller caller); + public static extern bool DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl(IncludeOuterIntegerStructSequentialByRefCdeclcaller caller); //Reverse Pinvoke,stdcall [DllImport("SeqPInvokeNative", CallingConvention = CallingConvention.StdCall)] - public static extern bool DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall(IncludeOuterIntergerStructSequentialByRefStdCallcaller caller); + public static extern bool DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall(IncludeOuterIntegerStructSequentialByRefStdCallcaller caller); #endregion @@ -1140,14 +1140,14 @@ private static bool TestMethodForStructIncludeOuterIntergerStructSequential_Reve //For Reverse Pinvoke ByVal [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate IncludeOuterIntergerStructSequential IncludeOuterIntergerStructSequentialByValCdeclcaller([In, Out] IncludeOuterIntergerStructSequential argStr); - private static IncludeOuterIntergerStructSequential TestMethodForStructIncludeOuterIntergerStructSequential_ReversePInvokeByVal_Cdecl(IncludeOuterIntergerStructSequential argstr) + public delegate IncludeOuterIntegerStructSequential IncludeOuterIntegerStructSequentialByValCdeclcaller([In, Out] IncludeOuterIntegerStructSequential argStr); + private static IncludeOuterIntegerStructSequential TestMethodForStructIncludeOuterIntegerStructSequential_ReversePInvokeByVal_Cdecl(IncludeOuterIntegerStructSequential argstr) { Console.WriteLine("ReversePinvoke,By Value,Cdecl"); - IncludeOuterIntergerStructSequential changeIncludeOuterIntergerStructSequential = Helper.NewIncludeOuterIntergerStructSequential(64, 64); + IncludeOuterIntegerStructSequential changeIncludeOuterIntegerStructSequential = Helper.NewIncludeOuterIntegerStructSequential(64, 64); //Check the input - Assert.True(Helper.ValidateIncludeOuterIntergerStructSequential(argstr, - changeIncludeOuterIntergerStructSequential, "TestMethodForStructIncludeOuterIntergerStructSequential_ReversePInvokeByVal_Cdecl")); + Assert.True(Helper.ValidateIncludeOuterIntegerStructSequential(argstr, + changeIncludeOuterIntegerStructSequential, "TestMethodForStructIncludeOuterIntegerStructSequential_ReversePInvokeByVal_Cdecl")); //Chanage the value argstr.s.s_int.i = 32; argstr.s.i = 32; @@ -1155,14 +1155,14 @@ private static IncludeOuterIntergerStructSequential TestMethodForStructIncludeOu } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IncludeOuterIntergerStructSequential IncludeOuterIntergerStructSequentialByValStdCallcaller([In, Out] IncludeOuterIntergerStructSequential argStr); - private static IncludeOuterIntergerStructSequential TestMethodForStructIncludeOuterIntergerStructSequential_ReversePInvokeByVal_StdCall(IncludeOuterIntergerStructSequential argstr) + public delegate IncludeOuterIntegerStructSequential IncludeOuterIntegerStructSequentialByValStdCallcaller([In, Out] IncludeOuterIntegerStructSequential argStr); + private static IncludeOuterIntegerStructSequential TestMethodForStructIncludeOuterIntegerStructSequential_ReversePInvokeByVal_StdCall(IncludeOuterIntegerStructSequential argstr) { Console.WriteLine("ReversePinvoke,By Value,StdCall"); - IncludeOuterIntergerStructSequential changeIncludeOuterIntergerStructSequential = Helper.NewIncludeOuterIntergerStructSequential(64, 64); + IncludeOuterIntegerStructSequential changeIncludeOuterIntegerStructSequential = Helper.NewIncludeOuterIntegerStructSequential(64, 64); //Check the input - Assert.True(Helper.ValidateIncludeOuterIntergerStructSequential(argstr, - changeIncludeOuterIntergerStructSequential, "TestMethodForStructIncludeOuterIntergerStructSequential_ReversePInvokeByVal_StdCall")); + Assert.True(Helper.ValidateIncludeOuterIntegerStructSequential(argstr, + changeIncludeOuterIntegerStructSequential, "TestMethodForStructIncludeOuterIntegerStructSequential_ReversePInvokeByVal_StdCall")); //Chanage the value argstr.s.s_int.i = 32; argstr.s.i = 32; @@ -1171,10 +1171,10 @@ private static IncludeOuterIntergerStructSequential TestMethodForStructIncludeOu //Reverse Pinvoke,cdecl [DllImport("SeqPInvokeNative", CallingConvention = CallingConvention.Cdecl)] - public static extern bool DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByVal_Cdecl(IncludeOuterIntergerStructSequentialByValCdeclcaller caller); + public static extern bool DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByVal_Cdecl(IncludeOuterIntegerStructSequentialByValCdeclcaller caller); //Reverse Pinvoke,stdcall [DllImport("SeqPInvokeNative", CallingConvention = CallingConvention.StdCall)] - public static extern bool DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByVal_StdCall(IncludeOuterIntergerStructSequentialByValStdCallcaller caller); + public static extern bool DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByVal_StdCall(IncludeOuterIntegerStructSequentialByValStdCallcaller caller); #endregion @@ -1412,28 +1412,28 @@ public static ByteStruct3Byte TestMethod_DoCallBack_MarshalStructByVal_ByteStruc //For Reverse Pinvoke ByVal [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate IntergerStructSequential IntergerStructSequentialByValCdeclcaller([In, Out] IntergerStructSequential argStr); - private static IntergerStructSequential TestMethodForStructIntergerStructSequential_ReversePInvokeByVal_Cdecl(IntergerStructSequential argstr) + public delegate IntegerStructSequential IntegerStructSequentialByValCdeclcaller([In, Out] IntegerStructSequential argStr); + private static IntegerStructSequential TestMethodForStructIntegerStructSequential_ReversePInvokeByVal_Cdecl(IntegerStructSequential argstr) { Console.WriteLine("ReversePinvoke,By Value,Cdecl"); - IntergerStructSequential changeIntergerStructSequential = Helper.NewIntergerStructSequential(64); + IntegerStructSequential changeIntegerStructSequential = Helper.NewIntegerStructSequential(64); //Check the input - Assert.True(Helper.ValidateIntergerStructSequential(argstr, - changeIntergerStructSequential, "TestMethodForStructIntergerStructSequential_ReversePInvokeByVal_Cdecl")); + Assert.True(Helper.ValidateIntegerStructSequential(argstr, + changeIntegerStructSequential, "TestMethodForStructIntegerStructSequential_ReversePInvokeByVal_Cdecl")); //Chanage the value argstr.i = 32; return argstr; } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntergerStructSequential IntergerStructSequentialByValStdCallcaller([In, Out] IntergerStructSequential argStr); - private static IntergerStructSequential TestMethodForStructIntergerStructSequential_ReversePInvokeByVal_StdCall(IntergerStructSequential argstr) + public delegate IntegerStructSequential IntegerStructSequentialByValStdCallcaller([In, Out] IntegerStructSequential argStr); + private static IntegerStructSequential TestMethodForStructIntegerStructSequential_ReversePInvokeByVal_StdCall(IntegerStructSequential argstr) { Console.WriteLine("ReversePinvoke,By Value,StdCall"); - IntergerStructSequential changeIntergerStructSequential = Helper.NewIntergerStructSequential(64); + IntegerStructSequential changeIntegerStructSequential = Helper.NewIntegerStructSequential(64); //Check the input - Assert.True(Helper.ValidateIntergerStructSequential(argstr, - changeIntergerStructSequential, "TestMethodForStructIntergerStructSequential_ReversePInvokeByVal_StdCall")); + Assert.True(Helper.ValidateIntegerStructSequential(argstr, + changeIntegerStructSequential, "TestMethodForStructIntegerStructSequential_ReversePInvokeByVal_StdCall")); //Chanage the value argstr.i = 32; return argstr; @@ -1441,10 +1441,10 @@ private static IntergerStructSequential TestMethodForStructIntergerStructSequent //Reverse Pinvoke,cdecl [DllImport("SeqPInvokeNative", CallingConvention = CallingConvention.Cdecl)] - public static extern bool DoCallBack_MarshalStructIntergerStructSequentialByVal_Cdecl(IntergerStructSequentialByValCdeclcaller caller); + public static extern bool DoCallBack_MarshalStructIntegerStructSequentialByVal_Cdecl(IntegerStructSequentialByValCdeclcaller caller); //Reverse Pinvoke,stdcall [DllImport("SeqPInvokeNative", CallingConvention = CallingConvention.StdCall)] - public static extern bool DoCallBack_MarshalStructIntergerStructSequentialByVal_StdCall(IntergerStructSequentialByValStdCallcaller caller); + public static extern bool DoCallBack_MarshalStructIntegerStructSequentialByVal_StdCall(IntegerStructSequentialByValStdCallcaller caller); #region Methods implementation @@ -1506,10 +1506,10 @@ private static void TestMethod_DoCallBack_MarshalStructByRef_Cdecl(StructID stru Console.WriteLine("Calling ReversePInvoke_MarshalStructS9ByRef_Cdecl..."); Assert.True(DoCallBack_MarshalStructS9ByRef_Cdecl(new S9ByRefCdeclcaller(TestMethodForStructS9_ReversePInvokeByRef_Cdecl))); break; - case StructID.IncludeOuterIntergerStructSequentialId: - Console.WriteLine("Calling ReversePInvoke_MarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl..."); - Assert.True(DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl( - new IncludeOuterIntergerStructSequentialByRefCdeclcaller(TestMethodForStructIncludeOuterIntergerStructSequential_ReversePInvokeByRef_Cdecl))); + case StructID.IncludeOuterIntegerStructSequentialId: + Console.WriteLine("Calling ReversePInvoke_MarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl..."); + Assert.True(DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl( + new IncludeOuterIntegerStructSequentialByRefCdeclcaller(TestMethodForStructIncludeOuterIntegerStructSequential_ReversePInvokeByRef_Cdecl))); break; case StructID.S11Id: Console.WriteLine("Calling ReversePInvoke_MarshalStructS11ByRef_Cdecl..."); @@ -1578,10 +1578,10 @@ private static void TestMethod_DoCallBack_MarshalStructByRef_StdCall(StructID st Console.WriteLine("Calling ReversePInvoke_MarshalStructS9ByRef_StdCall..."); Assert.True(DoCallBack_MarshalStructS9ByRef_StdCall(new S9ByRefStdCallcaller(TestMethodForStructS9_ReversePInvokeByRef_StdCall))); break; - case StructID.IncludeOuterIntergerStructSequentialId: - Console.WriteLine("Calling ReversePInvoke_MarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall..."); - Assert.True(DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall( - new IncludeOuterIntergerStructSequentialByRefStdCallcaller(TestMethodForStructIncludeOuterIntergerStructSequential_ReversePInvokeByRef_StdCall))); + case StructID.IncludeOuterIntegerStructSequentialId: + Console.WriteLine("Calling ReversePInvoke_MarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall..."); + Assert.True(DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall( + new IncludeOuterIntegerStructSequentialByRefStdCallcaller(TestMethodForStructIncludeOuterIntegerStructSequential_ReversePInvokeByRef_StdCall))); break; case StructID.S11Id: Console.WriteLine("Calling ReversePInvoke_MarshalStructS11ByRef_StdCall..."); @@ -1607,7 +1607,7 @@ private static void Run_TestMethod_DoCallBack_MarshalStructByRef_Cdecl() TestMethod_DoCallBack_MarshalStructByRef_Cdecl(StructID.StringStructSequentialUnicodeId); TestMethod_DoCallBack_MarshalStructByRef_Cdecl(StructID.S8Id); TestMethod_DoCallBack_MarshalStructByRef_Cdecl(StructID.S9Id); - TestMethod_DoCallBack_MarshalStructByRef_Cdecl(StructID.IncludeOuterIntergerStructSequentialId); + TestMethod_DoCallBack_MarshalStructByRef_Cdecl(StructID.IncludeOuterIntegerStructSequentialId); TestMethod_DoCallBack_MarshalStructByRef_Cdecl(StructID.S11Id); } @@ -1625,7 +1625,7 @@ private static void Run_TestMethod_DoCallBack_MarshalStructByRef_StdCall() TestMethod_DoCallBack_MarshalStructByRef_StdCall(StructID.StringStructSequentialUnicodeId); TestMethod_DoCallBack_MarshalStructByRef_StdCall(StructID.S8Id); TestMethod_DoCallBack_MarshalStructByRef_StdCall(StructID.S9Id); - TestMethod_DoCallBack_MarshalStructByRef_StdCall(StructID.IncludeOuterIntergerStructSequentialId); + TestMethod_DoCallBack_MarshalStructByRef_StdCall(StructID.IncludeOuterIntegerStructSequentialId); TestMethod_DoCallBack_MarshalStructByRef_StdCall(StructID.S11Id); } @@ -1687,10 +1687,10 @@ private static void TestMethod_DoCallBack_MarshalStructByVal_Cdecl(StructID stru Console.WriteLine("Calling ReversePInvoke_MarshalStructS9ByVal_Cdecl..."); Assert.True(DoCallBack_MarshalStructS9ByVal_Cdecl(new S9ByValCdeclcaller(TestMethodForStructS9_ReversePInvokeByVal_Cdecl))); break; - case StructID.IncludeOuterIntergerStructSequentialId: - Console.WriteLine("Calling ReversePInvoke_MarshalStructIncludeOuterIntergerStructSequentialByVal_Cdecl..."); - Assert.True(DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByVal_Cdecl( - new IncludeOuterIntergerStructSequentialByValCdeclcaller(TestMethodForStructIncludeOuterIntergerStructSequential_ReversePInvokeByVal_Cdecl))); + case StructID.IncludeOuterIntegerStructSequentialId: + Console.WriteLine("Calling ReversePInvoke_MarshalStructIncludeOuterIntegerStructSequentialByVal_Cdecl..."); + Assert.True(DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByVal_Cdecl( + new IncludeOuterIntegerStructSequentialByValCdeclcaller(TestMethodForStructIncludeOuterIntegerStructSequential_ReversePInvokeByVal_Cdecl))); break; case StructID.S11Id: Console.WriteLine("Calling ReversePInvoke_MarshalStructS11ByVal_Cdecl..."); @@ -1764,10 +1764,10 @@ private static void TestMethod_DoCallBack_MarshalStructByVal_StdCall(StructID st Console.WriteLine("Calling ReversePInvoke_MarshalStructS9ByVal_StdCall..."); Assert.True(DoCallBack_MarshalStructS9ByVal_StdCall(new S9ByValStdCallcaller(TestMethodForStructS9_ReversePInvokeByVal_StdCall))); break; - case StructID.IncludeOuterIntergerStructSequentialId: - Console.WriteLine("Calling ReversePInvoke_MarshalStructIncludeOuterIntergerStructSequentialByVal_StdCall..."); - Assert.True(DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByVal_StdCall( - new IncludeOuterIntergerStructSequentialByValStdCallcaller(TestMethodForStructIncludeOuterIntergerStructSequential_ReversePInvokeByVal_StdCall))); + case StructID.IncludeOuterIntegerStructSequentialId: + Console.WriteLine("Calling ReversePInvoke_MarshalStructIncludeOuterIntegerStructSequentialByVal_StdCall..."); + Assert.True(DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByVal_StdCall( + new IncludeOuterIntegerStructSequentialByValStdCallcaller(TestMethodForStructIncludeOuterIntegerStructSequential_ReversePInvokeByVal_StdCall))); break; case StructID.S11Id: Console.WriteLine("Calling ReversePInvoke_MarshalStructS11ByVal_StdCall..."); @@ -1798,7 +1798,7 @@ private static void Run_TestMethod_DoCallBack_MarshalStructByVal_Cdecl() TestMethod_DoCallBack_MarshalStructByVal_Cdecl(StructID.StringStructSequentialUnicodeId); TestMethod_DoCallBack_MarshalStructByVal_Cdecl(StructID.S8Id); TestMethod_DoCallBack_MarshalStructByVal_Cdecl(StructID.S9Id); - TestMethod_DoCallBack_MarshalStructByVal_Cdecl(StructID.IncludeOuterIntergerStructSequentialId); + TestMethod_DoCallBack_MarshalStructByVal_Cdecl(StructID.IncludeOuterIntegerStructSequentialId); TestMethod_DoCallBack_MarshalStructByVal_Cdecl(StructID.S11Id); // Windows X86 has a long standing X86_ONLY logic that causes 3, 5,6,7 byte structure returns to behave incorrectly. if ((RuntimeInformation.ProcessArchitecture != Architecture.X86) || !OperatingSystem.IsWindows()) @@ -1821,7 +1821,7 @@ private static void Run_TestMethod_DoCallBack_MarshalStructByVal_StdCall() TestMethod_DoCallBack_MarshalStructByVal_StdCall(StructID.StringStructSequentialUnicodeId); TestMethod_DoCallBack_MarshalStructByVal_StdCall(StructID.S8Id); TestMethod_DoCallBack_MarshalStructByVal_StdCall(StructID.S9Id); - TestMethod_DoCallBack_MarshalStructByVal_StdCall(StructID.IncludeOuterIntergerStructSequentialId); + TestMethod_DoCallBack_MarshalStructByVal_StdCall(StructID.IncludeOuterIntegerStructSequentialId); TestMethod_DoCallBack_MarshalStructByVal_StdCall(StructID.S11Id); // Windows X86 has a long standing X86_ONLY logic that causes 3, 5,6,7 byte structure returns to behave incorrectly. if ((RuntimeInformation.ProcessArchitecture != Architecture.X86) || !OperatingSystem.IsWindows()) diff --git a/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/SeqStructDelRevPInvokeNative.cpp b/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/SeqStructDelRevPInvokeNative.cpp index a2d9ba28f1d3e..d4be926abd532 100644 --- a/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/SeqStructDelRevPInvokeNative.cpp +++ b/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/SeqStructDelRevPInvokeNative.cpp @@ -25,7 +25,7 @@ struct ComplexStruct INT i; CHAR b; LPCSTR str; - //use this(padding), since in the Mac, it use 4bytes as struct pack(In windows, it is 8 bytes). + //use this(padding), since in the Mac, it use 4bytes as struct pack(In windows, it is 8 bytes). //if i dont add this. In Mac, it will try to replace the value of (pedding) with idata's value LPVOID padding;//padding ScriptParamType type; @@ -33,8 +33,8 @@ struct ComplexStruct extern "C" DLL_EXPORT BOOL _cdecl MarshalStructComplexStructByRef_Cdecl(ComplexStruct * pcs) -{ - //Check the Input +{ + //Check the Input if((321 != pcs->i)||(!pcs->b)||(0 != strcmp(pcs->str,"Managed"))||(123 != pcs->type.idata)||(0x120000 != (int)(LONG64)(pcs->type.udata.ptrdata))) { @@ -168,7 +168,7 @@ extern "C" DLL_EXPORT ComplexStructDelegatePInvokeByRefStdCallCaller __stdcall G //Passby value extern "C" DLL_EXPORT BOOL _cdecl MarshalStructComplexStructByVal_Cdecl(ComplexStruct cs) { - //Check the Input + //Check the Input if((321 != cs.i)||(!cs.b)||(0 != strcmp(cs.str,"Managed"))||(123 != cs.type.idata)||(0x120000 != (int)(LONG64)(cs.type.udata.ptrdata))) { @@ -355,7 +355,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructInnerSequentialByRe typedef BOOL (_cdecl *InnerSequentialDelegatePInvokeByRefCdeclCaller)(InnerSequential* pcs); extern "C" DLL_EXPORT InnerSequentialDelegatePInvokeByRefCdeclCaller _cdecl Get_MarshalStructInnerSequentialByRef_Cdecl_FuncPtr() { - return MarshalStructInnerSequentialByRef_Cdecl; + return MarshalStructInnerSequentialByRef_Cdecl; } typedef BOOL (__stdcall *InnerSequentialDelegatePInvokeByRefStdCallCaller)(InnerSequential* pcs); @@ -368,7 +368,7 @@ extern "C" DLL_EXPORT InnerSequentialDelegatePInvokeByRefStdCallCaller __stdcall //Passby value extern "C" DLL_EXPORT BOOL _cdecl MarshalStructInnerSequentialByVal_Cdecl(InnerSequential argstr) { - //Check the Input + //Check the Input if(!IsCorrectInnerSequential(&argstr)) { printf("\tMarshalStructInnerSequentialByVal_Cdecl: InnerSequential param not as expected\n"); @@ -392,7 +392,7 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructInnerSequentialByVal_Cdecl(InnerS extern "C" DLL_EXPORT BOOL __stdcall MarshalStructInnerSequentialByVal_StdCall(InnerSequential argstr) { - //Check the Input + //Check the Input if(!IsCorrectInnerSequential(&argstr)) { printf("\tMarshalStructInnerSequentialByVal_StdCall: InnerSequential param not as expected\n"); @@ -593,7 +593,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructInnerArraySequentia typedef BOOL (_cdecl *InnerArraySequentialDelegatePInvokeByRefCdeclCaller)(InnerArraySequential* pcs); extern "C" DLL_EXPORT InnerArraySequentialDelegatePInvokeByRefCdeclCaller _cdecl Get_MarshalStructInnerArraySequentialByRef_Cdecl_FuncPtr() { - return MarshalStructInnerArraySequentialByRef_Cdecl; + return MarshalStructInnerArraySequentialByRef_Cdecl; } typedef BOOL (__stdcall *InnerArraySequentialDelegatePInvokeByRefStdCallCaller)(InnerArraySequential* pcs); @@ -606,7 +606,7 @@ extern "C" DLL_EXPORT InnerArraySequentialDelegatePInvokeByRefStdCallCaller __st //Passby value extern "C" DLL_EXPORT BOOL _cdecl MarshalStructInnerArraySequentialByVal_Cdecl(InnerArraySequential argstr) { - //Check the Input + //Check the Input if(!IsCorrectInnerArraySequential(&argstr)) { printf("\tMarshalStructInnerArraySequentialByVal_Cdecl: InnerArraySequential param not as expected\n"); @@ -637,7 +637,7 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructInnerArraySequentialByVal_Cdecl(I extern "C" DLL_EXPORT BOOL __stdcall MarshalStructInnerArraySequentialByVal_StdCall(InnerArraySequential argstr) { - //Check the Input + //Check the Input if(!IsCorrectInnerArraySequential(&argstr)) { printf("\tMarshalStructInnerArraySequentialByVal_StdCall: InnerArraySequential param not as expected\n"); @@ -855,7 +855,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructCharSetAnsiSequenti typedef BOOL (_cdecl *CharSetAnsiSequentialDelegatePInvokeByRefCdeclCaller)(CharSetAnsiSequential* pcs); extern "C" DLL_EXPORT CharSetAnsiSequentialDelegatePInvokeByRefCdeclCaller _cdecl Get_MarshalStructCharSetAnsiSequentialByRef_Cdecl_FuncPtr() { - return MarshalStructCharSetAnsiSequentialByRef_Cdecl; + return MarshalStructCharSetAnsiSequentialByRef_Cdecl; } typedef BOOL (__stdcall *CharSetAnsiSequentialDelegatePInvokeByRefStdCallCaller)(CharSetAnsiSequential* pcs); @@ -868,7 +868,7 @@ extern "C" DLL_EXPORT CharSetAnsiSequentialDelegatePInvokeByRefStdCallCaller __s //Passby value extern "C" DLL_EXPORT BOOL _cdecl MarshalStructCharSetAnsiSequentialByVal_Cdecl(CharSetAnsiSequential argstr) { - //Check the Input + //Check the Input if(!IsCorrectCharSetAnsiSequential(&argstr)) { printf("\tMarshalStructCharSetAnsiSequentialByVal_Cdecl: CharSetAnsiSequential param not as expected\n"); @@ -894,7 +894,7 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructCharSetAnsiSequentialByVal_Cdecl( extern "C" DLL_EXPORT BOOL __stdcall MarshalStructCharSetAnsiSequentialByVal_StdCall(CharSetAnsiSequential argstr) { - //Check the Input + //Check the Input if(!IsCorrectCharSetAnsiSequential(&argstr)) { printf("\tMarshalStructCharSetAnsiSequentialByVal_StdCall: CharSetAnsiSequential param not as expected\n"); @@ -1095,7 +1095,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructCharSetUnicodeSeque typedef BOOL (_cdecl *CharSetUnicodeSequentialDelegatePInvokeByRefCdeclCaller)(CharSetUnicodeSequential* pcs); extern "C" DLL_EXPORT CharSetUnicodeSequentialDelegatePInvokeByRefCdeclCaller _cdecl Get_MarshalStructCharSetUnicodeSequentialByRef_Cdecl_FuncPtr() { - return MarshalStructCharSetUnicodeSequentialByRef_Cdecl; + return MarshalStructCharSetUnicodeSequentialByRef_Cdecl; } typedef BOOL (__stdcall *CharSetUnicodeSequentialDelegatePInvokeByRefStdCallCaller)(CharSetUnicodeSequential* pcs); @@ -1108,7 +1108,7 @@ extern "C" DLL_EXPORT CharSetUnicodeSequentialDelegatePInvokeByRefStdCallCaller //Passby value extern "C" DLL_EXPORT BOOL _cdecl MarshalStructCharSetUnicodeSequentialByVal_Cdecl(CharSetUnicodeSequential argstr) { - //Check the Input + //Check the Input if(!IsCorrectCharSetUnicodeSequential(&argstr)) { printf("\tMarshalStructCharSetUnicodeSequentialByVal_Cdecl: CharSetUnicodeSequential param not as expected\n"); @@ -1135,7 +1135,7 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructCharSetUnicodeSequentialByVal_Cde extern "C" DLL_EXPORT BOOL __stdcall MarshalStructCharSetUnicodeSequentialByVal_StdCall(CharSetUnicodeSequential argstr) { - //Check the Input + //Check the Input if(!IsCorrectCharSetUnicodeSequential(&argstr)) { printf("\tMarshalStructCharSetUnicodeSequentialByVal_StdCall: CharSetUnicodeSequential param not as expected\n"); @@ -1335,7 +1335,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructNumberSequentialByR typedef BOOL (_cdecl *NumberSequentialDelegatePInvokeByRefCdeclCaller)(NumberSequential* pcs); extern "C" DLL_EXPORT NumberSequentialDelegatePInvokeByRefCdeclCaller _cdecl Get_MarshalStructNumberSequentialByRef_Cdecl_FuncPtr() { - return MarshalStructNumberSequentialByRef_Cdecl; + return MarshalStructNumberSequentialByRef_Cdecl; } typedef BOOL (__stdcall *NumberSequentialDelegatePInvokeByRefStdCallCaller)(NumberSequential* pcs); @@ -1348,7 +1348,7 @@ extern "C" DLL_EXPORT NumberSequentialDelegatePInvokeByRefStdCallCaller __stdcal //Passby value extern "C" DLL_EXPORT BOOL _cdecl MarshalStructNumberSequentialByVal_Cdecl(NumberSequential argstr) { - //Check the Input + //Check the Input if(!IsCorrectNumberSequential(&argstr)) { printf("\tMarshalStructNumberSequentialByVal_Cdecl: NumberSequential param not as expected\n"); @@ -1374,7 +1374,7 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructNumberSequentialByVal_Cdecl(Numbe extern "C" DLL_EXPORT BOOL __stdcall MarshalStructNumberSequentialByVal_StdCall(NumberSequential argstr) { - //Check the Input + //Check the Input if(!IsCorrectNumberSequential(&argstr)) { printf("\tMarshalStructNumberSequentialByVal_StdCall: NumberSequential param not as expected\n"); @@ -1583,7 +1583,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructS3ByRef_StdCall(S3B typedef BOOL (_cdecl *S3DelegatePInvokeByRefCdeclCaller)(S3* pcs); extern "C" DLL_EXPORT S3DelegatePInvokeByRefCdeclCaller _cdecl Get_MarshalStructS3ByRef_Cdecl_FuncPtr() { - return MarshalStructS3ByRef_Cdecl; + return MarshalStructS3ByRef_Cdecl; } typedef BOOL (__stdcall *S3DelegatePInvokeByRefStdCallCaller)(S3* pcs); @@ -1596,7 +1596,7 @@ extern "C" DLL_EXPORT S3DelegatePInvokeByRefStdCallCaller __stdcall Get_MarshalS //Passby value extern "C" DLL_EXPORT BOOL _cdecl MarshalStructS3ByVal_Cdecl(S3 argstr) { - //Check the Input + //Check the Input if(!IsCorrectS3(&argstr)) { printf("\tMarshalStructS3ByVal_Cdecl: S3 param not as expected\n"); @@ -1622,7 +1622,7 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructS3ByVal_Cdecl(S3 argstr) extern "C" DLL_EXPORT BOOL __stdcall MarshalStructS3ByVal_StdCall(S3 argstr) { - //Check the Input + //Check the Input if(!IsCorrectS3(&argstr)) { printf("\tMarshalStructS3ByVal_StdCall: S3 param not as expected\n"); @@ -1781,7 +1781,7 @@ extern "C" DLL_EXPORT BOOL _cdecl DoCallBack_MarshalStructS5ByRef_Cdecl(S5ByRefC S5 argstr; Enum1 eInstance = e2; - const char* strSource = "change string"; + const char* strSource = "change string"; size_t len =strlen(strSource) + 1; LPCSTR temp = (LPCSTR)CoreClrAlloc(sizeof(char)*len); if(temp != NULL) @@ -1813,7 +1813,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructS5ByRef_StdCall(S5B S5 argstr; Enum1 eInstance = e2; - const char* strSource = "change string"; + const char* strSource = "change string"; size_t len =strlen(strSource) + 1; LPCSTR temp = (LPCSTR)CoreClrAlloc(sizeof(char)*len); if(temp != NULL) @@ -1841,7 +1841,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructS5ByRef_StdCall(S5B typedef BOOL (_cdecl *S5DelegatePInvokeByRefCdeclCaller)(S5* pcs); extern "C" DLL_EXPORT S5DelegatePInvokeByRefCdeclCaller _cdecl Get_MarshalStructS5ByRef_Cdecl_FuncPtr() { - return MarshalStructS5ByRef_Cdecl; + return MarshalStructS5ByRef_Cdecl; } typedef BOOL (__stdcall *S5DelegatePInvokeByRefStdCallCaller)(S5* pcs); @@ -1854,7 +1854,7 @@ extern "C" DLL_EXPORT S5DelegatePInvokeByRefStdCallCaller __stdcall Get_MarshalS //Passby value extern "C" DLL_EXPORT BOOL _cdecl MarshalStructS5ByVal_Cdecl(S5 argstr) { - //Check the Input + //Check the Input if(!IsCorrectS5(&argstr)) { printf("\tMarshalStructS5ByVal_Cdecl: S5 param not as expected\n"); @@ -1863,7 +1863,7 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructS5ByVal_Cdecl(S5 argstr) } Enum1 eInstance = e2; - const char* strSource = "change string"; + const char* strSource = "change string"; size_t len =strlen(strSource) + 1; LPCSTR temp = (LPCSTR)CoreClrAlloc(sizeof(char)*len); if(temp != NULL) @@ -1879,7 +1879,7 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructS5ByVal_Cdecl(S5 argstr) extern "C" DLL_EXPORT BOOL __stdcall MarshalStructS5ByVal_StdCall(S5 argstr) { - //Check the Input + //Check the Input if(!IsCorrectS5(&argstr)) { printf("\tMarshalStructS5ByVal_StdCall: S5 param not as expected\n"); @@ -1888,7 +1888,7 @@ extern "C" DLL_EXPORT BOOL __stdcall MarshalStructS5ByVal_StdCall(S5 argstr) } Enum1 eInstance = e2; - const char* strSource = "change string"; + const char* strSource = "change string"; size_t len =strlen(strSource) + 1; LPCSTR temp = (LPCSTR)CoreClrAlloc(sizeof(char)*len); if(temp != NULL) @@ -1908,7 +1908,7 @@ extern "C" DLL_EXPORT BOOL _cdecl DoCallBack_MarshalStructS5ByVal_Cdecl(S5ByValC S5 argstr{}; Enum1 eInstance = e2; - const char* strSource = "change string"; + const char* strSource = "change string"; size_t len =strlen(strSource) + 1; LPCSTR temp = (LPCSTR)CoreClrAlloc(sizeof(char)*len); if(temp != NULL) @@ -1942,7 +1942,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructS5ByVal_StdCall(S5B S5 argstr{}; Enum1 eInstance = e2; - const char* strSource = "change string"; + const char* strSource = "change string"; size_t len =strlen(strSource) + 1; LPCSTR temp = (LPCSTR)CoreClrAlloc(sizeof(char)*len); if(temp != NULL) @@ -2020,7 +2020,7 @@ extern "C" DLL_EXPORT BOOL _cdecl DoCallBack_MarshalStructStringStructSequential } newFirst[512] = '\0'; newLast[512] = '\0'; - argstr.first = newFirst; + argstr.first = newFirst; argstr.last = newLast; if(!caller(&argstr)) @@ -2052,7 +2052,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructStringStructSequent } newFirst[512] = '\0'; newLast[512] = '\0'; - argstr.first = newFirst; + argstr.first = newFirst; argstr.last = newLast; if(!caller(&argstr)) @@ -2072,7 +2072,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructStringStructSequent typedef BOOL (_cdecl *StringStructSequentialAnsiDelegatePInvokeByRefCdeclCaller)(StringStructSequentialAnsi* pcs); extern "C" DLL_EXPORT StringStructSequentialAnsiDelegatePInvokeByRefCdeclCaller _cdecl Get_MarshalStructStringStructSequentialAnsiByRef_Cdecl_FuncPtr() { - return MarshalStructStringStructSequentialAnsiByRef_Cdecl; + return MarshalStructStringStructSequentialAnsiByRef_Cdecl; } typedef BOOL (__stdcall *StringStructSequentialAnsiDelegatePInvokeByRefStdCallCaller)(StringStructSequentialAnsi* pcs); @@ -2085,7 +2085,7 @@ extern "C" DLL_EXPORT StringStructSequentialAnsiDelegatePInvokeByRefStdCallCalle //Passby value extern "C" DLL_EXPORT BOOL _cdecl MarshalStructStringStructSequentialAnsiByVal_Cdecl(StringStructSequentialAnsi argstr) { - //Check the Input + //Check the Input if(!IsCorrectStringStructSequentialAnsi(&argstr)) { printf("\tMarshalStructStringStructSequentialAnsiByVal_Cdecl: StringStructSequentialAnsi param not as expected\n"); @@ -2102,7 +2102,7 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructStringStructSequentialAnsiByVal_C } newFirst[512] = '\0'; newLast[512] = '\0'; - argstr.first = newFirst; + argstr.first = newFirst; argstr.last = newLast; return TRUE; @@ -2110,7 +2110,7 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructStringStructSequentialAnsiByVal_C extern "C" DLL_EXPORT BOOL __stdcall MarshalStructStringStructSequentialAnsiByVal_StdCall(StringStructSequentialAnsi argstr) { - //Check the Input + //Check the Input if(!IsCorrectStringStructSequentialAnsi(&argstr)) { printf("\tMarshalStructStringStructSequentialAnsiByVal_StdCall: StringStructSequentialAnsi param not as expected\n"); @@ -2127,7 +2127,7 @@ extern "C" DLL_EXPORT BOOL __stdcall MarshalStructStringStructSequentialAnsiByVa } newFirst[512] = '\0'; newLast[512] = '\0'; - argstr.first = newFirst; + argstr.first = newFirst; argstr.last = newLast; return TRUE; @@ -2147,7 +2147,7 @@ extern "C" DLL_EXPORT BOOL _cdecl DoCallBack_MarshalStructStringStructSequential } newFirst[512] = '\0'; newLast[512] = '\0'; - argstr.first = newFirst; + argstr.first = newFirst; argstr.last = newLast; if(!caller(argstr)) @@ -2179,7 +2179,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructStringStructSequent } newFirst[512] = '\0'; newLast[512] = '\0'; - argstr.first = newFirst; + argstr.first = newFirst; argstr.last = newLast; if(!caller(argstr)) @@ -2302,7 +2302,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructStringStructSequent typedef BOOL (_cdecl *StringStructSequentialUnicodeDelegatePInvokeByRefCdeclCaller)(StringStructSequentialUnicode* pcs); extern "C" DLL_EXPORT StringStructSequentialUnicodeDelegatePInvokeByRefCdeclCaller _cdecl Get_MarshalStructStringStructSequentialUnicodeByRef_Cdecl_FuncPtr() { - return MarshalStructStringStructSequentialUnicodeByRef_Cdecl; + return MarshalStructStringStructSequentialUnicodeByRef_Cdecl; } typedef BOOL (__stdcall *StringStructSequentialUnicodeDelegatePInvokeByRefStdCallCaller)(StringStructSequentialUnicode* pcs); @@ -2315,7 +2315,7 @@ extern "C" DLL_EXPORT StringStructSequentialUnicodeDelegatePInvokeByRefStdCallCa //Passby value extern "C" DLL_EXPORT BOOL _cdecl MarshalStructStringStructSequentialUnicodeByVal_Cdecl(StringStructSequentialUnicode argstr) { - //Check the Input + //Check the Input if(!IsCorrectStringStructSequentialUnicode(&argstr)) { printf("\tMarshalStructStringStructSequentialUnicodeByVal_Cdecl: StringStructSequentialUnicode param not as expected\n"); @@ -2340,7 +2340,7 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructStringStructSequentialUnicodeByVa extern "C" DLL_EXPORT BOOL __stdcall MarshalStructStringStructSequentialUnicodeByVal_StdCall(StringStructSequentialUnicode argstr) { - //Check the Input + //Check the Input if(!IsCorrectStringStructSequentialUnicode(&argstr)) { printf("\tMarshalStructStringStructSequentialUnicodeByVal_StdCall: StringStructSequentialUnicode param not as expected\n"); @@ -2548,7 +2548,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructS8ByRef_StdCall(S8B typedef BOOL (_cdecl *S8DelegatePInvokeByRefCdeclCaller)(S8* pcs); extern "C" DLL_EXPORT S8DelegatePInvokeByRefCdeclCaller _cdecl Get_MarshalStructS8ByRef_Cdecl_FuncPtr() { - return MarshalStructS8ByRef_Cdecl; + return MarshalStructS8ByRef_Cdecl; } typedef BOOL (__stdcall *S8DelegatePInvokeByRefStdCallCaller)(S8* pcs); @@ -2561,7 +2561,7 @@ extern "C" DLL_EXPORT S8DelegatePInvokeByRefStdCallCaller __stdcall Get_MarshalS //Passby value extern "C" DLL_EXPORT BOOL _cdecl MarshalStructS8ByVal_Cdecl(S8 argstr) { - //Check the Input + //Check the Input if(!IsCorrectS8(&argstr)) { printf("\tMarshalStructS8ByVal_Cdecl: S8 param not as expected\n"); @@ -2593,7 +2593,7 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructS8ByVal_Cdecl(S8 argstr) extern "C" DLL_EXPORT BOOL __stdcall MarshalStructS8ByVal_StdCall(S8 argstr) { - //Check the Input + //Check the Input if(!IsCorrectS8(&argstr)) { printf("\tMarshalStructS8ByVal_StdCall: S8 param not as expected\n"); @@ -2808,7 +2808,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructS9ByRef_StdCall(S9B typedef BOOL (_cdecl *S9DelegatePInvokeByRefCdeclCaller)(S9* pcs); extern "C" DLL_EXPORT S9DelegatePInvokeByRefCdeclCaller _cdecl Get_MarshalStructS9ByRef_Cdecl_FuncPtr() { - return MarshalStructS9ByRef_Cdecl; + return MarshalStructS9ByRef_Cdecl; } typedef BOOL (__stdcall *S9DelegatePInvokeByRefStdCallCaller)(S9* pcs); @@ -2821,7 +2821,7 @@ extern "C" DLL_EXPORT S9DelegatePInvokeByRefStdCallCaller __stdcall Get_MarshalS //Passby value extern "C" DLL_EXPORT BOOL _cdecl MarshalStructS9ByVal_Cdecl(S9 argstr) { - //Check the Input + //Check the Input if(argstr.i32 != 128 || argstr.myDelegate1 == NULL) { @@ -2836,7 +2836,7 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructS9ByVal_Cdecl(S9 argstr) extern "C" DLL_EXPORT BOOL __stdcall MarshalStructS9ByVal_StdCall(S9 argstr) { - //Check the Input + //Check the Input if(argstr.i32 != 128 || argstr.myDelegate1 == NULL) { @@ -2903,96 +2903,96 @@ extern "C" DLL_EXPORT S9DelegatePInvokeByValStdCallCaller _cdecl Get_MarshalStru return MarshalStructS9ByVal_StdCall; } -///////////////////////////////////////////Methods for IncludeOuterIntergerStructSequential struct//////////////////////////////////////////////////// -extern "C" DLL_EXPORT BOOL _cdecl MarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl(IncludeOuterIntergerStructSequential* argstr) +///////////////////////////////////////////Methods for IncludeOuterIntegerStructSequential struct//////////////////////////////////////////////////// +extern "C" DLL_EXPORT BOOL _cdecl MarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl(IncludeOuterIntegerStructSequential* argstr) { - if(!IsCorrectIncludeOuterIntergerStructSequential(argstr)) + if(!IsCorrectIncludeOuterIntegerStructSequential(argstr)) { - printf("\tMarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl: IncludeOuterIntergerStructSequential param not as expected\n"); - PrintIncludeOuterIntergerStructSequential(argstr,"argstr"); + printf("\tMarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl: IncludeOuterIntegerStructSequential param not as expected\n"); + PrintIncludeOuterIntegerStructSequential(argstr,"argstr"); return FALSE; } - ChangeIncludeOuterIntergerStructSequential(argstr); + ChangeIncludeOuterIntegerStructSequential(argstr); return TRUE; } -extern "C" DLL_EXPORT BOOL __stdcall MarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall(IncludeOuterIntergerStructSequential* argstr) +extern "C" DLL_EXPORT BOOL __stdcall MarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall(IncludeOuterIntegerStructSequential* argstr) { - if(!IsCorrectIncludeOuterIntergerStructSequential(argstr)) + if(!IsCorrectIncludeOuterIntegerStructSequential(argstr)) { - printf("\tMarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall: IncludeOuterIntergerStructSequential param not as expected\n"); - PrintIncludeOuterIntergerStructSequential(argstr,"argstr"); + printf("\tMarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall: IncludeOuterIntegerStructSequential param not as expected\n"); + PrintIncludeOuterIntegerStructSequential(argstr,"argstr"); return FALSE; } - ChangeIncludeOuterIntergerStructSequential(argstr); + ChangeIncludeOuterIntegerStructSequential(argstr); return TRUE; } -typedef BOOL (_cdecl *IncludeOuterIntergerStructSequentialByRefCdeclCaller)(IncludeOuterIntergerStructSequential* pcs); -extern "C" DLL_EXPORT BOOL _cdecl DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl(IncludeOuterIntergerStructSequentialByRefCdeclCaller caller) +typedef BOOL (_cdecl *IncludeOuterIntegerStructSequentialByRefCdeclCaller)(IncludeOuterIntegerStructSequential* pcs); +extern "C" DLL_EXPORT BOOL _cdecl DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl(IncludeOuterIntegerStructSequentialByRefCdeclCaller caller) { //Init - IncludeOuterIntergerStructSequential argstr; + IncludeOuterIntegerStructSequential argstr; argstr.s.s_int.i = 64; argstr.s.i = 64; if(!caller(&argstr)) { - printf("DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl:The Caller returns wrong value\n"); + printf("DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl:The Caller returns wrong value\n"); return FALSE; } //Verify the value unchanged - if(!IsCorrectIncludeOuterIntergerStructSequential(&argstr)) + if(!IsCorrectIncludeOuterIntegerStructSequential(&argstr)) { - printf("The parameter for DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl is wrong\n"); + printf("The parameter for DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl is wrong\n"); return FALSE; } return TRUE; } -typedef BOOL (__stdcall *IncludeOuterIntergerStructSequentialByRefStdCallCaller)(IncludeOuterIntergerStructSequential* pcs); -extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall(IncludeOuterIntergerStructSequentialByRefStdCallCaller caller) +typedef BOOL (__stdcall *IncludeOuterIntegerStructSequentialByRefStdCallCaller)(IncludeOuterIntegerStructSequential* pcs); +extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall(IncludeOuterIntegerStructSequentialByRefStdCallCaller caller) { //Init - IncludeOuterIntergerStructSequential argstr; + IncludeOuterIntegerStructSequential argstr; argstr.s.s_int.i = 64; argstr.s.i = 64; if(!caller(&argstr)) { - printf("DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall:The Caller returns wrong value\n"); + printf("DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall:The Caller returns wrong value\n"); return FALSE; } //Verify the value unchanged - if(!IsCorrectIncludeOuterIntergerStructSequential(&argstr)) + if(!IsCorrectIncludeOuterIntegerStructSequential(&argstr)) { - printf("The parameter for DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall is wrong\n"); + printf("The parameter for DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall is wrong\n"); return FALSE; } return TRUE; } //Delegate PInvoke,passbyref -typedef BOOL (_cdecl *IncludeOuterIntergerStructSequentialDelegatePInvokeByRefCdeclCaller)(IncludeOuterIntergerStructSequential* pcs); -extern "C" DLL_EXPORT IncludeOuterIntergerStructSequentialDelegatePInvokeByRefCdeclCaller _cdecl Get_MarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl_FuncPtr() +typedef BOOL (_cdecl *IncludeOuterIntegerStructSequentialDelegatePInvokeByRefCdeclCaller)(IncludeOuterIntegerStructSequential* pcs); +extern "C" DLL_EXPORT IncludeOuterIntegerStructSequentialDelegatePInvokeByRefCdeclCaller _cdecl Get_MarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl_FuncPtr() { - return MarshalStructIncludeOuterIntergerStructSequentialByRef_Cdecl; + return MarshalStructIncludeOuterIntegerStructSequentialByRef_Cdecl; } -typedef BOOL (__stdcall *IncludeOuterIntergerStructSequentialDelegatePInvokeByRefStdCallCaller)(IncludeOuterIntergerStructSequential* pcs); -extern "C" DLL_EXPORT IncludeOuterIntergerStructSequentialDelegatePInvokeByRefStdCallCaller __stdcall Get_MarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall_FuncPtr() +typedef BOOL (__stdcall *IncludeOuterIntegerStructSequentialDelegatePInvokeByRefStdCallCaller)(IncludeOuterIntegerStructSequential* pcs); +extern "C" DLL_EXPORT IncludeOuterIntegerStructSequentialDelegatePInvokeByRefStdCallCaller __stdcall Get_MarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall_FuncPtr() { - return MarshalStructIncludeOuterIntergerStructSequentialByRef_StdCall; + return MarshalStructIncludeOuterIntegerStructSequentialByRef_StdCall; } //Passby value -extern "C" DLL_EXPORT BOOL _cdecl MarshalStructIncludeOuterIntergerStructSequentialByVal_Cdecl(IncludeOuterIntergerStructSequential argstr) +extern "C" DLL_EXPORT BOOL _cdecl MarshalStructIncludeOuterIntegerStructSequentialByVal_Cdecl(IncludeOuterIntegerStructSequential argstr) { - //Check the Input - if(!IsCorrectIncludeOuterIntergerStructSequential(&argstr)) + //Check the Input + if(!IsCorrectIncludeOuterIntegerStructSequential(&argstr)) { - printf("\tMarshalStructIncludeOuterIntergerStructSequentialByVal_Cdecl: IncludeOuterIntergerStructSequential param not as expected\n"); - PrintIncludeOuterIntergerStructSequential(&argstr,"argstr"); + printf("\tMarshalStructIncludeOuterIntegerStructSequentialByVal_Cdecl: IncludeOuterIntegerStructSequential param not as expected\n"); + PrintIncludeOuterIntegerStructSequential(&argstr,"argstr"); return FALSE; } @@ -3002,13 +3002,13 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructIncludeOuterIntergerStructSequent return TRUE; } -extern "C" DLL_EXPORT BOOL __stdcall MarshalStructIncludeOuterIntergerStructSequentialByVal_StdCall(IncludeOuterIntergerStructSequential argstr) +extern "C" DLL_EXPORT BOOL __stdcall MarshalStructIncludeOuterIntegerStructSequentialByVal_StdCall(IncludeOuterIntegerStructSequential argstr) { - //Check the Input - if(!IsCorrectIncludeOuterIntergerStructSequential(&argstr)) + //Check the Input + if(!IsCorrectIncludeOuterIntegerStructSequential(&argstr)) { - printf("\tMarshalStructIncludeOuterIntergerStructSequentialByVal_StdCall: IncludeOuterIntergerStructSequential param not as expected\n"); - PrintIncludeOuterIntergerStructSequential(&argstr,"argstr"); + printf("\tMarshalStructIncludeOuterIntegerStructSequentialByVal_StdCall: IncludeOuterIntegerStructSequential param not as expected\n"); + PrintIncludeOuterIntegerStructSequential(&argstr,"argstr"); return FALSE; } @@ -3018,21 +3018,21 @@ extern "C" DLL_EXPORT BOOL __stdcall MarshalStructIncludeOuterIntergerStructSequ return TRUE; } -typedef IncludeOuterIntergerStructSequential (_cdecl *IncludeOuterIntergerStructSequentialByValCdeclCaller)(IncludeOuterIntergerStructSequential cs); -extern "C" DLL_EXPORT BOOL _cdecl DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByVal_Cdecl(IncludeOuterIntergerStructSequentialByValCdeclCaller caller) +typedef IncludeOuterIntegerStructSequential (_cdecl *IncludeOuterIntegerStructSequentialByValCdeclCaller)(IncludeOuterIntegerStructSequential cs); +extern "C" DLL_EXPORT BOOL _cdecl DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByVal_Cdecl(IncludeOuterIntegerStructSequentialByValCdeclCaller caller) { //Init - IncludeOuterIntergerStructSequential argstr; + IncludeOuterIntegerStructSequential argstr; argstr.s.s_int.i = 64; argstr.s.i = 64; - IncludeOuterIntergerStructSequential retstr = caller(argstr); + IncludeOuterIntegerStructSequential retstr = caller(argstr); - if (!IsCorrectIncludeOuterIntergerStructSequential(&retstr)) + if (!IsCorrectIncludeOuterIntegerStructSequential(&retstr)) { - printf("DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByVal_Cdecl:The Caller returns wrong value\n"); - PrintIncludeOuterIntergerStructSequential(&retstr, "retstr"); + printf("DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByVal_Cdecl:The Caller returns wrong value\n"); + PrintIncludeOuterIntegerStructSequential(&retstr, "retstr"); return FALSE; } @@ -3045,21 +3045,21 @@ extern "C" DLL_EXPORT BOOL _cdecl DoCallBack_MarshalStructIncludeOuterIntergerSt return TRUE; } -typedef IncludeOuterIntergerStructSequential (__stdcall *IncludeOuterIntergerStructSequentialByValStdCallCaller)(IncludeOuterIntergerStructSequential cs); -extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByVal_StdCall(IncludeOuterIntergerStructSequentialByValStdCallCaller caller) +typedef IncludeOuterIntegerStructSequential (__stdcall *IncludeOuterIntegerStructSequentialByValStdCallCaller)(IncludeOuterIntegerStructSequential cs); +extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByVal_StdCall(IncludeOuterIntegerStructSequentialByValStdCallCaller caller) { //Init - IncludeOuterIntergerStructSequential argstr; + IncludeOuterIntegerStructSequential argstr; argstr.s.s_int.i = 64; argstr.s.i = 64; - IncludeOuterIntergerStructSequential retstr = caller(argstr); + IncludeOuterIntegerStructSequential retstr = caller(argstr); - if (!IsCorrectIncludeOuterIntergerStructSequential(&retstr)) + if (!IsCorrectIncludeOuterIntegerStructSequential(&retstr)) { - printf("DoCallBack_MarshalStructIncludeOuterIntergerStructSequentialByVal_StdCall:The Caller returns wrong value\n"); - PrintIncludeOuterIntergerStructSequential(&retstr, "retstr"); + printf("DoCallBack_MarshalStructIncludeOuterIntegerStructSequentialByVal_StdCall:The Caller returns wrong value\n"); + PrintIncludeOuterIntegerStructSequential(&retstr, "retstr"); return FALSE; } @@ -3071,16 +3071,16 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructIncludeOuterInterge return TRUE; } //Delegate PInvoke,passbyval -typedef BOOL (_cdecl *IncludeOuterIntergerStructSequentialDelegatePInvokeByValCdeclCaller)(IncludeOuterIntergerStructSequential cs); -extern "C" DLL_EXPORT IncludeOuterIntergerStructSequentialDelegatePInvokeByValCdeclCaller _cdecl Get_MarshalStructIncludeOuterIntergerStructSequentialByVal_Cdecl_FuncPtr() +typedef BOOL (_cdecl *IncludeOuterIntegerStructSequentialDelegatePInvokeByValCdeclCaller)(IncludeOuterIntegerStructSequential cs); +extern "C" DLL_EXPORT IncludeOuterIntegerStructSequentialDelegatePInvokeByValCdeclCaller _cdecl Get_MarshalStructIncludeOuterIntegerStructSequentialByVal_Cdecl_FuncPtr() { - return MarshalStructIncludeOuterIntergerStructSequentialByVal_Cdecl; + return MarshalStructIncludeOuterIntegerStructSequentialByVal_Cdecl; } -typedef BOOL (__stdcall *IncludeOuterIntergerStructSequentialDelegatePInvokeByValStdCallCaller)(IncludeOuterIntergerStructSequential cs); -extern "C" DLL_EXPORT IncludeOuterIntergerStructSequentialDelegatePInvokeByValStdCallCaller __stdcall Get_MarshalStructIncludeOuterIntergerStructSequentialByVal_StdCall_FuncPtr() +typedef BOOL (__stdcall *IncludeOuterIntegerStructSequentialDelegatePInvokeByValStdCallCaller)(IncludeOuterIntegerStructSequential cs); +extern "C" DLL_EXPORT IncludeOuterIntegerStructSequentialDelegatePInvokeByValStdCallCaller __stdcall Get_MarshalStructIncludeOuterIntegerStructSequentialByVal_StdCall_FuncPtr() { - return MarshalStructIncludeOuterIntergerStructSequentialByVal_StdCall; + return MarshalStructIncludeOuterIntegerStructSequentialByVal_StdCall; } ///////////////////////////////////////////Methods for S11 struct//////////////////////////////////////////////////// @@ -3155,7 +3155,7 @@ extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructS11ByRef_StdCall(S1 typedef BOOL (_cdecl *S11DelegatePInvokeByRefCdeclCaller)(S11* pcs); extern "C" DLL_EXPORT S11DelegatePInvokeByRefCdeclCaller _cdecl Get_MarshalStructS11ByRef_Cdecl_FuncPtr() { - return MarshalStructS11ByRef_Cdecl; + return MarshalStructS11ByRef_Cdecl; } typedef BOOL (__stdcall *S11DelegatePInvokeByRefStdCallCaller)(S11* pcs); @@ -3168,7 +3168,7 @@ extern "C" DLL_EXPORT S11DelegatePInvokeByRefStdCallCaller __stdcall Get_Marshal //Passby value extern "C" DLL_EXPORT BOOL _cdecl MarshalStructS11ByVal_Cdecl(S11 argstr) { - //Check the Input + //Check the Input if(argstr.i32 != (LPINT)(32) || argstr.i != 32) { printf("\tMarshalStructS11ByVal_Cdecl: S11 param not as expected\n"); @@ -3183,7 +3183,7 @@ extern "C" DLL_EXPORT BOOL _cdecl MarshalStructS11ByVal_Cdecl(S11 argstr) extern "C" DLL_EXPORT BOOL __stdcall MarshalStructS11ByVal_StdCall(S11 argstr) { - //Check the Input + //Check the Input if(argstr.i32 != (LPINT)(32) || argstr.i != 32) { printf("\tMarshalStructS11ByVal_StdCall: S11 param not as expected\n"); @@ -3314,20 +3314,20 @@ extern "C" DLL_EXPORT BOOL _cdecl DoCallBack_MarshalStructByVal_Cdecl_ByteStruct return TRUE; } -typedef IntergerStructSequential (_cdecl *IntergerStructSequentialByValCdeclCaller)(IntergerStructSequential cs); -extern "C" DLL_EXPORT BOOL _cdecl DoCallBack_MarshalStructIntergerStructSequentialByVal_Cdecl(IntergerStructSequentialByValCdeclCaller caller) +typedef IntegerStructSequential (_cdecl *IntegerStructSequentialByValCdeclCaller)(IntegerStructSequential cs); +extern "C" DLL_EXPORT BOOL _cdecl DoCallBack_MarshalStructIntegerStructSequentialByVal_Cdecl(IntegerStructSequentialByValCdeclCaller caller) { //Init - IntergerStructSequential argstr; + IntegerStructSequential argstr; argstr.i = 64; - IntergerStructSequential retstr = caller(argstr); + IntegerStructSequential retstr = caller(argstr); - if (!IsCorrectIntergerStructSequential(&retstr)) + if (!IsCorrectIntegerStructSequential(&retstr)) { - printf("DoCallBack_MarshalStructIntergerStructSequentialByVal_Cdecl:The Caller returns wrong value\n"); - PrintIntergerStructSequential(&retstr, "retstr"); + printf("DoCallBack_MarshalStructIntegerStructSequentialByVal_Cdecl:The Caller returns wrong value\n"); + PrintIntegerStructSequential(&retstr, "retstr"); return FALSE; } @@ -3337,20 +3337,20 @@ extern "C" DLL_EXPORT BOOL _cdecl DoCallBack_MarshalStructIntergerStructSequenti return TRUE; } -typedef IntergerStructSequential (__stdcall *IntergerStructSequentialByValStdCallCaller)(IntergerStructSequential cs); -extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructIntergerStructSequentialByVal_StdCall(IntergerStructSequentialByValStdCallCaller caller) +typedef IntegerStructSequential (__stdcall *IntegerStructSequentialByValStdCallCaller)(IntegerStructSequential cs); +extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalStructIntegerStructSequentialByVal_StdCall(IntegerStructSequentialByValStdCallCaller caller) { //Init - IntergerStructSequential argstr; + IntegerStructSequential argstr; argstr.i = 64; - IntergerStructSequential retstr = caller(argstr); + IntegerStructSequential retstr = caller(argstr); - if (!IsCorrectIntergerStructSequential(&retstr)) + if (!IsCorrectIntegerStructSequential(&retstr)) { - printf("DoCallBack_MarshalStructIntergerStructSequentialByVal_StdCall:The Caller returns wrong value\n"); - PrintIntergerStructSequential(&retstr, "retstr"); + printf("DoCallBack_MarshalStructIntegerStructSequentialByVal_StdCall:The Caller returns wrong value\n"); + PrintIntegerStructSequential(&retstr, "retstr"); return FALSE; } diff --git a/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/SeqStructDelRevPInvokeNative.h b/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/SeqStructDelRevPInvokeNative.h index e6cfe6e22b48d..7e8501ec67395 100644 --- a/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/SeqStructDelRevPInvokeNative.h +++ b/src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/SeqStructDelRevPInvokeNative.h @@ -5,7 +5,7 @@ #include #include #include - + const int NumArrElements = 2; struct InnerSequential { @@ -88,7 +88,7 @@ bool IsCorrectINNER2(INNER2* p) return true; } -struct InnerExplicit +struct InnerExplicit { #ifdef WINDOWS union @@ -106,7 +106,7 @@ struct InnerExplicit }; INT _unused0; LPCSTR f3; -#endif +#endif }; void PrintInnerExplicit(InnerExplicit* p, const char* name) @@ -292,7 +292,7 @@ bool IsCorrectCharSetAnsiSequential(CharSetAnsiSequential* p) } -struct CharSetUnicodeSequential +struct CharSetUnicodeSequential { LPCWSTR f1; WCHAR f2; @@ -346,15 +346,15 @@ struct NumberSequential // size = 64 bytes LONG64 i64; ULONG64 ui64; DOUBLE d; - INT i32; - UINT ui32; - SHORT s1; - WORD us1; - SHORT i16; + INT i32; + UINT ui32; + SHORT s1; + WORD us1; + SHORT i16; WORD ui16; FLOAT sgl; - BYTE b; - CHAR sb; + BYTE b; + CHAR sb; }; void PrintNumberSequential(NumberSequential* str, const char* name) @@ -423,7 +423,7 @@ void ChangeS3(S3* p) const char* strSource = "change string"; size_t len = strlen(strSource); - LPCSTR temp = (LPCSTR)CoreClrAlloc(sizeof(char)*(len+1)); + LPCSTR temp = (LPCSTR)CoreClrAlloc(sizeof(char)*(len+1)); if(temp != NULL) { memset((LPVOID)temp,0,len+1); @@ -462,10 +462,10 @@ struct S4 // size = 8 bytes LPCSTR name; }; -enum Enum1 +enum Enum1 { e1 = 1, - e2 = 3 + e2 = 3 }; struct S5 // size = 8 bytes @@ -484,7 +484,7 @@ void PrintS5(S5* str, const char* name) void ChangeS5(S5* str) { Enum1 eInstance = e2; - const char* strSource = "change string"; + const char* strSource = "change string"; size_t len = strlen(strSource); LPCSTR temp = (LPCSTR)CoreClrAlloc(sizeof(char)*(len+1)); if(temp != NULL) @@ -552,7 +552,7 @@ void ChangeStringStructSequentialAnsi(StringStructSequentialAnsi* str) newFirst[512] = '\0'; newLast[512] = '\0'; - str->first = newFirst; + str->first = newFirst; str->last = newLast; } @@ -666,17 +666,17 @@ void ChangeS8(S8* str) } #pragma pack (8) -struct IntergerStructSequential // size = 4 bytes +struct IntegerStructSequential // size = 4 bytes { INT i; }; -void PrintIntergerStructSequential(IntergerStructSequential* str, const char* name) +void PrintIntegerStructSequential(IntegerStructSequential* str, const char* name) { printf("\t%s.i = %d\n", name, str->i); } -bool IsCorrectIntergerStructSequential(IntergerStructSequential* str) +bool IsCorrectIntegerStructSequential(IntegerStructSequential* str) { if(str->i != 32) return false; @@ -692,24 +692,24 @@ struct S9 // size = 8 bytes TestDelegate1 myDelegate1; }; -struct OuterIntergerStructSequential // size = 8 bytes +struct OuterIntegerStructSequential // size = 8 bytes { INT i; - struct IntergerStructSequential s_int; + struct IntegerStructSequential s_int; }; -struct IncludeOuterIntergerStructSequential // size = 8 bytes +struct IncludeOuterIntegerStructSequential // size = 8 bytes { - struct OuterIntergerStructSequential s; + struct OuterIntegerStructSequential s; }; -void PrintIncludeOuterIntergerStructSequential(IncludeOuterIntergerStructSequential* str, const char* name) +void PrintIncludeOuterIntegerStructSequential(IncludeOuterIntegerStructSequential* str, const char* name) { printf("\t%s.s.s_int.i = %d\n", name, str->s.s_int.i); printf("\t%s.s.i = %d\n", name, str->s.i); } -bool IsCorrectIncludeOuterIntergerStructSequential(IncludeOuterIntergerStructSequential* str) +bool IsCorrectIncludeOuterIntegerStructSequential(IncludeOuterIntegerStructSequential* str) { if(str->s.s_int.i != 32) return false; @@ -718,7 +718,7 @@ bool IsCorrectIncludeOuterIntergerStructSequential(IncludeOuterIntergerStructSeq return true; } -void ChangeIncludeOuterIntergerStructSequential(IncludeOuterIntergerStructSequential* str) +void ChangeIncludeOuterIntegerStructSequential(IncludeOuterIntegerStructSequential* str) { str->s.s_int.i = 64; str->s.i = 64; diff --git a/src/tests/Interop/StructMarshalling/ReversePInvoke/Struct.cs b/src/tests/Interop/StructMarshalling/ReversePInvoke/Struct.cs index dce4fb9cff33c..59e64a619c685 100644 --- a/src/tests/Interop/StructMarshalling/ReversePInvoke/Struct.cs +++ b/src/tests/Interop/StructMarshalling/ReversePInvoke/Struct.cs @@ -163,22 +163,22 @@ public struct S9 public delegate void TestDelegate1(S9 myStruct); [StructLayout(LayoutKind.Sequential)] -public struct IntergerStructSequential +public struct IntegerStructSequential { public int i; } [StructLayout(LayoutKind.Sequential)] -public struct OuterIntergerStructSequential +public struct OuterIntegerStructSequential { public int i; - public IntergerStructSequential s_int; + public IntegerStructSequential s_int; } [StructLayout(LayoutKind.Sequential)] -public struct IncludeOuterIntergerStructSequential +public struct IncludeOuterIntegerStructSequential { - public OuterIntergerStructSequential s; + public OuterIntegerStructSequential s; } [StructLayout(LayoutKind.Sequential)] diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate001.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate001.cs index a47064a2473ec..a4800301721da 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate001.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate001.cs @@ -26,7 +26,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate002.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate002.cs index fadd4b555b61a..55969f27f0eaf 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate002.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate002.cs @@ -26,7 +26,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate003.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate003.cs index ea96f0b793b5a..108ee051ba55c 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate003.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate003.cs @@ -26,7 +26,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate004.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate004.cs index 4bb24b830aad4..bc61411488918 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate004.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate004.cs @@ -26,7 +26,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate005.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate005.cs index 342a94c9a7137..3b6f66bda971d 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate005.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate005.cs @@ -26,7 +26,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate006.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate006.cs index e745f63360733..07951b1fe2c24 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate006.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate006.cs @@ -26,7 +26,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate007.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate007.cs index 44b8545a3bd6e..dc646d9514aa3 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate007.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate007.cs @@ -26,7 +26,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate008.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate008.cs index 94192a0c0020f..af2b37ed3daa0 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate008.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate008.cs @@ -26,7 +26,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate009.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate009.cs index b5f97c197b650..3b00bb85f55be 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate009.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate009.cs @@ -26,7 +26,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate010.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate010.cs index e9cfafa7e8667..a59b86e07b8c7 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate010.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate010.cs @@ -26,7 +26,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate011.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate011.cs index 43382c0cbb900..8a3caeb08f04c 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate011.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate011.cs @@ -26,7 +26,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate012.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate012.cs index 915d6c4a82a4a..f810de24f28ca 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate012.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate012.cs @@ -26,7 +26,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate013.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate013.cs index ac43f13f7a95b..487266812c02b 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate013.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate013.cs @@ -31,7 +31,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate014.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate014.cs index 4d789c84a8475..4e7c365133ff6 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate014.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate014.cs @@ -31,7 +31,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate015.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate015.cs index 94bf0aa73631a..809eee618ee35 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate015.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate015.cs @@ -31,7 +31,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate016.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate016.cs index 4f8d99c91691a..76b2bd5582913 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate016.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate016.cs @@ -31,7 +31,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate017.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate017.cs index 4790c33a6d4de..ed2702bd3c8a9 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate017.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate017.cs @@ -31,7 +31,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate018.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate018.cs index beac0d1fe08bf..97afce70ccc51 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate018.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate018.cs @@ -31,7 +31,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate019.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate019.cs index 601631c973df0..5db70694afbe6 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate019.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate019.cs @@ -31,7 +31,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate020.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate020.cs index ef2acdb12c8e2..8689ea21e6e63 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate020.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate020.cs @@ -31,7 +31,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate021.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate021.cs index f02375daa1e41..7f4da723e0f69 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate021.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate021.cs @@ -31,7 +31,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate022.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate022.cs index a3b0dc2d0d4e9..dc01236dadc2f 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate022.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate022.cs @@ -31,7 +31,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate023.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate023.cs index e56f1e8182fc8..5fbb9b7f47a84 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate023.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate023.cs @@ -31,7 +31,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate024.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate024.cs index eea60271f60d3..2d5d7f463d8ac 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate024.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate024.cs @@ -31,7 +31,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate025.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate025.cs index 310caf497c9e7..7c1e02ee3cbf2 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate025.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate025.cs @@ -25,7 +25,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate026.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate026.cs index a0e95a5888776..40ad6f7ed5b17 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate026.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate026.cs @@ -25,7 +25,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate027.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate027.cs index 49165ed9fca2d..399ee549d892a 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate027.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate027.cs @@ -25,7 +25,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate028.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate028.cs index 025e9f804bbf3..6188065aad218 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate028.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate028.cs @@ -25,7 +25,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate029.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate029.cs index 4b447cd47c6bc..3a4eea458973d 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate029.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate029.cs @@ -25,7 +25,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate030.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate030.cs index bfa9b33be6edb..8849c19ea143d 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate030.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate030.cs @@ -25,7 +25,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate031.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate031.cs index 729fe4fd0fc74..677d5c9ff3fbd 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate031.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate031.cs @@ -25,7 +25,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/Generics/Instantiation/delegates/Delegate032.cs b/src/tests/JIT/Generics/Instantiation/delegates/Delegate032.cs index 9d0d02114293b..b17eccfab8f0e 100644 --- a/src/tests/JIT/Generics/Instantiation/delegates/Delegate032.cs +++ b/src/tests/JIT/Generics/Instantiation/delegates/Delegate032.cs @@ -25,7 +25,7 @@ public static int Main() if ((i != 10) || (j != 10)) { - Console.WriteLine("Failed Sync Invokation"); + Console.WriteLine("Failed Sync Invocation"); return 1; } diff --git a/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherMaskVector128.cs b/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherMaskVector128.cs index ae256b08e0167..74c9eefc8fef5 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherMaskVector128.cs +++ b/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherMaskVector128.cs @@ -133,7 +133,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector128(sourcef, (float*)(floatTable.inArrayPtr), indexi, maskf, Four); @@ -158,7 +158,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -203,7 +203,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vd = Avx2.GatherMaskVector128(sourced, (double*)(doubletTable.inArrayPtr), indexi, maskd, Eight); @@ -228,7 +228,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -272,7 +272,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector128(sourcei, (int*)(intTable.inArrayPtr), indexi, maski, Four); @@ -297,7 +297,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -341,7 +341,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector128(sourceui, (uint*)(intTable.inArrayPtr), indexi, maskui, Four); @@ -366,7 +366,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -410,7 +410,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector128(sourcel, (long*)(longTable.inArrayPtr), indexi, maskl, Eight); @@ -435,7 +435,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -479,7 +479,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector128(sourceul, (ulong*)(longTable.inArrayPtr), indexi, maskul, Eight); @@ -504,7 +504,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -548,7 +548,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector128(sourcei, (int*)(intTable.inArrayPtr), indexl, maski, Four); @@ -573,7 +573,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -617,7 +617,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector128(sourceui, (uint*)(intTable.inArrayPtr), indexl, maskui, Four); @@ -642,7 +642,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -686,7 +686,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector128(sourcel, (long*)(longTable.inArrayPtr), indexl, maskl, Eight); @@ -711,7 +711,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -755,7 +755,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector128(sourceul, (ulong*)(longTable.inArrayPtr), indexl, maskul, Eight); @@ -780,10 +780,10 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } - + // public static unsafe Vector128 GatherMaskVector128(Vector128 source, float* baseAddress, Vector128 index, Vector128 mask, byte scale) using (TestTable floatTable = new TestTable(floatSourceTable, new float[4])) { @@ -824,7 +824,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector128(sourcef, (float*)(floatTable.inArrayPtr), indexl, maskf, Four); @@ -849,7 +849,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -893,7 +893,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vd = Avx2.GatherMaskVector128(sourced, (double*)(doubletTable.inArrayPtr), indexl, maskd, Eight); @@ -918,7 +918,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -962,7 +962,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector128(sourcei, (int*)(intTable.inArrayPtr), indexl256, maski, Four); @@ -987,11 +987,11 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } - // public static unsafe Vector128 GatherMaskVector128(Vector128 source, uint* baseAddress, Vector256 index, Vector128 mask, byte scale) + // public static unsafe Vector128 GatherMaskVector128(Vector128 source, uint* baseAddress, Vector256 index, Vector128 mask, byte scale) using (TestTable intTable = new TestTable(intSourceTable, new int[4])) { var vf = Avx2.GatherMaskVector128(sourceui, (uint*)(intTable.inArrayPtr), indexl256, maskui, 4); @@ -1031,7 +1031,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector128(sourceui, (uint*)(intTable.inArrayPtr), indexl256, maskui, Four); @@ -1056,7 +1056,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -1100,7 +1100,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector128(sourcef, (float*)(floatTable.inArrayPtr), indexl256, maskf, Four); @@ -1125,7 +1125,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } diff --git a/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherMaskVector256.cs b/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherMaskVector256.cs index b993f474ca368..495815886ba3e 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherMaskVector256.cs +++ b/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherMaskVector256.cs @@ -132,7 +132,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector256(sourcef, (float*)(floatTable.inArrayPtr), indexi, maskf, Four); @@ -157,7 +157,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -201,7 +201,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vd = Avx2.GatherMaskVector256(sourced, (double*)(doubletTable.inArrayPtr), indexi128, maskd, Eight); @@ -226,7 +226,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -270,7 +270,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector256(sourcei, (int*)(intTable.inArrayPtr), indexi, maski, Four); @@ -295,7 +295,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -337,7 +337,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector256(sourceui, (uint*)(intTable.inArrayPtr), indexi, maskui, Four); @@ -362,7 +362,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -406,7 +406,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector256(sourcel, (long*)(longTable.inArrayPtr), indexi128, maskl, Eight); @@ -431,7 +431,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -475,7 +475,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector256(sourceul, (ulong*)(longTable.inArrayPtr), indexi128, maskul, Eight); @@ -500,11 +500,11 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } - // public static unsafe Vector256 GatherMaskVector256(Vector256 source, long* baseAddress, Vector256 index, Vector256 mask, byte scale) + // public static unsafe Vector256 GatherMaskVector256(Vector256 source, long* baseAddress, Vector256 index, Vector256 mask, byte scale) using (TestTable longTable = new TestTable(longSourceTable, new long[4])) { var vf = Avx2.GatherMaskVector256(sourcel, (long*)(longTable.inArrayPtr), indexl, maskl, 8); @@ -544,7 +544,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector256(sourcel, (long*)(longTable.inArrayPtr), indexl, maskl, Eight); @@ -569,7 +569,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -613,7 +613,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherMaskVector256(sourceul, (ulong*)(longTable.inArrayPtr), indexl, maskul, Eight); @@ -638,9 +638,9 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } - } + } // public static unsafe Vector256 GatherMaskVector256(Vector256 source, double* baseAddress, Vector256 index, Vector256 mask, byte scale) using (TestTable doubletTable = new TestTable(doubleSourceTable, new double[4])) @@ -682,7 +682,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vd = Avx2.GatherMaskVector256(sourced, (double*)(doubletTable.inArrayPtr), indexl, maskd, Eight); @@ -707,13 +707,13 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } } - + return testResult; } diff --git a/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherVector128.cs b/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherVector128.cs index 856d32f262c7c..f59994d648628 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherVector128.cs +++ b/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherVector128.cs @@ -102,7 +102,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector128((float*)(floatTable.inArrayPtr), indexi, Four); @@ -127,7 +127,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -171,7 +171,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vd = Avx2.GatherVector128((double*)(doubletTable.inArrayPtr), indexi, Eight); @@ -196,7 +196,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -240,7 +240,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector128((int*)(intTable.inArrayPtr), indexi, Four); @@ -265,7 +265,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -309,7 +309,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector128((uint*)(intTable.inArrayPtr), indexi, Four); @@ -334,7 +334,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -378,7 +378,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector128((long*)(longTable.inArrayPtr), indexi, Eight); @@ -403,7 +403,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -447,7 +447,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector128((ulong*)(longTable.inArrayPtr), indexi, Eight); @@ -472,7 +472,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -516,7 +516,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector128((int*)(intTable.inArrayPtr), indexl, Four); @@ -541,7 +541,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -585,7 +585,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector128((uint*)(intTable.inArrayPtr), indexl, Four); @@ -610,7 +610,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -654,7 +654,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector128((long*)(longTable.inArrayPtr), indexl, Eight); @@ -679,7 +679,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -723,7 +723,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector128((ulong*)(longTable.inArrayPtr), indexl, Eight); @@ -748,10 +748,10 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } - + // public static unsafe Vector128 GatherVector128(float* baseAddress, Vector128 index, byte scale) using (TestTable floatTable = new TestTable(floatSourceTable, new float[4])) { @@ -792,7 +792,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector128((float*)(floatTable.inArrayPtr), indexl, Four); @@ -817,7 +817,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -861,7 +861,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vd = Avx2.GatherVector128((double*)(doubletTable.inArrayPtr), indexl, Eight); @@ -886,7 +886,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -930,7 +930,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector128((int*)(intTable.inArrayPtr), indexl256, Four); @@ -955,7 +955,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -997,7 +997,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector128((uint*)(intTable.inArrayPtr), indexl256, Four); @@ -1022,7 +1022,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -1066,7 +1066,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector128((float*)(floatTable.inArrayPtr), indexl256, Four); @@ -1091,7 +1091,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } diff --git a/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherVector256.cs b/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherVector256.cs index 62c9b106e9649..ee2c1546cba5e 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherVector256.cs +++ b/src/tests/JIT/HardwareIntrinsics/X86/Avx2/GatherVector256.cs @@ -102,7 +102,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector256((float*)(floatTable.inArrayPtr), indexi, Four); @@ -127,11 +127,11 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } - // public static unsafe Vector256 GatherVector256(double* baseAddress, Vector128 index, byte scale) + // public static unsafe Vector256 GatherVector256(double* baseAddress, Vector128 index, byte scale) using (TestTable doubletTable = new TestTable(doubleSourceTable, new double[4])) { var vd = Avx2.GatherVector256((double*)(doubletTable.inArrayPtr), indexi128, 8); @@ -171,7 +171,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vd = Avx2.GatherVector256((double*)(doubletTable.inArrayPtr), indexi128, Eight); @@ -196,11 +196,11 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } - // public static unsafe Vector256 GatherVector256(int* baseAddress, Vector256 index, byte scale) + // public static unsafe Vector256 GatherVector256(int* baseAddress, Vector256 index, byte scale) using (TestTable intTable = new TestTable(intSourceTable, new int[8])) { var vf = Avx2.GatherVector256((int*)(intTable.inArrayPtr), indexi, 4); @@ -240,7 +240,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector256((int*)(intTable.inArrayPtr), indexi, Four); @@ -265,7 +265,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -309,7 +309,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector256((uint*)(intTable.inArrayPtr), indexi, Four); @@ -334,7 +334,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -378,7 +378,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector256((long*)(longTable.inArrayPtr), indexi128, Eight); @@ -403,7 +403,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -447,7 +447,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector256((ulong*)(longTable.inArrayPtr), indexi128, Eight); @@ -472,7 +472,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -516,7 +516,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector256((long*)(longTable.inArrayPtr), indexl, Eight); @@ -541,7 +541,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } @@ -585,7 +585,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vf = Avx2.GatherVector256((ulong*)(longTable.inArrayPtr), indexl, Eight); @@ -610,9 +610,9 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } - } + } // public static unsafe Vector256 GatherVector256(double* baseAddress, Vector256 index, byte scale) using (TestTable doubletTable = new TestTable(doubleSourceTable, new double[4])) @@ -654,7 +654,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } vd = Avx2.GatherVector256((double*)(doubletTable.inArrayPtr), indexl, Eight); @@ -679,7 +679,7 @@ static unsafe int Main(string[] args) } catch (System.ArgumentOutOfRangeException) { - // sucess + // success } } diff --git a/src/tests/JIT/HardwareIntrinsics/X86/Regression/GitHub_21666/GitHub_21666.cs b/src/tests/JIT/HardwareIntrinsics/X86/Regression/GitHub_21666/GitHub_21666.cs index fa436ae7e012a..46622ee8ba65c 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86/Regression/GitHub_21666/GitHub_21666.cs +++ b/src/tests/JIT/HardwareIntrinsics/X86/Regression/GitHub_21666/GitHub_21666.cs @@ -24,17 +24,17 @@ class GitHub_21666 static int Main(string[] args) { - bool sucess = true; + bool success = true; byteSF = 0; ushortSF = 0; uintSF = 0; ulongSF = 0; - sucess = sucess && TestByteContainment(); - sucess = sucess && TestUInt16Containment(); - sucess = sucess && TestUInt32Containment(); - sucess = sucess && TestUInt64Containment(); + success = success && TestByteContainment(); + success = success && TestUInt16Containment(); + success = success && TestUInt32Containment(); + success = success && TestUInt64Containment(); - return sucess ? Pass : Fail; + return success ? Pass : Fail; } static unsafe bool TestByteContainment() @@ -239,7 +239,7 @@ static unsafe bool TestUInt64Containment() Console.WriteLine("TestUInt64Containment failed on Crc32"); return false; } - + if (Sse42.X64.Crc32(0xffffffffffffffffUL, *ptr1) != 0x0000000073d74d75UL) { Console.WriteLine("TestUInt64Containment failed on Crc32"); diff --git a/src/tests/JIT/Methodical/tailcall_v4/delegateParamCallTarget.cs b/src/tests/JIT/Methodical/tailcall_v4/delegateParamCallTarget.cs index 903261901c122..fff9cdcc88bdb 100644 --- a/src/tests/JIT/Methodical/tailcall_v4/delegateParamCallTarget.cs +++ b/src/tests/JIT/Methodical/tailcall_v4/delegateParamCallTarget.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. /* - * When generating the code for a tail call, the JIT was not careful to preserve any stack-based parameters used in the computation of the call target address if it is a simple indirection (like in the case of delgate.Invoke). + * When generating the code for a tail call, the JIT was not careful to preserve any stack-based parameters used in the computation of the call target address if it is a simple indirection (like in the case of delegate.Invoke). * Thus, in the case where an outgoing argument overwrites the same slot as the incoming delegate, the new value is used in the indirection to compute the target address. * The fix is to not hoist any parameter uses when we hoist the indirection onto the call, and instead use tmpvars. This leaves the use of the parameter above the assignment to the slot for the outgoing tail call. In this one example it actually made the code better. * @@ -12,7 +12,7 @@ * * Actual output: * Accomplice - * Failed + * Failed */ using System; diff --git a/src/tests/JIT/Performance/CodeQuality/Bytemark/neural.cs b/src/tests/JIT/Performance/CodeQuality/Bytemark/neural.cs index b5c39062274d6..66b9e2b3ca37e 100644 --- a/src/tests/JIT/Performance/CodeQuality/Bytemark/neural.cs +++ b/src/tests/JIT/Performance/CodeQuality/Bytemark/neural.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. /* ** This program was translated to C# and adapted for xunit-performance. -** New variants of several tests were added to compare class versus +** New variants of several tests were added to compare class versus ** struct and to compare jagged arrays vs multi-dimensional arrays. */ @@ -23,7 +23,7 @@ ** are error-free. Consequently, McGraw-HIll and BYTE Magazine make ** no claims in regard to the fitness of the source code, executable ** code, and documentation of the BYTEmark. -** +** ** Furthermore, BYTE Magazine, McGraw-Hill, and all employees ** of McGraw-Hill cannot be held responsible for any damages resulting ** from the use of this code or the results obtained from using @@ -780,7 +780,7 @@ public static void zero_changes() /******************** ** randomize_wts() ** ********************* - ** Intialize the weights in the middle and output layers to + ** Initialize the weights in the middle and output layers to ** random values between -0.25..+0.25 ** Function rand() returns a value between 0 and 32767. ** diff --git a/src/tests/JIT/Performance/CodeQuality/Bytemark/neuraljagged.cs b/src/tests/JIT/Performance/CodeQuality/Bytemark/neuraljagged.cs index fb1836a9eaf57..e0a6e2186d47e 100644 --- a/src/tests/JIT/Performance/CodeQuality/Bytemark/neuraljagged.cs +++ b/src/tests/JIT/Performance/CodeQuality/Bytemark/neuraljagged.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. /* ** This program was translated to C# and adapted for xunit-performance. -** New variants of several tests were added to compare class versus +** New variants of several tests were added to compare class versus ** struct and to compare jagged arrays vs multi-dimensional arrays. */ @@ -23,7 +23,7 @@ ** are error-free. Consequently, McGraw-HIll and BYTE Magazine make ** no claims in regard to the fitness of the source code, executable ** code, and documentation of the BYTEmark. -** +** ** Furthermore, BYTE Magazine, McGraw-Hill, and all employees ** of McGraw-Hill cannot be held responsible for any damages resulting ** from the use of this code or the results obtained from using @@ -779,7 +779,7 @@ public static void zero_changes() /******************** ** randomize_wts() ** ********************* - ** Intialize the weights in the middle and output layers to + ** Initialize the weights in the middle and output layers to ** random values between -0.25..+0.25 ** Function rand() returns a value between 0 and 32767. ** diff --git a/src/tests/JIT/Regression/JitBlue/DevDiv_491206/DevDiv_491206.il b/src/tests/JIT/Regression/JitBlue/DevDiv_491206/DevDiv_491206.il index 0ebbd7dfeda23..4109d615849c0 100644 --- a/src/tests/JIT/Regression/JitBlue/DevDiv_491206/DevDiv_491206.il +++ b/src/tests/JIT/Regression/JitBlue/DevDiv_491206/DevDiv_491206.il @@ -5,7 +5,7 @@ .assembly 'DevDiv_491206' {} .assembly extern xunit.core {} -// This test originally triggered an assert Extra_flags_on_tree, because fgMorphCast did not reset an asignment flag, when +// This test originally triggered an assert Extra_flags_on_tree, because fgMorphCast did not reset an assignment flag, when // its children was optimized in the assertion propagation. .class ILGEN_CLASS diff --git a/src/tests/JIT/Regression/JitBlue/DevDiv_495792/DevDiv_495792.il b/src/tests/JIT/Regression/JitBlue/DevDiv_495792/DevDiv_495792.il index c09b2da5c8499..3958733b41951 100644 --- a/src/tests/JIT/Regression/JitBlue/DevDiv_495792/DevDiv_495792.il +++ b/src/tests/JIT/Regression/JitBlue/DevDiv_495792/DevDiv_495792.il @@ -5,7 +5,7 @@ .assembly 'DevDiv_495792' {} .assembly extern xunit.core {} -// This test originally triggered an assert Extra_flags_on_tree, because fgMorphCast did not reset an asignment flag, when +// This test originally triggered an assert Extra_flags_on_tree, because fgMorphCast did not reset an assignment flag, when // its children was optimized in the assertion propagation. .class ILGEN_CLASS diff --git a/src/tests/JIT/Regression/JitBlue/GitHub_19022/GitHub_19022.cs b/src/tests/JIT/Regression/JitBlue/GitHub_19022/GitHub_19022.cs index 09f50eb769fc1..502bcb4f3a1c6 100644 --- a/src/tests/JIT/Regression/JitBlue/GitHub_19022/GitHub_19022.cs +++ b/src/tests/JIT/Regression/JitBlue/GitHub_19022/GitHub_19022.cs @@ -15,7 +15,7 @@ static int Main(string[] args) var map = new ItemRunner(); s_res = 0; - map.UpdateItem(0,10); + map.UpdateItem(0,10); if (s_res == 300) { @@ -42,14 +42,14 @@ public ItemRunner() for (int i = 0; i < _Pool.Length; ++i) { _Pool[i] = new Item(); } } - private const float _LenghtZ = 1000.0f; + private const float _LengthZ = 1000.0f; private static readonly Vector3 _Start = new Vector3(0.0f, -1021.7f, -3451.3f); private static readonly Vector3 _Slope = new Vector3(0.0f, 0.286f, 0.958f); private Item[] _Pool = new Item[30]; - private Item _LastGenerated; + private Item _LastGenerated; // This method qualifies for the optimization: @@ -71,7 +71,7 @@ public void UpdateItem(float fDelta, int depth) { vDelta = _Slope * fDelta; - if (_LastGenerated != null) _Pool[i]._Position = _LastGenerated._Position - _Slope * _LenghtZ; + if (_LastGenerated != null) _Pool[i]._Position = _LastGenerated._Position - _Slope * _LengthZ; else _Pool[i]._Position = _Start - vDelta; _LastGenerated = _Pool[i]; diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_60957/Runtime_60957.cs b/src/tests/JIT/Regression/JitBlue/Runtime_60957/Runtime_60957.cs index 1e20e9242e59e..e63f485115083 100644 --- a/src/tests/JIT/Regression/JitBlue/Runtime_60957/Runtime_60957.cs +++ b/src/tests/JIT/Regression/JitBlue/Runtime_60957/Runtime_60957.cs @@ -12,7 +12,7 @@ class Runtime_60957 [MethodImpl(MethodImplOptions.NoInlining)] // Count the number of times this function gets called. It shouldn't change whether - // all the MD functions get implemented as intriniscs or not. + // all the MD functions get implemented as intrinsics or not. static int[,] GetArray(int[,] a) { ++access_count; @@ -166,7 +166,7 @@ static int test12(int[,] a) } /////////////////////////////////////////////////////////////////// - // + // // Struct that doesn't get promoted // @@ -216,7 +216,7 @@ static int test15(S1 s) } /////////////////////////////////////////////////////////////////// - // + // // Struct that gets promoted // @@ -263,7 +263,7 @@ static int test18(S2 s) } /////////////////////////////////////////////////////////////////// - // + // // Array element // diff --git a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/Interfaces/UnitTest.il b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/Interfaces/UnitTest.il index eb263f608b678..9e8d491888fec 100644 --- a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/Interfaces/UnitTest.il +++ b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/Interfaces/UnitTest.il @@ -67,14 +67,14 @@ } // ======================================================================================== -// Main base type with various virtual methods that will be overriden later +// Main base type with various virtual methods that will be overridden later // ======================================================================================== .class public auto ansi beforefieldinit GenBaseType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - .method public hidebysig newslot virtual instance object MyFunc(string& res) + .method public hidebysig newslot virtual instance object MyFunc(string& res) { ldarg.1 ldstr "object GenBaseType.MyFunc()" @@ -82,7 +82,7 @@ ldnull ret } - .method public hidebysig newslot virtual instance class IB MyFunc(string& res) + .method public hidebysig newslot virtual instance class IB MyFunc(string& res) { ldarg.1 ldstr "IB GenBaseType.MyFunc()" @@ -106,7 +106,7 @@ ldnull ret } - .method public hidebysig newslot virtual instance class IB GenToNonGen(string& res) + .method public hidebysig newslot virtual instance class IB GenToNonGen(string& res) { ldarg.1 ldstr "IB GenBaseType.GenToNonGen()" @@ -114,7 +114,7 @@ ldnull ret } - .method public hidebysig newslot virtual instance class IB NonGenThroughGenFunc(string& res) + .method public hidebysig newslot virtual instance class IB NonGenThroughGenFunc(string& res) { ldarg.1 ldstr "IB GenBaseType.NonGenThroughGenFunc()" @@ -122,7 +122,7 @@ ldnull ret } - .method public hidebysig newslot virtual instance class IGenRetType MyGenFunc(string& res) + .method public hidebysig newslot virtual instance class IGenRetType MyGenFunc(string& res) { ldarg.1 ldstr "IGenRetType GenBaseType.MyGenFunc()" @@ -130,7 +130,7 @@ ldnull ret } - .method public hidebysig newslot virtual instance class IGenRetType> MyGenFunc(string& res) + .method public hidebysig newslot virtual instance class IGenRetType> MyGenFunc(string& res) { ldarg.1 ldstr "IGenRetType> GenBaseType.MyGenFunc()" @@ -150,7 +150,7 @@ } // ======================================================================================== -// SECOND LAYER type: overrides *SOME* virtuals on GenBaseType using MethodImpls with +// SECOND LAYER type: overrides *SOME* virtuals on GenBaseType using MethodImpls with // covariant return types (more derived return types) // ======================================================================================== @@ -205,7 +205,7 @@ // ======================================================================================== -// THIRD LAYER type: overrides all virtuals from GenBaseType using MethodImpls with +// THIRD LAYER type: overrides all virtuals from GenBaseType using MethodImpls with // covariant return types (more derived return types than the ones used in GenMiddleType) // ======================================================================================== @@ -252,7 +252,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class IGenRetType MyFunc(string& res) { .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) @@ -263,7 +263,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class IC MyFunc(string& res) { .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) @@ -327,14 +327,14 @@ newobj instance void [System.Runtime]System.Exception::.ctor(string) throw } - + .method public hidebysig virtual instance object MyFunc(string& res) { ldstr "Should never execute this method" newobj instance void [System.Runtime]System.Exception::.ctor(string) throw } - + .method public hidebysig virtual instance class IB MyFunc(string& res) { ldstr "Should never execute this method" @@ -358,7 +358,7 @@ } // ======================================================================================== -// FOURTH LAYER type: overrides all virtuals from GenBaseType using MethodImpls with +// FOURTH LAYER type: overrides all virtuals from GenBaseType using MethodImpls with // covariant return types (classes that implement the interfaces used as return types) // ======================================================================================== @@ -405,7 +405,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class GenRetType MyFunc(string& res) { .override method instance object class GenBaseType::MyFunc(string& res) @@ -415,7 +415,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class C MyFunc(string& res) { .override method instance class IB class GenBaseType::MyFunc(string& res) @@ -496,7 +496,7 @@ string a, [opt] string b, [opt] string c, - [opt] string d) cil managed + [opt] string d) cil managed { .param [3] = nullref .param [4] = nullref @@ -588,14 +588,14 @@ // ============== Test using GenTestType ============== // // These test methods will callvirt each method using: // 1) The signature from GetBaseType - // 2) The signature from GenMiddleType with covariant returns (when applicable) + // 2) The signature from GenMiddleType with covariant returns (when applicable) // 3) The signature from GenTestType with covariant returns // And verify that the override on GetTestType is the one that executes - - .method public static bool RunTest1() noinlining + + .method public static bool RunTest1() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance object class GenBaseType::MyFunc(string&) @@ -615,10 +615,10 @@ ret } - .method public static bool RunTest2() noinlining + .method public static bool RunTest2() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class IB class GenBaseType::MyFunc(string&) @@ -637,11 +637,11 @@ call bool CMain::CheckResults(string,string,string,string,string) ret } - - .method public static bool RunTest3() noinlining + + .method public static bool RunTest3() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class IGenRetType> class GenBaseType::MyGenFunc(string&) @@ -666,10 +666,10 @@ ret } - .method public static bool RunTest4() noinlining + .method public static bool RunTest4() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class IGenRetType class GenBaseType::MyGenFunc(string&) @@ -694,10 +694,10 @@ ret } - .method public static bool RunTest5() noinlining + .method public static bool RunTest5() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class IB class GenBaseType::GenToNonGen(string&) @@ -722,10 +722,10 @@ ret } - .method public static bool RunTest6() noinlining + .method public static bool RunTest6() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class IB class GenBaseType::NonGenThroughGenFunc(string&) @@ -820,12 +820,12 @@ // These test methods will callvirt each method using: // 1) The signature from GetBaseType // 2) The signature from GenMiddleType with covariant returns - // And verify that the override on GenMiddleType is the one that executes - - .method public static bool RunTest_Middle1() noinlining + // And verify that the override on GenMiddleType is the one that executes + + .method public static bool RunTest_Middle1() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenMiddleType::.ctor() ldloca.s 0 callvirt instance class IGenRetType> class GenBaseType::MyGenFunc(string&) @@ -845,10 +845,10 @@ ret } - .method public static bool RunTest_Middle2() noinlining + .method public static bool RunTest_Middle2() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenMiddleType::.ctor() ldloca.s 0 callvirt instance class IGenRetType class GenBaseType::MyGenFunc(string&) @@ -868,10 +868,10 @@ ret } - .method public static bool RunTest_Middle3() noinlining + .method public static bool RunTest_Middle3() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenMiddleType::.ctor() ldloca.s 0 callvirt instance class IB class GenBaseType::GenToNonGen(string&) @@ -891,10 +891,10 @@ ret } - .method public static bool RunTest_Middle4() noinlining + .method public static bool RunTest_Middle4() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenMiddleType::.ctor() ldloca.s 0 callvirt instance class IB class GenBaseType::NonGenThroughGenFunc(string&) @@ -913,19 +913,19 @@ call bool CMain::CheckResults(string,string,string,string,string) ret } - + // ============== Test using GenMoreDerived ============== // // These test methods will callvirt each method using: // 1) The signature from GetBaseType - // 2) The signature from GenMiddleType with covariant returns (when applicable) + // 2) The signature from GenMiddleType with covariant returns (when applicable) // 3) The signature from GenTestType with covariant returns - // 4) The signature from GenMoreDerived with covariant returns + // 4) The signature from GenMoreDerived with covariant returns // And verify that the override on GenMoreDerived is the one that executes - - .method public static bool RunTest_MoreDerived1() noinlining + + .method public static bool RunTest_MoreDerived1() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class GenMoreDerived::.ctor() ldloca.s 0 callvirt instance object class GenBaseType::MyFunc(string&) @@ -950,10 +950,10 @@ ret } - .method public static bool RunTest_MoreDerived2() noinlining + .method public static bool RunTest_MoreDerived2() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class GenMoreDerived::.ctor() ldloca.s 0 callvirt instance class IB class GenBaseType::MyFunc(string&) @@ -977,11 +977,11 @@ call bool CMain::CheckResults(string,string,string,string,string) ret } - - .method public static bool RunTest_MoreDerived3() noinlining + + .method public static bool RunTest_MoreDerived3() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class GenMoreDerived::.ctor() ldloca.s 0 callvirt instance class IGenRetType> class GenBaseType::MyGenFunc(string&) @@ -1011,10 +1011,10 @@ ret } - .method public static bool RunTest_MoreDerived4() noinlining + .method public static bool RunTest_MoreDerived4() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class GenMoreDerived::.ctor() ldloca.s 0 callvirt instance class IGenRetType class GenBaseType::MyGenFunc(string&) @@ -1044,10 +1044,10 @@ ret } - .method public static bool RunTest_MoreDerived5() noinlining + .method public static bool RunTest_MoreDerived5() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class GenMoreDerived::.ctor() ldloca.s 0 callvirt instance class IB class GenBaseType::GenToNonGen(string&) @@ -1077,10 +1077,10 @@ ret } - .method public static bool RunTest_MoreDerived6() noinlining + .method public static bool RunTest_MoreDerived6() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class GenMoreDerived::.ctor() ldloca.s 0 callvirt instance class IB class GenBaseType::NonGenThroughGenFunc(string&) @@ -1113,14 +1113,14 @@ // ===================================================================================== // - .method public static void RunTest_Invalid1() noinlining + .method public static void RunTest_Invalid1() noinlining { newobj instance void class Invalid1::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest_Invalid2() noinlining + .method public static void RunTest_Invalid2() noinlining { newobj instance void class Invalid2::.ctor() call void [System.Console]System.Console::WriteLine(object) @@ -1144,40 +1144,40 @@ .entrypoint .maxstack 2 .locals init ( bool result ) - + ldc.i4.1 stloc.0 - + T1: call bool CMain::RunTest1() brtrue.s T2 ldc.i4.0 stloc.0 - + T2: call bool CMain::RunTest2() brtrue.s T3 ldc.i4.0 stloc.0 - + T3: call bool CMain::RunTest3() brtrue.s T4 ldc.i4.0 stloc.0 - + T4: call bool CMain::RunTest4() brtrue.s T5 ldc.i4.0 stloc.0 - + T5: call bool CMain::RunTest5() brtrue.s T6 ldc.i4.0 stloc.0 - + T6: call bool CMain::RunTest6() brtrue.s T7 @@ -1203,31 +1203,31 @@ stloc.0 // ===================================================================================== // - + M1: call bool CMain::RunTest_Middle1() brtrue.s M2 ldc.i4.0 stloc.0 - + M2: call bool CMain::RunTest_Middle2() brtrue.s M3 ldc.i4.0 stloc.0 - + M3: call bool CMain::RunTest_Middle3() brtrue.s M4 ldc.i4.0 stloc.0 - + M4: call bool CMain::RunTest_Middle4() brtrue.s MOREDERIVED1 ldc.i4.0 stloc.0 - + // ===================================================================================== // MOREDERIVED1: @@ -1235,37 +1235,37 @@ brtrue.s MOREDERIVED2 ldc.i4.0 stloc.0 - + MOREDERIVED2: call bool CMain::RunTest_MoreDerived2() brtrue.s MOREDERIVED3 ldc.i4.0 stloc.0 - + MOREDERIVED3: call bool CMain::RunTest_MoreDerived3() brtrue.s MOREDERIVED4 ldc.i4.0 stloc.0 - + MOREDERIVED4: call bool CMain::RunTest_MoreDerived4() brtrue.s MOREDERIVED5 ldc.i4.0 stloc.0 - + MOREDERIVED5: call bool CMain::RunTest_MoreDerived5() brtrue.s MOREDERIVED6 ldc.i4.0 stloc.0 - + MOREDERIVED6: call bool CMain::RunTest_MoreDerived6() brtrue.s INVALID1 ldc.i4.0 - stloc.0 - + stloc.0 + // ===================================================================================== // INVALID1: @@ -1279,13 +1279,13 @@ leave.s INVALID2 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s INVALID2 } - + INVALID2: .try { @@ -1297,10 +1297,10 @@ leave.s INVALID3 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s INVALID3 } @@ -1332,7 +1332,7 @@ call void [System.Console]System.Console::WriteLine(string) ldc.i4.s 101 ret - + PASS: ldstr "Test PASSED" call void [System.Console]System.Console::WriteLine(string) diff --git a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/ReturnTypeValidation/ImplicitOverrideSameSigAsDecl.il b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/ReturnTypeValidation/ImplicitOverrideSameSigAsDecl.il index 2d8ed43645a7e..49d22348ca8f5 100644 --- a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/ReturnTypeValidation/ImplicitOverrideSameSigAsDecl.il +++ b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/ReturnTypeValidation/ImplicitOverrideSameSigAsDecl.il @@ -76,14 +76,14 @@ } // ======================================================================================== -// Main base type with various virtual methods that will be overriden later +// Main base type with various virtual methods that will be overridden later // ======================================================================================== .class public auto ansi beforefieldinit GenBaseType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - .method public hidebysig newslot virtual instance object MyFunc(string& res) + .method public hidebysig newslot virtual instance object MyFunc(string& res) { ldarg.1 ldstr "object GenBaseType.MyFunc()" @@ -91,7 +91,7 @@ newobj instance void A::.ctor() ret } - .method public hidebysig newslot virtual instance class B MyFunc(string& res) + .method public hidebysig newslot virtual instance class B MyFunc(string& res) { ldarg.1 ldstr "B GenBaseType.MyFunc()" @@ -99,7 +99,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class B GenToNonGen(string& res) + .method public hidebysig newslot virtual instance class B GenToNonGen(string& res) { ldarg.1 ldstr "B GenBaseType.GenToNonGen()" @@ -107,7 +107,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class B NonGenThroughGenFunc(string& res) + .method public hidebysig newslot virtual instance class B NonGenThroughGenFunc(string& res) { ldarg.1 ldstr "B GenBaseType.NonGenThroughGenFunc()" @@ -115,7 +115,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class GenRetType MyGenFunc(string& res) + .method public hidebysig newslot virtual instance class GenRetType MyGenFunc(string& res) { ldarg.1 ldstr "GenRetType GenBaseType.MyGenFunc()" @@ -123,7 +123,7 @@ newobj instance void class GenRetType::.ctor() ret } - .method public hidebysig newslot virtual instance class GenRetType> MyGenFunc(string& res) + .method public hidebysig newslot virtual instance class GenRetType> MyGenFunc(string& res) { ldarg.1 ldstr "GenRetType> GenBaseType.MyGenFunc()" @@ -134,7 +134,7 @@ } // ======================================================================================== -// SECOND LAYER type: overrides all virtuals on GenBaseType using MethodImpls with +// SECOND LAYER type: overrides all virtuals on GenBaseType using MethodImpls with // covariant return types (more derived return types) // ======================================================================================== @@ -179,7 +179,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class GenRetType NewFunc1(string& res) { .override method instance object class GenBaseType::MyFunc(string& res) @@ -189,7 +189,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class C NewFunc2(string& res) { .override method instance class B class GenBaseType::MyFunc(string& res) @@ -211,7 +211,7 @@ .class public auto ansi beforefieldinit Invalid1 extends class GenTestType { - .method public hidebysig virtual instance object MyFunc(string& res) + .method public hidebysig virtual instance object MyFunc(string& res) { ldnull ret @@ -220,7 +220,7 @@ } .class public auto ansi beforefieldinit Invalid2 extends class GenTestType { - .method public hidebysig virtual instance class B MyFunc(string& res) + .method public hidebysig virtual instance class B MyFunc(string& res) { ldnull ret @@ -229,7 +229,7 @@ } .class public auto ansi beforefieldinit Invalid3 extends class GenTestType { - .method public hidebysig virtual instance class B GenToNonGen(string& res) + .method public hidebysig virtual instance class B GenToNonGen(string& res) { ldnull ret @@ -238,7 +238,7 @@ } .class public auto ansi beforefieldinit Invalid4 extends class GenTestType { - .method public hidebysig virtual instance class B NonGenThroughGenFunc(string& res) + .method public hidebysig virtual instance class B NonGenThroughGenFunc(string& res) { ldnull ret @@ -247,7 +247,7 @@ } .class public auto ansi beforefieldinit Invalid5 extends class GenTestType { - .method public hidebysig virtual instance class GenRetType MyGenFunc(string& res) + .method public hidebysig virtual instance class GenRetType MyGenFunc(string& res) { ldnull ret @@ -256,7 +256,7 @@ } .class public auto ansi beforefieldinit Invalid6 extends class GenTestType { - .method public hidebysig virtual instance class GenRetType> MyGenFunc(string& res) + .method public hidebysig virtual instance class GenRetType> MyGenFunc(string& res) { ldnull ret @@ -268,42 +268,42 @@ .class public auto ansi beforefieldinit CMain extends [mscorlib]System.Object { - .method public static void RunTest1() noinlining + .method public static void RunTest1() noinlining { newobj instance void class Invalid1::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest2() noinlining + .method public static void RunTest2() noinlining { newobj instance void class Invalid2::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest3() noinlining + .method public static void RunTest3() noinlining { newobj instance void class Invalid3::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest4() noinlining + .method public static void RunTest4() noinlining { newobj instance void class Invalid4::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest5() noinlining + .method public static void RunTest5() noinlining { newobj instance void class Invalid5::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest6() noinlining + .method public static void RunTest6() noinlining { newobj instance void class Invalid6::.ctor() call void [System.Console]System.Console::WriteLine(object) @@ -317,10 +317,10 @@ ) .entrypoint .maxstack 2 - .locals init (bool V_0) + .locals init (bool V_0) ldc.i4.1 stloc.0 - + T1: .try { @@ -332,13 +332,13 @@ leave.s T2 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T2 } - + T2: .try { @@ -350,10 +350,10 @@ leave.s T3 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T3 } @@ -368,10 +368,10 @@ leave.s T4 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T4 } @@ -386,10 +386,10 @@ leave.s T5 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T5 } @@ -404,10 +404,10 @@ leave.s T6 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T6 } @@ -422,28 +422,28 @@ leave.s DONE } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s DONE - } + } DONE: - + ldloc.0 brtrue.s PASS ldc.i4.s 101 ret - + PASS: ldstr "Test PASSED" call void [System.Console]System.Console::WriteLine(string) ldc.i4.s 100 ret } - + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { .maxstack 8 diff --git a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/ReturnTypeValidation/OverrideSameSigAsDecl.il b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/ReturnTypeValidation/OverrideSameSigAsDecl.il index 2064a845e5f0e..2c1f7c3aec255 100644 --- a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/ReturnTypeValidation/OverrideSameSigAsDecl.il +++ b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/ReturnTypeValidation/OverrideSameSigAsDecl.il @@ -76,14 +76,14 @@ } // ======================================================================================== -// Main base type with various virtual methods that will be overriden later +// Main base type with various virtual methods that will be overridden later // ======================================================================================== .class public auto ansi beforefieldinit GenBaseType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - .method public hidebysig newslot virtual instance object MyFunc(string& res) + .method public hidebysig newslot virtual instance object MyFunc(string& res) { ldarg.1 ldstr "object GenBaseType.MyFunc()" @@ -91,7 +91,7 @@ newobj instance void A::.ctor() ret } - .method public hidebysig newslot virtual instance class B MyFunc(string& res) + .method public hidebysig newslot virtual instance class B MyFunc(string& res) { ldarg.1 ldstr "B GenBaseType.MyFunc()" @@ -99,7 +99,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class B GenToNonGen(string& res) + .method public hidebysig newslot virtual instance class B GenToNonGen(string& res) { ldarg.1 ldstr "B GenBaseType.GenToNonGen()" @@ -107,7 +107,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class B NonGenThroughGenFunc(string& res) + .method public hidebysig newslot virtual instance class B NonGenThroughGenFunc(string& res) { ldarg.1 ldstr "B GenBaseType.NonGenThroughGenFunc()" @@ -115,7 +115,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class GenRetType MyGenFunc(string& res) + .method public hidebysig newslot virtual instance class GenRetType MyGenFunc(string& res) { ldarg.1 ldstr "GenRetType GenBaseType.MyGenFunc()" @@ -123,7 +123,7 @@ newobj instance void class GenRetType::.ctor() ret } - .method public hidebysig newslot virtual instance class GenRetType> MyGenFunc(string& res) + .method public hidebysig newslot virtual instance class GenRetType> MyGenFunc(string& res) { ldarg.1 ldstr "GenRetType> GenBaseType.MyGenFunc()" @@ -131,7 +131,7 @@ newobj instance void class GenRetType>::.ctor() ret } - .method public hidebysig newslot virtual instance class GenRetType TestNonGenericDerived(string& res) + .method public hidebysig newslot virtual instance class GenRetType TestNonGenericDerived(string& res) { ldarg.1 ldstr "GenRetType GenBaseType.TestNonGenericDerived()" @@ -143,7 +143,7 @@ // ======================================================================================== -// SECOND LAYER type: overrides all virtuals on GenBaseType using MethodImpls with +// SECOND LAYER type: overrides all virtuals on GenBaseType using MethodImpls with // covariant return types (more derived return types) // ======================================================================================== @@ -188,7 +188,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class GenRetType NewFunc1(string& res) { .override method instance object class GenBaseType::MyFunc(string& res) @@ -198,7 +198,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class C NewFunc2(string& res) { .override method instance class B class GenBaseType::MyFunc(string& res) @@ -280,7 +280,7 @@ ldnull ret } - + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } @@ -300,42 +300,42 @@ .class public auto ansi beforefieldinit CMain extends [mscorlib]System.Object { - .method public static void RunTest1() noinlining + .method public static void RunTest1() noinlining { newobj instance void class Invalid1::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest2() noinlining + .method public static void RunTest2() noinlining { newobj instance void class Invalid2::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest3() noinlining + .method public static void RunTest3() noinlining { newobj instance void class Invalid3::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest4() noinlining + .method public static void RunTest4() noinlining { newobj instance void class Invalid4::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest5() noinlining + .method public static void RunTest5() noinlining { newobj instance void class Invalid5::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest6() noinlining + .method public static void RunTest6() noinlining { newobj instance void class Invalid6::.ctor() call void [System.Console]System.Console::WriteLine(object) @@ -349,10 +349,10 @@ ) .entrypoint .maxstack 2 - .locals init (bool V_0) + .locals init (bool V_0) ldc.i4.1 stloc.0 - + T1: .try { @@ -364,13 +364,13 @@ leave.s T2 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T2 } - + T2: .try { @@ -382,10 +382,10 @@ leave.s T3 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T3 } @@ -400,10 +400,10 @@ leave.s T4 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T4 } @@ -418,10 +418,10 @@ leave.s T5 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T5 } @@ -436,10 +436,10 @@ leave.s T6 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T6 } @@ -454,28 +454,28 @@ leave.s DONE } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s DONE - } + } DONE: - + ldloc.0 brtrue.s PASS ldc.i4.s 101 ret - + PASS: ldstr "Test PASSED" call void [System.Console]System.Console::WriteLine(string) ldc.i4.s 100 ret } - + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { .maxstack 8 diff --git a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/Structs/IncompatibleOverride.il b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/Structs/IncompatibleOverride.il index 39c67576567e9..d923cc2f791b0 100644 --- a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/Structs/IncompatibleOverride.il +++ b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/Structs/IncompatibleOverride.il @@ -25,33 +25,33 @@ .class interface public auto ansi abstract IGenDerive implements class IGenRetType { } // Structs implementing the interfaces -.class public sealed auto ansi A extends [mscorlib]System.ValueType +.class public sealed auto ansi A extends [mscorlib]System.ValueType implements IA { } -.class public sealed auto ansi B extends [mscorlib]System.ValueType +.class public sealed auto ansi B extends [mscorlib]System.ValueType implements IB { } -.class public sealed auto ansi RetType extends [mscorlib]System.ValueType +.class public sealed auto ansi RetType extends [mscorlib]System.ValueType implements class IGenRetType { } -.class public sealed auto ansi DerivedRetType extends [mscorlib]System.ValueType +.class public sealed auto ansi DerivedRetType extends [mscorlib]System.ValueType implements class IGenDerive { } -.class public sealed auto ansi GenRetType extends [mscorlib]System.ValueType +.class public sealed auto ansi GenRetType extends [mscorlib]System.ValueType implements class IGenRetType> { } -.class public sealed auto ansi DerivedGenRetType extends [mscorlib]System.ValueType +.class public sealed auto ansi DerivedGenRetType extends [mscorlib]System.ValueType implements class IGenDerive> { } // ======================================================================================== -// Main base type with various virtual methods that will be overriden later +// Main base type with various virtual methods that will be overridden later // ======================================================================================== .class public auto ansi beforefieldinit GenBaseType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - .method public hidebysig newslot virtual instance class IA NonGen(string& res) + .method public hidebysig newslot virtual instance class IA NonGen(string& res) { ldarg.1 ldstr "IA GenBaseType.NonGen()" @@ -59,7 +59,7 @@ ldnull ret } - .method public hidebysig newslot virtual instance class IGenRetType GenFunc(string& res) + .method public hidebysig newslot virtual instance class IGenRetType GenFunc(string& res) { ldarg.1 ldstr "IGenRetType GenBaseType.GenFunc()" @@ -67,7 +67,7 @@ ldnull ret } - .method public hidebysig newslot virtual instance class IGenRetType> GenFunc(string& res) + .method public hidebysig newslot virtual instance class IGenRetType> GenFunc(string& res) { ldarg.1 ldstr "IGenRetType> GenBaseType.GenFunc()" @@ -86,7 +86,7 @@ .class public auto ansi beforefieldinit Invalid1 extends class GenBaseType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - .method public hidebysig newslot virtual instance valuetype A NonGen(string& res) + .method public hidebysig newslot virtual instance valuetype A NonGen(string& res) { .override method instance class IA class GenBaseType::NonGen(string& res) .locals ( valuetype A ) @@ -98,7 +98,7 @@ .class public auto ansi beforefieldinit Invalid2 extends class GenBaseType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - .method public hidebysig newslot virtual instance valuetype B NonGen(string& res) + .method public hidebysig newslot virtual instance valuetype B NonGen(string& res) { .override method instance class IA class GenBaseType::NonGen(string& res) .locals ( valuetype B ) @@ -110,7 +110,7 @@ .class public auto ansi beforefieldinit Invalid3 extends class GenBaseType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - .method public hidebysig newslot virtual instance valuetype RetType GenFunc(string& res) + .method public hidebysig newslot virtual instance valuetype RetType GenFunc(string& res) { .override method instance class IGenRetType class GenBaseType::GenFunc(string& res) .locals ( valuetype RetType ) @@ -122,7 +122,7 @@ .class public auto ansi beforefieldinit Invalid4 extends class GenBaseType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - .method public hidebysig newslot virtual instance valuetype DerivedRetType GenFunc(string& res) + .method public hidebysig newslot virtual instance valuetype DerivedRetType GenFunc(string& res) { .override method instance class IGenRetType class GenBaseType::GenFunc(string& res) .locals ( valuetype DerivedRetType ) @@ -134,7 +134,7 @@ .class public auto ansi beforefieldinit Invalid5 extends class GenBaseType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - .method public hidebysig newslot virtual instance valuetype GenRetType GenFunc(string& res) + .method public hidebysig newslot virtual instance valuetype GenRetType GenFunc(string& res) { .override method instance class IGenRetType> class GenBaseType::GenFunc(string& res) .locals ( valuetype GenRetType ) @@ -146,7 +146,7 @@ .class public auto ansi beforefieldinit Invalid6 extends class GenBaseType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - .method public hidebysig newslot virtual instance valuetype DerivedGenRetType GenFunc(string& res) + .method public hidebysig newslot virtual instance valuetype DerivedGenRetType GenFunc(string& res) { .override method instance class IGenRetType> class GenBaseType::GenFunc(string& res) .locals ( valuetype DerivedGenRetType ) @@ -159,42 +159,42 @@ .class public auto ansi beforefieldinit CMain extends [mscorlib]System.Object { - .method public static void RunTest1() noinlining + .method public static void RunTest1() noinlining { newobj instance void class Invalid1::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest2() noinlining + .method public static void RunTest2() noinlining { newobj instance void class Invalid2::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest3() noinlining + .method public static void RunTest3() noinlining { newobj instance void class Invalid3::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest4() noinlining + .method public static void RunTest4() noinlining { newobj instance void class Invalid4::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest5() noinlining + .method public static void RunTest5() noinlining { newobj instance void class Invalid5::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunTest6() noinlining + .method public static void RunTest6() noinlining { newobj instance void class Invalid6::.ctor() call void [System.Console]System.Console::WriteLine(object) @@ -208,10 +208,10 @@ ) .entrypoint .maxstack 2 - .locals init (bool V_0) + .locals init (bool V_0) ldc.i4.1 stloc.0 - + T1: .try { @@ -223,13 +223,13 @@ leave.s T2 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T2 } - + T2: .try { @@ -241,10 +241,10 @@ leave.s T3 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T3 } @@ -259,10 +259,10 @@ leave.s T4 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T4 } @@ -277,10 +277,10 @@ leave.s T5 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T5 } @@ -295,10 +295,10 @@ leave.s T6 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s T6 } @@ -313,28 +313,28 @@ leave.s DONE } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s DONE } DONE: - + ldloc.0 brtrue.s PASS ldc.i4.s 101 ret - + PASS: ldstr "Test PASSED" call void [System.Console]System.Console::WriteLine(string) ldc.i4.s 100 ret } - + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 7 (0x7) diff --git a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/OverrideMoreDerivedReturn.il b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/OverrideMoreDerivedReturn.il index fb803ab54411f..53c720508843e 100644 --- a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/OverrideMoreDerivedReturn.il +++ b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/OverrideMoreDerivedReturn.il @@ -11,126 +11,126 @@ // Types that will be used as return types on the various methods // ======================================================================================== -.class public auto ansi beforefieldinit A +.class public auto ansi beforefieldinit A { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit B extends A +.class public auto ansi beforefieldinit B extends A { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit C extends B +.class public auto ansi beforefieldinit C extends B { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit D extends C +.class public auto ansi beforefieldinit D extends C { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenRetType +.class public auto ansi beforefieldinit GenRetType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerivedRetType extends class GenRetType +.class public auto ansi beforefieldinit GenDerivedRetType extends class GenRetType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerivedRetType2 extends class GenDerivedRetType +.class public auto ansi beforefieldinit GenDerivedRetType2 extends class GenDerivedRetType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit Dictionary +.class public auto ansi beforefieldinit Dictionary { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerive1 extends class GenRetType +.class public auto ansi beforefieldinit GenDerive1 extends class GenRetType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerive2 extends class GenDerive1> +.class public auto ansi beforefieldinit GenDerive2 extends class GenDerive1> { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerive3 extends class GenDerive2 +.class public auto ansi beforefieldinit GenDerive3 extends class GenDerive2 { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerive4 extends class GenDerive3 +.class public auto ansi beforefieldinit GenDerive4 extends class GenDerive3 { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived1 extends class GenRetType +.class public auto ansi beforefieldinit NonGenericDerived1 extends class GenRetType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived2 extends class NonGenericDerived1 +.class public auto ansi beforefieldinit NonGenericDerived2 extends class NonGenericDerived1 { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived3 extends class NonGenericDerived2 +.class public auto ansi beforefieldinit NonGenericDerived3 extends class NonGenericDerived2 { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived4 extends NonGenericDerived3 +.class public auto ansi beforefieldinit NonGenericDerived4 extends NonGenericDerived3 { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived5 extends NonGenericDerived4 +.class public auto ansi beforefieldinit NonGenericDerived5 extends NonGenericDerived4 { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenToNonGen1 extends C +.class public auto ansi beforefieldinit GenToNonGen1 extends C { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenToNonGen2 extends class GenToNonGen1> +.class public auto ansi beforefieldinit GenToNonGen2 extends class GenToNonGen1> { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenToNonGen3 extends class GenToNonGen2 +.class public auto ansi beforefieldinit GenToNonGen3 extends class GenToNonGen2 { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenToNonGen4 extends class GenToNonGen3 +.class public auto ansi beforefieldinit GenToNonGen4 extends class GenToNonGen3 { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen1 extends C +.class public auto ansi beforefieldinit NonGenThroughGen1 extends C { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen2 extends class NonGenThroughGen1> +.class public auto ansi beforefieldinit NonGenThroughGen2 extends class NonGenThroughGen1> { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen3 extends class NonGenThroughGen2 +.class public auto ansi beforefieldinit NonGenThroughGen3 extends class NonGenThroughGen2 { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen4 extends NonGenThroughGen3 +.class public auto ansi beforefieldinit NonGenThroughGen4 extends NonGenThroughGen3 { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen5 extends NonGenThroughGen4 +.class public auto ansi beforefieldinit NonGenThroughGen5 extends NonGenThroughGen4 { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } // ======================================================================================== -// Main base type with various virtual methods that will be overriden later +// Main base type with various virtual methods that will be overridden later // ======================================================================================== .class public auto ansi beforefieldinit GenBaseType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - .method public hidebysig newslot virtual instance object MyFunc(string& res) + .method public hidebysig newslot virtual instance object MyFunc(string& res) { ldarg.1 ldstr "object GenBaseType.MyFunc()" @@ -138,7 +138,7 @@ newobj instance void A::.ctor() ret } - .method public hidebysig newslot virtual instance class B MyFunc(string& res) + .method public hidebysig newslot virtual instance class B MyFunc(string& res) { ldarg.1 ldstr "B GenBaseType.MyFunc()" @@ -146,7 +146,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class B GenToNonGen(string& res) + .method public hidebysig newslot virtual instance class B GenToNonGen(string& res) { ldarg.1 ldstr "B GenBaseType.GenToNonGen()" @@ -154,7 +154,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class B NonGenThroughGenFunc(string& res) + .method public hidebysig newslot virtual instance class B NonGenThroughGenFunc(string& res) { ldarg.1 ldstr "B GenBaseType.NonGenThroughGenFunc()" @@ -162,7 +162,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class GenRetType MyGenFunc(string& res) + .method public hidebysig newslot virtual instance class GenRetType MyGenFunc(string& res) { ldarg.1 ldstr "GenRetType GenBaseType.MyGenFunc()" @@ -170,7 +170,7 @@ newobj instance void class GenRetType::.ctor() ret } - .method public hidebysig newslot virtual instance class GenRetType> MyGenFunc(string& res) + .method public hidebysig newslot virtual instance class GenRetType> MyGenFunc(string& res) { ldarg.1 ldstr "GenRetType> GenBaseType.MyGenFunc()" @@ -178,7 +178,7 @@ newobj instance void class GenRetType>::.ctor() ret } - .method public hidebysig newslot virtual instance class GenRetType TestNonGenericDerived(string& res) + .method public hidebysig newslot virtual instance class GenRetType TestNonGenericDerived(string& res) { ldarg.1 ldstr "GenRetType GenBaseType.TestNonGenericDerived()" @@ -190,7 +190,7 @@ // ======================================================================================== -// SECOND LAYER type: overrides all virtuals on GenBaseType using MethodImpls with +// SECOND LAYER type: overrides all virtuals on GenBaseType using MethodImpls with // covariant return types (more derived return types) // ======================================================================================== @@ -235,7 +235,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class GenDerivedRetType MyFunc(string& res) { .override method instance object class GenBaseType::MyFunc(string& res) @@ -245,7 +245,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class C MyFunc(string& res) { .override method instance class B class GenBaseType::MyFunc(string& res) @@ -309,7 +309,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class GenDerivedRetType2 MyFunc(string& res) { .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) @@ -320,7 +320,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class D MyFunc(string& res) { .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) @@ -344,7 +344,7 @@ string a, [opt] string b, [opt] string c, - [opt] string d) cil managed + [opt] string d) cil managed { .param [3] = nullref .param [4] = nullref @@ -440,10 +440,10 @@ // 3) The signature from GenDerivedTestType with covariant returns // And verify that the override on GenDerivedTestType is the one that executes - .method public static bool RunTest1() noinlining + .method public static bool RunTest1() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenDerivedTestType::.ctor() ldloca.s 0 callvirt instance object class GenBaseType::MyFunc(string&) @@ -468,10 +468,10 @@ ret } - .method public static bool RunTest2() noinlining + .method public static bool RunTest2() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenDerivedTestType::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::MyFunc(string&) @@ -495,11 +495,11 @@ call bool CMain::CheckResults(string,string,string,string,string) ret } - - .method public static bool RunTest3() noinlining + + .method public static bool RunTest3() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenDerivedTestType::.ctor() ldloca.s 0 callvirt instance class GenRetType> class GenBaseType::MyGenFunc(string&) @@ -524,10 +524,10 @@ ret } - .method public static bool RunTest4() noinlining + .method public static bool RunTest4() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenDerivedTestType::.ctor() ldloca.s 0 callvirt instance class GenRetType class GenBaseType::MyGenFunc(string&) @@ -552,10 +552,10 @@ ret } - .method public static bool RunTest5() noinlining + .method public static bool RunTest5() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenDerivedTestType::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::GenToNonGen(string&) @@ -580,10 +580,10 @@ ret } - .method public static bool RunTest6() noinlining + .method public static bool RunTest6() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenDerivedTestType::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::NonGenThroughGenFunc(string&) @@ -618,46 +618,46 @@ .entrypoint .maxstack 2 .locals init ( bool result ) - + ldc.i4.1 stloc.0 - + T1: call bool CMain::RunTest1() brtrue.s T2 ldc.i4.0 stloc.0 - + T2: call bool CMain::RunTest2() brtrue.s T3 ldc.i4.0 stloc.0 - + T3: call bool CMain::RunTest3() brtrue.s T4 ldc.i4.0 stloc.0 - + T4: call bool CMain::RunTest4() brtrue.s T5 ldc.i4.0 stloc.0 - + T5: call bool CMain::RunTest5() brtrue.s T6 ldc.i4.0 stloc.0 - + T6: call bool CMain::RunTest6() brtrue.s DONE ldc.i4.0 stloc.0 - + DONE: ldloc.0 brtrue.s PASS @@ -666,7 +666,7 @@ call void [System.Console]System.Console::WriteLine(string) ldc.i4.s 101 ret - + PASS: ldstr "Test PASSED" call void [System.Console]System.Console::WriteLine(string) diff --git a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest.il b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest.il index 1f91183ae7ff8..795dc10671fa7 100644 --- a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest.il +++ b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest.il @@ -13,97 +13,97 @@ .class public auto ansi beforefieldinit A { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit B extends A +.class public auto ansi beforefieldinit B extends A { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit C extends B +.class public auto ansi beforefieldinit C extends B { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenRetType +.class public auto ansi beforefieldinit GenRetType { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit Dictionary +.class public auto ansi beforefieldinit Dictionary { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerive1 extends class GenRetType +.class public auto ansi beforefieldinit GenDerive1 extends class GenRetType { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerive2 extends class GenDerive1> +.class public auto ansi beforefieldinit GenDerive2 extends class GenDerive1> { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerive3 extends class GenDerive2 +.class public auto ansi beforefieldinit GenDerive3 extends class GenDerive2 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived1 extends class GenRetType +.class public auto ansi beforefieldinit NonGenericDerived1 extends class GenRetType { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived2 extends class NonGenericDerived1 +.class public auto ansi beforefieldinit NonGenericDerived2 extends class NonGenericDerived1 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived3 extends class NonGenericDerived2 +.class public auto ansi beforefieldinit NonGenericDerived3 extends class NonGenericDerived2 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived4 extends NonGenericDerived3 +.class public auto ansi beforefieldinit NonGenericDerived4 extends NonGenericDerived3 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenToNonGen1 extends C +.class public auto ansi beforefieldinit GenToNonGen1 extends C { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenToNonGen2 extends class GenToNonGen1> +.class public auto ansi beforefieldinit GenToNonGen2 extends class GenToNonGen1> { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenToNonGen3 extends class GenToNonGen2 +.class public auto ansi beforefieldinit GenToNonGen3 extends class GenToNonGen2 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen1 extends C +.class public auto ansi beforefieldinit NonGenThroughGen1 extends C { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen2 extends class NonGenThroughGen1> +.class public auto ansi beforefieldinit NonGenThroughGen2 extends class NonGenThroughGen1> { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen3 extends class NonGenThroughGen2 +.class public auto ansi beforefieldinit NonGenThroughGen3 extends class NonGenThroughGen2 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen4 extends NonGenThroughGen3 +.class public auto ansi beforefieldinit NonGenThroughGen4 extends NonGenThroughGen3 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } // ======================================================================================== -// Main base type with various virtual methods that will be overriden later +// Main base type with various virtual methods that will be overridden later // ======================================================================================== .class public auto ansi beforefieldinit GenBaseType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - .method public hidebysig newslot virtual instance object MyFunc(string& res) + .method public hidebysig newslot virtual instance object MyFunc(string& res) { ldarg.1 ldstr "object GenBaseType.MyFunc()" @@ -111,7 +111,7 @@ newobj instance void A::.ctor() ret } - .method public hidebysig newslot virtual instance class B MyFunc(string& res) + .method public hidebysig newslot virtual instance class B MyFunc(string& res) { ldarg.1 ldstr "B GenBaseType.MyFunc()" @@ -119,7 +119,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class B GenToNonGen(string& res) + .method public hidebysig newslot virtual instance class B GenToNonGen(string& res) { ldarg.1 ldstr "B GenBaseType.GenToNonGen()" @@ -127,7 +127,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class B NonGenThroughGenFunc(string& res) + .method public hidebysig newslot virtual instance class B NonGenThroughGenFunc(string& res) { ldarg.1 ldstr "B GenBaseType.NonGenThroughGenFunc()" @@ -135,7 +135,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class GenRetType MyGenFunc(string& res) + .method public hidebysig newslot virtual instance class GenRetType MyGenFunc(string& res) { ldarg.1 ldstr "GenRetType GenBaseType.MyGenFunc()" @@ -143,7 +143,7 @@ newobj instance void class GenRetType::.ctor() ret } - .method public hidebysig newslot virtual instance class GenRetType> MyGenFunc(string& res) + .method public hidebysig newslot virtual instance class GenRetType> MyGenFunc(string& res) { ldarg.1 ldstr "GenRetType> GenBaseType.MyGenFunc()" @@ -154,7 +154,7 @@ } // ======================================================================================== -// SECOND LAYER type: overrides *SOME* virtuals on GenBaseType using MethodImpls with +// SECOND LAYER type: overrides *SOME* virtuals on GenBaseType using MethodImpls with // covariant return types (more derived return types) // ======================================================================================== @@ -209,7 +209,7 @@ // ======================================================================================== -// THIRD LAYER type: overrides all virtuals from GenBaseType using MethodImpls with +// THIRD LAYER type: overrides all virtuals from GenBaseType using MethodImpls with // covariant return types (more derived return types than the ones used in GenMiddleType) // ======================================================================================== @@ -256,7 +256,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class GenRetType MyFunc(string& res) { .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) @@ -267,7 +267,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class C MyFunc(string& res) { .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) @@ -278,7 +278,7 @@ ldnull ret } - + // ======================================================================================== // Set of implicit overrides that should be ignored given there are explicit overrides from the MethodImpls // ======================================================================================== @@ -309,14 +309,14 @@ newobj instance void [System.Runtime]System.Exception::.ctor(string) throw } - + .method public hidebysig virtual instance object MyFunc(string& res) { ldstr "Should never execute this method" newobj instance void [System.Runtime]System.Exception::.ctor(string) throw } - + .method public hidebysig virtual instance class B MyFunc(string& res) { ldstr "Should never execute this method" @@ -367,7 +367,7 @@ ldnull ret } - + .method public hidebysig virtual instance class GenRetType MyFunc(string& res) { ldarg.1 @@ -376,7 +376,7 @@ ldnull ret } - + .method public hidebysig virtual instance class C MyFunc(string& res) { ldarg.1 @@ -435,7 +435,7 @@ ldnull ret } - + .method public hidebysig virtual instance class GenRetType MyFunc_MethodImpl(string& res) { .override method instance class GenRetType class GenTestType::MyFunc(string& res) @@ -445,7 +445,7 @@ ldnull ret } - + .method public hidebysig virtual instance class C MyFunc_MethodImpl(string& res) { .override method instance class C class GenTestType::MyFunc(string& res) @@ -468,7 +468,7 @@ string a, [opt] string b, [opt] string c, - [opt] string d) cil managed + [opt] string d) cil managed { .param [3] = nullref .param [4] = nullref @@ -560,14 +560,14 @@ // ============== Test using GenTestType ============== // // These test methods will callvirt each method using: // 1) The signature from GetBaseType - // 2) The signature from GenMiddleType with covariant returns (when applicable) + // 2) The signature from GenMiddleType with covariant returns (when applicable) // 3) The signature from GenTestType with covariant returns // And verify that the override on GetTestType is the one that executes - - .method public static bool RunTest1() noinlining + + .method public static bool RunTest1() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance object class GenBaseType::MyFunc(string&) @@ -587,10 +587,10 @@ ret } - .method public static bool RunTest2() noinlining + .method public static bool RunTest2() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::MyFunc(string&) @@ -609,11 +609,11 @@ call bool CMain::CheckResults(string,string,string,string,string) ret } - - .method public static bool RunTest3() noinlining + + .method public static bool RunTest3() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class GenRetType> class GenBaseType::MyGenFunc(string&) @@ -638,10 +638,10 @@ ret } - .method public static bool RunTest4() noinlining + .method public static bool RunTest4() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class GenRetType class GenBaseType::MyGenFunc(string&) @@ -666,10 +666,10 @@ ret } - .method public static bool RunTest5() noinlining + .method public static bool RunTest5() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::GenToNonGen(string&) @@ -694,10 +694,10 @@ ret } - .method public static bool RunTest6() noinlining + .method public static bool RunTest6() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::NonGenThroughGenFunc(string&) @@ -729,11 +729,11 @@ // 3) The signature from GenTestType with covariant returns // 4) The signature from ImplicitOverrideToMethodImpls // And verify that the override on ImplicitOverrideToMethodImpls is the one that executes - - .method public static bool RunTest_ImplicitOverride1() noinlining + + .method public static bool RunTest_ImplicitOverride1() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class ImplicitOverrideToMethodImpls::.ctor() ldloca.s 0 callvirt instance object class GenBaseType::MyFunc(string&) @@ -758,10 +758,10 @@ ret } - .method public static bool RunTest_ImplicitOverride2() noinlining + .method public static bool RunTest_ImplicitOverride2() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class ImplicitOverrideToMethodImpls::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::MyFunc(string&) @@ -785,11 +785,11 @@ call bool CMain::CheckResults(string,string,string,string,string) ret } - - .method public static bool RunTest_ImplicitOverride3() noinlining + + .method public static bool RunTest_ImplicitOverride3() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class ImplicitOverrideToMethodImpls::.ctor() ldloca.s 0 callvirt instance class GenRetType> class GenBaseType::MyGenFunc(string&) @@ -819,10 +819,10 @@ ret } - .method public static bool RunTest_ImplicitOverride4() noinlining + .method public static bool RunTest_ImplicitOverride4() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class ImplicitOverrideToMethodImpls::.ctor() ldloca.s 0 callvirt instance class GenRetType class GenBaseType::MyGenFunc(string&) @@ -852,10 +852,10 @@ ret } - .method public static bool RunTest_ImplicitOverride5() noinlining + .method public static bool RunTest_ImplicitOverride5() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class ImplicitOverrideToMethodImpls::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::GenToNonGen(string&) @@ -885,10 +885,10 @@ ret } - .method public static bool RunTest_ImplicitOverride6() noinlining + .method public static bool RunTest_ImplicitOverride6() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class ImplicitOverrideToMethodImpls::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::NonGenThroughGenFunc(string&) @@ -925,11 +925,11 @@ // 3) The signature from GenTestType with covariant returns // 4) The signature from ExplicitOverrideToMethodImpls // And verify that the override on ExplicitOverrideToMethodImpls is the one that executes - - .method public static bool RunTest_ExplicitOverride1() noinlining + + .method public static bool RunTest_ExplicitOverride1() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class ExplicitOverrideToMethodImpls::.ctor() ldloca.s 0 callvirt instance object class GenBaseType::MyFunc(string&) @@ -954,10 +954,10 @@ ret } - .method public static bool RunTest_ExplicitOverride2() noinlining + .method public static bool RunTest_ExplicitOverride2() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class ExplicitOverrideToMethodImpls::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::MyFunc(string&) @@ -981,11 +981,11 @@ call bool CMain::CheckResults(string,string,string,string,string) ret } - - .method public static bool RunTest_ExplicitOverride3() noinlining + + .method public static bool RunTest_ExplicitOverride3() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class ExplicitOverrideToMethodImpls::.ctor() ldloca.s 0 callvirt instance class GenRetType> class GenBaseType::MyGenFunc(string&) @@ -1015,10 +1015,10 @@ ret } - .method public static bool RunTest_ExplicitOverride4() noinlining + .method public static bool RunTest_ExplicitOverride4() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class ExplicitOverrideToMethodImpls::.ctor() ldloca.s 0 callvirt instance class GenRetType class GenBaseType::MyGenFunc(string&) @@ -1048,10 +1048,10 @@ ret } - .method public static bool RunTest_ExplicitOverride5() noinlining + .method public static bool RunTest_ExplicitOverride5() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class ExplicitOverrideToMethodImpls::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::GenToNonGen(string&) @@ -1081,10 +1081,10 @@ ret } - .method public static bool RunTest_ExplicitOverride6() noinlining + .method public static bool RunTest_ExplicitOverride6() noinlining { .locals init (string res1, string res2, string res3, string res4) - + newobj instance void class ExplicitOverrideToMethodImpls::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::NonGenThroughGenFunc(string&) @@ -1118,12 +1118,12 @@ // These test methods will callvirt each method using: // 1) The signature from GetBaseType // 2) The signature from GenMiddleType with covariant returns - // And verify that the override on GenMiddleType is the one that executes - - .method public static bool RunTest_Middle1() noinlining + // And verify that the override on GenMiddleType is the one that executes + + .method public static bool RunTest_Middle1() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenMiddleType::.ctor() ldloca.s 0 callvirt instance class GenRetType> class GenBaseType::MyGenFunc(string&) @@ -1143,10 +1143,10 @@ ret } - .method public static bool RunTest_Middle2() noinlining + .method public static bool RunTest_Middle2() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenMiddleType::.ctor() ldloca.s 0 callvirt instance class GenRetType class GenBaseType::MyGenFunc(string&) @@ -1166,10 +1166,10 @@ ret } - .method public static bool RunTest_Middle3() noinlining + .method public static bool RunTest_Middle3() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenMiddleType::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::GenToNonGen(string&) @@ -1189,10 +1189,10 @@ ret } - .method public static bool RunTest_Middle4() noinlining + .method public static bool RunTest_Middle4() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenMiddleType::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::NonGenThroughGenFunc(string&) @@ -1211,9 +1211,9 @@ call bool CMain::CheckResults(string,string,string,string,string) ret } - + // ===================================================================================== // - + .method public hidebysig static int32 Main( string[] args) cil managed { .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( @@ -1222,72 +1222,72 @@ .entrypoint .maxstack 2 .locals init ( bool result ) - + ldc.i4.1 stloc.0 - + T1: call bool CMain::RunTest1() brtrue.s T2 ldc.i4.0 stloc.0 - + T2: call bool CMain::RunTest2() brtrue.s T3 ldc.i4.0 stloc.0 - + T3: call bool CMain::RunTest3() brtrue.s T4 ldc.i4.0 stloc.0 - + T4: call bool CMain::RunTest4() brtrue.s T5 ldc.i4.0 stloc.0 - + T5: call bool CMain::RunTest5() brtrue.s T6 ldc.i4.0 stloc.0 - + T6: call bool CMain::RunTest6() brtrue.s M1 ldc.i4.0 stloc.0 - + // ===================================================================================== // - + M1: call bool CMain::RunTest_Middle1() brtrue.s M2 ldc.i4.0 stloc.0 - + M2: call bool CMain::RunTest_Middle2() brtrue.s M3 ldc.i4.0 stloc.0 - + M3: call bool CMain::RunTest_Middle3() brtrue.s M4 ldc.i4.0 stloc.0 - + M4: call bool CMain::RunTest_Middle4() brtrue.s IMP_OVERRIDE1 ldc.i4.0 stloc.0 - + // ===================================================================================== // IMP_OVERRIDE1: @@ -1295,37 +1295,37 @@ brtrue.s IMP_OVERRIDE2 ldc.i4.0 stloc.0 - + IMP_OVERRIDE2: call bool CMain::RunTest_ImplicitOverride2() brtrue.s IMP_OVERRIDE3 ldc.i4.0 stloc.0 - + IMP_OVERRIDE3: call bool CMain::RunTest_ImplicitOverride3() brtrue.s IMP_OVERRIDE4 ldc.i4.0 stloc.0 - + IMP_OVERRIDE4: call bool CMain::RunTest_ImplicitOverride4() brtrue.s IMP_OVERRIDE5 ldc.i4.0 stloc.0 - + IMP_OVERRIDE5: call bool CMain::RunTest_ImplicitOverride5() brtrue.s IMP_OVERRIDE6 ldc.i4.0 stloc.0 - + IMP_OVERRIDE6: call bool CMain::RunTest_ImplicitOverride6() brtrue.s EXP_OVERRIDE1 ldc.i4.0 - stloc.0 - + stloc.0 + // ===================================================================================== // EXP_OVERRIDE1: @@ -1333,36 +1333,36 @@ brtrue.s EXP_OVERRIDE2 ldc.i4.0 stloc.0 - + EXP_OVERRIDE2: call bool CMain::RunTest_ExplicitOverride2() brtrue.s EXP_OVERRIDE3 ldc.i4.0 stloc.0 - + EXP_OVERRIDE3: call bool CMain::RunTest_ExplicitOverride3() brtrue.s EXP_OVERRIDE4 ldc.i4.0 stloc.0 - + EXP_OVERRIDE4: call bool CMain::RunTest_ExplicitOverride4() brtrue.s EXP_OVERRIDE5 ldc.i4.0 stloc.0 - + EXP_OVERRIDE5: call bool CMain::RunTest_ExplicitOverride5() brtrue.s EXP_OVERRIDE6 ldc.i4.0 stloc.0 - + EXP_OVERRIDE6: call bool CMain::RunTest_ExplicitOverride6() brtrue.s DONE ldc.i4.0 - stloc.0 + stloc.0 // ===================================================================================== // @@ -1374,7 +1374,7 @@ call void [System.Console]System.Console::WriteLine(string) ldc.i4.s 101 ret - + PASS: ldstr "Test PASSED" call void [System.Console]System.Console::WriteLine(string) diff --git a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTestDelegates.il b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTestDelegates.il index 5ee3b7f6b850a..e5c59af4ac778 100644 --- a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTestDelegates.il +++ b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTestDelegates.il @@ -13,85 +13,85 @@ .class public auto ansi beforefieldinit A { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit B extends A +.class public auto ansi beforefieldinit B extends A { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit C extends B +.class public auto ansi beforefieldinit C extends B { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenRetType +.class public auto ansi beforefieldinit GenRetType { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit Dictionary +.class public auto ansi beforefieldinit Dictionary { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerive1 extends class GenRetType +.class public auto ansi beforefieldinit GenDerive1 extends class GenRetType { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerive2 extends class GenDerive1> +.class public auto ansi beforefieldinit GenDerive2 extends class GenDerive1> { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerive3 extends class GenDerive2 +.class public auto ansi beforefieldinit GenDerive3 extends class GenDerive2 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived1 extends class GenRetType +.class public auto ansi beforefieldinit NonGenericDerived1 extends class GenRetType { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived2 extends class NonGenericDerived1 +.class public auto ansi beforefieldinit NonGenericDerived2 extends class NonGenericDerived1 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived3 extends class NonGenericDerived2 +.class public auto ansi beforefieldinit NonGenericDerived3 extends class NonGenericDerived2 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived4 extends NonGenericDerived3 +.class public auto ansi beforefieldinit NonGenericDerived4 extends NonGenericDerived3 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenToNonGen1 extends C +.class public auto ansi beforefieldinit GenToNonGen1 extends C { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenToNonGen2 extends class GenToNonGen1> +.class public auto ansi beforefieldinit GenToNonGen2 extends class GenToNonGen1> { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenToNonGen3 extends class GenToNonGen2 +.class public auto ansi beforefieldinit GenToNonGen3 extends class GenToNonGen2 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen1 extends C +.class public auto ansi beforefieldinit NonGenThroughGen1 extends C { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen2 extends class NonGenThroughGen1> +.class public auto ansi beforefieldinit NonGenThroughGen2 extends class NonGenThroughGen1> { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen3 extends class NonGenThroughGen2 +.class public auto ansi beforefieldinit NonGenThroughGen3 extends class NonGenThroughGen2 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen4 extends NonGenThroughGen3 +.class public auto ansi beforefieldinit NonGenThroughGen4 extends NonGenThroughGen3 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } .class private auto ansi sealed En extends [System.Runtime]System.Enum @@ -101,14 +101,14 @@ // ======================================================================================== -// Main base type with various virtual methods that will be overriden later +// Main base type with various virtual methods that will be overridden later // ======================================================================================== .class public auto ansi beforefieldinit GenBaseType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - .method public hidebysig newslot virtual instance object MyFunc(string& res) + .method public hidebysig newslot virtual instance object MyFunc(string& res) { ldarg.1 ldstr "object GenBaseType.MyFunc()" @@ -116,7 +116,7 @@ newobj instance void A::.ctor() ret } - .method public hidebysig newslot virtual instance class B MyFunc(string& res) + .method public hidebysig newslot virtual instance class B MyFunc(string& res) { ldarg.1 ldstr "B GenBaseType.MyFunc()" @@ -124,7 +124,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class B GenToNonGen(string& res) + .method public hidebysig newslot virtual instance class B GenToNonGen(string& res) { ldarg.1 ldstr "B GenBaseType.GenToNonGen()" @@ -132,7 +132,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class B NonGenThroughGenFunc(string& res) + .method public hidebysig newslot virtual instance class B NonGenThroughGenFunc(string& res) { ldarg.1 ldstr "B GenBaseType.NonGenThroughGenFunc()" @@ -140,7 +140,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class GenRetType MyGenFunc(string& res) + .method public hidebysig newslot virtual instance class GenRetType MyGenFunc(string& res) { ldarg.1 ldstr "GenRetType GenBaseType.MyGenFunc()" @@ -148,7 +148,7 @@ newobj instance void class GenRetType::.ctor() ret } - .method public hidebysig newslot virtual instance class GenRetType> MyGenFunc(string& res) + .method public hidebysig newslot virtual instance class GenRetType> MyGenFunc(string& res) { ldarg.1 ldstr "GenRetType> GenBaseType.MyGenFunc()" @@ -157,17 +157,17 @@ ret } - .method public hidebysig newslot virtual instance int32[] RetIntArr() + .method public hidebysig newslot virtual instance int32[] RetIntArr() { ldstr "base.retintarr" call void [System.Console]System.Console::WriteLine(string) - ldnull + ldnull ret } } // ======================================================================================== -// SECOND LAYER type: overrides *SOME* virtuals on GenBaseType using MethodImpls with +// SECOND LAYER type: overrides *SOME* virtuals on GenBaseType using MethodImpls with // covariant return types (more derived return types) // ======================================================================================== @@ -222,7 +222,7 @@ // ======================================================================================== -// THIRD LAYER type: overrides all virtuals from GenBaseType using MethodImpls with +// THIRD LAYER type: overrides all virtuals from GenBaseType using MethodImpls with // covariant return types (more derived return types than the ones used in GenMiddleType) // ======================================================================================== @@ -269,7 +269,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class GenRetType MyFunc(string& res) { .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) @@ -280,7 +280,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class C MyFunc(string& res) { .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) @@ -291,7 +291,7 @@ ldnull ret } - + // ======================================================================================== // Set of implicit overrides that should be ignored given there are explicit overrides from the MethodImpls // ======================================================================================== @@ -322,14 +322,14 @@ newobj instance void [System.Runtime]System.Exception::.ctor(string) throw } - + .method public hidebysig virtual instance object MyFunc(string& res) { ldstr "Should never execute this method" newobj instance void [System.Runtime]System.Exception::.ctor(string) throw } - + .method public hidebysig virtual instance class B MyFunc(string& res) { ldstr "Should never execute this method" @@ -345,26 +345,26 @@ .class private auto ansi sealed Del_Obj extends [System.Runtime]System.MulticastDelegate { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } // end of method Del_Obj::.ctor - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance object Invoke(string& res) runtime managed { } // end of method Del_Obj::Invoke - .method public hidebysig newslot virtual - instance class [System.Runtime]System.IAsyncResult + .method public hidebysig newslot virtual + instance class [System.Runtime]System.IAsyncResult BeginInvoke(string& res, class [System.Runtime]System.AsyncCallback callback, object 'object') runtime managed { } // end of method Del_Obj::BeginInvoke - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance object EndInvoke(string& res, class [System.Runtime]System.IAsyncResult result) runtime managed { @@ -374,26 +374,26 @@ .class private auto ansi sealed Del_B extends [System.Runtime]System.MulticastDelegate { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } // end of method Del_B::.ctor - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance class B Invoke(string& res) runtime managed { } // end of method Del_B::Invoke - .method public hidebysig newslot virtual - instance class [System.Runtime]System.IAsyncResult + .method public hidebysig newslot virtual + instance class [System.Runtime]System.IAsyncResult BeginInvoke(string& res, class [System.Runtime]System.AsyncCallback callback, object 'object') runtime managed { } // end of method Del_B::BeginInvoke - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance class B EndInvoke(string& res, class [System.Runtime]System.IAsyncResult result) runtime managed { @@ -403,28 +403,28 @@ .class private auto ansi sealed Del_GenRetType_int_object extends [System.Runtime]System.MulticastDelegate { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } // end of method Del_GenRetType_int_object::.ctor - .method public hidebysig newslot virtual - instance class GenRetType + .method public hidebysig newslot virtual + instance class GenRetType Invoke(string& res) runtime managed { } // end of method Del_GenRetType_int_object::Invoke - .method public hidebysig newslot virtual - instance class [System.Runtime]System.IAsyncResult + .method public hidebysig newslot virtual + instance class [System.Runtime]System.IAsyncResult BeginInvoke(string& res, class [System.Runtime]System.AsyncCallback callback, object 'object') runtime managed { } // end of method Del_GenRetType_int_object::BeginInvoke - .method public hidebysig newslot virtual - instance class GenRetType + .method public hidebysig newslot virtual + instance class GenRetType EndInvoke(string& res, class [System.Runtime]System.IAsyncResult result) runtime managed { @@ -434,28 +434,28 @@ .class private auto ansi sealed Del_GenRetType extends [System.Runtime]System.MulticastDelegate { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } // end of method Del_GenRetType::.ctor - .method public hidebysig newslot virtual - instance class GenRetType> + .method public hidebysig newslot virtual + instance class GenRetType> Invoke(string& res) runtime managed { } // end of method Del_GenRetType::Invoke - .method public hidebysig newslot virtual - instance class [System.Runtime]System.IAsyncResult + .method public hidebysig newslot virtual + instance class [System.Runtime]System.IAsyncResult BeginInvoke(string& res, class [System.Runtime]System.AsyncCallback callback, object 'object') runtime managed { } // end of method Del_GenRetType::BeginInvoke - .method public hidebysig newslot virtual - instance class GenRetType> + .method public hidebysig newslot virtual + instance class GenRetType> EndInvoke(string& res, class [System.Runtime]System.IAsyncResult result) runtime managed { @@ -465,28 +465,28 @@ .class private auto ansi sealed Del_NonGenThroughGen2 extends [System.Runtime]System.MulticastDelegate { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } // end of method Del_NonGenThroughGen2::.ctor - .method public hidebysig newslot virtual - instance class NonGenThroughGen2 + .method public hidebysig newslot virtual + instance class NonGenThroughGen2 Invoke(string& res) runtime managed { } // end of method Del_NonGenThroughGen2::Invoke - .method public hidebysig newslot virtual - instance class [System.Runtime]System.IAsyncResult + .method public hidebysig newslot virtual + instance class [System.Runtime]System.IAsyncResult BeginInvoke(string& res, class [System.Runtime]System.AsyncCallback callback, object 'object') runtime managed { } // end of method Del_NonGenThroughGen2::BeginInvoke - .method public hidebysig newslot virtual - instance class NonGenThroughGen2 + .method public hidebysig newslot virtual + instance class NonGenThroughGen2 EndInvoke(string& res, class [System.Runtime]System.IAsyncResult result) runtime managed { @@ -496,28 +496,28 @@ .class private auto ansi sealed Del_GenToNonGen1 extends [System.Runtime]System.MulticastDelegate { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } // end of method Del_GenToNonGen1::.ctor - .method public hidebysig newslot virtual - instance class GenToNonGen1> + .method public hidebysig newslot virtual + instance class GenToNonGen1> Invoke(string& res) runtime managed { } // end of method Del_GenToNonGen1::Invoke - .method public hidebysig newslot virtual - instance class [System.Runtime]System.IAsyncResult + .method public hidebysig newslot virtual + instance class [System.Runtime]System.IAsyncResult BeginInvoke(string& res, class [System.Runtime]System.AsyncCallback callback, object 'object') runtime managed { } // end of method Del_GenToNonGen1::BeginInvoke - .method public hidebysig newslot virtual - instance class GenToNonGen1> + .method public hidebysig newslot virtual + instance class GenToNonGen1> EndInvoke(string& res, class [System.Runtime]System.IAsyncResult result) runtime managed { @@ -527,28 +527,28 @@ .class private auto ansi sealed Del_NonGenericDerived1 extends [System.Runtime]System.MulticastDelegate { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } // end of method Del_NonGenericDerived1::.ctor - .method public hidebysig newslot virtual - instance class NonGenericDerived1 + .method public hidebysig newslot virtual + instance class NonGenericDerived1 Invoke(string& res) runtime managed { } // end of method Del_NonGenericDerived1::Invoke - .method public hidebysig newslot virtual - instance class [System.Runtime]System.IAsyncResult + .method public hidebysig newslot virtual + instance class [System.Runtime]System.IAsyncResult BeginInvoke(string& res, class [System.Runtime]System.AsyncCallback callback, object 'object') runtime managed { } // end of method Del_NonGenericDerived1::BeginInvoke - .method public hidebysig newslot virtual - instance class NonGenericDerived1 + .method public hidebysig newslot virtual + instance class NonGenericDerived1 EndInvoke(string& res, class [System.Runtime]System.IAsyncResult result) runtime managed { @@ -558,28 +558,28 @@ .class private auto ansi sealed Del_GenDerive1 extends [System.Runtime]System.MulticastDelegate { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } // end of method Del_GenDerive1::.ctor - .method public hidebysig newslot virtual - instance class GenDerive1> + .method public hidebysig newslot virtual + instance class GenDerive1> Invoke(string& res) runtime managed { } // end of method Del_GenDerive1::Invoke - .method public hidebysig newslot virtual - instance class [System.Runtime]System.IAsyncResult + .method public hidebysig newslot virtual + instance class [System.Runtime]System.IAsyncResult BeginInvoke(string& res, class [System.Runtime]System.AsyncCallback callback, object 'object') runtime managed { } // end of method Del_GenDerive1::BeginInvoke - .method public hidebysig newslot virtual - instance class GenDerive1> + .method public hidebysig newslot virtual + instance class GenDerive1> EndInvoke(string& res, class [System.Runtime]System.IAsyncResult result) runtime managed { @@ -589,28 +589,28 @@ .class private auto ansi sealed Del_NonGenThroughGen4 extends [System.Runtime]System.MulticastDelegate { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } // end of method Del_NonGenThroughGen4::.ctor - .method public hidebysig newslot virtual - instance class NonGenThroughGen4 + .method public hidebysig newslot virtual + instance class NonGenThroughGen4 Invoke(string& res) runtime managed { } // end of method Del_NonGenThroughGen4::Invoke - .method public hidebysig newslot virtual - instance class [System.Runtime]System.IAsyncResult + .method public hidebysig newslot virtual + instance class [System.Runtime]System.IAsyncResult BeginInvoke(string& res, class [System.Runtime]System.AsyncCallback callback, object 'object') runtime managed { } // end of method Del_NonGenThroughGen4::BeginInvoke - .method public hidebysig newslot virtual - instance class NonGenThroughGen4 + .method public hidebysig newslot virtual + instance class NonGenThroughGen4 EndInvoke(string& res, class [System.Runtime]System.IAsyncResult result) runtime managed { @@ -620,28 +620,28 @@ .class private auto ansi sealed Del_GenToNonGen3 extends [System.Runtime]System.MulticastDelegate { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } // end of method Del_GenToNonGen3::.ctor - .method public hidebysig newslot virtual - instance class GenToNonGen3 + .method public hidebysig newslot virtual + instance class GenToNonGen3 Invoke(string& res) runtime managed { } // end of method Del_GenToNonGen3::Invoke - .method public hidebysig newslot virtual - instance class [System.Runtime]System.IAsyncResult + .method public hidebysig newslot virtual + instance class [System.Runtime]System.IAsyncResult BeginInvoke(string& res, class [System.Runtime]System.AsyncCallback callback, object 'object') runtime managed { } // end of method Del_GenToNonGen3::BeginInvoke - .method public hidebysig newslot virtual - instance class GenToNonGen3 + .method public hidebysig newslot virtual + instance class GenToNonGen3 EndInvoke(string& res, class [System.Runtime]System.IAsyncResult result) runtime managed { @@ -651,28 +651,28 @@ .class private auto ansi sealed Del_NonGenericDerived4 extends [System.Runtime]System.MulticastDelegate { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } // end of method Del_NonGenericDerived4::.ctor - .method public hidebysig newslot virtual - instance class NonGenericDerived4 + .method public hidebysig newslot virtual + instance class NonGenericDerived4 Invoke(string& res) runtime managed { } // end of method Del_NonGenericDerived4::Invoke - .method public hidebysig newslot virtual - instance class [System.Runtime]System.IAsyncResult + .method public hidebysig newslot virtual + instance class [System.Runtime]System.IAsyncResult BeginInvoke(string& res, class [System.Runtime]System.AsyncCallback callback, object 'object') runtime managed { } // end of method Del_NonGenericDerived4::BeginInvoke - .method public hidebysig newslot virtual - instance class NonGenericDerived4 + .method public hidebysig newslot virtual + instance class NonGenericDerived4 EndInvoke(string& res, class [System.Runtime]System.IAsyncResult result) runtime managed { @@ -682,28 +682,28 @@ .class private auto ansi sealed Del_GenDerive3 extends [System.Runtime]System.MulticastDelegate { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } // end of method Del_GenDerive3::.ctor - .method public hidebysig newslot virtual - instance class GenDerive3 + .method public hidebysig newslot virtual + instance class GenDerive3 Invoke(string& res) runtime managed { } // end of method Del_GenDerive3::Invoke - .method public hidebysig newslot virtual - instance class [System.Runtime]System.IAsyncResult + .method public hidebysig newslot virtual + instance class [System.Runtime]System.IAsyncResult BeginInvoke(string& res, class [System.Runtime]System.AsyncCallback callback, object 'object') runtime managed { } // end of method Del_GenDerive3::BeginInvoke - .method public hidebysig newslot virtual - instance class GenDerive3 + .method public hidebysig newslot virtual + instance class GenDerive3 EndInvoke(string& res, class [System.Runtime]System.IAsyncResult result) runtime managed { @@ -713,28 +713,28 @@ .class private auto ansi sealed Del_GenRetType_U_V extends [System.Runtime]System.MulticastDelegate { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } // end of method Del_GenRetType_U_V::.ctor - .method public hidebysig newslot virtual - instance class GenRetType + .method public hidebysig newslot virtual + instance class GenRetType Invoke(string& res) runtime managed { } // end of method Del_GenRetType_U_V::Invoke - .method public hidebysig newslot virtual - instance class [System.Runtime]System.IAsyncResult + .method public hidebysig newslot virtual + instance class [System.Runtime]System.IAsyncResult BeginInvoke(string& res, class [System.Runtime]System.AsyncCallback callback, object 'object') runtime managed { } // end of method Del_GenRetType_U_V::BeginInvoke - .method public hidebysig newslot virtual - instance class GenRetType + .method public hidebysig newslot virtual + instance class GenRetType EndInvoke(string& res, class [System.Runtime]System.IAsyncResult result) runtime managed { @@ -744,26 +744,26 @@ .class private auto ansi sealed Del_C extends [System.Runtime]System.MulticastDelegate { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor(object 'object', native int 'method') runtime managed { } // end of method Del_C::.ctor - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance class C Invoke(string& res) runtime managed { } // end of method Del_C::Invoke - .method public hidebysig newslot virtual - instance class [System.Runtime]System.IAsyncResult + .method public hidebysig newslot virtual + instance class [System.Runtime]System.IAsyncResult BeginInvoke(string& res, class [System.Runtime]System.AsyncCallback callback, object 'object') runtime managed { } // end of method Del_C::BeginInvoke - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance class C EndInvoke(string& res, class [System.Runtime]System.IAsyncResult result) runtime managed { @@ -869,21 +869,21 @@ IL_00a3: ret } // end of method Program::CheckResults - + // ============== Test using GenTestType ============== // // These test methods will callvirt each method using: // 1) The signature from GetBaseType - // 2) The signature from GenMiddleType with covariant returns (when applicable) + // 2) The signature from GenMiddleType with covariant returns (when applicable) // 3) The signature from GenTestType with covariant returns // And verify that the override on GetTestType is the one that executes .method public hidebysig static bool RunTest1() cil managed noinlining { .locals init (string res1, string res2, string res3, class GenTestType thisPtr) - + newobj instance void class GenTestType::.ctor() stloc.s thisPtr - + ldloc.s thisPtr ldloc.s thisPtr ldvirtftn instance object class GenBaseType::MyFunc(string&) @@ -912,10 +912,10 @@ .method public hidebysig static bool RunTest2() cil managed noinlining { .locals init (string res1, string res2, string res3, class GenTestType thisPtr) - + newobj instance void class GenTestType::.ctor() stloc.s thisPtr - + ldloc.s thisPtr ldloc.s thisPtr ldvirtftn instance class B class GenBaseType::MyFunc(string&) @@ -944,10 +944,10 @@ .method public hidebysig static bool RunTest3() cil managed noinlining { .locals init (string res1, string res2, string res3, class GenTestType thisPtr) - + newobj instance void class GenTestType::.ctor() stloc.s thisPtr - + ldloc.s thisPtr ldloc.s thisPtr ldvirtftn instance class GenRetType> class GenBaseType::MyGenFunc(string&) @@ -984,10 +984,10 @@ .method public hidebysig static bool RunTest4() cil managed noinlining { .locals init (string res1, string res2, string res3, class GenTestType thisPtr) - + newobj instance void class GenTestType::.ctor() stloc.s thisPtr - + ldloc.s thisPtr ldloc.s thisPtr ldvirtftn instance class GenRetType class GenBaseType::MyGenFunc(string&) @@ -1018,16 +1018,16 @@ ldloc.2 ldnull call bool CMain::CheckResults(string,string,string,string,string) - ret + ret } .method public hidebysig static bool RunTest5() cil managed noinlining { .locals init (string res1, string res2, string res3, class GenTestType thisPtr) - + newobj instance void class GenTestType::.ctor() stloc.s thisPtr - + ldloc.s thisPtr ldloc.s thisPtr ldvirtftn instance class B class GenBaseType::GenToNonGen(string&) @@ -1064,10 +1064,10 @@ .method public hidebysig static bool RunTest6() cil managed noinlining { .locals init (string res1, string res2, string res3, class GenTestType thisPtr) - + newobj instance void class GenTestType::.ctor() stloc.s thisPtr - + ldloc.s thisPtr ldloc.s thisPtr ldvirtftn instance class B class GenBaseType::NonGenThroughGenFunc(string&) @@ -1109,40 +1109,40 @@ .entrypoint .maxstack 2 .locals init ( bool result ) - + ldc.i4.1 stloc.0 - + T1: call bool CMain::RunTest1() brtrue.s T2 ldc.i4.0 stloc.0 - + T2: call bool CMain::RunTest2() brtrue.s T3 ldc.i4.0 stloc.0 - + T3: call bool CMain::RunTest3() brtrue.s T4 ldc.i4.0 stloc.0 - + T4: call bool CMain::RunTest4() brtrue.s T5 ldc.i4.0 stloc.0 - + T5: call bool CMain::RunTest5() brtrue.s T6 ldc.i4.0 stloc.0 - + T6: call bool CMain::RunTest6() brtrue.s DONE @@ -1159,7 +1159,7 @@ call void [System.Console]System.Console::WriteLine(string) ldc.i4.s 101 ret - + PASS: ldstr "Test PASSED" call void [System.Console]System.Console::WriteLine(string) diff --git a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest_GVM.il b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest_GVM.il index 67e5b8f185b65..e655e41217e82 100644 --- a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest_GVM.il +++ b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/UnitTest_GVM.il @@ -11,107 +11,107 @@ // Types that will be used as return types on the various methods // ======================================================================================== -.class public auto ansi beforefieldinit A +.class public auto ansi beforefieldinit A { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit B extends A +.class public auto ansi beforefieldinit B extends A { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit C extends B +.class public auto ansi beforefieldinit C extends B { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenRetType +.class public auto ansi beforefieldinit GenRetType { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit Dictionary +.class public auto ansi beforefieldinit Dictionary { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerive1 extends class GenRetType +.class public auto ansi beforefieldinit GenDerive1 extends class GenRetType { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerive2 extends class GenDerive1> +.class public auto ansi beforefieldinit GenDerive2 extends class GenDerive1> { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenDerive3 extends class GenDerive2 +.class public auto ansi beforefieldinit GenDerive3 extends class GenDerive2 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived1 extends class GenRetType +.class public auto ansi beforefieldinit NonGenericDerived1 extends class GenRetType { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived2 extends class NonGenericDerived1 +.class public auto ansi beforefieldinit NonGenericDerived2 extends class NonGenericDerived1 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived3 extends class NonGenericDerived2 +.class public auto ansi beforefieldinit NonGenericDerived3 extends class NonGenericDerived2 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived4 extends NonGenericDerived3 +.class public auto ansi beforefieldinit NonGenericDerived4 extends NonGenericDerived3 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenericDerived5 extends class NonGenericDerived1 +.class public auto ansi beforefieldinit NonGenericDerived5 extends class NonGenericDerived1 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenToNonGen1 extends C +.class public auto ansi beforefieldinit GenToNonGen1 extends C { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenToNonGen2 extends class GenToNonGen1> +.class public auto ansi beforefieldinit GenToNonGen2 extends class GenToNonGen1> { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit GenToNonGen3 extends class GenToNonGen2 +.class public auto ansi beforefieldinit GenToNonGen3 extends class GenToNonGen2 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen1 extends C +.class public auto ansi beforefieldinit NonGenThroughGen1 extends C { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen2 extends class NonGenThroughGen1> +.class public auto ansi beforefieldinit NonGenThroughGen2 extends class NonGenThroughGen1> { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen3 extends class NonGenThroughGen2 +.class public auto ansi beforefieldinit NonGenThroughGen3 extends class NonGenThroughGen2 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen4 extends NonGenThroughGen3 +.class public auto ansi beforefieldinit NonGenThroughGen4 extends NonGenThroughGen3 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } -.class public auto ansi beforefieldinit NonGenThroughGen5 extends class NonGenThroughGen2 +.class public auto ansi beforefieldinit NonGenThroughGen5 extends class NonGenThroughGen2 { - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } // ======================================================================================== -// Main base type with various virtual methods that will be overriden later +// Main base type with various virtual methods that will be overridden later // ======================================================================================== .class public auto ansi beforefieldinit GenBaseType { .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } - .method public hidebysig newslot virtual instance object MyFunc(string& res) + .method public hidebysig newslot virtual instance object MyFunc(string& res) { ldarg.1 ldstr "object GenBaseType.MyFunc()" @@ -119,7 +119,7 @@ newobj instance void A::.ctor() ret } - .method public hidebysig newslot virtual instance class B MyFunc(string& res) + .method public hidebysig newslot virtual instance class B MyFunc(string& res) { ldarg.1 ldstr "B GenBaseType.MyFunc()" @@ -127,7 +127,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class B GenToNonGen(string& res) + .method public hidebysig newslot virtual instance class B GenToNonGen(string& res) { ldarg.1 ldstr "B GenBaseType.GenToNonGen()" @@ -135,7 +135,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class B NonGenThroughGenFunc(string& res) + .method public hidebysig newslot virtual instance class B NonGenThroughGenFunc(string& res) { ldarg.1 ldstr "B GenBaseType.NonGenThroughGenFunc()" @@ -143,7 +143,7 @@ newobj instance void B::.ctor() ret } - .method public hidebysig newslot virtual instance class GenRetType MyGenFunc(string& res) + .method public hidebysig newslot virtual instance class GenRetType MyGenFunc(string& res) { ldarg.1 ldstr "GenRetType GenBaseType.MyGenFunc()" @@ -151,7 +151,7 @@ newobj instance void class GenRetType::.ctor() ret } - .method public hidebysig newslot virtual instance class GenRetType> MyGenFunc(string& res) + .method public hidebysig newslot virtual instance class GenRetType> MyGenFunc(string& res) { ldarg.1 ldstr "GenRetType> GenBaseType.MyGenFunc()" @@ -163,7 +163,7 @@ // ======================================================================================== -// SECOND LAYER type: overrides *SOME* virtuals on GenBaseType using MethodImpls with +// SECOND LAYER type: overrides *SOME* virtuals on GenBaseType using MethodImpls with // covariant return types (more derived return types) // ======================================================================================== @@ -213,11 +213,11 @@ stind.ref ldnull ret - } + } } // ======================================================================================== -// THIRD LAYER type: overrides all virtuals from GenBaseType using MethodImpls with +// THIRD LAYER type: overrides all virtuals from GenBaseType using MethodImpls with // covariant return types (more derived return types than the ones used in GenMiddleType) // ======================================================================================== @@ -262,7 +262,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class GenRetType MyFunc(string& res) { .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) @@ -273,7 +273,7 @@ ldnull ret } - + .method public hidebysig newslot virtual instance class C MyFunc(string& res) { .custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = (01 00 00 00) @@ -303,7 +303,7 @@ ldnull ret } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } .class public auto ansi beforefieldinit Invalid2 extends class GenMiddleType { @@ -314,7 +314,7 @@ ldnull ret } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } .class public auto ansi beforefieldinit Invalid3 extends class GenMiddleType { @@ -325,7 +325,7 @@ ldnull ret } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } .class public auto ansi beforefieldinit Invalid4 extends class GenMiddleType { @@ -336,7 +336,7 @@ ldnull ret } - .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ret } } // ======================================================================================== @@ -348,7 +348,7 @@ string a, [opt] string b, [opt] string c, - [opt] string d) cil managed + [opt] string d) cil managed { .param [3] = nullref .param [4] = nullref @@ -440,14 +440,14 @@ // ============== Test using GenTestType ============== // // These test methods will callvirt each method using: // 1) The signature from GetBaseType - // 2) The signature from GenMiddleType with covariant returns (when applicable) + // 2) The signature from GenMiddleType with covariant returns (when applicable) // 3) The signature from GenTestType with covariant returns // And verify that the override on GetTestType is the one that executes - - .method public static bool RunTest1() noinlining + + .method public static bool RunTest1() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance object class GenBaseType::MyFunc(string&) @@ -467,10 +467,10 @@ ret } - .method public static bool RunTest2() noinlining + .method public static bool RunTest2() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::MyFunc(string&) @@ -489,11 +489,11 @@ call bool CMain::CheckResults(string,string,string,string,string) ret } - - .method public static bool RunTest3() noinlining + + .method public static bool RunTest3() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class GenRetType> class GenBaseType::MyGenFunc(string&) @@ -518,10 +518,10 @@ ret } - .method public static bool RunTest4() noinlining + .method public static bool RunTest4() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class GenRetType class GenBaseType::MyGenFunc(string&) @@ -546,10 +546,10 @@ ret } - .method public static bool RunTest5() noinlining + .method public static bool RunTest5() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::GenToNonGen(string&) @@ -574,10 +574,10 @@ ret } - .method public static bool RunTest6() noinlining + .method public static bool RunTest6() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenTestType::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::NonGenThroughGenFunc(string&) @@ -606,12 +606,12 @@ // These test methods will callvirt each method using: // 1) The signature from GetBaseType // 2) The signature from GenMiddleType with covariant returns - // And verify that the override on GenMiddleType is the one that executes - - .method public static bool RunTest_Middle1() noinlining + // And verify that the override on GenMiddleType is the one that executes + + .method public static bool RunTest_Middle1() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenMiddleType::.ctor() ldloca.s 0 callvirt instance class GenRetType> class GenBaseType::MyGenFunc(string&) @@ -631,10 +631,10 @@ ret } - .method public static bool RunTest_Middle2() noinlining + .method public static bool RunTest_Middle2() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenMiddleType::.ctor() ldloca.s 0 callvirt instance class GenRetType class GenBaseType::MyGenFunc(string&) @@ -654,10 +654,10 @@ ret } - .method public static bool RunTest_Middle3() noinlining + .method public static bool RunTest_Middle3() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenMiddleType::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::GenToNonGen(string&) @@ -677,10 +677,10 @@ ret } - .method public static bool RunTest_Middle4() noinlining + .method public static bool RunTest_Middle4() noinlining { .locals init (string res1, string res2, string res3) - + newobj instance void class GenMiddleType::.ctor() ldloca.s 0 callvirt instance class B class GenBaseType::NonGenThroughGenFunc(string&) @@ -699,33 +699,33 @@ call bool CMain::CheckResults(string,string,string,string,string) ret } - + // ============== Test using GenMiddleType ============== // // These test methods attempt to load the invalid types, and are // expected to throw a TypeLoadException (caught by Main()) - - .method public static void RunInvalidTest1() noinlining + + .method public static void RunInvalidTest1() noinlining { newobj instance void class Invalid1::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunInvalidTest2() noinlining + .method public static void RunInvalidTest2() noinlining { newobj instance void class Invalid2::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunInvalidTest3() noinlining + .method public static void RunInvalidTest3() noinlining { newobj instance void class Invalid3::.ctor() call void [System.Console]System.Console::WriteLine(object) ret } - .method public static void RunInvalidTest4() noinlining + .method public static void RunInvalidTest4() noinlining { newobj instance void class Invalid4::.ctor() call void [System.Console]System.Console::WriteLine(object) @@ -741,70 +741,70 @@ .entrypoint .maxstack 2 .locals init ( bool result ) - + ldc.i4.1 stloc.0 - + T1: call bool CMain::RunTest1() brtrue.s T2 ldc.i4.0 stloc.0 - + T2: call bool CMain::RunTest2() brtrue.s T3 ldc.i4.0 stloc.0 - + T3: call bool CMain::RunTest3() brtrue.s T4 ldc.i4.0 stloc.0 - + T4: call bool CMain::RunTest4() brtrue.s T5 ldc.i4.0 stloc.0 - + T5: call bool CMain::RunTest5() brtrue.s T6 ldc.i4.0 stloc.0 - + T6: call bool CMain::RunTest6() brtrue.s M1 ldc.i4.0 stloc.0 - + M1: call bool CMain::RunTest_Middle1() brtrue.s M2 ldc.i4.0 stloc.0 - + M2: call bool CMain::RunTest_Middle2() brtrue.s M3 ldc.i4.0 stloc.0 - + M3: call bool CMain::RunTest_Middle3() brtrue.s M4 ldc.i4.0 stloc.0 - + M4: call bool CMain::RunTest_Middle4() brtrue.s INVALID1 ldc.i4.0 stloc.0 - + INVALID1: .try { @@ -816,13 +816,13 @@ leave.s INVALID2 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s INVALID2 } - + INVALID2: .try { @@ -834,10 +834,10 @@ leave.s INVALID3 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s INVALID3 } @@ -852,10 +852,10 @@ leave.s INVALID4 } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s INVALID4 } @@ -870,10 +870,10 @@ leave.s DONE } catch [mscorlib]System.TypeLoadException - { + { ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s DONE } @@ -885,7 +885,7 @@ call void [System.Console]System.Console::WriteLine(string) ldc.i4.s 101 ret - + PASS: ldstr "Test PASSED" call void [System.Console]System.Console::WriteLine(string) diff --git a/src/tests/Loader/classloader/MethodImpl/Desktop/README.txt b/src/tests/Loader/classloader/MethodImpl/Desktop/README.txt index a0335de5e1324..441e8692c3cd2 100644 --- a/src/tests/Loader/classloader/MethodImpl/Desktop/README.txt +++ b/src/tests/Loader/classloader/MethodImpl/Desktop/README.txt @@ -18,10 +18,10 @@ the same class actually invokes the .override method. That is because there's only one slot for the method in the method table, and by using .override, we have determined that the .override method gets that slot. So it won't matter whether the method is called virtually or -non-virtually, the result is the same. +non-virtually, the result is the same. Another consequence of this is that if the original declaration that -is being overriden has a body itself and then is .overriden in the +is being overridden has a body itself and then is .overridden in the same class, it will be impossible to invoke that original method, regardless of whether calls are virtual or non-virtual. diff --git a/src/tests/Loader/classloader/MethodImpl/Desktop/override_override1.il b/src/tests/Loader/classloader/MethodImpl/Desktop/override_override1.il index f951fafeeba07..4cc57bfa575ba 100644 --- a/src/tests/Loader/classloader/MethodImpl/Desktop/override_override1.il +++ b/src/tests/Loader/classloader/MethodImpl/Desktop/override_override1.il @@ -5,14 +5,14 @@ // MyBar is a normal reference type that extends MyFoo. // MyBar::DoBar explicitly overrides MyFoo::DoFoo // MyBar::DoBarOverride explicitly overrides MyBar::DoBar -// Expect TypeLoadException when loading MyBar because on override is being overriden. +// Expect TypeLoadException when loading MyBar because on override is being overridden. .assembly extern mscorlib{} .assembly override_override1{} .class public auto ansi beforefieldinit MyFoo{ - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 7 (0x7) @@ -34,7 +34,7 @@ .class public auto ansi beforefieldinit MyBar extends MyFoo { - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance int32 DoBar() { .maxstack 1 @@ -51,7 +51,7 @@ } // end of method MyBar::DoBar - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance int32 DoBarOverride() { // Code size 16 (0x10) @@ -69,7 +69,7 @@ } - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 7 (0x7) @@ -114,10 +114,10 @@ call void [mscorlib]System.Console::WriteLine(string) leave.s L1 } - catch [mscorlib]System.TypeLoadException{ + catch [mscorlib]System.TypeLoadException{ ldstr "Caught expected TypeLoadException:" call void [mscorlib]System.Console::WriteLine(string) - call void [mscorlib]System.Console::WriteLine(object) + call void [mscorlib]System.Console::WriteLine(object) leave.s L1 } @@ -141,7 +141,7 @@ IL_002a: ret } // end of method CMain::Main - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 7 (0x7) diff --git a/src/tests/Loader/classloader/MethodImpl/generics_override1.il b/src/tests/Loader/classloader/MethodImpl/generics_override1.il index 88de948ec101a..124747ba9a368 100644 --- a/src/tests/Loader/classloader/MethodImpl/generics_override1.il +++ b/src/tests/Loader/classloader/MethodImpl/generics_override1.il @@ -4,7 +4,7 @@ // This test covers the scenario of testing overrides of generic methods // 1. Test1 covers testing cases where a MethodImpl Decl could // resolve to 2 different methods and the exact signature is needed to represent -// which method is overriden. +// which method is overridden. // 2. Test2 covers testing the substitution chain handling scenario. // Metadata version: v4.0.30319 @@ -16,12 +16,12 @@ .assembly extern xunit.core {} .assembly 'generics_override1' { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) + // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 @@ -40,7 +40,7 @@ .class private abstract auto ansi beforefieldinit Base`2 extends [mscorlib]System.Object { - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance string Method([out] class [mscorlib]System.Collections.Generic.List`1& y, class [mscorlib]System.Collections.Generic.List`1& x) cil managed { @@ -54,7 +54,7 @@ IL_000f: ret } // end of method Base`2::Method - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance string Method(class [mscorlib]System.Collections.Generic.List`1& x, [out] class [mscorlib]System.Collections.Generic.List`1& y) cil managed { @@ -68,7 +68,7 @@ IL_000f: ret } // end of method Base`2::Method - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance string Method(class [mscorlib]System.Collections.Generic.List`1& x) cil managed { // Code size 13 (0xd) @@ -78,7 +78,7 @@ IL_000c: ret } // end of method Base`2::Method - .method family hidebysig specialname rtspecialname + .method family hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 8 (0x8) @@ -94,7 +94,7 @@ .class private auto ansi beforefieldinit Base2`2 extends class Base`2 { - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance string Method([out] class [mscorlib]System.Collections.Generic.List`1& x) cil managed { // Code size 16 (0x10) @@ -107,7 +107,7 @@ IL_000f: ret } // end of method Base2`2::Method - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 8 (0x8) @@ -123,7 +123,7 @@ .class private auto ansi beforefieldinit Derived extends class Base2`2 { - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance string Method(class [mscorlib]System.Collections.Generic.List`1& a, [out] class [mscorlib]System.Collections.Generic.List`1& b) cil managed { @@ -139,7 +139,7 @@ IL_000f: ret } // end of method Derived::Method - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance string Method(class [mscorlib]System.Collections.Generic.List`1& a) cil managed { .override method instance string class Base`2::Method(class [mscorlib]System.Collections.Generic.List`1&) @@ -150,7 +150,7 @@ IL_000c: ret } // end of method Derived::Method - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 8 (0x8) @@ -168,7 +168,7 @@ .class private auto ansi beforefieldinit BaseTestGenericsShape`4 extends [mscorlib]System.Object { - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance string Method(!A a, !B b) cil managed { @@ -184,7 +184,7 @@ IL_000a: ret } // end of method BaseTestGenericsShape`4::Method - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance string Method(!C c, !D d) cil managed { @@ -200,7 +200,7 @@ IL_000a: ret } // end of method BaseTestGenericsShape`4::Method - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 8 (0x8) @@ -216,7 +216,7 @@ .class private auto ansi beforefieldinit IntermediateGenericsShape`2 extends class BaseTestGenericsShape`4 { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 8 (0x8) @@ -232,7 +232,7 @@ .class private auto ansi beforefieldinit DerivedGenericsShape`1 extends class IntermediateGenericsShape`2 { - .method public hidebysig virtual instance string + .method public hidebysig virtual instance string MethodOnDerived(int32 e, !G f) cil managed { @@ -249,7 +249,7 @@ IL_000a: ret } // end of method DerivedGenericsShape`1::Method - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 8 (0x8) @@ -265,7 +265,7 @@ .class private auto ansi beforefieldinit DerivedGenericsShapeInvalidSubstitutedOverride extends class IntermediateGenericsShape`2 { - .method public hidebysig virtual instance string + .method public hidebysig virtual instance string MethodOnDerived(int32 e, int32 f) cil managed { @@ -282,7 +282,7 @@ IL_000a: ret } // end of method DerivedGenericsShapeInvalidSubstitutedOverride::Method - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 8 (0x8) @@ -299,13 +299,13 @@ // Types for Test4 .class interface private abstract auto ansi IMultiGeneric`2 { - .method public hidebysig newslot abstract virtual + .method public hidebysig newslot abstract virtual instance string Func(!T t1, !U u2) cil managed { } // end of method IMultiGeneric`2::Func - .method public hidebysig newslot abstract virtual + .method public hidebysig newslot abstract virtual instance string Func(!U u1, !T t2) cil managed { @@ -317,7 +317,7 @@ extends [mscorlib]System.Object implements class IMultiGeneric`2 { - .method private hidebysig newslot virtual final + .method private hidebysig newslot virtual final instance string 'IMultiGeneric.Func'(!A t1, !B u2) cil managed { @@ -336,7 +336,7 @@ IL_000a: ret } // end of method Implementor`2::'IMultiGeneric.Func' - .method private hidebysig newslot virtual final + .method private hidebysig newslot virtual final instance string 'IMultiGeneric.Func'(!B u1, !A t2) cil managed { @@ -355,7 +355,7 @@ IL_000a: ret } // end of method Implementor`2::'IMultiGeneric.Func' - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 8 (0x8) @@ -372,7 +372,7 @@ extends [mscorlib]System.Object implements class IMultiGeneric`2 { - .method private hidebysig newslot virtual final + .method private hidebysig newslot virtual final instance string 'IMultiGeneric.Func'(!C t1, int32 u2) cil managed { @@ -391,7 +391,7 @@ IL_000a: ret } // end of method PartialIntImplementor`1::'IMultiGeneric.Func' - .method private hidebysig newslot virtual final + .method private hidebysig newslot virtual final instance string 'IMultiGeneric.Func'(int32 u1, !C t2) cil managed { @@ -410,7 +410,7 @@ IL_000a: ret } // end of method PartialIntImplementor`1::'IMultiGeneric.Func' - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 8 (0x8) @@ -427,7 +427,7 @@ extends [mscorlib]System.Object implements class IMultiGeneric`2 { - .method public hidebysig newslot virtual final + .method public hidebysig newslot virtual final instance string Func(int32 x, int32 y) cil managed { @@ -443,7 +443,7 @@ IL_000a: ret } // end of method IntImplementor::Func - .method private hidebysig newslot virtual final + .method private hidebysig newslot virtual final instance string 'IMultiGeneric.Func(!0,!1)'(int32 u1, int32 t2) cil managed { @@ -461,7 +461,7 @@ IL_000a: ret } // end of method IntImplementor::'IMultiGeneric.Func(!0,!1)' - .method private hidebysig newslot virtual final + .method private hidebysig newslot virtual final instance string 'IMultiGeneric.Func(!1,!0)'(int32 u1, int32 t2) cil managed { @@ -479,7 +479,7 @@ IL_000a: ret } // end of method IntImplementor::'IMultiGeneric.Func(!1,!0)' - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 8 (0x8) @@ -495,7 +495,7 @@ // Types for Test5 .class interface private abstract auto ansi ISingleGeneric`1 { - .method public hidebysig newslot abstract virtual + .method public hidebysig newslot abstract virtual instance string Method(!T t) cil managed { } // end of method ISingleGeneric`1::Method @@ -506,7 +506,7 @@ extends [mscorlib]System.Object implements class ISingleGeneric`1 { - .method private hidebysig newslot virtual final + .method private hidebysig newslot virtual final instance string 'ISingleGeneric.Method'(int32 t) cil managed { .override method instance string class ISingleGeneric`1::Method(int32) @@ -522,7 +522,7 @@ IL_000a: ret } // end of method InvalidOverride::'ISingleGeneric.Method' - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 8 (0x8) @@ -799,7 +799,7 @@ IL_0015: stloc.0 IL_0016: leave.s IL_003c } // end .try - catch [mscorlib]System.MissingMethodException + catch [mscorlib]System.MissingMethodException { IL_0018: pop IL_0019: nop @@ -810,7 +810,7 @@ IL_0027: stloc.0 IL_0028: leave.s IL_003c } // end handler - catch [mscorlib]System.TypeLoadException + catch [mscorlib]System.TypeLoadException { IL_002a: pop IL_002b: nop @@ -860,7 +860,7 @@ IL_0024: ret } // end of method Program::CallSpecificInterfaceFuncs - .method private hidebysig static int32 + .method private hidebysig static int32 Test4() cil managed { // Code size 120 (0x78) @@ -956,7 +956,7 @@ IL_001d: ret } // end of method Program::Test5Internal - .method private hidebysig static int32 + .method private hidebysig static int32 Test5() cil managed { // Code size 55 (0x37) @@ -985,7 +985,7 @@ IL_0036: stloc.0 IL_0037: leave.s IL_005d } // end .try - catch [mscorlib]System.MissingMethodException + catch [mscorlib]System.MissingMethodException { IL_0039: pop IL_003a: nop @@ -996,7 +996,7 @@ IL_0048: stloc.0 IL_0049: leave.s IL_005d } // end handler - catch [mscorlib]System.TypeLoadException + catch [mscorlib]System.TypeLoadException { IL_004b: pop IL_004c: nop @@ -1057,7 +1057,7 @@ IL_001d: nop IL_001e: leave.s IL_0035 } // end .try - catch [mscorlib]System.Exception + catch [mscorlib]System.Exception { IL_0020: stloc.3 IL_0021: nop @@ -1095,7 +1095,7 @@ IL_0052: nop IL_0053: leave.s IL_006c } // end .try - catch [mscorlib]System.Exception + catch [mscorlib]System.Exception { IL_0055: stloc.s V_5 IL_0057: nop @@ -1133,7 +1133,7 @@ IL_0089: nop IL_008a: leave.s IL_00a3 } // end .try - catch [mscorlib]System.Exception + catch [mscorlib]System.Exception { IL_008c: stloc.s V_7 IL_008e: nop @@ -1171,7 +1171,7 @@ Test4Done: nop leave.s Test4PostTryCatch } // end .try - catch [mscorlib]System.Exception + catch [mscorlib]System.Exception { stloc.s V_10 nop @@ -1210,7 +1210,7 @@ Test5Done: nop leave.s Test5PostTryCatch } // end .try - catch [mscorlib]System.Exception + catch [mscorlib]System.Exception { stloc.s V_12 nop @@ -1235,7 +1235,7 @@ IL_00ad: ret } // end of method Program::Main - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 8 (0x8) diff --git a/src/tests/Loader/classloader/MethodImpl/override_override1.il b/src/tests/Loader/classloader/MethodImpl/override_override1.il index 8b92de84911b9..36c41d1bbf43c 100644 --- a/src/tests/Loader/classloader/MethodImpl/override_override1.il +++ b/src/tests/Loader/classloader/MethodImpl/override_override1.il @@ -7,14 +7,14 @@ // MyBar is a normal reference type that extends MyFoo. // MyBar::DoBar explicitly overrides MyFoo::DoFoo // MyBar::DoBarOverride explicitly overrides MyBar::DoBar -// Expect TypeLoadException when loading MyBar because on override is being overriden. +// Expect TypeLoadException when loading MyBar because on override is being overridden. .assembly extern mscorlib{} .assembly override_override1{} .class public auto ansi beforefieldinit MyFoo{ - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 7 (0x7) @@ -36,7 +36,7 @@ .class public auto ansi beforefieldinit MyBar extends MyFoo { - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance int32 DoBar() { .maxstack 1 @@ -53,7 +53,7 @@ } // end of method MyBar::DoBar - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance int32 DoBarOverride() { // Code size 16 (0x10) @@ -71,7 +71,7 @@ } - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 7 (0x7) @@ -119,10 +119,10 @@ call void [System.Console]System.Console::WriteLine(string) leave.s L1 } - catch [mscorlib]System.TypeLoadException{ + catch [mscorlib]System.TypeLoadException{ ldstr "Caught expected TypeLoadException:" call void [System.Console]System.Console::WriteLine(string) - call void [System.Console]System.Console::WriteLine(object) + call void [System.Console]System.Console::WriteLine(object) leave.s L1 } @@ -146,7 +146,7 @@ IL_002a: ret } // end of method CMain::Main - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 7 (0x7) diff --git a/src/tests/Loader/classloader/generics/VSD/Struct_ImplicitOverrideVirtualNewslot.il b/src/tests/Loader/classloader/generics/VSD/Struct_ImplicitOverrideVirtualNewslot.il index cb456154ae07b..47bbd28b72032 100644 --- a/src/tests/Loader/classloader/generics/VSD/Struct_ImplicitOverrideVirtualNewslot.il +++ b/src/tests/Loader/classloader/generics/VSD/Struct_ImplicitOverrideVirtualNewslot.il @@ -7,7 +7,7 @@ // The reason we are using IL is because C# doesn't allow struct to have virtual methods with 'virtual' keyword. // Methods that implement interface methods are by default virtual (which translates to 'virtual newslot final' in IL. // But if we use 'virtual' keyword in C# it translates to 'virtual newslot' in IL -// and struct virtual methods can't be overriden. +// and struct virtual methods can't be overridden. .assembly extern mscorlib {} @@ -17,7 +17,7 @@ .class public auto ansi beforefieldinit A`1 extends [mscorlib]System.Object { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 7 (0x7) @@ -38,12 +38,12 @@ .class interface public abstract auto ansi I { - .method public hidebysig newslot abstract virtual + .method public hidebysig newslot abstract virtual instance int32 method1() cil managed { } // end of method I::method1 - .method public hidebysig newslot abstract virtual + .method public hidebysig newslot abstract virtual instance int32 method2() cil managed { } // end of method I::method2 @@ -52,12 +52,12 @@ .class interface public abstract auto ansi IGen`1 { - .method public hidebysig newslot abstract virtual + .method public hidebysig newslot abstract virtual instance int32 method1() cil managed { } // end of method IGen`1::method1 - .method public hidebysig newslot abstract virtual + .method public hidebysig newslot abstract virtual instance int32 method2() cil managed { } // end of method IGen`1::method2 @@ -85,7 +85,7 @@ IL_0006: ret } // end of method C1::method1 - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance int32 method2() cil managed { // Code size 7 (0x7) @@ -146,7 +146,7 @@ { .pack 0 .size 1 - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance int32 method1() cil managed { // Code size 7 (0x7) @@ -161,7 +161,7 @@ IL_0006: ret } // end of method C3Int::method1 - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance int32 method2() cil managed { // Code size 7 (0x7) @@ -199,7 +199,7 @@ IL_0006: ret } // end of method C3String::method1 - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance int32 method2() cil managed { // Code size 7 (0x7) @@ -222,7 +222,7 @@ { .pack 0 .size 1 - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance int32 method1() cil managed { // Code size 7 (0x7) @@ -237,7 +237,7 @@ IL_0006: ret } // end of method C3Object::method1 - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance int32 method2() cil managed { // Code size 7 (0x7) @@ -260,7 +260,7 @@ { .pack 0 .size 1 - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance int32 method1() cil managed { // Code size 7 (0x7) @@ -275,7 +275,7 @@ IL_0006: ret } // end of method C4`1::method1 - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance int32 method2() cil managed { // Code size 7 (0x7) @@ -840,7 +840,7 @@ IL_0048: ret } // end of method Test::Main - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 7 (0x7) @@ -850,7 +850,7 @@ IL_0006: ret } // end of method Test::.ctor - .method private hidebysig specialname rtspecialname static + .method private hidebysig specialname rtspecialname static void .cctor() cil managed { // Code size 7 (0x7) diff --git a/src/tests/Loader/classloader/generics/regressions/vsw395780/testExplicitOverride.cs b/src/tests/Loader/classloader/generics/regressions/vsw395780/testExplicitOverride.cs index 364f05ba4533d..98cac40363563 100644 --- a/src/tests/Loader/classloader/generics/regressions/vsw395780/testExplicitOverride.cs +++ b/src/tests/Loader/classloader/generics/regressions/vsw395780/testExplicitOverride.cs @@ -4,7 +4,7 @@ // this is regression test for VSW 395780 // explicit overriding with a generic type was working. -// as opposed to testExcplicitOverride2.il, in this case the overriden method is also generic. +// as opposed to testExcplicitOverride2.il, in this case the overridden method is also generic. using System; @@ -30,7 +30,7 @@ public static int Main() try { I cGen = new C(); - + int ret = cGen.M("Hello"); if (ret == 3) @@ -49,6 +49,6 @@ public static int Main() Console.WriteLine("FAIL: Caugh unexpected exception: " + e); return 101; } - + } } diff --git a/src/tests/Loader/classloader/regressions/dev10_813331/Case2.cs b/src/tests/Loader/classloader/regressions/dev10_813331/Case2.cs index 24331ca680cc0..e2b40ffd10c33 100644 --- a/src/tests/Loader/classloader/regressions/dev10_813331/Case2.cs +++ b/src/tests/Loader/classloader/regressions/dev10_813331/Case2.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -//Non-generic classe A and generic class B +//Non-generic class A and generic class B public class HelloWorld { diff --git a/src/tests/Loader/classloader/regressions/vsw188290/vsw188290.il b/src/tests/Loader/classloader/regressions/vsw188290/vsw188290.il index 13fa000c3be1e..dca8b687dfb07 100644 --- a/src/tests/Loader/classloader/regressions/vsw188290/vsw188290.il +++ b/src/tests/Loader/classloader/regressions/vsw188290/vsw188290.il @@ -16,9 +16,9 @@ // --- The following custom attribute is added automatically, do not uncomment ------- // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(bool, - // bool) = ( 01 00 00 01 00 00 ) + // bool) = ( 01 00 00 01 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } @@ -36,7 +36,7 @@ .class sealed private auto ansi beforefieldinit C<([mscorlib]System.Object) T> extends [mscorlib]System.ValueType { - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 75 (0x4b) @@ -86,7 +86,7 @@ IL_0017: ret } // end of method Test::fail - .method private hidebysig static int32 + .method private hidebysig static int32 Main() cil managed { .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( @@ -113,7 +113,7 @@ IL_001d: callvirt instance void [mscorlib]System.Array::Initialize() IL_0022: ldsfld bool Test_vsw188290::run IL_0027: brtrue.s IL_0033 - IL_0029: ldstr "contructor not run" + IL_0029: ldstr "constructor not run" IL_002e: call void Test_vsw188290::fail(string) @@ -133,7 +133,7 @@ IL_0055: ldsfld bool Test_vsw188290::run IL_005a: brtrue.s IL_0066 - IL_005c: ldstr "contructor not run" + IL_005c: ldstr "constructor not run" IL_0061: call void Test_vsw188290::fail(string) IL_0066: ldstr "C passed" call void [System.Console]System.Console::WriteLine(string) @@ -150,7 +150,7 @@ IL_0088: ldsfld bool Test_vsw188290::run IL_008d: brtrue.s IL_0099 - IL_008f: ldstr "contructor not run" + IL_008f: ldstr "constructor not run" IL_0094: call void Test_vsw188290::fail(string) IL_0099: ldstr "C passed" call void [System.Console]System.Console::WriteLine(string) @@ -167,7 +167,7 @@ IL_00bb: ldsfld bool Test_vsw188290::run IL_00c0: brtrue.s IL_00cc - IL_00c2: ldstr "contructor not run" + IL_00c2: ldstr "constructor not run" IL_00c7: call void Test_vsw188290::fail(string) IL_00cc: ldstr "C passed" call void [System.Console]System.Console::WriteLine(string) @@ -191,7 +191,7 @@ IL_00f6: ret } // end of method Test::Main - .method private hidebysig specialname rtspecialname static + .method private hidebysig specialname rtspecialname static void .cctor() cil managed { // Code size 7 (0x7) @@ -201,7 +201,7 @@ IL_0006: ret } // end of method Test::.cctor - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 7 (0x7) diff --git a/src/tests/Loader/classloader/rmv/il/RMV-2-13-26-two.il b/src/tests/Loader/classloader/rmv/il/RMV-2-13-26-two.il index 173bce4e151cf..e759509e16288 100644 --- a/src/tests/Loader/classloader/rmv/il/RMV-2-13-26-two.il +++ b/src/tests/Loader/classloader/rmv/il/RMV-2-13-26-two.il @@ -12,7 +12,7 @@ .assembly extern mscorlib {} .class value sealed Foo extends [mscorlib]System.ValueType{ - .method public pinvokeimpl("NonExistant.dll") void Foo(){ + .method public pinvokeimpl("NonExistent.dll") void Foo(){ } } diff --git a/src/tests/Regressions/coreclr/GitHub_45053/test45053.cs b/src/tests/Regressions/coreclr/GitHub_45053/test45053.cs index 1c093f6ee2924..90fb03ce024ea 100644 --- a/src/tests/Regressions/coreclr/GitHub_45053/test45053.cs +++ b/src/tests/Regressions/coreclr/GitHub_45053/test45053.cs @@ -19,7 +19,7 @@ public abstract class TA : T { } // public override A GetA() => new (); // } - // Overriden here, in the grandson + // Overridden here, in the grandson public class TB : TA { public override B GetA() => new (); diff --git a/src/tests/baseservices/compilerservices/dynamicobjectproperties/testoverrides.cs b/src/tests/baseservices/compilerservices/dynamicobjectproperties/testoverrides.cs index 7cde59c0106a0..e338e546c379d 100644 --- a/src/tests/baseservices/compilerservices/dynamicobjectproperties/testoverrides.cs +++ b/src/tests/baseservices/compilerservices/dynamicobjectproperties/testoverrides.cs @@ -40,9 +40,9 @@ public override bool Equals(Object obj) public class TestOverridesClass { // this test ensures that while manipulating keys (through add/remove/lookup - // in the dictionary the overriden GetHashCode(), Equals(), and ==operator do not get invoked. - // Earlier implementation was using these functions virtually so overriding them would result in - // the overridden functions being invoked. But later on Ati changed implementation to use + // in the dictionary the overridden GetHashCode(), Equals(), and ==operator do not get invoked. + // Earlier implementation was using these functions virtually so overriding them would result in + // the overridden functions being invoked. But later on Ati changed implementation to use // Runtime.GetHashCode and Object.ReferenceEquals so this test makes sure that overridden functions never get invoked. public static void TestOverrides() { diff --git a/src/tests/nativeaot/SmokeTests/DynamicGenerics/UniversalConstrainedCalls.cs b/src/tests/nativeaot/SmokeTests/DynamicGenerics/UniversalConstrainedCalls.cs index 53c61708505e5..dc9ed5e6ed8b4 100644 --- a/src/tests/nativeaot/SmokeTests/DynamicGenerics/UniversalConstrainedCalls.cs +++ b/src/tests/nativeaot/SmokeTests/DynamicGenerics/UniversalConstrainedCalls.cs @@ -21,12 +21,12 @@ public class ConstrainedCallBaseType { public virtual string VirtualMethod() { - return "NonOverriden"; + return "NonOverridden"; } public virtual string GenVirtualMethod() { - return "NonOverridenGeneric"; + return "NonOverriddenGeneric"; } } @@ -330,7 +330,7 @@ public static void TestUSCCallsOnNonGenStruct() Assert.AreEqual("42", o.MakeConstrainedCall()); Assert.AreEqual("42" + TypeOf.String, o.MakeGenericConstrainedCall()); - // Test Non-overriden object methods + // Test Non-overridden object methods Assert.AreEqual(testStruct.ToString(), o.MakeToStringCall()); Assert.AreEqual(testStruct.GetHashCode(), o.MakeGetHashCodeCall()); Assert.AreEqual(false, o.MakeEqualsCall(16)); @@ -346,7 +346,7 @@ public static void TestUSCCallsOnNonGenStruct() Assert.AreEqual("40", o.MakeConstrainedCall()); Assert.AreEqual("40" + TypeOf.String, o.MakeGenericConstrainedCall()); - // Test Overriden object methods + // Test Overridden object methods string toStringResult = testStruct2.ToString(); int getHashCodeResult = testStruct2.GetHashCode(); @@ -368,7 +368,7 @@ public static void TestUSCCallsOnNonGenStruct() [TestMethod] public static void TestUSCCallsOnSharedGenStruct() { - // Use an explicit typeof here for GenericStructThatImplementsInterface so that + // Use an explicit typeof here for GenericStructThatImplementsInterface so that // that case uses the normal shared generic path, and not anything else. var t = TypeOf.UCC_UCGConstrainedCall.MakeGenericType(typeof(GenericStructThatImplementsInterface), TypeOf.Int16, TypeOf.String); var o = (TestConstrainedCallBase)Activator.CreateInstance(t); @@ -380,7 +380,7 @@ public static void TestUSCCallsOnSharedGenStruct() Assert.AreEqual("74", o.MakeConstrainedCall()); Assert.AreEqual("74" + TypeOf.String, o.MakeGenericConstrainedCall()); - // Test Overriden object methods + // Test Overridden object methods string toStringResult = testStruct.ToString(); int getHashCodeResult = testStruct.GetHashCode(); @@ -415,7 +415,7 @@ public static void TestUSCCallsOnUSCGenStruct() Assert.AreEqual("162", o.MakeConstrainedCall()); Assert.AreEqual("162" + TypeOf.Int16, o.MakeGenericConstrainedCall()); - // Test Overriden object methods + // Test Overridden object methods string toStringResult = testStruct.ToString(); int getHashCodeResult = testStruct.GetHashCode(); diff --git a/src/tests/nativeaot/SmokeTests/UnitTests/Interfaces.cs b/src/tests/nativeaot/SmokeTests/UnitTests/Interfaces.cs index 9ef60373f0414..0d7db3e2a795e 100644 --- a/src/tests/nativeaot/SmokeTests/UnitTests/Interfaces.cs +++ b/src/tests/nativeaot/SmokeTests/UnitTests/Interfaces.cs @@ -38,7 +38,7 @@ public static int Run() TestDefaultInterfaceMethods.Run(); TestDefaultInterfaceVariance.Run(); TestVariantInterfaceOptimizations.Run(); - TestSharedIntefaceMethods.Run(); + TestSharedInterfaceMethods.Run(); TestCovariantReturns.Run(); TestDynamicInterfaceCastable.Run(); TestStaticInterfaceMethodsAnalysis.Run(); @@ -555,7 +555,7 @@ public static void Run() } } - class TestSharedIntefaceMethods + class TestSharedInterfaceMethods { interface IInnerValueGrabber { @@ -592,10 +592,10 @@ public static void Run() var x = new Derived() { InnerValue = "My inner value" }; string r1 = ((IFace)x).GrabValue(new Atom1()); - if (r1 != "'My inner value' over 'Interfaces+TestSharedIntefaceMethods+Atom1' with 'The Atom1'") + if (r1 != "'My inner value' over 'Interfaces+TestSharedInterfaceMethods+Atom1' with 'The Atom1'") throw new Exception(); string r2 = ((IFace)x).GrabValue(new Atom2()); - if (r2 != "'My inner value' over 'Interfaces+TestSharedIntefaceMethods+Atom2' with 'The Atom2'") + if (r2 != "'My inner value' over 'Interfaces+TestSharedInterfaceMethods+Atom2' with 'The Atom2'") throw new Exception(); IFace o = new Yadda() { InnerValue = "SomeString" }; @@ -637,14 +637,14 @@ class BaseWithUnusedVirtual public virtual IFoo GetFoo() => throw new NotImplementedException(); } - class DerivedWithOverridenUnusedVirtual : BaseWithUnusedVirtual + class DerivedWithOverriddenUnusedVirtual : BaseWithUnusedVirtual { - public override Foo GetFoo() => new Foo("DerivedWithOverridenUnusedVirtual"); + public override Foo GetFoo() => new Foo("DerivedWithOverriddenUnusedVirtual"); } - class SuperDerivedWithOverridenUnusedVirtual : DerivedWithOverridenUnusedVirtual + class SuperDerivedWithOverriddenUnusedVirtual : DerivedWithOverriddenUnusedVirtual { - public override Foo GetFoo() => new Foo("SuperDerivedWithOverridenUnusedVirtual"); + public override Foo GetFoo() => new Foo("SuperDerivedWithOverriddenUnusedVirtual"); } interface IInterfaceWithCovariantReturn @@ -685,14 +685,14 @@ public static void Run() } { - DerivedWithOverridenUnusedVirtual b = new DerivedWithOverridenUnusedVirtual(); - if (b.GetFoo().State != "DerivedWithOverridenUnusedVirtual") + DerivedWithOverriddenUnusedVirtual b = new DerivedWithOverriddenUnusedVirtual(); + if (b.GetFoo().State != "DerivedWithOverriddenUnusedVirtual") throw new Exception(); } { - DerivedWithOverridenUnusedVirtual b = new SuperDerivedWithOverridenUnusedVirtual(); - if (b.GetFoo().State != "SuperDerivedWithOverridenUnusedVirtual") + DerivedWithOverriddenUnusedVirtual b = new SuperDerivedWithOverriddenUnusedVirtual(); + if (b.GetFoo().State != "SuperDerivedWithOverriddenUnusedVirtual") throw new Exception(); } diff --git a/src/tests/profiler/native/rejitprofiler/rejitprofiler.cpp b/src/tests/profiler/native/rejitprofiler/rejitprofiler.cpp index 068d9dd7d3ef8..ab824f48ab066 100644 --- a/src/tests/profiler/native/rejitprofiler/rejitprofiler.cpp +++ b/src/tests/profiler/native/rejitprofiler/rejitprofiler.cpp @@ -386,7 +386,7 @@ HRESULT STDMETHODCALLTYPE ReJITProfiler::GetReJITParameters(ModuleID moduleId, m return hr; } - INFO(L"IL build sucessful for methodDef=" << std::hex << methodId); + INFO(L"IL build successful for methodDef=" << std::hex << methodId); return S_OK; } diff --git a/src/tests/profiler/native/rejitprofiler/sigparse.cpp b/src/tests/profiler/native/rejitprofiler/sigparse.cpp index cf9f1d3a9d278..8d16f1a9e22cb 100644 --- a/src/tests/profiler/native/rejitprofiler/sigparse.cpp +++ b/src/tests/profiler/native/rejitprofiler/sigparse.cpp @@ -90,7 +90,7 @@ bool SigParser::ParseMethod(sig_elem_type elem_type) if (!ParseRetType()) return false; - bool fEncounteredSentinal = false; + bool fEncounteredSentinel = false; for (sig_count i = 0; i < param_count; i++) { @@ -99,11 +99,11 @@ bool SigParser::ParseMethod(sig_elem_type elem_type) if (*pbCur == ELEMENT_TYPE_SENTINEL) { - if (fEncounteredSentinal) + if (fEncounteredSentinel) return false; - fEncounteredSentinal = true; - NotifySentinal(); + fEncounteredSentinel = true; + NotifySentinel(); pbCur++; } diff --git a/src/tests/profiler/native/rejitprofiler/sigparse.h b/src/tests/profiler/native/rejitprofiler/sigparse.h index a7db1e7b47b20..249afa2a80062 100644 --- a/src/tests/profiler/native/rejitprofiler/sigparse.h +++ b/src/tests/profiler/native/rejitprofiler/sigparse.h @@ -180,7 +180,7 @@ class SigParser virtual void NotifyEndParam() = 0; // sentinel indication the location of the "..." in the method signature - virtual void NotifySentinal() = 0; + virtual void NotifySentinel() = 0; // number of generic parameters in this method signature (if any) virtual void NotifyGenericParamCount(sig_count) = 0; diff --git a/src/tests/readytorun/tests/main.cs b/src/tests/readytorun/tests/main.cs index 96d862387751b..02d94a5939378 100644 --- a/src/tests/readytorun/tests/main.cs +++ b/src/tests/readytorun/tests/main.cs @@ -65,7 +65,7 @@ static void TestVirtualMethodCalls() // Make sure the constrained call to ToString doesn't box var mystruct = new MyStructWithVirtuals(); mystruct.ToString(); - Assert.AreEqual(mystruct.X, "Overriden"); + Assert.AreEqual(mystruct.X, "Overridden"); } } diff --git a/src/tests/readytorun/tests/test.cs b/src/tests/readytorun/tests/test.cs index 4afc1d630c0fe..5b6c34d9a6329 100644 --- a/src/tests/readytorun/tests/test.cs +++ b/src/tests/readytorun/tests/test.cs @@ -132,7 +132,7 @@ public static void TestStaticFields() #if false // TODO: Enable once LDFTN is supported // Do some operations on static fields on a different thread to verify that we are not mixing thread-static and non-static - Task.Run(() => { + Task.Run(() => { StaticObjectField = (int)StaticObjectField + 1234; @@ -141,7 +141,7 @@ public static void TestStaticFields() ThreadStaticStringField = "Garbage"; ThreadStaticIntField = 0xBAAD; - + ThreadStaticDateTimeField = DateTime.Now; }).Wait(); @@ -219,19 +219,19 @@ public class MyGeneric #if V2 public object m_unused1; public string m_Field1; - + public object m_unused2; public T m_Field2; - + public object m_unused3; public List m_Field3; - + static public object m_unused4; static public KeyValuePair m_Field4; - + static public object m_unused5; static public int m_Field5; - + public object m_unused6; static public object m_unused7; #else @@ -387,7 +387,7 @@ public struct MyStructWithVirtuals #if V2 public override string ToString() { - X = "Overriden"; + X = "Overridden"; return base.ToString(); } #endif @@ -490,7 +490,7 @@ static void TestVirtualMethodCallsOnStruct() // Make sure the constrained call to ToString doesn't box var mystruct = new MyStructWithVirtuals(); mystruct.ToString(); - Assert.AreEqual(mystruct.X, "Overriden"); + Assert.AreEqual(mystruct.X, "Overridden"); } } @@ -894,7 +894,7 @@ private static void ValidateTestHasCrossModuleImplementation(string testName, Li public static void RunAllTests(Assembly assembly) { // This test is designed to run a representative sample of the sorts of things that R2R can inline across modules - // In addition to the pattern of extracting the code into this generic, it uses the map file generated by the + // In addition to the pattern of extracting the code into this generic, it uses the map file generated by the // crossgen2 build to ensure that the expected set of methods was actually compiled into the compilation target. // As we remove barriers to further compilation of cross module stuff, we should change this test to validate // that the right methods got compiled.