Skip to content

Commit 9d6396d

Browse files
authored
Fix typos (dotnet#72709)
1 parent f0e7a68 commit 9d6396d

File tree

1,292 files changed

+4511
-4511
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,292 files changed

+4511
-4511
lines changed

docs/coding-guidelines/mono-code-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Macros generally use a `MONO_` prefix. Macros in public API headers *must* use
5353

5454
Prefer the standard C sized types `int32_t`, `intptr_t`, etc over the eglib types `gint32`, `gsize` etc.
5555

56-
One exception is `gboolean` is prefered over C `bool`.
56+
One exception is `gboolean` is preferred over C `bool`.
5757

5858
There are actually three boolean types to keep in mind:
5959

docs/design/coreclr/botr/clr-abi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CLR ABI
22

3-
This document describes the .NET Common Language Runtime (CLR) software conventions (or ABI, "Application Binary Interface"). It focusses on the ABI for the x64 (aka, AMD64), ARM (aka, ARM32 or Thumb-2), and ARM64 processor architectures. Documentation for the x86 ABI is somewhat scant, but information on the basics of the calling convention is included at the bottom of this document.
3+
This document describes the .NET Common Language Runtime (CLR) software conventions (or ABI, "Application Binary Interface"). It focuses on the ABI for the x64 (aka, AMD64), ARM (aka, ARM32 or Thumb-2), and ARM64 processor architectures. Documentation for the x86 ABI is somewhat scant, but information on the basics of the calling convention is included at the bottom of this document.
44

55
It describes requirements that the Just-In-Time (JIT) compiler imposes on the VM and vice-versa.
66

@@ -153,7 +153,7 @@ The below is performed when the GC transition is not suppressed.
153153
2. For JIT64/AMD64 only: Next for non-IL stubs, the InlinedCallFrame is 'pushed' by setting `Thread->m_pFrame` to point to the InlinedCallFrame (recall that the per-frame initialization already set `InlinedCallFrame->m_pNext` to point to the previous top). For IL stubs this step is accomplished in the per-frame initialization.
154154
3. The Frame is made active by setting `InlinedCallFrame->m_pCallerReturnAddress`.
155155
4. The code then toggles the GC mode by setting `Thread->m_fPreemptiveGCDisabled = 0`.
156-
5. Starting now, no GC pointers may be live in registers. RyuJit LSRA meets this requirement by adding special refPositon `RefTypeKillGCRefs` before unmanaged calls and special helpers.
156+
5. Starting now, no GC pointers may be live in registers. RyuJit LSRA meets this requirement by adding special refPosition `RefTypeKillGCRefs` before unmanaged calls and special helpers.
157157
6. Then comes the actual call/PInvoke.
158158
7. The GC mode is set back by setting `Thread->m_fPreemptiveGCDisabled = 1`.
159159
8. Then we check to see if `g_TrapReturningThreads` is set (non-zero). If it is, we call `CORINFO_HELP_STOP_FOR_GC`.

docs/design/coreclr/botr/dac-notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Both methodCold and methodCode are declared as `BYTE *`, but in fact hold target
178178

179179
If this code seems overly complex and confusing to you, that's good. In fact it is. Worse, it provides no protection for the separation of host and target addresses. From the declarations of `methodCold` and `methodCode`, there is no particular reason to interpret them as target addresses at all. If these pointers were dereferenced in DAC builds as if they really were host pointers, the process would probably AV. This snippet demonstrates that any arbitrary pointer type (as opposed to a `PTR` type) can be casted to a `TADDR`. Given that these two variables always hold target addresses, they should be of type `PTR_BYTE`, rather than `BYTE *`.
180180

181-
There is also a disciplined means to cast between different `PTR` types: `dac_cast`. The `dac_cast` operator is the DAC-aware vesion of the C++ `static_cast` operator (which the CLR coding conventions stipulate instead of C-style casts when casting pointer types). The `dac_cast` operator will do any of the following things:
181+
There is also a disciplined means to cast between different `PTR` types: `dac_cast`. The `dac_cast` operator is the DAC-aware version of the C++ `static_cast` operator (which the CLR coding conventions stipulate instead of C-style casts when casting pointer types). The `dac_cast` operator will do any of the following things:
182182

183183
1. Create a `PTR` type from a `TADDR`
184184
2. Convert one `PTR` type to another

docs/design/coreclr/botr/exceptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ When a C++ exception is thrown, and there is a missing UACH, the typical failure
262262
Runtime code into managed code
263263
------------------------------
264264

265-
The transition from the runtime into managed code has highly platform-dependent requirements. On 32-bit Windows platforms, the CLR's managed exception code requires that "COMPlusFrameHandler" is installed just before entering managed code. These transitions are handled by highly specialized helper functions, which take care of the appropriate exception handlers. It is very unlikely that any typical new calls into managed would use any other way in. In the event that the COMPlusFrameHander were missing, the most likely effect would be that exception handling code in the target managed code simply wouldn't be executed – no finally blocks, and no catch blocks.
265+
The transition from the runtime into managed code has highly platform-dependent requirements. On 32-bit Windows platforms, the CLR's managed exception code requires that "COMPlusFrameHandler" is installed just before entering managed code. These transitions are handled by highly specialized helper functions, which take care of the appropriate exception handlers. It is very unlikely that any typical new calls into managed would use any other way in. In the event that the COMPlusFrameHandler were missing, the most likely effect would be that exception handling code in the target managed code simply wouldn't be executed – no finally blocks, and no catch blocks.
266266

267267
Runtime code into external native code
268268
--------------------------------------

docs/design/coreclr/botr/guide-for-porting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The process follows the following strategy
4646
not maintained as generally working. It is expected that the interpreter
4747
will take 1-2 months to enable for an engineer familiar with the CoreCLR
4848
codebase. A functional interpreter allows the porting team to have a set of
49-
engineers which focus exclusively on the JIT and a set which focusses on the
49+
engineers which focus exclusively on the JIT and a set which focuses on the
5050
VM portion of the runtime.
5151

5252
- Build up a set of scripts that will run the coreclr tests. The normal
@@ -311,7 +311,7 @@ must implement.
311311
components. The implementation made architecture specific via a long series of
312312
C preprocessor macros.
313313

314-
6. `gcinfodecoder.h` The GC info format is archictecture specific as it holds
314+
6. `gcinfodecoder.h` The GC info format is architecture specific as it holds
315315
information about which specific registers hold GC data. The implementation
316316
is generally simplified to be defined in terms of register numbers, but if
317317
the architecture has more registers available for use than existing architectures
@@ -378,7 +378,7 @@ Here is an annotated list of the stubs implemented for Unix on Arm64.
378378

379379
9. `TheUMEntryPrestub`/ `UMThunkStub` - used to enter the runtime from
380380
non-managed code through entrypoints generated from the
381-
Marshal.GetFunctionPointerForDelagate api.
381+
Marshal.GetFunctionPointerForDelegate api.
382382

383383
10. `OnHijackTripThread` - needed for thread suspension to support GC + other
384384
suspension requiring events. This is typically not needed for very early

docs/design/coreclr/botr/managed-type-system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,4 @@ The type system implementation is found in:
112112

113113
## Notable differences from CoreCLR type system
114114

115-
* `MethodDesc` has exact generic instantations where possible in managed type system. The code sharing policy in managed type system is one of the pluggable algorithms and it does not affect `MethodDesc` identity. The code sharing policy in the CoreCLR type system is coupled with `MethodDesc` identity. See https://github.com/dotnet/runtime/pull/45744 for an example how this difference manifests itself.
115+
* `MethodDesc` has exact generic instantiations where possible in managed type system. The code sharing policy in managed type system is one of the pluggable algorithms and it does not affect `MethodDesc` identity. The code sharing policy in the CoreCLR type system is coupled with `MethodDesc` identity. See https://github.com/dotnet/runtime/pull/45744 for an example how this difference manifests itself.

docs/design/coreclr/botr/readytorun-format.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -702,11 +702,11 @@ To see this in action, we can take a look at the following example, with these o
702702
| R | 0x1234 |
703703
| S | 0x1238 |
704704

705-
Suppose we decided to have only two buckets, then only the least signficant digit will be used to index the table, the whole hash table will look like this:
705+
Suppose we decided to have only two buckets, then only the least significant digit will be used to index the table, the whole hash table will look like this:
706706

707707
| Part | Offset | Content | Meaning |
708708
|:--------|:-------|:--------:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
709-
| Header | 0 | 0x04 | This is the header, the least signficant bit is `00`, therefore the table cell is just one byte. The most significant six bit represents 1, which means the number of buckets is 2^1 = 2. |
709+
| Header | 0 | 0x04 | This is the header, the least significant bit is `00`, therefore the table cell is just one byte. The most significant six bit represents 1, which means the number of buckets is 2^1 = 2. |
710710
| Table | 1 | 0x08 | This is the representation of the unsigned integer 4, which correspond to the offset of the bucket correspond to hash code `0`. |
711711
| Table | 2 | 0x14 | This is the representation of the unsigned integer 10, which correspond to the offset of the bucket correspond to hash code `1`. |
712712
| Table | 3 | 0x18 | This is the representation of the unsigned integer 12, which correspond to the offset of the end of the whole hash table. |
@@ -835,7 +835,7 @@ enum ReadyToRunHelper
835835
READYTORUN_HELPER_FltRound = 0xE3,
836836

837837
#ifndef _TARGET_X86_
838-
// Personality rountines
838+
// Personality routines
839839
READYTORUN_HELPER_PersonalityRoutine = 0xF0,
840840
READYTORUN_HELPER_PersonalityRoutineFilterFunclet = 0xF1,
841841
#endif

docs/design/coreclr/botr/shared-generics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The first N slots in an instantiation of N arguments are always going to be the
9595

9696
For instance, here is an example of the contents of the generic dictionary for our `Method<string>` example:
9797

98-
| `Method<string>'s dicionary` |
98+
| `Method<string>'s dictionary` |
9999
|--------------------------|
100100
| slot[0]: TypeHandle(`string`) |
101101
| slot[1]: Total dictionary size |

docs/design/coreclr/botr/threading.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ Hijacking for GC suspension is done by Thread::SysSuspendForGC. This method atte
103103
2. Get the current CONTEXT for the thread, via GetThreadContext. This is an OS concept; CONTEXT represents the current register state of the thread. This allows us to inspect its instruction pointer, and thus determine what type of code it is currently executing.
104104
3. Check again if the thread is in cooperative mode, as it may have already left cooperative mode before it could be suspended. If so, the thread is in dangerous territory: the thread may be executing arbitrary native code, and must be resumed immediately to avoid deadlocks.
105105
4. Check if the thread is running managed code. It is possible that it is executing native VM code in cooperative mode (see Synchronization, below), in which case the thread must be immediately resumed as in the previous step.
106-
5. Now the thread is suspended in managed code. Depending on whether that code is fully- or partially-interruptable, one of the following is performed:
107-
* If fully interruptable, it is safe to perform a GC at any point, since the thread is, by definition, at a safe point. It is reasonable to leave the thread suspended at this point (because it's safe) but various historical OS bugs prevent this from working, because the CONTEXT retrieved earlier may be corrupt). Instead, the thread's instruction pointer is overwritten, redirecting it to a stub that will capture a more complete CONTEXT, leave cooperative mode, wait for the GC to complete, reenter cooperative mode, and restore the thread to its previous state.
108-
* If partially-interruptable, the thread is, by definition, not at a safe point. However, the caller will be at a safe point (method transition). Using that knowledge, the CLR "hijacks" the top-most stack frame's return address (physically overwrite that location on the stack) with a stub similar to the one used for fully-interruptable code. When the method returns, it will no longer return to its actual caller, but rather to the stub (the method may also perform a GC poll, inserted by the JIT, before that point, which will cause it to leave cooperative mode and undo the hijack).
106+
5. Now the thread is suspended in managed code. Depending on whether that code is fully- or partially-interruptible, one of the following is performed:
107+
* If fully interruptible, it is safe to perform a GC at any point, since the thread is, by definition, at a safe point. It is reasonable to leave the thread suspended at this point (because it's safe) but various historical OS bugs prevent this from working, because the CONTEXT retrieved earlier may be corrupt). Instead, the thread's instruction pointer is overwritten, redirecting it to a stub that will capture a more complete CONTEXT, leave cooperative mode, wait for the GC to complete, reenter cooperative mode, and restore the thread to its previous state.
108+
* If partially-interruptible, the thread is, by definition, not at a safe point. However, the caller will be at a safe point (method transition). Using that knowledge, the CLR "hijacks" the top-most stack frame's return address (physically overwrite that location on the stack) with a stub similar to the one used for fully-interruptible code. When the method returns, it will no longer return to its actual caller, but rather to the stub (the method may also perform a GC poll, inserted by the JIT, before that point, which will cause it to leave cooperative mode and undo the hijack).
109109

110110
ThreadAbort / AppDomain-Unload
111111
==============================

docs/design/coreclr/botr/vectors-and-intrinsics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Code will be compiled using the optimistic instruction set to drive compilation,
177177
- Any use of a platform intrinsic in the codebase SHOULD be wrapped with a call to the associated IsSupported property. This wrapping may be done within the same function that uses the hardware intrinsic, but this is not required as long as the programmer can control all entrypoints to a function that uses the hardware intrinsic.
178178
- If an application developer is highly concerned about startup performance, developers should avoid use intrinsics beyond Sse42, or should use Crossgen with an updated baseline instruction set support.
179179

180-
### Crossgen2 ajustment to rules for System.Private.CoreLib.dll
180+
### Crossgen2 adjustment to rules for System.Private.CoreLib.dll
181181
Since System.Private.CoreLib.dll is known to be code reviewed with the code review rules as written above for crossgen1 with System.Private.CoreLib.dll, it is possible to relax rule "Code which attempts to use instruction sets outside of the optimistic set will generate code that will not be used on machines with support for the instruction set." What this will do is allow the generation of non-optimal code for these situations, but through the magic of code review, the generated logic will still work correctly.
182182

183183

0 commit comments

Comments
 (0)