diff --git a/.github/ISSUE_TEMPLATE/02_api_proposal.yml b/.github/ISSUE_TEMPLATE/02_api_proposal.yml index 145095e3bb42b2..541bcf5b73c7a8 100644 --- a/.github/ISSUE_TEMPLATE/02_api_proposal.yml +++ b/.github/ISSUE_TEMPLATE/02_api_proposal.yml @@ -33,7 +33,7 @@ body: public void Fancy(T item); } } - ``` + ``` validations: required: true - type: textarea @@ -41,7 +41,7 @@ body: attributes: label: API Usage description: | - Please provide code examples that highlight how the proposed API additions are meant to be consumed. This will help suggest whether the API has the right shape to be functional, performant and useable. + Please provide code examples that highlight how the proposed API additions are meant to be consumed. This will help suggest whether the API has the right shape to be functional, performant and usable. placeholder: API usage value: | ```C# @@ -52,7 +52,7 @@ body: // Getting the values out foreach (var v in c) Console.WriteLine(v); - ``` + ``` validations: required: true - type: textarea diff --git a/docs/design/coreclr/botr/vectors-and-intrinsics.md b/docs/design/coreclr/botr/vectors-and-intrinsics.md index 2688db9ca376b2..3c18eecb0a6446 100644 --- a/docs/design/coreclr/botr/vectors-and-intrinsics.md +++ b/docs/design/coreclr/botr/vectors-and-intrinsics.md @@ -16,7 +16,7 @@ Most hardware intrinsics support is tied to the use of various Vector apis. Ther - The fixed length float vectors. `Vector2`, `Vector3`, and `Vector4`. These vector types represent a struct of floats of various lengths. For type layout, ABI and, interop purposes they are represented in exactly the same way as a structure with an appropriate number of floats in it. Operations on these vector types are supported on all architectures and platforms, although some architectures may optimize various operations. - The variable length `Vector`. This represents vector data of runtime-determined length. In any given process the length of a `Vector` is the same in all methods, but this length may differ between various machines or environment variable settings read at startup of the process. The `T` type variable may be the following types (`System.Byte`, `System.SByte`, `System.Int16`, `System.UInt16`, `System.Int32`, `System.UInt32`, `System.Int64`, `System.UInt64`, `System.Single`, and `System.Double`), and allows use of integer or double data within a vector. The length and alignment of `Vector` is unknown to the developer at compile time (although discoverable at runtime by using the `Vector.Count` api), and `Vector` may not exist in any interop signature. Operations on these vector types are supported on all architectures and platforms, although some architectures may optimize various operations if the `Vector.IsHardwareAccelerated` api returns true. - `Vector64`, `Vector128`, and `Vector256` represent fixed-sized vectors that closely resemble the fixed- sized vectors available in C++. These structures can be used in any code that runs, but very few features are supported directly on these types other than creation. They are used primarily in the processor specific hardware intrinsics apis. -- Processor specific hardware intrinsics apis such as `System.Runtime.Intrinsics.X86.Ssse3`. These apis map directly to individual instructions or short instruction sequences that are specific to a particular hardware instruction. These apis are only useable on hardware that supports the particular instruction. See https://github.com/dotnet/designs/blob/master/accepted/2018/platform-intrinsics.md for the design of these. +- Processor specific hardware intrinsics apis such as `System.Runtime.Intrinsics.X86.Ssse3`. These apis map directly to individual instructions or short instruction sequences that are specific to a particular hardware instruction. These apis are only usable on hardware that supports the particular instruction. See https://github.com/dotnet/designs/blob/master/accepted/2018/platform-intrinsics.md for the design of these. # How to use intrinsics apis @@ -185,7 +185,7 @@ Since System.Private.CoreLib.dll is known to be code reviewed with the code revi The JIT receives flags which instruct it on what instruction sets are valid to use, and has access to a new jit interface api `notifyInstructionSetUsage(isa, bool supportBehaviorRequired)`. -The notifyInstructionSetUsage api is used to notify the AOT compiler infrastructure that the code may only execute if the runtime environment of the code is exactly the same as the boolean parameter indicates it should be. For instance, if `notifyInstructionSetUsage(Avx, false)` is used, then the code generated must not be used if the `Avx` instruction set is useable. Similarly `notifyInstructionSetUsage(Avx, true)` will indicate that the code may only be used if the `Avx` instruction set is available. +The notifyInstructionSetUsage api is used to notify the AOT compiler infrastructure that the code may only execute if the runtime environment of the code is exactly the same as the boolean parameter indicates it should be. For instance, if `notifyInstructionSetUsage(Avx, false)` is used, then the code generated must not be used if the `Avx` instruction set is usable. Similarly `notifyInstructionSetUsage(Avx, true)` will indicate that the code may only be used if the `Avx` instruction set is available. While the above api exists, it is not expected that general purpose code within the JIT will use it. In general jitted code is expected to use a number of different apis to understand the available hardware instruction support available. diff --git a/docs/design/features/arm64-intrinsics.md b/docs/design/features/arm64-intrinsics.md index e814833ad126fc..5b602f24cf7102 100644 --- a/docs/design/features/arm64-intrinsics.md +++ b/docs/design/features/arm64-intrinsics.md @@ -173,7 +173,7 @@ It is also worth noting `System.Runtime.Intrinsics.X86` naming conventions will operations which take vector argument(s), but contain an implicit cast(s) to the base type and therefore operate only on the first item of the argument vector(s). -### Intinsic Method Argument and Return Types +### Intrinsic Method Argument and Return Types Intrinsic methods will typically use a standard set of argument and return types: diff --git a/docs/design/libraries/DllImportGenerator/StructMarshalling.md b/docs/design/libraries/DllImportGenerator/StructMarshalling.md index 2b4f33f8233366..ab332616b74132 100644 --- a/docs/design/libraries/DllImportGenerator/StructMarshalling.md +++ b/docs/design/libraries/DllImportGenerator/StructMarshalling.md @@ -117,7 +117,7 @@ There are 2 usage mechanisms of these attributes. #### Usage 1, Source-generated interop -The user can apply the `GeneratedMarshallingAttribute` to their structure `S`. The source generator will determine if the type is blittable. If it is blittable, the source generator will generate a partial definition and apply the `BlittableTypeAttribute` to the struct type `S`. Otherwise, it will generate a blittable representation of the struct with the aformentioned requried shape and apply the `NativeMarshallingAttribute` and point it to the blittable representation. The blittable representation can either be generated as a separate top-level type or as a nested type on `S`. +The user can apply the `GeneratedMarshallingAttribute` to their structure `S`. The source generator will determine if the type is blittable. If it is blittable, the source generator will generate a partial definition and apply the `BlittableTypeAttribute` to the struct type `S`. Otherwise, it will generate a blittable representation of the struct with the aformentioned required shape and apply the `NativeMarshallingAttribute` and point it to the blittable representation. The blittable representation can either be generated as a separate top-level type or as a nested type on `S`. #### Usage 2, Manual interop 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 0779c2401f01d1..90261791d0c8d5 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs @@ -34,7 +34,7 @@ private static Attribute[] InternalGetCustomAttributes(PropertyInfo element, Typ // create the hashtable that keeps track of inherited types Dictionary types = new Dictionary(11); - // create an array list to collect all the requested attibutes + // create an array list to collect all the requested attributes List attributeList = new List(); CopyToAttributeList(attributeList, attributes, types); do @@ -137,7 +137,7 @@ private static Attribute[] InternalGetCustomAttributes(EventInfo element, Type t } // create the hashtable that keeps track of inherited types - // create an array list to collect all the requested attibutes + // create an array list to collect all the requested attributes Dictionary types = new Dictionary(11); List attributeList = new List(); CopyToAttributeList(attributeList, attributes, types); diff --git a/src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontextreader.h b/src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontextreader.h index 6106898e8e656a..c43a2ab5a0c5cf 100644 --- a/src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontextreader.h +++ b/src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontextreader.h @@ -40,7 +40,7 @@ struct MethodContextBuffer } }; -// The pack(4) directive is so that each entry is 12 bytes, intead of 16 +// The pack(4) directive is so that each entry is 12 bytes, instead of 16 #pragma pack(push) #pragma pack(4) class MethodContextReader diff --git a/src/coreclr/debug/daccess/daccess.cpp b/src/coreclr/debug/daccess/daccess.cpp index 0e201dd4b812d2..f9ec95c1f41838 100644 --- a/src/coreclr/debug/daccess/daccess.cpp +++ b/src/coreclr/debug/daccess/daccess.cpp @@ -8037,7 +8037,7 @@ bool DacHandleWalker::FetchMoreHandles(HANDLESCANPROC callback) if (hTable) { // Yikes! The handle table callbacks don't produce the handle type or - // the AppDomain that we need, and it's too difficult to propogate out + // the AppDomain that we need, and it's too difficult to propagate out // these things (especially the type) without worrying about performance // implications for the GC. Instead we'll have the callback walk each // type individually. There are only a few handle types, and the handle diff --git a/src/coreclr/debug/daccess/task.cpp b/src/coreclr/debug/daccess/task.cpp index b8e4e4357ffa72..42c4e0becce1c1 100644 --- a/src/coreclr/debug/daccess/task.cpp +++ b/src/coreclr/debug/daccess/task.cpp @@ -2416,7 +2416,7 @@ ClrDataModule::GetFileName( // Try to get the assembly name through GetPath. // If the returned name is empty, then try to get the guessed module assembly name. - // The guessed assembly name is propogated from metadata's module name. + // The guessed assembly name is propagated from metadata's module name. // if ((m_module->GetPEAssembly()->GetPath().DacGetUnicode(bufLen, name, &_nameLen) && name[0])|| (m_module->GetPEAssembly()->GetModuleFileNameHint().DacGetUnicode(bufLen, name, &_nameLen) && name[0])) diff --git a/src/coreclr/debug/di/dbgtransportpipeline.cpp b/src/coreclr/debug/di/dbgtransportpipeline.cpp index 24c861aba0faf6..7a2899fb99cc03 100644 --- a/src/coreclr/debug/di/dbgtransportpipeline.cpp +++ b/src/coreclr/debug/di/dbgtransportpipeline.cpp @@ -231,7 +231,7 @@ HRESULT DbgTransportPipeline::CreateProcessUnderDebugger( &m_hProcess); if (SUCCEEDED(hr)) { - // Wait for the connection to become useable (or time out). + // Wait for the connection to become usable (or time out). if (!m_pTransport->WaitForSessionToOpen(10000)) { hr = CORDBG_E_TIMEOUT; @@ -298,7 +298,7 @@ HRESULT DbgTransportPipeline::DebugActiveProcess(MachineInfo machineInfo, const if (SUCCEEDED(hr)) { // TODO: Pass this timeout as a parameter all the way from debugger - // Wait for the connection to become useable (or time out). + // Wait for the connection to become usable (or time out). if (!m_pTransport->WaitForSessionToOpen(10000)) { hr = CORDBG_E_TIMEOUT; diff --git a/src/coreclr/debug/di/process.cpp b/src/coreclr/debug/di/process.cpp index dd90a5c8a7242b..9b21fa47e67285 100644 --- a/src/coreclr/debug/di/process.cpp +++ b/src/coreclr/debug/di/process.cpp @@ -4591,7 +4591,7 @@ void CordbProcess::DispatchRCEvent() CONTRACTL { - // This is happening on the RCET thread, so there's no place to propogate an error back up. + // This is happening on the RCET thread, so there's no place to propagate an error back up. NOTHROW; } CONTRACTL_END; @@ -4777,7 +4777,7 @@ void CordbProcess::DbgAssertAppDomainDeleted(VMPTR_AppDomain vmAppDomainDeleted) // Errors could occur because: // - the event is corrupted (exceptional case) // - the RS is corrupted / OOM (exceptional case) -// Exception errors here will propogate back to the Filter() call, and there's not really anything +// Exception errors here will propagate back to the Filter() call, and there's not really anything // a debugger can do about an error here (perhaps report it to the user). // Errors must leave IcorDebug in a consistent state. // @@ -8518,7 +8518,7 @@ void CordbProcess::UnrecoverableError(HRESULT errorHR, { // @dbgtodo - , shim: Once everything is hoisted, we can remove // this code. - // In the v3 case, we should never get an unrecoverable error. Instead, the HR should be propogated + // In the v3 case, we should never get an unrecoverable error. Instead, the HR should be propagated // and returned at the top-level public API. _ASSERTE(!"Unrecoverable error dispatched in V3 case."); } @@ -10257,7 +10257,7 @@ void CordbRCEventThread::FlushQueuedEvents(CordbProcess* process) { CONTRACTL { - NOTHROW; // This is happening on the RCET thread, so there's no place to propogate an error back up. + NOTHROW; // This is happening on the RCET thread, so there's no place to propagate an error back up. } CONTRACTL_END; @@ -11160,7 +11160,7 @@ void CordbProcess::FilterClrNotification( // Case 2: Sync Complete // - HandleSyncCompleteRecieved(); + HandleSyncCompleteReceived(); } else { @@ -11679,7 +11679,7 @@ bool CordbProcess::IsWin32EventThread() // managed event-queue, and coordinating with the dispatch thread (RCET). // // @dbgtodo - this should eventually get hoisted into the shim. -void CordbProcess::HandleSyncCompleteRecieved() +void CordbProcess::HandleSyncCompleteReceived() { _ASSERTE(ThreadHoldsProcessLock()); @@ -11847,7 +11847,7 @@ Reaction CordbProcess::TriageSyncComplete() // we should put that to good use here. this->SuspendUnmanagedThreads(); - this->HandleSyncCompleteRecieved(); + this->HandleSyncCompleteReceived(); // Let the process run free. return REACTION(cIgnore); @@ -12831,7 +12831,7 @@ void CordbProcess::HandleDebugEventForInteropDebugging(const DEBUG_EVENT * pEven CordbWin32EventThread * pW32EventThread = this->m_pShim->GetWin32EventThread(); _ASSERTE(pW32EventThread != NULL); - // if we were waiting for a retriggered exception but recieved any other event then turn + // if we were waiting for a retriggered exception but received any other event then turn // off the single stepping and dequeue the IB event. Right now we only use the SS flag internally // for stepping during possible retrigger. if(reaction.GetType() != Reaction::cInbandExceptionRetrigger && pUnmanagedThread->IsSSFlagNeeded()) diff --git a/src/coreclr/debug/di/rspriv.h b/src/coreclr/debug/di/rspriv.h index 1baa6a9f24afd5..a34dd0e6a07288 100644 --- a/src/coreclr/debug/di/rspriv.h +++ b/src/coreclr/debug/di/rspriv.h @@ -846,7 +846,7 @@ typedef RSLock::RSInverseLockHolder RSInverseLockHolder; * ------------------------------------------------------------------------- */ // This serves as glue for exceptions. Eventually, we shouldn't have unrecoverable -// error, and instead, errors should just propogate up. +// error, and instead, errors should just propagate up. #define SetUnrecoverableIfFailed(__p, __hr) \ if (FAILED(__hr)) \ { \ @@ -3389,7 +3389,7 @@ class CordbProcess : bool IsWin32EventThread(); - void HandleSyncCompleteRecieved(); + void HandleSyncCompleteReceived(); // Send a truly asynchronous IPC event. void SendAsyncIPCEvent(DebuggerIPCEventType t); @@ -3839,7 +3839,7 @@ class CordbProcess : // m_syncCompleteReceived tells us if the runtime is _actually_ sychronized. It goes // high once we get a SyncComplete, and it goes low once we actually send the continue. // This is always set by the thread that receives the sync-complete. In interop, that's the w32et. - // Thus this is the most accurate indication of wether the Debuggee is _actually_ synchronized or not. + // Thus this is the most accurate indication of whether the Debuggee is _actually_ synchronized or not. bool m_syncCompleteReceived; @@ -9151,7 +9151,7 @@ class CordbReferenceValue : public CordbValue, public ICorDebugReferenceValue, p RefValueHome m_valueHome; - // Indicates when we last syncronized our stored data (m_info) from the left side + // Indicates when we last synchronized our stored data (m_info) from the left side UINT m_continueCounterLastSync; }; @@ -10507,7 +10507,7 @@ class CordbUnmanagedThread : public CordbBase HRESULT LoadTLSArrayPtr(); - // Hijacks this thread to a hijack worker function which recieves the current + // Hijacks this thread to a hijack worker function which receives the current // context and the provided exception record. The reason determines what code // the hijack worker executes HRESULT SetupFirstChanceHijack(EHijackReason::EHijackReason reason, const EXCEPTION_RECORD * pExceptionRecord); diff --git a/src/coreclr/debug/di/rstype.cpp b/src/coreclr/debug/di/rstype.cpp index f9e283b8cf32b8..3d807bb2434f53 100644 --- a/src/coreclr/debug/di/rstype.cpp +++ b/src/coreclr/debug/di/rstype.cpp @@ -2449,13 +2449,13 @@ HRESULT CordbType::GetFieldInfo(mdFieldDef fldToken, FieldData ** ppFieldData) fldToken, ppFieldData); // fall through and return. - // Let possible CORDBG_E_ENC_HANGING_FIELD errors propogate + // Let possible CORDBG_E_ENC_HANGING_FIELD errors propagate } } else { hr = m_pClass->GetFieldInfo(fldToken, ppFieldData); // this is for non-generic types.... - // Let possible CORDBG_E_ENC_HANGING_FIELD errors propogate + // Let possible CORDBG_E_ENC_HANGING_FIELD errors propagate } } EX_CATCH_HRESULT(hr); diff --git a/src/coreclr/debug/ee/debugger.cpp b/src/coreclr/debug/ee/debugger.cpp index f26b09de180f31..dde66e58d2eb1d 100644 --- a/src/coreclr/debug/ee/debugger.cpp +++ b/src/coreclr/debug/ee/debugger.cpp @@ -7655,7 +7655,7 @@ void Debugger::SendExceptionEventsWorker( // // Returns: // S_OK on success (common case by far). -// propogates other errors. +// propagates other errors. // HRESULT Debugger::SendException(Thread *pThread, bool fFirstChance, @@ -10480,7 +10480,7 @@ bool Debugger::HandleIPCEvent(DebuggerIPCEvent * pEvent) } else { - // not synchornized. We get debugger lock upon the function entry + // not synchronized. We get debugger lock upon the function entry _ASSERTE(ThreadHoldsLock()); // Simply trap all Runtime threads if we're not already trying to. diff --git a/src/coreclr/gc/gcpriv.h b/src/coreclr/gc/gcpriv.h index 200e8ae58bec9a..3c8cc01e762c09 100644 --- a/src/coreclr/gc/gcpriv.h +++ b/src/coreclr/gc/gcpriv.h @@ -43,13 +43,13 @@ inline void FATAL_GC_ERROR() /* the following section defines the optional features */ // Regions invariants - -// +// // + each generation consists of 1+ regions. // + a region is in a contiguous address range; different regions could have // gaps inbetween. // + a region cannot contain more than one generation. -// -// This means any empty regions can be freely used for any generation. For +// +// This means any empty regions can be freely used for any generation. For // Server GC we will balance regions between heaps. // For now enable regions by default for only StandAlone GC builds #if defined (HOST_64BIT) && defined (BUILD_AS_STANDALONE) @@ -782,7 +782,7 @@ class allocator #endif //USE_REGIONS #ifdef FEATURE_EVENT_TRACE - uint16_t count_largest_items (etw_bucket_info* bucket_info, + uint16_t count_largest_items (etw_bucket_info* bucket_info, size_t max_size, size_t max_item_count, size_t* recorded_fl_info_size); @@ -808,7 +808,7 @@ class generation #ifdef USE_REGIONS heap_segment* tail_region; heap_segment* plan_start_segment; - // only max_generation could have ro regions; for other generations + // only max_generation could have ro regions; for other generations // this will be 0. heap_segment* tail_ro_region; #endif //USE_REGIONS @@ -1297,7 +1297,7 @@ class gc_heap PER_HEAP void verify_heap (BOOL begin_gc_p); PER_HEAP - BOOL check_need_card (uint8_t* child_obj, int gen_num_for_cards, + BOOL check_need_card (uint8_t* child_obj, int gen_num_for_cards, uint8_t* low, uint8_t* high); #endif //VERIFY_HEAP @@ -1413,21 +1413,21 @@ class gc_heap // if needed. PER_HEAP void update_start_tail_regions (generation* gen, - heap_segment* region_to_delete, - heap_segment* prev_region, + heap_segment* region_to_delete, + heap_segment* prev_region, heap_segment* next_region); PER_HEAP bool should_sweep_in_plan (heap_segment* region); PER_HEAP - void sweep_region_in_plan (heap_segment* region, - BOOL use_mark_list, + void sweep_region_in_plan (heap_segment* region, + BOOL use_mark_list, uint8_t**& mark_list_next, uint8_t** mark_list_index); PER_HEAP - void check_demotion_helper_sip (uint8_t** pval, - int parent_gen_num, + void check_demotion_helper_sip (uint8_t** pval, + int parent_gen_num, uint8_t* parent_loc); // This relocates the SIP regions and return the next non SIP region. PER_HEAP @@ -1759,8 +1759,8 @@ class gc_heap void handle_failure_for_no_gc(); PER_HEAP - void fire_mark_event (int root_type, - size_t& current_promoted_bytes, + void fire_mark_event (int root_type, + size_t& current_promoted_bytes, size_t& last_promoted_bytes); PER_HEAP @@ -2820,7 +2820,7 @@ class gc_heap PER_HEAP uint8_t* find_next_marked (uint8_t* x, uint8_t* end, - BOOL use_mark_list, + BOOL use_mark_list, uint8_t**& mark_list_next, uint8_t** mark_list_index); @@ -3229,8 +3229,8 @@ class gc_heap PER_HEAP_ISOLATED size_t get_total_survived_size(); PER_HEAP - bool update_alloc_info (int gen_number, - size_t allocated_size, + bool update_alloc_info (int gen_number, + size_t allocated_size, size_t* etw_allocation_amount); // this also resets allocated_since_last_gc PER_HEAP_ISOLATED @@ -3610,28 +3610,28 @@ class gc_heap PER_HEAP_ISOLATED size_t regions_range; - // Each GC thread maintains its own record of survived/survived due to - // old gen cards pointing into that region. These allow us to make the - // following decisions - - // + // Each GC thread maintains its own record of survived/survived due to + // old gen cards pointing into that region. These allow us to make the + // following decisions - + // // If a region's survival rate is very high, it's not very useful to // compact it, unless we want to free up its virtual address range to // form a larger free space so we can accommodate a larger region. // - // During a GC whose plan gen is not gen2, if a region's survival rate + // During a GC whose plan gen is not gen2, if a region's survival rate // is very high and most of the survival comes from old generations' cards, - // it would be much better to promote that region directly into gen2 - // intead of having to go through gen1 then get promoted to gen2. + // it would be much better to promote that region directly into gen2 + // instead of having to go through gen1 then get promoted to gen2. // // I'm reusing g_mark_list_piece for these since g_mark_list_piece is - // not used while we are marking. So this means we can only use this up + // not used while we are marking. So this means we can only use this up // till sort_mark_list is called. - // - // REGIONS TODO: this means we should treat g_mark_list_piece as part of + // + // REGIONS TODO: this means we should treat g_mark_list_piece as part of // the GC bookkeeping data structures and allocate it as such. // - // REGIONS TODO: currently we only make use of SOH's promoted bytes to - // make decisions whether we want to compact or sweep a region. We + // REGIONS TODO: currently we only make use of SOH's promoted bytes to + // make decisions whether we want to compact or sweep a region. We // should also enable this for LOH compaction. PER_HEAP size_t* survived_per_region; @@ -4542,7 +4542,7 @@ class gc_heap // // Note that the goal of this is not to show every single type of roots // For that you have the per heap MarkWithType events. This takes advantage - // of the joins we already have and naturally gets the time between each + // of the joins we already have and naturally gets the time between each // join. enum etw_gc_time_info { @@ -4570,7 +4570,7 @@ class gc_heap #endif //BACKGROUND_GC PER_HEAP_ISOLATED - void record_mark_time (uint64_t& mark_time, + void record_mark_time (uint64_t& mark_time, uint64_t& current_mark_time, uint64_t& last_mark_time); @@ -4588,7 +4588,7 @@ class gc_heap // these events on verbose level and stop at max_etw_item_count items. PER_HEAP etw_bucket_info bucket_info[NUM_GEN2_ALIST]; - + PER_HEAP void init_bucket_info(); @@ -4596,8 +4596,8 @@ class gc_heap void add_plug_in_condemned_info (generation* gen, size_t plug_size); PER_HEAP - void fire_etw_allocation_event (size_t allocation_amount, - int gen_number, + void fire_etw_allocation_event (size_t allocation_amount, + int gen_number, uint8_t* object_address, size_t object_size); @@ -4645,8 +4645,8 @@ class gc_heap etw_loh_compact_info* loh_compact_info; PER_HEAP - void loh_reloc_survivor_helper (uint8_t** pval, - size_t& total_refs, + void loh_reloc_survivor_helper (uint8_t** pval, + size_t& total_refs, size_t& zero_refs); #endif //FEATURE_LOH_COMPACTION #endif //FEATURE_EVENT_TRACE @@ -5007,7 +5007,7 @@ class gc_heap protected: PER_HEAP void update_collection_counts (); - + PER_HEAP_ISOLATED size_t card_table_element_layout[total_bookkeeping_elements + 1]; @@ -5519,7 +5519,7 @@ struct loh_padding_obj #define heap_segment_flags_poh 512 #if defined(BACKGROUND_GC) && defined(USE_REGIONS) -// This means this seg needs to be processed by +// This means this seg needs to be processed by // BGC overflow when we process non concurrently. #define heap_segment_flags_overflow 1024 #endif //BACKGROUND_GC && USE_REGIONS @@ -5545,7 +5545,7 @@ class heap_segment // or a negative value which means it's in a large region. uint8_t* allocated; uint8_t* committed; - // For regions This could be obtained from region_allocator as each + // For regions This could be obtained from region_allocator as each // busy block knows its size. uint8_t* reserved; uint8_t* used; @@ -5567,21 +5567,21 @@ class heap_segment #endif //!MULTIPLE_HEAPS || !USE_REGIONS uint8_t* plan_allocated; // In the plan phase we change the allocated for a seg but we need this - // value to correctly calculate how much space we can reclaim in + // value to correctly calculate how much space we can reclaim in // generation_fragmentation. But it's beneficial to truncate it as it // means in the later phases we only need to look up to the new allocated. - uint8_t* saved_allocated; + uint8_t* saved_allocated; uint8_t* saved_bg_allocated; #ifdef USE_REGIONS // These generation numbers are initialized to -1. // For plan_gen_num: // for all regions in condemned generations it needs - // to be re-initialized to -1 when a GC is done. + // to be re-initialized to -1 when a GC is done. // When setting it we update the demotion decision accordingly. uint8_t gen_num; // This says this region was already swept during plan and its bricks - // were built to indicates objects, ie, not the way plan builds them. - // Other phases need to be aware of this so they don't assume bricks + // were built to indicates objects, ie, not the way plan builds them. + // Other phases need to be aware of this so they don't assume bricks // indicate tree nodes. // // swept_in_plan_p can be folded into gen_num. @@ -5610,11 +5610,11 @@ class heap_segment // these will need to be populated for each basic region in the // seg mapping table. // - // We can break this up into 2 data structures, one with the + // We can break this up into 2 data structures, one with the // fields per basic region; the other with the rest of the fields. // // Could consider to have the region itself populated per basic - // region but so far it doesn't seem necessary so I'll leave it + // region but so far it doesn't seem necessary so I'll leave it // out. void init_free_list() { @@ -5641,23 +5641,23 @@ class heap_segment #ifdef USE_REGIONS // Region management -// +// // We reserve a big space for regions. We could consider including the GC bookkeeping data -// structures in this space too (eg, at the end and only commit the portion that's used to -// cover the current regions). -// +// structures in this space too (eg, at the end and only commit the portion that's used to +// cover the current regions). +// // region_allocator is used to find where to put a region. When it finds a space to allocate // a region in it will mark is as busy. Note that the actual commit operation for a region // is not done by region_allocator - it's done as needed when GC actually stores objects there. -// -// TODO: -// When GC detects a region only containing dead objects, it does not immediately return this -// region to region_allocator. It doesn't decommit anything from this region and stores this +// +// TODO: +// When GC detects a region only containing dead objects, it does not immediately return this +// region to region_allocator. It doesn't decommit anything from this region and stores this // region per heap as free_regions and free_large_regions respectively for SOH and UOH. When // the memory pressure is high enough, we decommit an appropriate amount regions in free_regions // and free_large_regions. These decommitted regions will be returned to region_allocator which // mark the space as free blocks. -// +// #define LARGE_REGION_FACTOR (8) #define region_alloc_free_bit (1 << (sizeof (uint32_t) * 8 - 1)) @@ -5671,31 +5671,31 @@ enum allocate_direction typedef bool (*region_allocator_callback_fn)(uint8_t*); // The big space we reserve for regions is divided into units of region_alignment. -// -// SOH regions are all basic regions, meaning their size is the same as alignment. UOH regions +// +// SOH regions are all basic regions, meaning their size is the same as alignment. UOH regions // are by default 8x as large. -// +// // We use a map to encode info on these units. The map consists of an array of 32-bit uints. // The encoding is the following: -// +// // If the MSB is not set, it means it's busy (in use); otherwise it means it's free. // // The value (without the MSB) indicates how many units to walk till we get to the next // group of encoded bytes which is called a block. -// -// For each region we encode the info with a busy block in the map. This block has the -// same # of uints as the # of units this region occupies. And we store the # in +// +// For each region we encode the info with a busy block in the map. This block has the +// same # of uints as the # of units this region occupies. And we store the # in // the starting uint. These uints can be converted to bytes since we have multiple units // for larger regions anyway. I haven't done that since this will need to be changed in // the near future based on more optimal allocation strategies. // // When we allocate, we search forward to find contiguous free units >= num_units // We do take the opportunity to coalesce free blocks but we do not coalesce busy blocks. -// When we decommit a region, we simply mark its block free. Free blocks are coalesced +// When we decommit a region, we simply mark its block free. Free blocks are coalesced // opportunistically when we need to walk them. // // TODO: to accommodate 32-bit processes, we reserve in segment sizes and divide each seg -// into regions. +// into regions. class region_allocator { private: @@ -5804,7 +5804,7 @@ class region_allocator // // - an rw seg // - part of an rw seg -// - no seg +// - no seg // // If it's part of an rw seg, meaning this is a large region, each basic region would // store the info for fast access but when we need to get to the actual region info diff --git a/src/coreclr/inc/cordebug.idl b/src/coreclr/inc/cordebug.idl index 9620b2cf771280..97e53150b055e0 100644 --- a/src/coreclr/inc/cordebug.idl +++ b/src/coreclr/inc/cordebug.idl @@ -54,7 +54,7 @@ typedef DWORD CONNID; cpp_quote("#ifndef _COR_IL_MAP") cpp_quote("#define _COR_IL_MAP") -// Note that this structure is also defined in CorProf.idl - PROPOGATE CHANGES +// Note that this structure is also defined in CorProf.idl - PROPAGATE CHANGES // BOTH WAYS, or this'll become a really insidious bug some day. typedef struct _COR_IL_MAP { diff --git a/src/coreclr/inc/corhdr.h b/src/coreclr/inc/corhdr.h index 8b3eb42775c451..11dd7029884539 100644 --- a/src/coreclr/inc/corhdr.h +++ b/src/coreclr/inc/corhdr.h @@ -249,7 +249,7 @@ typedef struct IMAGE_COR20_HEADER #else // !__IMAGE_COR20_HEADER_DEFINED__ // @TODO: This is required because we pull in the COM+ 2.0 PE header -// definition from WinNT.h, and these constants have not yet propogated to there. +// definition from WinNT.h, and these constants have not yet propagated to there. // #define COR_VTABLE_FROM_UNMANAGED_RETAIN_APPDOMAIN 0x08 #define COMIMAGE_FLAGS_32BITPREFERRED 0x00020000 diff --git a/src/coreclr/inc/nsutilpriv.h b/src/coreclr/inc/nsutilpriv.h index 519d0acc72f54e..108e8e61479b25 100644 --- a/src/coreclr/inc/nsutilpriv.h +++ b/src/coreclr/inc/nsutilpriv.h @@ -170,7 +170,7 @@ bool MakeAssemblyQualifiedName( // true if ok, static bool MakeAssemblyQualifiedName( // true ok, false truncation - __out_ecount (dwBuffer) WCHAR* pBuffer, // Buffer to recieve the results + __out_ecount (dwBuffer) WCHAR* pBuffer, // Buffer to receive the results int dwBuffer, // Number of characters total in buffer const WCHAR *szTypeName, // Namespace for name. int dwTypeName, // Number of characters (not including null) diff --git a/src/coreclr/inc/sstring.h b/src/coreclr/inc/sstring.h index 99a5219239578e..57db682e002707 100644 --- a/src/coreclr/inc/sstring.h +++ b/src/coreclr/inc/sstring.h @@ -22,7 +22,7 @@ // string. // // If you need a direct non-unicode representation, you will have to provide a fresh SString which can -// recieve a conversion operation if necessary. +// receive a conversion operation if necessary. // // The alternate encodings available are: // 1. ASCII - string consisting entirely of ASCII (7 bit) characters. This is the only 1 byte encoding diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index aa92db53e69034..258e15c26f305c 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -9061,7 +9061,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX else { // Verify and record that AVX2 isn't supported - compVerifyInstructionSetUnuseable(InstructionSet_AVX2); + compVerifyInstructionSetUnusable(InstructionSet_AVX2); assert(getSIMDSupportLevel() >= SIMD_SSE2_Supported); return TYP_SIMD16; } @@ -9104,7 +9104,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX assert(getSIMDSupportLevel() >= SIMD_SSE2_Supported); // Verify and record that AVX2 isn't supported - compVerifyInstructionSetUnuseable(InstructionSet_AVX2); + compVerifyInstructionSetUnusable(InstructionSet_AVX2); return XMM_REGSIZE_BYTES; } #elif defined(TARGET_ARM64) @@ -9338,15 +9338,15 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #endif } - // Ensure that code will not execute if an instruction set is useable. Call only - // if the instruction set has previously reported as unuseable, but when + // Ensure that code will not execute if an instruction set is usable. Call only + // if the instruction set has previously reported as unusable, but when // that that status has not yet been recorded to the AOT compiler - void compVerifyInstructionSetUnuseable(CORINFO_InstructionSet isa) + void compVerifyInstructionSetUnusable(CORINFO_InstructionSet isa) { // use compExactlyDependsOn to capture are record the use of the isa - bool isaUseable = compExactlyDependsOn(isa); - // Assert that the is unuseable. If true, this function should never be called. - assert(!isaUseable); + bool isaUsable = compExactlyDependsOn(isa); + // Assert that the is unusable. If true, this function should never be called. + assert(!isaUsable); } // Answer the question: Is a particular ISA allowed to be used implicitly by optimizations? diff --git a/src/coreclr/jit/fgdiagnostic.cpp b/src/coreclr/jit/fgdiagnostic.cpp index 3b16fc7bd75727..8fa10e2f9f18f5 100644 --- a/src/coreclr/jit/fgdiagnostic.cpp +++ b/src/coreclr/jit/fgdiagnostic.cpp @@ -3105,7 +3105,7 @@ void Compiler::fgDebugCheckFlags(GenTree* tree) if ((call->gtCallThisArg->GetNode()->gtFlags & GTF_ASG) != 0) { - // TODO-Cleanup: this is a patch for a violation in our GT_ASG propogation + // TODO-Cleanup: this is a patch for a violation in our GT_ASG propagation // see https://github.com/dotnet/runtime/issues/13758 treeFlags |= GTF_ASG; } @@ -3119,7 +3119,7 @@ void Compiler::fgDebugCheckFlags(GenTree* tree) if ((use.GetNode()->gtFlags & GTF_ASG) != 0) { - // TODO-Cleanup: this is a patch for a violation in our GT_ASG propogation + // TODO-Cleanup: this is a patch for a violation in our GT_ASG propagation // see https://github.com/dotnet/runtime/issues/13758 treeFlags |= GTF_ASG; } diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index 77a7e0593a6e1a..247c43054c3682 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -16304,7 +16304,7 @@ GenTreeLclVarCommon* GenTree::IsLocalAddrExpr() // Returns true if "this" represents the address of a local, or a field of a local. // // Notes: -// It is mostly used for optimizations but assertion propogation depends on it for correctness. +// It is mostly used for optimizations but assertion propagation depends on it for correctness. // So if this function does not recognize a def of a LCL_VAR we can have an incorrect optimization. // bool GenTree::IsLocalAddrExpr(Compiler* comp, diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index 3a91deb7b65032..af42e39750b2f2 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -9212,7 +9212,7 @@ GenTree* Compiler::fgMorphCall(GenTreeCall* call) // call->gtControlExpr = fgMorphTree(call->gtControlExpr); - // Propogate any gtFlags into the call + // Propagate any gtFlags into the call call->gtFlags |= call->gtControlExpr->gtFlags; } @@ -10529,7 +10529,7 @@ GenTree* Compiler::fgMorphBlockOperand(GenTree* tree, var_types asgType, unsigne // false otherwise. // // Notes: -// This check is needed to avoid accesing LCL_VARs with incorrect +// This check is needed to avoid accessing LCL_VARs with incorrect // CORINFO_FIELD_HANDLE that would confuse VN optimizations. // bool Compiler::fgMorphCanUseLclFldForCopy(unsigned lclNum1, unsigned lclNum2) diff --git a/src/coreclr/jit/morphblock.cpp b/src/coreclr/jit/morphblock.cpp index fdd0e90b24a380..a8482726a5da23 100644 --- a/src/coreclr/jit/morphblock.cpp +++ b/src/coreclr/jit/morphblock.cpp @@ -189,7 +189,7 @@ GenTree* MorphInitBlockHelper::Morph() // with information about it. // // Notes: -// When assertion propogation is enabled this method kills assertions about the dst local, +// When assertion propagation is enabled this method kills assertions about the dst local, // so the correctness depends on `IsLocalAddrExpr` recognizing all patterns. // void MorphInitBlockHelper::PrepareDst() diff --git a/src/coreclr/pal/src/file/filetime.cpp b/src/coreclr/pal/src/file/filetime.cpp index 7cdde900d2117f..768ee426c4dbfa 100644 --- a/src/coreclr/pal/src/file/filetime.cpp +++ b/src/coreclr/pal/src/file/filetime.cpp @@ -251,7 +251,7 @@ Function FileTimeToSystemTime() Helper function for FileTimeToDosTime. - Converts the necessary file time attibutes to system time, for + Converts the necessary file time attributes to system time, for easier manipulation in FileTimeToDosTime. --*/ diff --git a/src/coreclr/pal/tests/palsuite/c_runtime/malloc/test1/test1.cpp b/src/coreclr/pal/tests/palsuite/c_runtime/malloc/test1/test1.cpp index 2f713a0ee96faa..067791fe866dfd 100644 --- a/src/coreclr/pal/tests/palsuite/c_runtime/malloc/test1/test1.cpp +++ b/src/coreclr/pal/tests/palsuite/c_runtime/malloc/test1/test1.cpp @@ -5,7 +5,7 @@ ** ** Source: test1.c ** -** Purpose: Test that malloc returns useable memory +** Purpose: Test that malloc returns usable memory ** ** **==========================================================================*/ diff --git a/src/coreclr/pal/tests/palsuite/composite/synchronization/criticalsection/readme.txt b/src/coreclr/pal/tests/palsuite/composite/synchronization/criticalsection/readme.txt index af6ef5d230bdc7..974497cfaff94e 100644 --- a/src/coreclr/pal/tests/palsuite/composite/synchronization/criticalsection/readme.txt +++ b/src/coreclr/pal/tests/palsuite/composite/synchronization/criticalsection/readme.txt @@ -1,11 +1,11 @@ -To compile: +To compile: 1) create a dat file (say criticalsection.dat) with contents: -PAL,Composite,palsuite\composite\syncronization\criticalsection,criticalsection=mainWrapper.c,criticalsection.c,,, +PAL,Composite,palsuite\composite\synchronization\criticalsection,criticalsection=mainWrapper.c,criticalsection.c,,, 2) perl rrunmod.pl -r criticalsection.dat To execute: -mainwrapper [PROCESS_COUNT] [WORKER_THREAD_MULTIPLIER_COUNT] [REPEAT_COUNT] +mainwrapper [PROCESS_COUNT] [WORKER_THREAD_MULTIPLIER_COUNT] [REPEAT_COUNT] diff --git a/src/coreclr/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/test4.cpp b/src/coreclr/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/test4.cpp index 577869b78717ee..255d96c832bfec 100644 --- a/src/coreclr/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/test4.cpp +++ b/src/coreclr/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/test4.cpp @@ -18,11 +18,11 @@ const int MY_EXCEPTION=999; PALTEST(debug_api_WriteProcessMemory_test4_paltest_writeprocessmemory_test4, "debug_api/WriteProcessMemory/test4/paltest_writeprocessmemory_test4") { - + PROCESS_INFORMATION pi; STARTUPINFO si; DEBUG_EVENT DebugEv; - DWORD dwContinueStatus = DBG_CONTINUE; + DWORD dwContinueStatus = DBG_CONTINUE; int Count, ret; char* DataBuffer[4096]; char* Memory; @@ -31,22 +31,22 @@ PALTEST(debug_api_WriteProcessMemory_test4_paltest_writeprocessmemory_test4, "de { return FAIL; } - + ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); ZeroMemory( &pi, sizeof(pi) ); - + memset(DataBuffer, 'z', 4096); /* Create a new process. This is the process to be Debugged */ - if(!CreateProcess( NULL, "helper", NULL, NULL, - FALSE, 0, NULL, NULL, &si, &pi)) + if(!CreateProcess( NULL, "helper", NULL, NULL, + FALSE, 0, NULL, NULL, &si, &pi)) { Fail("ERROR: CreateProcess failed to load executable 'helper'. " "GetLastError() returned %d.\n",GetLastError()); } - /* Call DebugActiveProcess, because the process wasn't created as a + /* Call DebugActiveProcess, because the process wasn't created as a debug process. */ if(DebugActiveProcess(pi.dwProcessId) == 0) @@ -56,11 +56,11 @@ PALTEST(debug_api_WriteProcessMemory_test4_paltest_writeprocessmemory_test4, "de GetLastError()); } - + /* Call WaitForDebugEvent, which will wait until the helper process raises an exception. */ - + while(1) { if(WaitForDebugEvent(&DebugEv, INFINITE) == 0) @@ -68,53 +68,53 @@ PALTEST(debug_api_WriteProcessMemory_test4_paltest_writeprocessmemory_test4, "de Fail("ERROR: WaitForDebugEvent returned 0, indicating failure. " "GetLastError() returned %d.\n",GetLastError()); } - + /* We're waiting for the helper process to send this exception. When it does, we call WriteProcess. If it gets called more than once, it is ignored. */ - + if(DebugEv.u.Exception.ExceptionRecord.ExceptionCode == MY_EXCEPTION) { Memory = (LPVOID) DebugEv.u.Exception.ExceptionRecord.ExceptionInformation[0]; - + /* Write to this memory which we have no access to. */ - ret = WriteProcessMemory(pi.hProcess, + ret = WriteProcessMemory(pi.hProcess, Memory, DataBuffer, 4096, &Count); - + if(ret != 0) { Fail("ERROR: WriteProcessMemory should have failed, as " "it attempted to write to a range of memory which was " "not accessible.\n"); } - + if(GetLastError() != ERROR_NOACCESS) { Fail("ERROR: GetLastError() should have returned " - "ERROR_NOACCESS , but intead it returned " + "ERROR_NOACCESS , but instead it returned " "%d.\n",GetLastError()); } } - + if(DebugEv.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT) { break; } - - if(ContinueDebugEvent(DebugEv.dwProcessId, + + if(ContinueDebugEvent(DebugEv.dwProcessId, DebugEv.dwThreadId, dwContinueStatus) == 0) { Fail("ERROR: ContinueDebugEvent failed to continue the thread " "which had a debug event. GetLastError() returned %d.\n", GetLastError()); - } + } } diff --git a/src/coreclr/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/test.cpp b/src/coreclr/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/test.cpp index 165ebdaeca47a3..312d2e107a037f 100644 --- a/src/coreclr/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/test.cpp +++ b/src/coreclr/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableA/test1/test.cpp @@ -6,7 +6,7 @@ ** Source : test.c ** ** Purpose: Test for GetEnvironmentVariable() function -** Assign a properly sized buffer and get an environment +** Assign a properly sized buffer and get an environment ** variable, check to ensure it returns the correct values. ** ** @@ -20,7 +20,7 @@ PALTEST(miscellaneous_GetEnvironmentVariableA_test1_paltest_getenvironmentvariab /* Define some buffers needed for the function */ char * pResultBuffer = NULL; int size = 0; - + /* A place to stash the returned values */ int ReturnValueForLargeBuffer = 0; @@ -32,50 +32,50 @@ PALTEST(miscellaneous_GetEnvironmentVariableA_test1_paltest_getenvironmentvariab { return FAIL; } - - /* Recieve and allocate the correct amount of memory for the buffer */ - size = ReturnValueForLargeBuffer = GetEnvironmentVariable("PATH", - pResultBuffer, - 0); + + /* Receive and allocate the correct amount of memory for the buffer */ + size = ReturnValueForLargeBuffer = GetEnvironmentVariable("PATH", + pResultBuffer, + 0); pResultBuffer = (char*)malloc(size); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer. " "Can't properly exec test case without this.\n"); } - - + + /* Normal case, PATH should fit into this buffer */ - ReturnValueForLargeBuffer = GetEnvironmentVariable("PATH", - pResultBuffer, - size); - + ReturnValueForLargeBuffer = GetEnvironmentVariable("PATH", + pResultBuffer, + size); + /* Ensure that it returned a positive value */ - if(ReturnValueForLargeBuffer <= 0) + if(ReturnValueForLargeBuffer <= 0) { free(pResultBuffer); Fail("The return was %d, which indicates that the function failed.\n", - ReturnValueForLargeBuffer); + ReturnValueForLargeBuffer); } /* Ensure that it succeeded and copied the correct number of characters. - If this is true, then the return value should be one less of the size of + If this is true, then the return value should be one less of the size of the buffer. (Doesn't include that NULL byte) */ - if(ReturnValueForLargeBuffer != size-1) + if(ReturnValueForLargeBuffer != size-1) { free(pResultBuffer); Fail("The value returned was %d when it should have been %d. " "This should be the number of characters copied, minus the " - "NULL byte.\n",ReturnValueForLargeBuffer, size-1); + "NULL byte.\n",ReturnValueForLargeBuffer, size-1); } - - + + free(pResultBuffer); - + PAL_Terminate(); return PASS; } diff --git a/src/coreclr/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/test.cpp b/src/coreclr/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/test.cpp index 115486229f105c..2164d00e59f8d9 100644 --- a/src/coreclr/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/test.cpp +++ b/src/coreclr/pal/tests/palsuite/miscellaneous/GetEnvironmentVariableW/test1/test.cpp @@ -19,10 +19,10 @@ PALTEST(miscellaneous_GetEnvironmentVariableW_test1_paltest_getenvironmentvariab /* Define some buffers needed for the function */ WCHAR * pResultBuffer = NULL; int size = 0; - + /* A place to stash the returned values */ int ReturnValueForLargeBuffer = 0; - + /* * Initialize the PAL and return FAILURE if this fails */ @@ -32,35 +32,35 @@ PALTEST(miscellaneous_GetEnvironmentVariableW_test1_paltest_getenvironmentvariab return FAIL; } - /* Recieve and allocate the correct amount of memory for the buffer */ - size = ReturnValueForLargeBuffer = - GetEnvironmentVariable(convert("PATH"), - pResultBuffer, + /* Receive and allocate the correct amount of memory for the buffer */ + size = ReturnValueForLargeBuffer = + GetEnvironmentVariable(convert("PATH"), + pResultBuffer, 0); - + pResultBuffer = (WCHAR*)malloc(size*sizeof(WCHAR)); if ( pResultBuffer == NULL ) { Fail("ERROR: Failed to allocate memory for pResultBuffer pointer. " "Can't properly exec test case without this.\n"); } - - + + /* Normal case, PATH should fit into this buffer */ - ReturnValueForLargeBuffer = GetEnvironmentVariable(convert("PATH"), - pResultBuffer, - size); - free(pResultBuffer); - + ReturnValueForLargeBuffer = GetEnvironmentVariable(convert("PATH"), + pResultBuffer, + size); + free(pResultBuffer); + /* Ensure that it returned a positive value */ if(ReturnValueForLargeBuffer <= 0) { Fail("The return was %d, which indicates that the function failed.\n", ReturnValueForLargeBuffer); } - + /* Ensure that it succeeded and copied the correct number of characters. - If this is true, then the return value should be one less of the + If this is true, then the return value should be one less of the size of the buffer. (Doesn't include that NULL byte) */ if(ReturnValueForLargeBuffer != size-1) @@ -69,7 +69,7 @@ PALTEST(miscellaneous_GetEnvironmentVariableW_test1_paltest_getenvironmentvariab "should be the number of characters copied, " "minus the NULL byte.\n", ReturnValueForLargeBuffer, size-1); } - + PAL_Terminate(); return PASS; } diff --git a/src/coreclr/pal/tests/palsuite/threading/CreateProcessW/test2/parentprocess.cpp b/src/coreclr/pal/tests/palsuite/threading/CreateProcessW/test2/parentprocess.cpp index 5d69ee224d51ec..19bfc74ba6afde 100644 --- a/src/coreclr/pal/tests/palsuite/threading/CreateProcessW/test2/parentprocess.cpp +++ b/src/coreclr/pal/tests/palsuite/threading/CreateProcessW/test2/parentprocess.cpp @@ -6,7 +6,7 @@ ** Source: createprocessw/test2/parentprocess.c ** ** Purpose: Test the following features of CreateProcessW: -** - Check to see if hProcess & hThread are set in +** - Check to see if hProcess & hThread are set in ** return PROCESS_INFORMATION structure ** - Check to see if stdin, stdout, & stderr handles ** are used when STARTF_USESTDHANDLES is specified @@ -19,7 +19,7 @@ ** WaitForSingleObject ** WriteFile, ReadFile ** GetExitCodeProcess -** +** ** **=========================================================*/ @@ -68,11 +68,11 @@ PALTEST(threading_CreateProcessW_test2_paltest_createprocessw_test2, "threading/ } /*Setup SECURITY_ATTRIBUTES structure for CreatePipe*/ - pipeAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); - pipeAttributes.lpSecurityDescriptor = NULL; - pipeAttributes.bInheritHandle = TRUE; - - + pipeAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); + pipeAttributes.lpSecurityDescriptor = NULL; + pipeAttributes.bInheritHandle = TRUE; + + /*Create a StdIn pipe for child*/ bRetVal = CreatePipe(&hTestStdInR, /* read handle*/ &hTestStdInW, /* write handle */ @@ -138,7 +138,7 @@ PALTEST(threading_CreateProcessW_test2_paltest_createprocessw_test2, "threading/ /* Launch the child */ if ( !CreateProcess (NULL, szFullPathNameW, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi )) { - Fail("ERROR: CreateProcess call failed. GetLastError returned %d\n", + Fail("ERROR: CreateProcess call failed. GetLastError returned %d\n", GetLastError() ); } @@ -157,7 +157,7 @@ PALTEST(threading_CreateProcessW_test2_paltest_createprocessw_test2, "threading/ Fail("ERROR: %ld :unable to write to write pipe handle " "hTestStdInW=0x%lx\n", GetLastError(), hTestStdInW); } - + /* Wait for the child to finish, Max 20 seconds */ dwExitCode = WaitForSingleObject(pi.hProcess, 20000); @@ -222,7 +222,7 @@ PALTEST(threading_CreateProcessW_test2_paltest_createprocessw_test2, "threading/ NULL); /* overlapped buffer*/ - /* Confirm that we recieved the same string that we originally */ + /* Confirm that we received the same string that we originally */ /* wrote to the child and was received on both stdout & stderr.*/ if (strncmp(szTestString, szStdOutBuf, strlen(szTestString)) != 0 || strncmp(szTestString, szStdErrBuf, strlen(szTestString)) != 0) diff --git a/src/coreclr/scripts/genDummyProvider.py b/src/coreclr/scripts/genDummyProvider.py index 908c09d174db15..b8786c47a7a4f1 100644 --- a/src/coreclr/scripts/genDummyProvider.py +++ b/src/coreclr/scripts/genDummyProvider.py @@ -6,7 +6,7 @@ ## interface from a manifest file ## ## The intended use if for platforms which support event pipe -## but do not have a an eventing platform to recieve report events +## but do not have a an eventing platform to receive report events import os from genEventing import * diff --git a/src/coreclr/tools/Common/Compiler/DependencyAnalysis/Relocation.cs b/src/coreclr/tools/Common/Compiler/DependencyAnalysis/Relocation.cs index 5b50701a2b97eb..eda9378acc36d4 100644 --- a/src/coreclr/tools/Common/Compiler/DependencyAnalysis/Relocation.cs +++ b/src/coreclr/tools/Common/Compiler/DependencyAnalysis/Relocation.cs @@ -30,7 +30,7 @@ public enum RelocType // Relocations for R2R image production // IMAGE_REL_SYMBOL_SIZE = 0x1000, // The size of data in the image represented by the target symbol node - IMAGE_REL_FILE_ABSOLUTE = 0x1001, // 32 bit offset from begining of image + IMAGE_REL_FILE_ABSOLUTE = 0x1001, // 32 bit offset from beginning of image } public struct Relocation diff --git a/src/coreclr/tools/Common/Pgo/PgoFormat.cs b/src/coreclr/tools/Common/Pgo/PgoFormat.cs index afc05ae3d8b758..a7de96a03fd0fc 100644 --- a/src/coreclr/tools/Common/Pgo/PgoFormat.cs +++ b/src/coreclr/tools/Common/Pgo/PgoFormat.cs @@ -13,7 +13,7 @@ namespace Internal.Pgo public enum PgoInstrumentationKind { // This must be kept in sync with PgoInstrumentationKind in corjit.h - // New InstrumentationKinds should recieve corresponding merging logic in + // New InstrumentationKinds should receive corresponding merging logic in // PgoSchemeMergeComparer and the MergeInSchemaElem functions below // Schema data types diff --git a/src/coreclr/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedFieldLayoutAlgorithm.cs b/src/coreclr/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedFieldLayoutAlgorithm.cs index 2d26f451dcf0c6..7dd50f06f34415 100644 --- a/src/coreclr/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedFieldLayoutAlgorithm.cs +++ b/src/coreclr/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedFieldLayoutAlgorithm.cs @@ -11,7 +11,7 @@ namespace Internal.TypeSystem /// /// RuntimeDeterminedFieldLayoutAlgorithm algorithm which can be used to compute field layout /// for any RuntimeDeterminedType - /// Only useable for accessing the instance field size + /// Only usable for accessing the instance field size /// public class RuntimeDeterminedFieldLayoutAlgorithm : FieldLayoutAlgorithm { diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/SectionBuilder.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/SectionBuilder.cs index 1e02a7868d4bdc..02378eebf555d0 100644 --- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/SectionBuilder.cs +++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/SectionBuilder.cs @@ -26,7 +26,7 @@ public struct SymbolTarget /// Index of the section holding the symbol target. /// public readonly int SectionIndex; - + /// /// Offset of the symbol within the section. /// @@ -46,7 +46,7 @@ public SymbolTarget(int sectionIndex, int offset, int size) Size = size; } } - + /// /// After placing an ObjectData within a section, we use this helper structure to record /// its relocation information for the final relocation pass. @@ -118,7 +118,7 @@ public class Section /// the output code section). /// public readonly int Alignment; - + /// /// Blob builder representing the section content. /// @@ -359,7 +359,7 @@ public int GetSymbolRVA(ISymbolNode symbol) /// Look up final file position for a given symbol. This assumes the section have already been placed. /// /// Symbol to look up - /// File position of the symbol, from the begining of the emitted image + /// File position of the symbol, from the beginning of the emitted image public int GetSymbolFilePosition(ISymbolNode symbol) { SymbolTarget symbolTarget = _symbolMap[symbol]; @@ -419,7 +419,7 @@ public void SetWin32Resources(ISymbolNode symbol, int resourcesSize) } private CoreRTNameMangler _nameMangler; - + private NameMangler GetNameMangler() { if (_nameMangler == null) @@ -572,7 +572,7 @@ public BlobBuilder SerializeSection(string name, SectionLocation sectionLocation { return SerializeRelocationSection(sectionLocation); } - + if (name == R2RPEBuilder.ExportDataSectionName) { return SerializeExportSection(sectionLocation); @@ -637,7 +637,7 @@ private BlobBuilder SerializeRelocationSection(SectionLocation sectionLocation) // Even though the format doesn't dictate it, it seems customary // to align the base RVA's on 4K boundaries. const int BaseRVAAlignment = 1 << RelocationTypeShift; - + BlobBuilder builder = new BlobBuilder(); int baseRVA = 0; List offsetsAndTypes = null; @@ -729,7 +729,7 @@ private static void FlushRelocationBlock(BlobBuilder builder, int baseRVA, List< private BlobBuilder SerializeExportSection(SectionLocation sectionLocation) { _exportSymbols.MergeSort((es1, es2) => StringComparer.Ordinal.Compare(es1.Name, es2.Name)); - + BlobBuilder builder = new BlobBuilder(); int minOrdinal = int.MaxValue; @@ -742,7 +742,7 @@ private BlobBuilder SerializeExportSection(SectionLocation sectionLocation) symbol.NameRVAWhenPlaced = sectionLocation.RelativeVirtualAddress + builder.Count; builder.WriteUTF8(symbol.Name); builder.WriteByte(0); - + if (symbol.Ordinal < minOrdinal) { minOrdinal = symbol.Ordinal; @@ -788,7 +788,7 @@ private BlobBuilder SerializeExportSection(SectionLocation sectionLocation) { builder.WriteInt32(addressTableEntry); } - + // Emit the export directory table builder.Align(4); int exportDirectoryTableRVA = sectionLocation.RelativeVirtualAddress + builder.Count; @@ -817,7 +817,7 @@ private BlobBuilder SerializeExportSection(SectionLocation sectionLocation) int exportDirectorySize = sectionLocation.RelativeVirtualAddress + builder.Count - exportDirectoryTableRVA; _exportDirectoryEntry = new DirectoryEntry(relativeVirtualAddress: exportDirectoryTableRVA, size: exportDirectorySize); - + return builder; } @@ -842,7 +842,7 @@ public void UpdateDirectories(PEDirectoriesBuilder directoriesBuilder) Section section = _sections[symbolTarget.SectionIndex]; Debug.Assert(section.RVAWhenPlaced != 0); - // Windows has a bug in its resource processing logic that occurs when + // Windows has a bug in its resource processing logic that occurs when // 1. A PE file is loaded as a data file // 2. The resource data found in the resources has an RVA which has a magnitude greater than the size of the section which holds the resources // 3. The offset of the start of the resource data from the start of the section is not zero. @@ -858,7 +858,7 @@ public void UpdateDirectories(PEDirectoriesBuilder directoriesBuilder) { directoriesBuilder.ExportTable = _exportDirectoryEntry; } - + int relocationTableRVA = directoriesBuilder.BaseRelocationTable.RelativeVirtualAddress; if (relocationTableRVA == 0) { diff --git a/src/coreclr/tools/dotnet-pgo/dotnet-pgo-experiment.md b/src/coreclr/tools/dotnet-pgo/dotnet-pgo-experiment.md index 14f9c63bbe1c0b..e021a2d794befb 100644 --- a/src/coreclr/tools/dotnet-pgo/dotnet-pgo-experiment.md +++ b/src/coreclr/tools/dotnet-pgo/dotnet-pgo-experiment.md @@ -77,7 +77,7 @@ where it would be useful to describe types in the data section (such as for devi but there are also plausible cases for gathering each kind of data in both section, so the format will be made general to support both. Instrumentation Data shall have a version number independent of the general R2R versioning scheme. The intention is for this form of `InstrumentationData` to become -useable for both out of line instrumentation as described in this document, as well as only tiered +usable for both out of line instrumentation as described in this document, as well as only tiered compilation rejit scenarios with in process profiling. ## Trace data format diff --git a/src/coreclr/utilcode/namespaceutil.cpp b/src/coreclr/utilcode/namespaceutil.cpp index d930c6f86d2e2c..3731d0399fcdf1 100644 --- a/src/coreclr/utilcode/namespaceutil.cpp +++ b/src/coreclr/utilcode/namespaceutil.cpp @@ -513,7 +513,7 @@ void ns::MakePath( // throws on out of memory } bool ns::MakeAssemblyQualifiedName( // true ok, false truncation - __out_ecount(dwBuffer) WCHAR* pBuffer, // Buffer to recieve the results + __out_ecount(dwBuffer) WCHAR* pBuffer, // Buffer to receive the results int dwBuffer, // Number of characters total in buffer const WCHAR *szTypeName, // Namespace for name. int dwTypeName, // Number of characters (not including null) diff --git a/src/coreclr/vm/ceemain.cpp b/src/coreclr/vm/ceemain.cpp index 7ae4605e95adcb..593b8ff3a83d60 100644 --- a/src/coreclr/vm/ceemain.cpp +++ b/src/coreclr/vm/ceemain.cpp @@ -949,7 +949,7 @@ void EEStartupHelper() #ifdef DEBUGGING_SUPPORTED // Make a call to publish the DefaultDomain for the debugger // This should be done before assemblies/modules are loaded into it (i.e. SystemDomain::Init) - // and after its OK to switch GC modes and syncronize for sending events to the debugger. + // and after its OK to switch GC modes and synchronize for sending events to the debugger. // @dbgtodo synchronization: this can probably be simplified in V3 LOG((LF_CORDB | LF_SYNC | LF_STARTUP, LL_INFO1000, "EEStartup: adding default domain 0x%x\n", SystemDomain::System()->DefaultDomain())); diff --git a/src/coreclr/vm/comsynchronizable.cpp b/src/coreclr/vm/comsynchronizable.cpp index 5cd165eeeb705d..027627d4851d74 100644 --- a/src/coreclr/vm/comsynchronizable.cpp +++ b/src/coreclr/vm/comsynchronizable.cpp @@ -627,7 +627,7 @@ FCIMPLEND // Deliver the state of the thread as a consistent set of bits. // This copied in VM\EEDbgInterfaceImpl.h's // CorDebugUserState GetUserState( Thread *pThread ) -// , so propogate changes to both functions +// , so propagate changes to both functions FCIMPL1(INT32, ThreadNative::GetThreadState, ThreadBaseObject* pThisUNSAFE) { FCALL_CONTRACT; diff --git a/src/coreclr/vm/eedbginterfaceimpl.cpp b/src/coreclr/vm/eedbginterfaceimpl.cpp index ba48f89faf13b4..5d2edfb2c02929 100644 --- a/src/coreclr/vm/eedbginterfaceimpl.cpp +++ b/src/coreclr/vm/eedbginterfaceimpl.cpp @@ -1442,7 +1442,7 @@ void EEDbgInterfaceImpl::SetAllDebugState(Thread *et, } // This is pretty much copied from VM\COMSynchronizable's -// INT32 __stdcall ThreadNative::GetThreadState, so propogate changes +// INT32 __stdcall ThreadNative::GetThreadState, so propagate changes // to both functions // This just gets the user state from the EE's perspective (hence "partial"). CorDebugUserState EEDbgInterfaceImpl::GetPartialUserState(Thread *pThread) diff --git a/src/coreclr/vm/eedbginterfaceimpl.h b/src/coreclr/vm/eedbginterfaceimpl.h index 72594c336794c9..f97c115ff6a95d 100644 --- a/src/coreclr/vm/eedbginterfaceimpl.h +++ b/src/coreclr/vm/eedbginterfaceimpl.h @@ -301,7 +301,7 @@ class EEDbgInterfaceImpl : public EEDebugInterface CorDebugThreadState state); // This is pretty much copied from VM\COMSynchronizable's - // INT32 __stdcall ThreadNative::GetThreadState, so propogate changes + // INT32 __stdcall ThreadNative::GetThreadState, so propagate changes // to both functions CorDebugUserState GetPartialUserState( Thread *pThread ); diff --git a/src/coreclr/vm/loaderallocator.hpp b/src/coreclr/vm/loaderallocator.hpp index f4e5587e24a316..0907d98e266d5b 100644 --- a/src/coreclr/vm/loaderallocator.hpp +++ b/src/coreclr/vm/loaderallocator.hpp @@ -349,7 +349,7 @@ class LoaderAllocator // 3. Native LoaderAllocator is alive, managed scout is collected. // - The native LoaderAllocator can be kept alive via native reference with code:AddRef call, e.g.: // * Reference from LCG method, - // * Reference recieved from assembly iterator code:AppDomain::AssemblyIterator::Next and/or + // * Reference received from assembly iterator code:AppDomain::AssemblyIterator::Next and/or // held by code:CollectibleAssemblyHolder. // - Other LoaderAllocator can have this LoaderAllocator in its reference list // (code:m_LoaderAllocatorReferences), but without call to code:AddRef. diff --git a/src/coreclr/vm/methodtable.h b/src/coreclr/vm/methodtable.h index 6c3c89e7710afe..a56c575636318d 100644 --- a/src/coreclr/vm/methodtable.h +++ b/src/coreclr/vm/methodtable.h @@ -2137,7 +2137,7 @@ class MethodTable // Resolve virtual static interface method pInterfaceMD on this type. // // Specify allowNullResult to return NULL instead of throwing if the there is no implementation - // Specify verifyImplemented to verify that there is a match, but do not actually return a final useable MethodDesc + // Specify verifyImplemented to verify that there is a match, but do not actually return a final usable MethodDesc // Specify allowVariantMatches to permit generic interface variance MethodDesc *ResolveVirtualStaticMethod(MethodTable* pInterfaceType, MethodDesc* pInterfaceMD, BOOL allowNullResult, BOOL verifyImplemented = FALSE, BOOL allowVariantMatches = TRUE); diff --git a/src/coreclr/vm/methodtablebuilder.cpp b/src/coreclr/vm/methodtablebuilder.cpp index 133f1b92fe021e..d5feeae4425e24 100644 --- a/src/coreclr/vm/methodtablebuilder.cpp +++ b/src/coreclr/vm/methodtablebuilder.cpp @@ -1440,7 +1440,7 @@ MethodTableBuilder::BuildMethodTableThrowing( if (bmtGenerics->GetNumGenericArgs() != 0) { // Nested enums can have generic type parameters from their enclosing class. - // CLS rules require type parameters to be propogated to nested types. + // CLS rules require type parameters to be propagated to nested types. // Note that class G { enum E { } } will produce "G`1+E". // We want to disallow class G { enum E { } } // Perhaps the IL equivalent of class G { enum E { } } should be legal. diff --git a/src/coreclr/vm/threads.h b/src/coreclr/vm/threads.h index 30fe5dcf09c331..f7b7479f586d73 100644 --- a/src/coreclr/vm/threads.h +++ b/src/coreclr/vm/threads.h @@ -280,7 +280,7 @@ struct TailCallArgBuffer #define SWITCHED_OUT_FIBER_OSID 0xbaadf00d; #ifdef _DEBUG -// A thread doesn't recieve its id until fully constructed. +// A thread doesn't receive its id until fully constructed. #define UNINITIALIZED_THREADID 0xbaadf00d #endif //_DEBUG @@ -3606,7 +3606,7 @@ class Thread LIMITED_METHOD_CONTRACT; _ASSERTE(slot >= 0 && slot <= MAX_NOTIFICATION_PROFILERS); #ifdef _DEBUG - DWORD newValue = + DWORD newValue = #endif // _DEBUG ++m_dwProfilerEvacuationCounters[slot]; _ASSERTE(newValue != 0U); @@ -3617,7 +3617,7 @@ class Thread LIMITED_METHOD_CONTRACT; _ASSERTE(slot >= 0 && slot <= MAX_NOTIFICATION_PROFILERS); #ifdef _DEBUG - DWORD newValue = + DWORD newValue = #endif // _DEBUG --m_dwProfilerEvacuationCounters[slot]; _ASSERTE(newValue != (DWORD)-1); diff --git a/src/coreclr/vm/threadsuspend.cpp b/src/coreclr/vm/threadsuspend.cpp index 2b76d47b5e1d17..c4fc869e893ec8 100644 --- a/src/coreclr/vm/threadsuspend.cpp +++ b/src/coreclr/vm/threadsuspend.cpp @@ -1968,7 +1968,7 @@ CONTEXT* AllocateOSContextHelper(BYTE** contextBuffer) pfnInitializeContext2 = (PINITIALIZECONTEXT2)GetProcAddress(hm, "InitializeContext2"); } - // Determine if the processor supports AVX so we could + // Determine if the processor supports AVX so we could // retrieve extended registers DWORD64 FeatureMask = GetEnabledXStateFeatures(); if ((FeatureMask & XSTATE_MASK_AVX) != 0) @@ -2020,7 +2020,7 @@ CONTEXT* AllocateOSContextHelper(BYTE** contextBuffer) *contextBuffer = buffer; -#else +#else pOSContext = new (nothrow) CONTEXT; pOSContext->ContextFlags = CONTEXT_COMPLETE; *contextBuffer = NULL; @@ -2938,7 +2938,7 @@ BOOL Thread::RedirectThreadAtHandledJITCase(PFN_REDIRECTTARGET pTgt) #ifdef _DEBUG // In some rare cases the stack pointer may be outside the stack limits. // SetThreadContext would fail assuming that we are trying to bypass CFG. - // + // // NB: the check here is slightly more strict than what OS requires, // but it is simple and uses only documented parts of TEB auto pTeb = this->GetTEB(); @@ -3336,7 +3336,7 @@ void ThreadSuspend::SuspendRuntime(ThreadSuspend::SUSPEND_REASON reason) // is after the trap flag is visible to the other thread. // // In other words: any threads seen in preemptive mode are no longer interesting to us. - // if they try switch to cooperative, they would see the flag set. + // if they try switch to cooperative, they would see the flag set. #ifdef FEATURE_PERFTRACING // Mark that the thread is currently in managed code. thread->SaveGCModeOnSuspension(); @@ -3403,7 +3403,7 @@ void ThreadSuspend::SuspendRuntime(ThreadSuspend::SUSPEND_REASON reason) if (thread->HasThreadStateOpportunistic(Thread::TS_GCSuspendRedirected)) { // We have seen this thead before and have redirected it. - // No point in suspending it again. It will not run hijackable code until it parks itself. + // No point in suspending it again. It will not run hijackable code until it parks itself. continue; } @@ -4302,7 +4302,7 @@ bool Thread::SysStartSuspendForDebug(AppDomain *pAppDomain) // // This method is called by the debugger helper thread when it times out waiting for a set of threads to -// synchronize. Its used to chase down threads that are not syncronizing quickly. It returns true if all the threads are +// synchronize. Its used to chase down threads that are not synchronizing quickly. It returns true if all the threads are // now synchronized. This also means that we own the thread store lock. // // This can be safely called if we're already suspended. @@ -4699,7 +4699,7 @@ void Thread::HijackThread(ReturnKind returnKind, ExecutionState *esb) pvHijackAddr = returnAddressHijackTarget; } #endif // TARGET_WINDOWS && TARGET_AMD64 - + #ifdef TARGET_X86 if (returnKind == RT_Float) { @@ -5520,11 +5520,11 @@ void ThreadSuspend::RestartEE(BOOL bFinishedGC, BOOL SuspendSucceded) #if defined(TARGET_ARM) || defined(TARGET_ARM64) // Flush the store buffers on all CPUs, to ensure that they all see changes made - // by the GC threads. This only matters on weak memory ordered processors as + // by the GC threads. This only matters on weak memory ordered processors as // the strong memory ordered processors wouldn't have reordered the relevant reads. // This is needed to synchronize threads that were running in preemptive mode while - // the runtime was suspended and that will return to cooperative mode after the runtime - // is restarted. + // the runtime was suspended and that will return to cooperative mode after the runtime + // is restarted. ::FlushProcessWriteBuffers(); #endif //TARGET_ARM || TARGET_ARM64 @@ -5768,7 +5768,7 @@ void ThreadSuspend::SuspendEE(SUSPEND_REASON reason) #if defined(TARGET_ARM) || defined(TARGET_ARM64) // Flush the store buffers on all CPUs, to ensure that all changes made so far are seen - // by the GC threads. This only matters on weak memory ordered processors as + // by the GC threads. This only matters on weak memory ordered processors as // the strong memory ordered processors wouldn't have reordered the relevant writes. // This is needed to synchronize threads that were running in preemptive mode thus were // left alone by suspension to flush their writes that they made before they switched to diff --git a/src/coreclr/vm/typehashingalgorithms.h b/src/coreclr/vm/typehashingalgorithms.h index 6e393ed85cb833..76e82bb8f7ede6 100644 --- a/src/coreclr/vm/typehashingalgorithms.h +++ b/src/coreclr/vm/typehashingalgorithms.h @@ -142,7 +142,7 @@ The xxHash32 implementation is based on the code published by Yann Collet: inline static UINT32 HashMDToken(mdToken token) { - // Hash function to generate a value useable for reasonable hashes from a single 32bit value + // Hash function to generate a value usable for reasonable hashes from a single 32bit value // This function was taken from http://burtleburtle.net/bob/hash/integer.html UINT32 a = token; a -= (a<<6); diff --git a/src/installer/pkg/sfx/installers/osx_scripts/host/postinstall b/src/installer/pkg/sfx/installers/osx_scripts/host/postinstall index 3eba436d925092..6ad80b6c3988c6 100755 --- a/src/installer/pkg/sfx/installers/osx_scripts/host/postinstall +++ b/src/installer/pkg/sfx/installers/osx_scripts/host/postinstall @@ -12,7 +12,7 @@ INSTALL_DESTINATION=$2 chmod 755 $INSTALL_DESTINATION/dotnet mkdir -p /etc/dotnet -# set install_location (legacy location) to x64 location (regardless of wether or not we're installing x64) +# set install_location (legacy location) to x64 location (regardless of whether or not we're installing x64) echo $X64_INSTALL_DESTINATION | tee /etc/dotnet/install_location # set install_location_arch to point to this installed location echo $INSTALL_DESTINATION | tee /etc/dotnet/install_location_${InstallerTargetArchitecture} diff --git a/src/libraries/Common/src/Extensions/ProviderAliasUtilities/ProviderAliasUtilities.cs b/src/libraries/Common/src/Extensions/ProviderAliasUtilities/ProviderAliasUtilities.cs index 69e7687e62665f..2afb3a5710209b 100644 --- a/src/libraries/Common/src/Extensions/ProviderAliasUtilities/ProviderAliasUtilities.cs +++ b/src/libraries/Common/src/Extensions/ProviderAliasUtilities/ProviderAliasUtilities.cs @@ -10,7 +10,7 @@ namespace Microsoft.Extensions.Logging { internal static class ProviderAliasUtilities { - private const string AliasAttibuteTypeFullName = "Microsoft.Extensions.Logging.ProviderAliasAttribute"; + private const string AliasAttributeTypeFullName = "Microsoft.Extensions.Logging.ProviderAliasAttribute"; internal static string GetAlias(Type providerType) { @@ -19,7 +19,7 @@ internal static string GetAlias(Type providerType) for (int i = 0; i < attributes.Count; i++) { CustomAttributeData attributeData = attributes[i]; - if (attributeData.AttributeType.FullName == AliasAttibuteTypeFullName && + if (attributeData.AttributeType.FullName == AliasAttributeTypeFullName && attributeData.ConstructorArguments.Count > 0) { CustomAttributeTypedArgument arg = attributeData.ConstructorArguments[0]; diff --git a/src/libraries/Common/tests/System/Diagnostics/DebuggerAttributes.cs b/src/libraries/Common/tests/System/Diagnostics/DebuggerAttributes.cs index 3a1d3f8f84e873..1788215902f2e8 100644 --- a/src/libraries/Common/tests/System/Diagnostics/DebuggerAttributes.cs +++ b/src/libraries/Common/tests/System/Diagnostics/DebuggerAttributes.cs @@ -88,7 +88,7 @@ public static IEnumerable GetDebuggerVisibleProperties(Type debugg private static Type GetProxyType(Type type, Type[] genericTypeArguments) { - // Get the DebuggerTypeProxyAttibute for obj + // Get the DebuggerTypeProxyAttribute for obj var attrs = type.GetTypeInfo().CustomAttributes .Where(a => a.AttributeType == typeof(DebuggerTypeProxyAttribute)) diff --git a/src/libraries/Common/tests/System/Net/EnterpriseTests/EnterpriseTestConfiguration.cs b/src/libraries/Common/tests/System/Net/EnterpriseTests/EnterpriseTestConfiguration.cs index f6ea2e8e743f0e..5ceb2c0fe396ef 100644 --- a/src/libraries/Common/tests/System/Net/EnterpriseTests/EnterpriseTestConfiguration.cs +++ b/src/libraries/Common/tests/System/Net/EnterpriseTests/EnterpriseTestConfiguration.cs @@ -13,7 +13,7 @@ public static class EnterpriseTestConfiguration public const string DigestAuthWebServer = "http://apacheweb.linux.contoso.com/auth/digest/"; public static bool Enabled => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_RUNTIME_ENTERPRISETESTS_ENABLED")); - // Folowing credentials are used only in docker scenario, it is not leaking any secrets. + // Following credentials are used only in docker scenario, it is not leaking any secrets. public static NetworkCredential ValidNetworkCredentials => new NetworkCredential("user1", "PLACEHOLDERcorrect20"); public static NetworkCredential ValidDomainNetworkCredentials => new NetworkCredential("user1", "PLACEHOLDERcorrect20", "LINUX" ); public static NetworkCredential InvalidNetworkCredentials => new NetworkCredential("user1", "PLACEHOLDERwong"); diff --git a/src/libraries/Microsoft.Win32.SystemEvents/tests/SystemEvents.UserPreference.cs b/src/libraries/Microsoft.Win32.SystemEvents/tests/SystemEvents.UserPreference.cs index dc0e7c8a885b06..ecb4693bc4aa80 100644 --- a/src/libraries/Microsoft.Win32.SystemEvents/tests/SystemEvents.UserPreference.cs +++ b/src/libraries/Microsoft.Win32.SystemEvents/tests/SystemEvents.UserPreference.cs @@ -188,7 +188,7 @@ public void SignalsUserPreferenceEventsAsynchronouslyOnThemeChanged() { changedArgs.Add(e); changingDuringChanged = changingArgs; - // signal test to continue after two events were recieved + // signal test to continue after two events were received if (changedArgs.Count > 1) { changed.Set(); diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/PointConverterTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/PointConverterTests.cs index 8509731bc9d9d3..90b7c95ecce985 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/PointConverterTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/PointConverterTests.cs @@ -195,7 +195,7 @@ public void GetProperties() Assert.Equal(1, props["Y"].GetValue(pt)); Assert.Equal((object)false, props["IsEmpty"].GetValue(pt)); - // Pick an attibute that cannot be applied to properties to make sure everything gets filtered + // Pick an attribute that cannot be applied to properties to make sure everything gets filtered props = Converter.GetProperties(null, new Point(1, 1), new Attribute[] { new System.Reflection.AssemblyCopyrightAttribute("")}); Assert.Equal(0, props.Count); } diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/RectangleConverterTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/RectangleConverterTests.cs index a2f0f9b5ba62e1..4c939f8a61228f 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/RectangleConverterTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/RectangleConverterTests.cs @@ -205,7 +205,7 @@ public void TestGetProperties() Assert.Equal(rect.Size, propsColl["Size"].GetValue(rect)); Assert.Equal(rect.IsEmpty, propsColl["IsEmpty"].GetValue(rect)); - // Pick an attibute that cannot be applied to properties to make sure everything gets filtered + // Pick an attribute that cannot be applied to properties to make sure everything gets filtered propsColl = Converter.GetProperties(null, new Rectangle(10, 10, 20, 30), new Attribute[] { new System.Reflection.AssemblyCopyrightAttribute("")}); Assert.Equal(0, propsColl.Count); } diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/SizeConverterTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/SizeConverterTests.cs index 63ada2b2b870af..478e29c86f801e 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/SizeConverterTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/SizeConverterTests.cs @@ -195,7 +195,7 @@ public void GetProperties() Assert.Equal(1, props["Height"].GetValue(pt)); Assert.Equal((object)false, props["IsEmpty"].GetValue(pt)); - // Pick an attibute that cannot be applied to properties to make sure everything gets filtered + // Pick an attribute that cannot be applied to properties to make sure everything gets filtered props = Converter.GetProperties(null, new Size(1, 1), new Attribute[] { new System.Reflection.AssemblyCopyrightAttribute("")}); Assert.Equal(0, props.Count); } diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/SizeFConverterTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/SizeFConverterTests.cs index b7386313a4a315..6d19fedaf5b1d8 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/SizeFConverterTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/Drawing/SizeFConverterTests.cs @@ -193,7 +193,7 @@ public void GetProperties() Assert.Equal(1f, props["Height"].GetValue(pt)); Assert.Equal((object)false, props["IsEmpty"].GetValue(pt)); - // Pick an attibute that cannot be applied to properties to make sure everything gets filtered + // Pick an attribute that cannot be applied to properties to make sure everything gets filtered props = Converter.GetProperties(null, new SizeF(1, 1), new Attribute[] { new System.Reflection.AssemblyCopyrightAttribute("")}); Assert.Equal(0, props.Count); } diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/BaseConfigurationRecord.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/BaseConfigurationRecord.cs index 9adac8c52ded95..d798088fe9d416 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/BaseConfigurationRecord.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/BaseConfigurationRecord.cs @@ -63,7 +63,7 @@ internal abstract class BaseConfigurationRecord : IInternalConfigRecord protected const string LocationInheritInChildApplicationsAttribute = "inheritInChildApplications"; protected const string ConfigSourceAttribute = "configSource"; - internal const string ProtectionProviderAttibute = "configProtectionProvider"; + internal const string ProtectionProviderAttribute = "configProtectionProvider"; protected const string FormatNewConfigFile = "\r\n"; protected const string FormatConfiguration = "\r\n"; @@ -1505,7 +1505,7 @@ private ConfigXmlReader LoadConfigSource(string name, SectionXmlInfo sectionXmlI throw new ConfigurationErrorsException(SR.Config_source_file_format, xmlUtil); // Check for protectionProvider - string protectionProviderAttribute = xmlUtil.Reader.GetAttribute(ProtectionProviderAttibute); + string protectionProviderAttribute = xmlUtil.Reader.GetAttribute(ProtectionProviderAttribute); if (protectionProviderAttribute != null) { if (xmlUtil.Reader.AttributeCount != 1) @@ -2541,7 +2541,7 @@ private void ScanSectionsRecursive( } } - string protectionProviderAttribute = xmlUtil.Reader.GetAttribute(ProtectionProviderAttibute); + string protectionProviderAttribute = xmlUtil.Reader.GetAttribute(ProtectionProviderAttribute); if (protectionProviderAttribute != null) { try 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 d1f82070c295b9..c9203656dea95a 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationElement.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationElement.cs @@ -402,7 +402,7 @@ internal void HandleLockedAttributes(ConfigurationElement source) } else { - // don't error when optional attibute are not defined yet + // don't error when optional attribute are not defined yet if (ElementInformation.Properties[propInfo.Name].ValueOrigin == PropertyValueOrigin.SetHere) { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ProtectedConfigurationSection.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ProtectedConfigurationSection.cs index 1b2d903c0d8efd..9f70aa41620985 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ProtectedConfigurationSection.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ProtectedConfigurationSection.cs @@ -95,7 +95,7 @@ internal static string FormatEncryptedSection(string encryptedXml, string sectio { return string.Format(CultureInfo.InvariantCulture, EncryptedSectionTemplate, sectionName, // The section to encrypt - BaseConfigurationRecord.ProtectionProviderAttibute, // protectionProvider keyword + BaseConfigurationRecord.ProtectionProviderAttribute, // protectionProvider keyword providerName, // The provider name encryptedXml // the encrypted xml ); 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 08648e6d29c26c..3759b0a04ddd0a 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataTable.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataTable.cs @@ -2482,7 +2482,7 @@ private DataTable CloneTo(DataTable clone, DataSet? cloneDS, bool skipExpression if (foreign.Table == foreign.RelatedTable && foreign.Clone(clone) is ForeignKeyConstraint newforeign) { - // we cant make sure that we recieve a cloned FKC,since it depends if table and relatedtable be the same + // we cant make sure that we receive a cloned FKC,since it depends if table and relatedtable be the same clone.Constraints.Add(newforeign); } } 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 ab2fef64dbc51f..f103604b74c9f2 100644 --- a/src/libraries/System.Data.Common/src/System/Data/XMLSchema.cs +++ b/src/libraries/System.Data.Common/src/System/Data/XMLSchema.cs @@ -2095,7 +2095,7 @@ internal void HandleSimpleTypeSimpleContentColumn(XmlSchemaSimpleType typeNode, [RequiresUnreferencedCode(DataSet.RequiresUnreferencedCodeMessage)] internal void HandleSimpleContentColumn(string strType, DataTable table, bool isBase, XmlAttribute[]? attrs, bool isNillable) { - // for Named Simple type support : We should not recieved anything here other than string. + // 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 diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/TagListTests.cs b/src/libraries/System.Diagnostics.DiagnosticSource/tests/TagListTests.cs index 46dcb9c4faaffa..9f35cb9d47c027 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/tests/TagListTests.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/TagListTests.cs @@ -105,7 +105,7 @@ public void TestInsert() Assert.Equal(i, list[i].Value); } - // Insert at begining + // Insert at beginning int count = list.Count; for (int i = 1; i < 10; i++) { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Context.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Context.cs index 1947b66f588821..b132723c385ace 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Context.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Context.cs @@ -885,7 +885,7 @@ private void DoLDAPDirectoryInitNoContainer() // The Users container will also be used as the default for Groups. // The reason there are different contexts for groups, users and computers is so that // when a principal is created it will go into the appropriate default container. This is so users don't - // be default create principals in the root of their directory. When a search happens the base context is used so that + // by default create principals in the root of their directory. When a search happens the base context is used so that // the whole directory will be covered. // deUserGroupOrg = new DirectoryEntry(adsPathUserGroupOrg, _username, _password, authTypes); @@ -1107,7 +1107,7 @@ internal void ReadServerConfig(string serverName, ref ServerProperties propertie ldapConnection.AutoBind = false; // If SSL was enabled on the initial connection then turn it on for the search. - // This is requried bc the appended port number will be SSL and we don't know what port LDAP is running on. + // This is required bc the appended port number will be SSL and we don't know what port LDAP is running on. ldapConnection.SessionOptions.SecureSocketLayer = useSSL; string baseDN = null; // specify base as null for RootDSE search diff --git a/src/libraries/System.IO.Ports/tests/SerialPort/Parity.cs b/src/libraries/System.IO.Ports/tests/SerialPort/Parity.cs index 1cea85042f7765..ae1514fd2bcf30 100644 --- a/src/libraries/System.IO.Ports/tests/SerialPort/Parity.cs +++ b/src/libraries/System.IO.Ports/tests/SerialPort/Parity.cs @@ -348,7 +348,7 @@ private void VerifyParity(SerialPort com1, int numBytesToSend, int dataBits) byte shiftMask = 0xFF; //Create a mask that when logicaly and'd with the transmitted byte will - //will result in the byte recievied due to the leading bits being chopped + //will result in the byte received due to the leading bits being chopped //off due to Parity less then 8 if (8 > dataBits) shiftMask >>= 8 - com1.DataBits; @@ -394,7 +394,7 @@ private void VerifyReadParity(int parity, int dataBits, int numBytesToSend) com2.StopBits = StopBits.One; //Create a mask that when logicaly and'd with the transmitted byte will - //will result in the byte recievied due to the leading bits being chopped + //will result in the byte received due to the leading bits being chopped //off due to Parity less then 8 shiftMask >>= 8 - dataBits; @@ -545,7 +545,7 @@ private void PerformWriteRead(SerialPort com1, SerialPort com2, byte[] xmitBytes Debug.WriteLine("Bytes Sent:"); TCSupport.PrintBytes(xmitBytes); - Debug.WriteLine("Bytes Recieved:"); + Debug.WriteLine("Bytes Received:"); TCSupport.PrintBytes(rcvBytes); Debug.WriteLine("Expected Bytes:"); diff --git a/src/libraries/System.Management/src/System/Management/ManagementEventWatcher.cs b/src/libraries/System.Management/src/System/Management/ManagementEventWatcher.cs index 95e5a894a95497..26b33f9529682b 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementEventWatcher.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementEventWatcher.cs @@ -701,7 +701,7 @@ private void Cancel2(object o) // // Try catch the call to cancel. In this case the cancel is being done without the client // knowing about it so catching all exceptions is not a bad thing to do. If a client calls - // Stop (which calls Cancel), they will still recieve any exceptions that may have occured. + // Stop (which calls Cancel), they will still receive any exceptions that may have occured. // try { diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListenerRequest.Windows.cs b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListenerRequest.Windows.cs index 175085f4140c42..0e21c34681fe8c 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListenerRequest.Windows.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListenerRequest.Windows.cs @@ -350,7 +350,7 @@ private ListenerClientCertAsyncResult BeginGetClientCertificateCore(AsyncCallbac //demand a client cert at a later point // //The fix here is to demand the client cert when the channel is NOT INSECURE - //which means whether the client certs are requried at the beginning or not, + //which means whether the client certs are required at the beginning or not, //if this is an SSL connection, Call HttpReceiveClientCertificate, thus //starting the cert negotiation at that point // @@ -447,7 +447,7 @@ private void GetClientCertificateCore() //demand a client cert at a later point // //The fix here is to demand the client cert when the channel is NOT INSECURE - //which means whether the client certs are requried at the beginning or not, + //which means whether the client certs are required at the beginning or not, //if this is an SSL connection, Call HttpReceiveClientCertificate, thus //starting the cert negotiation at that point // diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicStreamTests.cs b/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicStreamTests.cs index ebb1d3baced0e1..5fb1bc14aa8998 100644 --- a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicStreamTests.cs +++ b/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicStreamTests.cs @@ -406,8 +406,8 @@ await RunClientServer( while (true) // TODO: if you don't read until 0-byte read, ShutdownCompleted sometimes may not trigger - why? { - Memory recieveChunkBuffer = receiveBuffer.AsMemory(totalBytesRead, Math.Min(receiveBuffer.Length - totalBytesRead, readSize)); - int bytesRead = await serverStream.ReadAsync(recieveChunkBuffer); + Memory receiveChunkBuffer = receiveBuffer.AsMemory(totalBytesRead, Math.Min(receiveBuffer.Length - totalBytesRead, readSize)); + int bytesRead = await serverStream.ReadAsync(receiveChunkBuffer); if (bytesRead == 0) { break; diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs index 9ed625aecd0ffc..8dcf51f5911088 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs @@ -123,7 +123,7 @@ public void IOControl_SIOCATMARK_Unix_Success() server.Send(new byte[] { 42 }, SocketFlags.None); server.Send(new byte[] { 43 }, SocketFlags.OutOfBand); - // OOB data recieved, but read pointer not at mark. + // OOB data received, but read pointer not at mark. Assert.True(SpinWait.SpinUntil(() => { Assert.Equal(4, client.IOControl(IOControlCode.OobDataRead, null, siocatmarkResult)); @@ -135,7 +135,7 @@ public void IOControl_SIOCATMARK_Unix_Success() Assert.Equal(1, client.Receive(received)); Assert.Equal(42, received[0]); - // OOB data recieved, read pointer at mark. + // OOB data received, read pointer at mark. Assert.Equal(4, client.IOControl(IOControlCode.OobDataRead, null, siocatmarkResult)); Assert.Equal(1, BitConverter.ToInt32(siocatmarkResult, 0)); @@ -177,7 +177,7 @@ public void IOControl_SIOCATMARK_Windows_Success() server.Send(new byte[] { 42 }, SocketFlags.None); server.Send(new byte[] { 43 }, SocketFlags.OutOfBand); - // OOB data recieved, but read pointer not at mark + // OOB data received, but read pointer not at mark Assert.True(SpinWait.SpinUntil(() => { Assert.Equal(4, client.IOControl(IOControlCode.OobDataRead, null, siocatmarkResult)); @@ -189,7 +189,7 @@ public void IOControl_SIOCATMARK_Windows_Success() Assert.Equal(1, client.Receive(received)); Assert.Equal(42, received[0]); - // OOB data recieved, read pointer at mark. + // OOB data received, read pointer at mark. Assert.Equal(4, client.IOControl(IOControlCode.OobDataRead, null, siocatmarkResult)); Assert.Equal(0, BitConverter.ToInt32(siocatmarkResult, 0)); diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/WaitSubsystem.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/WaitSubsystem.Unix.cs index 95db6481c23c33..d0b9c575e689fd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/WaitSubsystem.Unix.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/WaitSubsystem.Unix.cs @@ -80,7 +80,7 @@ namespace System.Threading /// cases, it is probably not worth optimizing for the single-wait case. It is possible with a small design change to /// bypass the lock and use interlocked operations for uncontended cases, but at the cost of making multi-waits more /// complicated and slower. - /// - The wait state of a thread (), among other things, is synchornized + /// - The wait state of a thread (), among other things, is synchronized /// using the thread's , so signalers and interrupters acquire the monitor's /// lock before checking the wait state of a thread and signaling the thread to wake up. /// diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs index 62c4a5cffaa9a4..443a6748ecd538 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs @@ -1224,7 +1224,7 @@ private static bool ShouldBeReplaced( { // The property name is a match. It might be an override, or // it might be hiding. Either way, check to see if the derived - // property has a getter that is useable for serialization. + // property has a getter that is usable for serialization. if (info.GetMethod != null && !info.GetMethod!.IsPublic && memberInfoToBeReplaced is PropertyInfo && ((PropertyInfo)memberInfoToBeReplaced).GetMethod!.IsPublic diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/RootAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/RootAction.cs index 718a6be718ca52..df883f5272d6e7 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/RootAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/RootAction.cs @@ -173,7 +173,7 @@ private void MirgeAttributeSets(Stylesheet stylesheet) { for (int src = srcAttList.Count - 1; 0 <= src; src--) { - // We can ignore duplicate attibutes here. + // We can ignore duplicate attributes here. dstAttList!.Add(srcAttList[src]); } } diff --git a/src/libraries/System.Private.Xml/tests/XmlDocument/XmlAttributeCollectionTests/CollectionInterfaceTests.cs b/src/libraries/System.Private.Xml/tests/XmlDocument/XmlAttributeCollectionTests/CollectionInterfaceTests.cs index 992cf24ca7fb5c..83f41d022c41bf 100644 --- a/src/libraries/System.Private.Xml/tests/XmlDocument/XmlAttributeCollectionTests/CollectionInterfaceTests.cs +++ b/src/libraries/System.Private.Xml/tests/XmlDocument/XmlAttributeCollectionTests/CollectionInterfaceTests.cs @@ -56,7 +56,7 @@ public void CopyToCopiesReferencesAtSpecifiedIndex() } [Fact] - public void IsSyncronizedGetsFalse() + public void IsSynchronizedGetsFalse() { XmlDocument doc = CreateDocumentWithElement(); XmlElement element = doc.DocumentElement; diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_Misc.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_Misc.cs index 2030cd3cf44afe..3d9b5f8830a503 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_Misc.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_Misc.cs @@ -389,7 +389,7 @@ private void Callback1(object sender, ValidationEventArgs args) { if (args.Severity == XmlSeverityType.Warning) { - _output.WriteLine("WARNING Recieved"); + _output.WriteLine("WARNING Received"); bWarningCallback = true; warningCount++; CError.Compare(args.Exception.InnerException == null, false, "Inner Exception not set"); diff --git a/src/libraries/System.Runtime/tests/TrimmingTests/VerifyResourcesGetTrimmedTest.cs b/src/libraries/System.Runtime/tests/TrimmingTests/VerifyResourcesGetTrimmedTest.cs index 91f1dbdbe02a60..8e770a91b95d91 100644 --- a/src/libraries/System.Runtime/tests/TrimmingTests/VerifyResourcesGetTrimmedTest.cs +++ b/src/libraries/System.Runtime/tests/TrimmingTests/VerifyResourcesGetTrimmedTest.cs @@ -13,7 +13,7 @@ static int Main(string[] args) } catch (Exception e) { - // When the Trimmer recieves the feature switch to use resource keys then exception + // When the Trimmer receives the feature switch to use resource keys then exception // messages shouldn't return the exception message resource, but instead the resource // key. This test is passing in the feature switch so we make sure that the resources // got trimmed correctly. diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonNode/JsonArrayTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonNode/JsonArrayTests.cs index 3464791348acf1..68abbe1fd16572 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonNode/JsonArrayTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonNode/JsonArrayTests.cs @@ -377,7 +377,7 @@ public static void NullHandling() } [Fact] - public static void AccesingNestedJsonArray() + public static void AccessingNestedJsonArray() { var issues = new JsonObject { diff --git a/src/libraries/System.Threading.Tasks/tests/CancellationTokenTests.cs b/src/libraries/System.Threading.Tasks/tests/CancellationTokenTests.cs index 63a37468eb3d6a..153d0db3d6322a 100644 --- a/src/libraries/System.Threading.Tasks/tests/CancellationTokenTests.cs +++ b/src/libraries/System.Threading.Tasks/tests/CancellationTokenTests.cs @@ -1779,7 +1779,7 @@ public override void Send(SendOrPostCallback d, object state) t.Wait(); if (marshalledException != null) - throw new AggregateException("DUMMY: ThreadCrossingSynchronizationContext.Send captured and propogated an exception", + throw new AggregateException("DUMMY: ThreadCrossingSynchronizationContext.Send captured and propagated an exception", marshalledException); } } diff --git a/src/libraries/System.Threading.Tasks/tests/Task/TaskRunSyncTests.cs b/src/libraries/System.Threading.Tasks/tests/Task/TaskRunSyncTests.cs index d85fe81ffac8fa..281c26d326d9c7 100644 --- a/src/libraries/System.Threading.Tasks/tests/Task/TaskRunSyncTests.cs +++ b/src/libraries/System.Threading.Tasks/tests/Task/TaskRunSyncTests.cs @@ -314,7 +314,7 @@ internal void RealRun() if (_postRunSyncAction == PostRunSyncAction.Wait) _task.Wait(0); if (_workloadType == WorkloadType.ThrowException) - Assert.True(false, string.Format("expected failure is not propogated out of Wait")); + Assert.True(false, string.Format("expected failure is not propagated out of Wait")); } catch (AggregateException ae) { diff --git a/src/libraries/System.Threading.Tasks/tests/Task/TaskWaitAllAnyTest.cs b/src/libraries/System.Threading.Tasks/tests/Task/TaskWaitAllAnyTest.cs index f597310020d626..0068a8203cf97c 100644 --- a/src/libraries/System.Threading.Tasks/tests/Task/TaskWaitAllAnyTest.cs +++ b/src/libraries/System.Threading.Tasks/tests/Task/TaskWaitAllAnyTest.cs @@ -351,7 +351,7 @@ private void Verify() if (workType == WorkloadType.Exceptional) { - // verify whether exception has(not) been propogated + // verify whether exception has(not) been propagated expCaught = VerifyException((ex) => { TPLTestException expectedExp = ex as TPLTestException; diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/Transaction.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/Transaction.cs index e6594884552a97..531f4e8ca3a7f4 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/Transaction.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/Transaction.cs @@ -1150,7 +1150,7 @@ internal enum DefaultComContextState // The TxLookup enum is used internally to detect where the ambient context needs to be stored or looked up. // Default - Used internally when looking up Transaction.Current. // DefaultCallContext - Used when TransactionScope with async flow option is enabled. Internally we will use CallContext to store the ambient transaction. - // Default TLS - Used for legacy/syncronous TransactionScope. Internally we will use TLS to store the ambient transaction. + // Default TLS - Used for legacy/synchronous TransactionScope. Internally we will use TLS to store the ambient transaction. // internal enum TxLookup { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionInformation.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionInformation.cs index 1519d81e496555..ff764d94b8caa8 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionInformation.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionInformation.cs @@ -51,7 +51,7 @@ public Guid DistributedIdentifier try { - // syncronize to avoid potential race between accessing the DistributerIdentifier + // synchronize to avoid potential race between accessing the DistributerIdentifier // and getting the transaction information entry populated... lock (_internalTransaction) diff --git a/src/libraries/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs b/src/libraries/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs index 05dce18d7129b9..baabd24424dee3 100644 --- a/src/libraries/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs +++ b/src/libraries/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs @@ -399,7 +399,7 @@ public void AsyncTSTest(int variation) break; } - // Final test - wrap the DoAsyncTSTaskWorkAsync in syncronous scope + // Final test - wrap the DoAsyncTSTaskWorkAsync in synchronous scope case 54: { string txId1 = null; @@ -437,7 +437,7 @@ public void AsyncTSTest(int variation) [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] [InlineData(true, false, null)] [InlineData(true, true, null)] - public void AsyncTSAndDependantClone(bool requiresNew, bool syncronizeScope, string txId) + public void AsyncTSAndDependantClone(bool requiresNew, bool synchronizeScope, string txId) { string txId1 = null; string txId2 = null; @@ -458,9 +458,9 @@ public void AsyncTSAndDependantClone(bool requiresNew, bool syncronizeScope, str { try { - // Since we use BlockCommitUntilComplete dependent transaction to syncronize the root TransactionScope, the ambient Tx may not be available and will be disposed and block on Commit. - // The flag will ensure we explicitly syncronize before disposing the root TransactionScope and the ambient transaction will still be available in the Task. - if (syncronizeScope) + // Since we use BlockCommitUntilComplete dependent transaction to synchronize the root TransactionScope, the ambient Tx may not be available and will be disposed and block on Commit. + // The flag will ensure we explicitly synchronize before disposing the root TransactionScope and the ambient transaction will still be available in the Task. + if (synchronizeScope) { txId2 = AssertAndGetCurrentTransactionId(); } @@ -472,7 +472,7 @@ public void AsyncTSAndDependantClone(bool requiresNew, bool syncronizeScope, str scope2.Complete(); } - if (syncronizeScope) + if (synchronizeScope) { txId4 = AssertAndGetCurrentTransactionId(); } @@ -483,7 +483,7 @@ public void AsyncTSAndDependantClone(bool requiresNew, bool syncronizeScope, str dependentTx.Dispose(); } - if (syncronizeScope) + if (synchronizeScope) { txId5 = AssertAndGetCurrentTransactionId(); } @@ -500,7 +500,7 @@ public void AsyncTSAndDependantClone(bool requiresNew, bool syncronizeScope, str txId6 = AssertAndGetCurrentTransactionId(); - if (syncronizeScope) + if (synchronizeScope) { task1.Wait(); } @@ -513,7 +513,7 @@ public void AsyncTSAndDependantClone(bool requiresNew, bool syncronizeScope, str Assert.Equal(txId1, txId3); Assert.Equal(txId3, txId6); - if (syncronizeScope) + if (synchronizeScope) { Assert.Equal(txId1, txId2); Assert.Equal(txId1, txId4); diff --git a/src/mono/mono/tests/safehandle.2.cs b/src/mono/mono/tests/safehandle.2.cs index 8de22907c47915..89bad1fccb6e62 100644 --- a/src/mono/mono/tests/safehandle.2.cs +++ b/src/mono/mono/tests/safehandle.2.cs @@ -14,8 +14,8 @@ public MyHandle () : base (IntPtr.Zero, true) public MyHandle (IntPtr x) : base (x, true) { } - - + + public override bool IsInvalid { get { return false; @@ -36,7 +36,7 @@ public class MyHandleNoCtor : SafeHandle { public MyHandleNoCtor (IntPtr handle) : base (handle, true) { } - + public override bool IsInvalid { get { return false; @@ -48,7 +48,7 @@ protected override bool ReleaseHandle () return true; } } - + [DllImport ("libtest")] public static extern void mono_safe_handle_ref (ref MyHandle handle); @@ -71,20 +71,20 @@ public static int test_0_safehandle_ref_noctor () try { mono_safe_handle_ref2 (ref m); } catch (MissingMethodException) { - Console.WriteLine ("Good: got exception requried"); + Console.WriteLine ("Good: got exception required"); return 0; } return 1; } - + public static int test_0_safehandle_ref () { MyHandle m = new MyHandle ((IntPtr) 0xdead); MyHandle m_saved = m; mono_safe_handle_ref (ref m); - + if (m.DangerousGetHandle () != (IntPtr) 0x800d){ Console.WriteLine ("test_0_safehandle_ref: fail; Expected 0x800d, got: {0:x}", m.DangerousGetHandle ()); return 1; @@ -135,7 +135,7 @@ public static int test_0_safehandle_ref_nomod_ref () [DllImport ("libtest")] public static extern int mono_xr (SafeHandle sh); - + public static int test_0_marshal_safehandle_argument () { SafeHandle s = new SafeFileHandle ((IntPtr) 0xeadcafe, true); @@ -153,7 +153,7 @@ public static int test_0_marshal_safehandle_argument_null () } return 1; } - + [StructLayout (LayoutKind.Sequential)] public struct StringOnStruct { @@ -172,7 +172,7 @@ public struct StructTest { public struct StructTest1 { public SafeHandle a; } - + [DllImport ("libtest")] public static extern int mono_safe_handle_struct_ref (ref StructTest test); @@ -190,7 +190,7 @@ public struct StructTest1 { [DllImport ("libtest", EntryPoint="mono_safe_handle_return")] public static extern MyHandleNoCtor mono_safe_handle_return_2 (); - + static StructTest x = new StructTest (); public static int test_0_safehandle_return_noctor () @@ -205,7 +205,7 @@ public static int test_0_safehandle_return_noctor () Console.WriteLine ("Failed, expected an exception because there is no parameterless ctor"); return 1; } - + public static int test_0_safehandle_return_exc () { try { @@ -225,7 +225,7 @@ public static int test_0_safehandle_return () Console.WriteLine ("Got the following handle: {0}", x.DangerousGetHandle ()); return x.DangerousGetHandle () == (IntPtr) 0x1000f00d ? 0 : 1; } - + public static int test_0_marshal_safehandle_field () { x.a = 1234; @@ -245,13 +245,13 @@ public static int test_0_marshal_safehandle_field_ref () x.b = 8743; x.handle1 = new SafeFileHandle ((IntPtr) 0x7080feed, false); x.handle2 = new SafeFileHandle ((IntPtr) 0x1234abcd, false); - + if (mono_safe_handle_struct_ref (ref x) != 0xf00d) return 1; return 0; } - + public static int test_0_simple () { StructTest1 s = new StructTest1 (); @@ -271,7 +271,7 @@ public static int test_0_struct_empty () } return 1; } - + public static int test_0_sf_dispose () { SafeFileHandle sf = new SafeFileHandle ((IntPtr) 0x0d00d, false); @@ -290,7 +290,7 @@ static int Error (string msg) Console.WriteLine ("Error: " + msg); return 1; } - + static int Main () { return TestDriver.RunTests (typeof (Tests)); diff --git a/src/tests/Interop/PInvoke/Variant/VariantNative.cpp b/src/tests/Interop/PInvoke/Variant/VariantNative.cpp index d55e7fae1cc54d..d92b2a0906c9c5 100644 --- a/src/tests/Interop/PInvoke/Variant/VariantNative.cpp +++ b/src/tests/Interop/PInvoke/Variant/VariantNative.cpp @@ -146,19 +146,19 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_ByValue_String(VARIANT valu extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_ByValue_Object(VARIANT value) { - + if (value.vt != VT_DISPATCH) { printf("Invalid format. Expected VT_DISPATCH.\n"); return FALSE; } - + IDispatch* obj = value.pdispVal; if (obj == NULL) { - printf("Marshal_ByValue (Native side) recieved an invalid IDispatch pointer\n"); + printf("Marshal_ByValue (Native side) received an invalid IDispatch pointer\n"); return FALSE; } @@ -171,19 +171,19 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_ByValue_Object(VARIANT valu extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_ByValue_Object_IUnknown(VARIANT value) { - + if (value.vt != VT_UNKNOWN) { printf("Invalid format. Expected VT_UNKNOWN.\n"); return FALSE; } - + IUnknown* obj = value.punkVal; if (obj == NULL) { - printf("Marshal_ByValue (Native side) recieved an invalid IUnknown pointer\n"); + printf("Marshal_ByValue (Native side) received an invalid IUnknown pointer\n"); return FALSE; } @@ -212,7 +212,7 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_ByValue_Empty(VARIANT value printf("Invalid format. Expected VT_EMPTY. \n"); return FALSE; } - + return TRUE; } @@ -270,7 +270,7 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_ByValue_Null(VARIANT value) printf("Invalid format. Expected VT_NULL. \n"); return FALSE; } - + return TRUE; } @@ -406,7 +406,7 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_ByRef_String(VARIANT* value printf("Invalid format. Expected VT_BSTR.\n"); return FALSE; } - + if (value->bstrVal == NULL || expected == NULL) { return value->bstrVal == NULL && expected == NULL; @@ -419,19 +419,19 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_ByRef_String(VARIANT* value extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_ByRef_Object(VARIANT* value) { - + if (value->vt != VT_DISPATCH) { printf("Invalid format. Expected VT_DISPATCH.\n"); return FALSE; } - + IDispatch* obj = value->pdispVal; if (obj == NULL) { - printf("Marshal_ByRef (Native side) recieved an invalid IDispatch pointer\n"); + printf("Marshal_ByRef (Native side) received an invalid IDispatch pointer\n"); return FALSE; } @@ -444,19 +444,19 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_ByRef_Object(VARIANT* value extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_ByRef_Object_IUnknown(VARIANT* value) { - + if (value->vt != VT_UNKNOWN) { printf("Invalid format. Expected VT_UNKNOWN.\n"); return FALSE; } - + IUnknown* obj = value->punkVal; if (obj == NULL) { - printf("Marshal_ByRef (Native side) recieved an invalid IUnknown pointer\n"); + printf("Marshal_ByRef (Native side) received an invalid IUnknown pointer\n"); return FALSE; } @@ -485,7 +485,7 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_ByRef_Empty(VARIANT* value) printf("Invalid format. Expected VT_EMPTY. \n"); return FALSE; } - + return TRUE; } @@ -542,7 +542,7 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_ByRef_Null(VARIANT* value) printf("Invalid format. Expected VT_NULL. \n"); return FALSE; } - + return TRUE; } @@ -704,7 +704,7 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_Struct_ByValue_String(Varia printf("Invalid format. Expected VT_BSTR.\n"); return FALSE; } - + if (wrapper.value.bstrVal == NULL || expected == NULL) { return wrapper.value.bstrVal == NULL && expected == NULL; @@ -717,19 +717,19 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_Struct_ByValue_String(Varia extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_Struct_ByValue_Object(VariantWrapper wrapper) { - + if (wrapper.value.vt != VT_DISPATCH) { printf("Invalid format. Expected VT_DISPATCH.\n"); return FALSE; } - + IDispatch* obj = wrapper.value.pdispVal; if (obj == NULL) { - printf("Marshal_Struct_ByValue (Native side) recieved an invalid IDispatch pointer\n"); + printf("Marshal_Struct_ByValue (Native side) received an invalid IDispatch pointer\n"); return FALSE; } @@ -742,19 +742,19 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_Struct_ByValue_Object(Varia extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_Struct_ByValue_Object_IUnknown(VariantWrapper wrapper) { - + if (wrapper.value.vt != VT_UNKNOWN) { printf("Invalid format. Expected VT_UNKNOWN.\n"); return FALSE; } - + IUnknown* obj = wrapper.value.punkVal; if (obj == NULL) { - printf("Marshal_Struct_ByValue (Native side) recieved an invalid IUnknown pointer\n"); + printf("Marshal_Struct_ByValue (Native side) received an invalid IUnknown pointer\n"); return FALSE; } @@ -783,7 +783,7 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_Struct_ByValue_Empty(Varian printf("Invalid format. Expected VT_EMPTY. \n"); return FALSE; } - + return TRUE; } @@ -840,7 +840,7 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_Struct_ByValue_Null(Variant printf("Invalid format. Expected VT_NULL. \n"); return FALSE; } - + return TRUE; } @@ -972,7 +972,7 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_Struct_ByRef_String(Variant printf("Invalid format. Expected VT_BSTR.\n"); return FALSE; } - + if (pWrapper->value.bstrVal == NULL || expected == NULL) { return pWrapper->value.bstrVal == NULL && expected == NULL; @@ -985,19 +985,19 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_Struct_ByRef_String(Variant extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_Struct_ByRef_Object(VariantWrapper* pWrapper) { - + if (pWrapper->value.vt != VT_DISPATCH) { printf("Invalid format. Expected VT_DISPATCH.\n"); return FALSE; } - + IDispatch* obj = pWrapper->value.pdispVal; if (obj == NULL) { - printf("Marshal_Struct_ByRef (Native side) recieved an invalid IDispatch pointer\n"); + printf("Marshal_Struct_ByRef (Native side) received an invalid IDispatch pointer\n"); return FALSE; } @@ -1010,19 +1010,19 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_Struct_ByRef_Object(Variant extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_Struct_ByRef_Object_IUnknown(VariantWrapper* pWrapper) { - + if (pWrapper->value.vt != VT_UNKNOWN) { printf("Invalid format. Expected VT_UNKNOWN.\n"); return FALSE; } - + IUnknown* obj = pWrapper->value.punkVal; if (obj == NULL) { - printf("Marshal_Struct_ByRef (Native side) recieved an invalid IUnknown pointer\n"); + printf("Marshal_Struct_ByRef (Native side) received an invalid IUnknown pointer\n"); return FALSE; } @@ -1051,7 +1051,7 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_Struct_ByRef_Empty(VariantW printf("Invalid format. Expected VT_EMPTY. \n"); return FALSE; } - + return TRUE; } @@ -1108,7 +1108,7 @@ extern "C" BOOL DLL_EXPORT STDMETHODCALLTYPE Marshal_Struct_ByRef_Null(VariantWr printf("Invalid format. Expected VT_NULL. \n"); return FALSE; } - + return TRUE; } diff --git a/src/tests/JIT/Directed/StructABI/structreturn.cs b/src/tests/JIT/Directed/StructABI/structreturn.cs index cbcdd70a1e2184..16704453f35f45 100644 --- a/src/tests/JIT/Directed/StructABI/structreturn.cs +++ b/src/tests/JIT/Directed/StructABI/structreturn.cs @@ -831,7 +831,7 @@ public ReturnStruct(int a) } } - static ReturnStruct TestConstPropogation(int a) + static ReturnStruct TestConstPropagation(int a) { if (a == 0) { @@ -860,9 +860,9 @@ static ReturnStruct TestConstPropogation(int a) } [MethodImpl(MethodImplOptions.NoInlining)] - static void TestConstPropogation() + static void TestConstPropagation() { - TestConstPropogation(5); + TestConstPropagation(5); } @@ -883,7 +883,7 @@ public StructWithOverlaps(int v) } [MethodImpl(MethodImplOptions.NoInlining)] - static ReturnStruct TestNoFieldSeqPropogation(int a) + static ReturnStruct TestNoFieldSeqPropagation(int a) { StructWithOverlaps s = new StructWithOverlaps(); if (a == 0) @@ -913,16 +913,16 @@ static ReturnStruct TestNoFieldSeqPropogation(int a) } [MethodImpl(MethodImplOptions.NoInlining)] - static void TestNoFieldSeqPropogation() + static void TestNoFieldSeqPropagation() { - TestNoFieldSeqPropogation(5); + TestNoFieldSeqPropagation(5); } public static void Test() { - TestConstPropogation(); - TestNoFieldSeqPropogation(); + TestConstPropagation(); + TestNoFieldSeqPropagation(); } } #endregion 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 d040e6e04823c8..74a9c7f50e9813 100644 --- a/src/tests/JIT/Regression/JitBlue/DevDiv_491206/DevDiv_491206.il +++ b/src/tests/JIT/Regression/JitBlue/DevDiv_491206/DevDiv_491206.il @@ -7,7 +7,7 @@ .module a.exe // This test originally triggered an assert Extra_flags_on_tree, because fgMorphCast did not reset an asignment flag, when -// its children was optimized in the assertion propogation. +// its children was optimized in the assertion propagation. .class ILGEN_CLASS { @@ -57,7 +57,7 @@ IL_006a: conv.i8 IL_006b: ret } // end of method DoubleToInt64 - + .method public static int32 Main() { .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( 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 e4d50f3db3394b..0038bc763324b0 100644 --- a/src/tests/JIT/Regression/JitBlue/DevDiv_495792/DevDiv_495792.il +++ b/src/tests/JIT/Regression/JitBlue/DevDiv_495792/DevDiv_495792.il @@ -7,7 +7,7 @@ .module a.exe // This test originally triggered an assert Extra_flags_on_tree, because fgMorphCast did not reset an asignment flag, when -// its children was optimized in the assertion propogation. +// its children was optimized in the assertion propagation. .class ILGEN_CLASS { @@ -69,7 +69,7 @@ IL_0064: starg 0x0001 IL_0068: neg IL_0069: nop - IL_006a: bgt + IL_006a: bgt IL_0074 IL_006f: ldarg 0x0000 IL_0073: pop @@ -100,9 +100,9 @@ IL_00a9: conv.u4 IL_00aa: div.un IL_00ab: pop - IL_00ac: ret + IL_00ac: ret } - + .method private static int32 Main() { .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( @@ -127,7 +127,7 @@ IL_000c: nop IL_000d: leave.s IL_0014 } // end .try - catch [mscorlib]System.OverflowException + catch [mscorlib]System.OverflowException { IL_000f: stloc.0 IL_0010: nop diff --git a/src/tests/JIT/Regression/JitBlue/GitHub_24185/GitHub_24185.cs b/src/tests/JIT/Regression/JitBlue/GitHub_24185/GitHub_24185.cs index d66e2919cd0416..4bd3d50cafbf44 100644 --- a/src/tests/JIT/Regression/JitBlue/GitHub_24185/GitHub_24185.cs +++ b/src/tests/JIT/Regression/JitBlue/GitHub_24185/GitHub_24185.cs @@ -5,7 +5,7 @@ using System.Threading; using System.Threading.Tasks; -// The test shows recursive assertion propogation in one statement. +// The test shows recursive assertion propagation in one statement. namespace GitHub_24185 { @@ -20,9 +20,9 @@ static int Main(string[] args) catch (Exception e) { // Each expression in this condition checks that `e` is not null and checks its type. - // This information should be calculated once and propogated by assertion propogation. - if (!(e is AggregateException) || - !((((AggregateException)e).InnerExceptions[0] is ArgumentException) + // This information should be calculated once and propagated by assertion propagation. + if (!(e is AggregateException) || + !((((AggregateException)e).InnerExceptions[0] is ArgumentException) || ((AggregateException)e).InnerExceptions[0] is AggregateException)) { return 100; diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_41100/Runtime_41100.cs b/src/tests/JIT/Regression/JitBlue/Runtime_41100/Runtime_41100.cs index c4ddf22babb6d9..ad6df21e420f87 100644 --- a/src/tests/JIT/Regression/JitBlue/Runtime_41100/Runtime_41100.cs +++ b/src/tests/JIT/Regression/JitBlue/Runtime_41100/Runtime_41100.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. -// The test was showing a wrong copy propogation when a struct field was rewritten by +// The test was showing a wrong copy propagation when a struct field was rewritten by // a call assignment to the parent struct but that assignment was not supported by copyprop. using System; @@ -20,7 +20,7 @@ public static void E(ImmutableArray a) {} public static ImmutableArray H() { string[] a = new string[100]; - + for (int i = 0; i < a.Length; i++) { a[i] = "hello"; @@ -29,7 +29,7 @@ public static ImmutableArray H() return ImmutableArray.Create(a); } - [MethodImpl(MethodImplOptions.NoInlining)] + [MethodImpl(MethodImplOptions.NoInlining)] public static int F() { var a = H(); @@ -49,7 +49,7 @@ public static int F() { if (s.Equals("hello")) r--; } - + aa = G(); foreach (var s in a)