Skip to content

Commit ea1d155

Browse files
committed
Fix up other code comment instances of insur* -> ensur*
1 parent d2cc4c7 commit ea1d155

File tree

40 files changed

+56
-56
lines changed

40 files changed

+56
-56
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ To allow changes in the runtime, we simply require that the new runtime handle a
117117

118118
### Restrictions on Runtime Evolution
119119

120-
As mentioned previously, when designing for version compatibility we have the choice of either simply disallowing a change (by changing the breaking change rules), or insuring that the format is sufficiently flexible to allow evolution. For example, for managed code we have opted to disallow changes to value type (struct) layout so that codegen for structs can be efficient. In addition, the design also includes a small number of restrictions that affect the flexibility of evolving the runtime itself. They are:
120+
As mentioned previously, when designing for version compatibility we have the choice of either simply disallowing a change (by changing the breaking change rules), or ensuring that the format is sufficiently flexible to allow evolution. For example, for managed code we have opted to disallow changes to value type (struct) layout so that codegen for structs can be efficient. In addition, the design also includes a small number of restrictions that affect the flexibility of evolving the runtime itself. They are:
121121

122122
- The field layout of `System.Object` cannot change. (First, there is a pointer sized field for type information and then the other fields.)
123123
- The field layout of arrays cannot change. (First, there is a pointer sized field for type information, and then a pointer sized field for the length. After these fields is the array data, packed using existing alignment rules.)

src/coreclr/debug/ee/rcthread.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ void DebuggerRCThread::ThreadProc(void)
610610
// This message actually serves a purpose (which is why it is always run)
611611
// The Stress log is run during hijacking, when other threads can be suspended
612612
// at arbitrary locations (including when holding a lock that NT uses to serialize
613-
// all memory allocations). By sending a message now, we insure that the stress
613+
// all memory allocations). By sending a message now, we ensure that the stress
614614
// log will not allocate memory at these critical times an avoid deadlock.
615615
{
616616
SUPPRESS_ALLOCATION_ASSERTS_IN_THIS_SCOPE;

src/coreclr/dlls/mscorpe/pewriter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ HRESULT PEWriter::link() {
11851185
// NOTE:
11861186
// link() can be called more than once! This is because at least one compiler
11871187
// (the prejitter) needs to know the base addresses of some segments before it
1188-
// builds others. It's up to the caller to insure the layout remains the same
1188+
// builds others. It's up to the caller to ensure the layout remains the same
11891189
// after changes are made, though.
11901190
//
11911191

src/coreclr/ilasm/assem.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ BOOL Assembler::AddMethod(Method *pMethod)
328328
unsigned codeSize = m_CurPC;
329329
unsigned codeSizeAligned = codeSize;
330330
if (moreSections)
331-
codeSizeAligned = (codeSizeAligned + 3) & ~3; // to insure EH section aligned
331+
codeSizeAligned = (codeSizeAligned + 3) & ~3; // to ensure EH section aligned
332332

333333
unsigned headerSize = COR_ILMETHOD::Size(&fatHeader, moreSections);
334334
unsigned ehSize = COR_ILMETHOD_SECT_EH::Size(pMethod->m_dwNumExceptions, pMethod->m_ExceptionList);

src/coreclr/inc/ceegen.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ class CCeeGen : public ICeeGenInternal {
275275
// Write the metadata in "emitter" to the default metadata section is "section" is 0
276276
// If 'section != 0, it will put the data in 'buffer'. This
277277
// buffer is assumed to be in 'section' at 'offset' and of size 'buffLen'
278-
// (should use GetSaveSize to insure that buffer is big enough
278+
// (should use GetSaveSize to ensure that buffer is big enough
279279
virtual HRESULT emitMetaData(IMetaDataEmit *emitter,
280280
CeeSection* section=0, DWORD offset=0, BYTE* buffer=0, unsigned buffLen=0);
281281
virtual HRESULT getMethodRVA(ULONG codeOffset, ULONG *codeRVA);

src/coreclr/inc/cordebug.idl

+1-1
Original file line numberDiff line numberDiff line change
@@ -5180,7 +5180,7 @@ interface ICorDebugNativeFrame : ICorDebugFrame
51805180
* coherent state. (Note that even if the frame is in a valid
51815181
* state as far as the runtime is concerned, there still may be
51825182
* problems - e.g. uninitialized local variables, etc. The caller
5183-
* (or perhaps the user) is responsible for insuring coherency of
5183+
* (or perhaps the user) is responsible for ensuring coherency of
51845184
* the running program.)
51855185
*
51865186
* Calling SetIP immediately invalidates all frames and chains for the

src/coreclr/inc/iceefilegen.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class ICeeFileGen {
149149
// Emit the metadata from "emitter".
150150
// If 'section != 0, it will put the data in 'buffer'. This
151151
// buffer is assumed to be in 'section' at 'offset' and of size 'buffLen'
152-
// (should use GetSaveSize to insure that buffer is big enough
152+
// (should use GetSaveSize to ensure that buffer is big enough
153153
virtual HRESULT EmitMetaDataAt (HCEEFILE ceeFile, IMetaDataEmit *emitter,
154154
HCEESECTION section, DWORD offset,
155155
BYTE* buffer, unsigned buffLen);

src/coreclr/jit/codegencommon.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4963,7 +4963,7 @@ void CodeGen::genFinalizeFrame()
49634963

49644964
// We currently only expect to push/pop consecutive FP registers
49654965
// and these have to be double-sized registers as well.
4966-
// Here we will insure that maskPushRegsFloat obeys these requirements.
4966+
// Here we will ensure that maskPushRegsFloat obeys these requirements.
49674967
//
49684968
if (maskPushRegsFloat != RBM_NONE)
49694969
{

src/coreclr/jit/instr.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ void CodeGen::inst_RV_SH(
750750
#elif defined(TARGET_XARCH)
751751

752752
#ifdef TARGET_AMD64
753-
// X64 JB BE insures only encodable values make it here.
753+
// X64 JB BE ensures only encodable values make it here.
754754
// x86 can encode 8 bits, though it masks down to 5 or 6
755755
// depending on 32-bit or 64-bit registers are used.
756756
// Here we will allow anything that is encodable.

src/coreclr/pal/tests/palsuite/common/palsuite.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ mkAbsoluteFilenameW (
154154
sizeFN = wcslen( fileName );
155155
sizeAPN = (sizeDN + 1 + sizeFN + 1);
156156

157-
/* insure ((dirName + DELIM + fileName + \0) =< _MAX_PATH ) */
157+
/* ensure ((dirName + DELIM + fileName + \0) =< _MAX_PATH ) */
158158
if ( sizeAPN > _MAX_PATH )
159159
{
160160
return ( 0 );
@@ -195,7 +195,7 @@ mkAbsoluteFilenameA (
195195
sizeFN = strlen( fileName );
196196
sizeAPN = (sizeDN + 1 + sizeFN + 1);
197197

198-
/* insure ((dirName + DELIM + fileName + \0) =< _MAX_PATH ) */
198+
/* ensure ((dirName + DELIM + fileName + \0) =< _MAX_PATH ) */
199199
if ( sizeAPN > _MAX_PATH )
200200
{
201201
return ( 0 );

src/coreclr/pal/tests/palsuite/threading/CreateSemaphoreW_ReleaseSemaphore/test3/createsemaphore.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
** Source: createsemaphorew_releasesemaphore/test3/createsemaphore.c
77
**
88
** Purpose: Test attributes of CreateSemaphoreExW and ReleaseSemaphore.
9-
** Insure for CreateSemaphore that lInitialCount and lMaximumCount
9+
** Ensure for CreateSemaphore that lInitialCount and lMaximumCount
1010
** constraints are respected. Validate that CreateSemaphore rejects
1111
** conditions where initial count and / or maximum count are negative
1212
** and conditions where the initial count is greater than the maximum

src/coreclr/utilcode/stresslog.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,9 @@ void StressLog::Terminate(BOOL fProcessDetach) {
389389
lockh.Acquire(); lockh.Release(); // The Enter() Leave() forces a memory barrier on weak memory model systems
390390
// we want all the other threads to notice that facilitiesToLog is now zero
391391

392-
// This is not strictly threadsafe, since there is no way of insuring when all the
392+
// This is not strictly threadsafe, since there is no way of ensuring when all the
393393
// threads are out of logMsg. In practice, since they can no longer enter logMsg
394-
// and there are no blocking operations in logMsg, simply sleeping will insure
394+
// and there are no blocking operations in logMsg, simply sleeping will ensure
395395
// that everyone gets out.
396396
ClrSleepEx(2, FALSE);
397397
lockh.Acquire();

src/coreclr/vm/codeman.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ void UnwindInfoTable::AddToUnwindInfoTable(UnwindInfoTable** unwindInfoPtr, PT_R
253253

254254
ULONG size = (ULONG) ((rangeEnd - rangeStart) / 128) + 1;
255255

256-
// To insure the test the growing logic in debug code make the size much smaller.
256+
// To ensure the test the growing logic in debug code make the size much smaller.
257257
INDEBUG(size = size / 4 + 1);
258258
unwindInfo = (PTR_UnwindInfoTable)new UnwindInfoTable(rangeStart, rangeEnd, size);
259259
unwindInfo->Register();
@@ -433,7 +433,7 @@ void UnwindInfoTable::AddToUnwindInfoTable(UnwindInfoTable** unwindInfoPtr, PT_R
433433
{
434434
STANDARD_VM_CONTRACT;
435435
{
436-
// CodeHeapIterator holds the m_CodeHeapCritSec, which insures code heaps don't get deallocated while being walked
436+
// CodeHeapIterator holds the m_CodeHeapCritSec, which ensures code heaps don't get deallocated while being walked
437437
EEJitManager::CodeHeapIterator heapIterator(NULL);
438438

439439
// Currently m_CodeHeapCritSec is given the CRST_UNSAFE_ANYMODE flag which allows it to be taken in a GC_NOTRIGGER
@@ -4957,7 +4957,7 @@ void ExecutionManager::Unload(LoaderAllocator *pLoaderAllocator)
49574957
// (This is also true on ARM64, but it not true for x86)
49584958
//
49594959
// For these architectures, in JITed code and in the prestub, we encode direct calls
4960-
// using the preferred call instruction and we also try to insure that the Jitted
4960+
// using the preferred call instruction and we also try to ensure that the Jitted
49614961
// code is within the 32-bit pc-rel range of clr.dll to allow direct JIT helper calls.
49624962
//
49634963
// When the call target is too far away to encode using the preferred call instruction.

src/coreclr/vm/comdynamic.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ extern "C" void QCALLTYPE TypeBuilder_SetMethodIL(QCall::ModuleHandle pModule,
347347

348348
unsigned codeSizeAligned = fatHeader.GetCodeSize();
349349
if (moreSections)
350-
codeSizeAligned = AlignUp(codeSizeAligned, 4); // to insure EH section aligned
350+
codeSizeAligned = AlignUp(codeSizeAligned, 4); // to ensure EH section aligned
351351
unsigned headerSize = COR_ILMETHOD::Size(&fatHeader, numExceptions != 0);
352352

353353
//Create the exception handlers.

src/coreclr/vm/eventtrace.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2696,7 +2696,7 @@ extern "C"
26962696
} CONTRACTL_END;
26972697

26982698
// Mark that we are the special ETWRundown thread. Currently all this does
2699-
// is insure that AVs thrown in this thread are treated as normal exceptions.
2699+
// is ensure that AVs thrown in this thread are treated as normal exceptions.
27002700
// This allows us to catch and swallow them. We can do this because we have
27012701
// a reasonably strong belief that doing ETW Rundown does not change runtime state
27022702
// and thus if an AV happens it is better to simply give up logging ETW and

src/coreclr/vm/fcall.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212

1313
// It is illegal to cause a GC or EH to happen in an FCALL before setting
1414
// up a frame. To prevent accidentally violating this rule, FCALLs turn
15-
// on BEGINGCFORBID, which insures that these things can't happen in a
15+
// on BEGINGCFORBID, which ensures that these things can't happen in a
1616
// checked build without causing an ASSERTE. Once you set up a frame,
1717
// this state is turned off as long as the frame is active, and then is
1818
// turned on again when the frame is torn down. This mechanism should
19-
// be sufficient to insure that the rules are followed.
19+
// be sufficient to ensure that the rules are followed.
2020

2121
// In general you set up a frame by using the following macros
2222

@@ -596,7 +596,7 @@ LPVOID __FCThrowArgument(LPVOID me, enum RuntimeExceptionKind reKind, LPCWSTR ar
596596
/* gcpoll; */
597597

598598
// The while(__helperframe.RestoreState() needs a bit of explanation.
599-
// The issue is insuring that the same machine state (which registers saved)
599+
// The issue is ensuring that the same machine state (which registers saved)
600600
// exists when the machine state is probed (when the frame is created, and
601601
// when it is actually used (when the frame is popped. We do this by creating
602602
// a flow of control from use to def. Note that 'RestoreState' always returns false
@@ -910,7 +910,7 @@ void HCallAssert(void*& cache, void* target);
910910
// the helper routine to the end of the FCALL using trivial heurisitics. The easiest (and only supported)
911911
// way of doing this is to place your helper right before a return (eg at the end of the method). Generally
912912
// this is not a problem at all, since the FCALL itself will pick off some common case and then tail-call to
913-
// the helper for everything else. You must use the code:FC_INNER_RETURN macros to do the call, to insure
913+
// the helper for everything else. You must use the code:FC_INNER_RETURN macros to do the call, to ensure
914914
// that the C++ compiler does not tail-call optimize the call to the inner function and mess up the stack
915915
// depth.
916916
//

src/coreclr/vm/gccover.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ void DoGcStress (PCONTEXT regs, NativeCodeVersion nativeCodeVersion)
697697
}
698698
else {
699699
// We have been in this routine before. Give up on epilog checking because
700-
// it is hard to insure that the saved caller register state is correct
700+
// it is hard to ensure that the saved caller register state is correct
701701
// This also has the effect of only doing the checking once per routine
702702
// (Even if there are multiple epilogs)
703703
gcCover->doingEpilogChecks = false;

src/coreclr/vm/i386/gmsx86.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626

2727
if (machState.setMachState != 0) return;
2828

29-
setMachState is guarnenteed to return 0 (so the return
29+
setMachState is guaranteed to return 0 (so the return
3030
statement will never be executed), but the expression above
31-
insures insures that there is a 'quick' path to epilog
32-
of the function. This insures that setMachState will only
31+
ensures that there is a 'quick' path to epilog
32+
of the function. This ensures that setMachState will only
3333
have to parse a limited number of X86 instructions. */
3434

3535

@@ -47,7 +47,7 @@
4747
#if !defined(DACCESS_COMPILE)
4848

4949
#ifdef _MSC_VER
50-
#pragma optimize("gsy", on ) // optimize to insure that code generation does not have junk in it
50+
#pragma optimize("gsy", on ) // optimize to ensure that code generation does not have junk in it
5151
#endif // _MSC_VER
5252
#pragma warning(disable:4717)
5353

src/coreclr/vm/i386/jitinterfacex86.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class JIT_TrialAlloc
4444
MP_ALLOCATOR = 0x1,
4545
SIZE_IN_EAX = 0x2,
4646
OBJ_ARRAY = 0x4,
47-
ALIGN8 = 0x8, // insert a dummy object to insure 8 byte alignment (until the next GC)
47+
ALIGN8 = 0x8, // insert a dummy object to ensure 8 byte alignment (until the next GC)
4848
ALIGN8OBJ = 0x10,
4949
};
5050

src/coreclr/vm/jitinterface.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -12920,7 +12920,7 @@ BOOL g_fAllowRel32 = TRUE;
1292012920
// The reason that this is named UnsafeJitFunction is that this helper
1292112921
// method is not thread safe! When multiple threads get in here for
1292212922
// the same pMD, ALL of them MUST return the SAME value.
12923-
// To insure that this happens you must call MakeJitWorker.
12923+
// To ensure that this happens you must call MakeJitWorker.
1292412924
// It creates a DeadlockAware list of methods being jitted and prevents us
1292512925
// from trying to jit the same method more that once.
1292612926
//

src/coreclr/vm/methodtable.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class MethodDataCache
134134
UINT32 m_iLastTouched;
135135

136136
#ifdef HOST_64BIT
137-
UINT32 pad; // insures that we are a multiple of 8-bytes
137+
UINT32 pad; // ensures that we are a multiple of 8-bytes
138138
#endif
139139
}; // class MethodDataCache
140140

src/coreclr/vm/methodtable.inl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ FORCEINLINE DWORD MethodTable::GetOffsetOfOptionalMember(OptionalMemberId id)
11011101
if (id == OptionalMember_##NAME) { \
11021102
return offset; \
11031103
} \
1104-
C_ASSERT(sizeof(TYPE) % sizeof(UINT_PTR) == 0); /* To insure proper alignment */ \
1104+
C_ASSERT(sizeof(TYPE) % sizeof(UINT_PTR) == 0); /* To ensure proper alignment */ \
11051105
if (Has##NAME()) { \
11061106
offset += sizeof(TYPE); \
11071107
}

src/coreclr/vm/object.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ uint32_t StackTraceArray::CopyDataFrom(StackTraceArray const & src)
15471547

15481548
#ifdef _DEBUG
15491549
//===============================================================================
1550-
// Code that insures that our unmanaged version of Nullable is consistant with
1550+
// Code that ensures that our unmanaged version of Nullable is consistant with
15511551
// the managed version Nullable<T> for all T.
15521552

15531553
void Nullable::CheckFieldOffsets(TypeHandle nullableType)
@@ -1564,7 +1564,7 @@ void Nullable::CheckFieldOffsets(TypeHandle nullableType)
15641564

15651565
MethodTable* nullableMT = nullableType.GetMethodTable();
15661566

1567-
// insure that the managed version of the table is the same as the
1567+
// ensure that the managed version of the table is the same as the
15681568
// unmanaged. Note that we can't do this in corelib.h because this
15691569
// class is generic and field layout depends on the instantiation.
15701570

src/coreclr/vm/stackingallocator.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
{
3939
StackBlock *m_Next; // Next oldest block in list
4040
DWORD_PTR m_Length; // Length of block excluding header (needs to be pointer-sized for alignment on IA64)
41-
INDEBUG(Sentinel* m_Sentinel;) // insure that we don't fall of the end of the buffer
41+
INDEBUG(Sentinel* m_Sentinel;) // ensure that we don't fall of the end of the buffer
4242
INDEBUG(void** m_Pad;) // keep the size a multiple of 8
4343
char *GetData() { return (char *)(this + 1);}
4444
};

src/coreclr/vm/threads.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1529,7 +1529,7 @@ void Thread::InitThread()
15291529
// This message actually serves a purpose (which is why it is always run)
15301530
// The Stress log is run during hijacking, when other threads can be suspended
15311531
// at arbitrary locations (including when holding a lock that NT uses to serialize
1532-
// all memory allocations). By sending a message now, we insure that the stress
1532+
// all memory allocations). By sending a message now, we ensure that the stress
15331533
// log will not allocate memory at these critical times an avoid deadlock.
15341534
STRESS_LOG2(LF_ALWAYS, LL_ALWAYS, "SetupThread managed Thread %p Thread Id = %x\n", this, GetThreadId());
15351535

@@ -5998,7 +5998,7 @@ BOOL Thread::UniqueStack(void* stackStart)
59985998
size_t stackTrace[UniqueStackDepth+1] = {0};
59995999

60006000
// stackTraceHash represents a hash of entire stack at the time we make the call,
6001-
// We insure at least GC per unique stackTrace. What information is contained in
6001+
// We ensure at least GC per unique stackTrace. What information is contained in
60026002
// 'stackTrace' is somewhat arbitrary. We choose it to mean all functions live
60036003
// on the stack up to the first jitted function.
60046004

@@ -6017,7 +6017,7 @@ BOOL Thread::UniqueStack(void* stackStart)
60176017
if (pFrame == 0 || pFrame == (Frame*) -1)
60186018
break;
60196019

6020-
pFrame->GetFunction(); // This insures that helper frames are inited
6020+
pFrame->GetFunction(); // This ensures that helper frames are inited
60216021

60226022
if (pFrame->GetReturnAddress() != 0)
60236023
{

src/coreclr/vm/threads.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3188,7 +3188,7 @@ class Thread
31883188
#endif // HOST_64BIT
31893189

31903190
// For debugging, you may want to make this number very large, (8K)
3191-
// should basically insure that no collisions happen
3191+
// should basically ensure that no collisions happen
31923192
#define OBJREF_TABSIZE 256
31933193
DWORD_PTR dangerousObjRefs[OBJREF_TABSIZE]; // Really objectRefs with lower bit stolen
31943194
// m_allObjRefEntriesBad is TRUE iff dangerousObjRefs are all marked as GC happened

src/libraries/System.Diagnostics.DiagnosticSource/src/ActivityUserGuide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ Typical Baggage usage includes adding a few baggage properties and enumeration t
273273
`TimeSpan Duration { get; private set; }` - Represents Activity duration if activity was stopped, TimeSpan.Zero otherwise.
274274

275275
### Id
276-
`string Id { get; private set; }` - Represents particular activity identifier. Filtering to a particular Id insures that you get only log records related to specific request within the operation. It is generated when the activity is started.
276+
`string Id { get; private set; }` - Represents particular activity identifier. Filtering to a particular Id ensures that you get only log records related to specific request within the operation. It is generated when the activity is started.
277277
Id is passed to external dependencies and considered as [ParentId](#parentid) for new external activity.
278278

279279
### ParentId

0 commit comments

Comments
 (0)