Skip to content

Commit

Permalink
Fix up other code comment instances of insur* -> ensur*
Browse files Browse the repository at this point in the history
  • Loading branch information
bchavez committed Nov 19, 2024
1 parent 98fc52f commit be959e8
Show file tree
Hide file tree
Showing 40 changed files with 56 additions and 56 deletions.
2 changes: 1 addition & 1 deletion docs/design/coreclr/botr/readytorun-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ To allow changes in the runtime, we simply require that the new runtime handle a

### Restrictions on Runtime Evolution

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:
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:

- The field layout of `System.Object` cannot change. (First, there is a pointer sized field for type information and then the other fields.)
- 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.)
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/debug/ee/rcthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ void DebuggerRCThread::ThreadProc(void)
// This message actually serves a purpose (which is why it is always run)
// The Stress log is run during hijacking, when other threads can be suspended
// at arbitrary locations (including when holding a lock that NT uses to serialize
// all memory allocations). By sending a message now, we insure that the stress
// all memory allocations). By sending a message now, we ensure that the stress
// log will not allocate memory at these critical times an avoid deadlock.
{
SUPPRESS_ALLOCATION_ASSERTS_IN_THIS_SCOPE;
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/dlls/mscorpe/pewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ HRESULT PEWriter::link() {
// NOTE:
// link() can be called more than once! This is because at least one compiler
// (the prejitter) needs to know the base addresses of some segments before it
// builds others. It's up to the caller to insure the layout remains the same
// builds others. It's up to the caller to ensure the layout remains the same
// after changes are made, though.
//

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/ilasm/assem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ BOOL Assembler::AddMethod(Method *pMethod)
unsigned codeSize = m_CurPC;
unsigned codeSizeAligned = codeSize;
if (moreSections)
codeSizeAligned = (codeSizeAligned + 3) & ~3; // to insure EH section aligned
codeSizeAligned = (codeSizeAligned + 3) & ~3; // to ensure EH section aligned

unsigned headerSize = COR_ILMETHOD::Size(&fatHeader, moreSections);
unsigned ehSize = COR_ILMETHOD_SECT_EH::Size(pMethod->m_dwNumExceptions, pMethod->m_ExceptionList);
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/inc/ceegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class CCeeGen : public ICeeGenInternal {
// Write the metadata in "emitter" to the default metadata section is "section" is 0
// If 'section != 0, it will put the data in 'buffer'. This
// buffer is assumed to be in 'section' at 'offset' and of size 'buffLen'
// (should use GetSaveSize to insure that buffer is big enough
// (should use GetSaveSize to ensure that buffer is big enough
virtual HRESULT emitMetaData(IMetaDataEmit *emitter,
CeeSection* section=0, DWORD offset=0, BYTE* buffer=0, unsigned buffLen=0);
virtual HRESULT getMethodRVA(ULONG codeOffset, ULONG *codeRVA);
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/inc/cordebug.idl
Original file line number Diff line number Diff line change
Expand Up @@ -5180,7 +5180,7 @@ interface ICorDebugNativeFrame : ICorDebugFrame
* coherent state. (Note that even if the frame is in a valid
* state as far as the runtime is concerned, there still may be
* problems - e.g. uninitialized local variables, etc. The caller
* (or perhaps the user) is responsible for insuring coherency of
* (or perhaps the user) is responsible for ensuring coherency of
* the running program.)
*
* Calling SetIP immediately invalidates all frames and chains for the
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/inc/iceefilegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class ICeeFileGen {
// Emit the metadata from "emitter".
// If 'section != 0, it will put the data in 'buffer'. This
// buffer is assumed to be in 'section' at 'offset' and of size 'buffLen'
// (should use GetSaveSize to insure that buffer is big enough
// (should use GetSaveSize to ensure that buffer is big enough
virtual HRESULT EmitMetaDataAt (HCEEFILE ceeFile, IMetaDataEmit *emitter,
HCEESECTION section, DWORD offset,
BYTE* buffer, unsigned buffLen);
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/codegencommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4963,7 +4963,7 @@ void CodeGen::genFinalizeFrame()

// We currently only expect to push/pop consecutive FP registers
// and these have to be double-sized registers as well.
// Here we will insure that maskPushRegsFloat obeys these requirements.
// Here we will ensure that maskPushRegsFloat obeys these requirements.
//
if (maskPushRegsFloat != RBM_NONE)
{
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/instr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ void CodeGen::inst_RV_SH(
#elif defined(TARGET_XARCH)

#ifdef TARGET_AMD64
// X64 JB BE insures only encodable values make it here.
// X64 JB BE ensures only encodable values make it here.
// x86 can encode 8 bits, though it masks down to 5 or 6
// depending on 32-bit or 64-bit registers are used.
// Here we will allow anything that is encodable.
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/pal/tests/palsuite/common/palsuite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ mkAbsoluteFilenameW (
sizeFN = wcslen( fileName );
sizeAPN = (sizeDN + 1 + sizeFN + 1);

/* insure ((dirName + DELIM + fileName + \0) =< _MAX_PATH ) */
/* ensure ((dirName + DELIM + fileName + \0) =< _MAX_PATH ) */
if ( sizeAPN > _MAX_PATH )
{
return ( 0 );
Expand Down Expand Up @@ -195,7 +195,7 @@ mkAbsoluteFilenameA (
sizeFN = strlen( fileName );
sizeAPN = (sizeDN + 1 + sizeFN + 1);

/* insure ((dirName + DELIM + fileName + \0) =< _MAX_PATH ) */
/* ensure ((dirName + DELIM + fileName + \0) =< _MAX_PATH ) */
if ( sizeAPN > _MAX_PATH )
{
return ( 0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
** Source: createsemaphorew_releasesemaphore/test3/createsemaphore.c
**
** Purpose: Test attributes of CreateSemaphoreExW and ReleaseSemaphore.
** Insure for CreateSemaphore that lInitialCount and lMaximumCount
** Ensure for CreateSemaphore that lInitialCount and lMaximumCount
** constraints are respected. Validate that CreateSemaphore rejects
** conditions where initial count and / or maximum count are negative
** and conditions where the initial count is greater than the maximum
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/utilcode/stresslog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ void StressLog::Terminate(BOOL fProcessDetach) {
lockh.Acquire(); lockh.Release(); // The Enter() Leave() forces a memory barrier on weak memory model systems
// we want all the other threads to notice that facilitiesToLog is now zero

// This is not strictly threadsafe, since there is no way of insuring when all the
// This is not strictly threadsafe, since there is no way of ensuring when all the
// threads are out of logMsg. In practice, since they can no longer enter logMsg
// and there are no blocking operations in logMsg, simply sleeping will insure
// and there are no blocking operations in logMsg, simply sleeping will ensure
// that everyone gets out.
ClrSleepEx(2, FALSE);
lockh.Acquire();
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/vm/codeman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ void UnwindInfoTable::AddToUnwindInfoTable(UnwindInfoTable** unwindInfoPtr, PT_R

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

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

// Currently m_CodeHeapCritSec is given the CRST_UNSAFE_ANYMODE flag which allows it to be taken in a GC_NOTRIGGER
Expand Down Expand Up @@ -4957,7 +4957,7 @@ void ExecutionManager::Unload(LoaderAllocator *pLoaderAllocator)
// (This is also true on ARM64, but it not true for x86)
//
// For these architectures, in JITed code and in the prestub, we encode direct calls
// using the preferred call instruction and we also try to insure that the Jitted
// using the preferred call instruction and we also try to ensure that the Jitted
// code is within the 32-bit pc-rel range of clr.dll to allow direct JIT helper calls.
//
// When the call target is too far away to encode using the preferred call instruction.
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/comdynamic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ extern "C" void QCALLTYPE TypeBuilder_SetMethodIL(QCall::ModuleHandle pModule,

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

//Create the exception handlers.
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/eventtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2696,7 +2696,7 @@ extern "C"
} CONTRACTL_END;

// Mark that we are the special ETWRundown thread. Currently all this does
// is insure that AVs thrown in this thread are treated as normal exceptions.
// is ensure that AVs thrown in this thread are treated as normal exceptions.
// This allows us to catch and swallow them. We can do this because we have
// a reasonably strong belief that doing ETW Rundown does not change runtime state
// and thus if an AV happens it is better to simply give up logging ETW and
Expand Down
8 changes: 4 additions & 4 deletions src/coreclr/vm/fcall.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

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

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

Expand Down Expand Up @@ -596,7 +596,7 @@ LPVOID __FCThrowArgument(LPVOID me, enum RuntimeExceptionKind reKind, LPCWSTR ar
/* gcpoll; */

// The while(__helperframe.RestoreState() needs a bit of explanation.
// The issue is insuring that the same machine state (which registers saved)
// The issue is ensuring that the same machine state (which registers saved)
// exists when the machine state is probed (when the frame is created, and
// when it is actually used (when the frame is popped. We do this by creating
// a flow of control from use to def. Note that 'RestoreState' always returns false
Expand Down Expand Up @@ -910,7 +910,7 @@ void HCallAssert(void*& cache, void* target);
// the helper routine to the end of the FCALL using trivial heurisitics. The easiest (and only supported)
// way of doing this is to place your helper right before a return (eg at the end of the method). Generally
// this is not a problem at all, since the FCALL itself will pick off some common case and then tail-call to
// the helper for everything else. You must use the code:FC_INNER_RETURN macros to do the call, to insure
// the helper for everything else. You must use the code:FC_INNER_RETURN macros to do the call, to ensure
// that the C++ compiler does not tail-call optimize the call to the inner function and mess up the stack
// depth.
//
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/gccover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ void DoGcStress (PCONTEXT regs, NativeCodeVersion nativeCodeVersion)
}
else {
// We have been in this routine before. Give up on epilog checking because
// it is hard to insure that the saved caller register state is correct
// it is hard to ensure that the saved caller register state is correct
// This also has the effect of only doing the checking once per routine
// (Even if there are multiple epilogs)
gcCover->doingEpilogChecks = false;
Expand Down
8 changes: 4 additions & 4 deletions src/coreclr/vm/i386/gmsx86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@

if (machState.setMachState != 0) return;

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


Expand All @@ -47,7 +47,7 @@
#if !defined(DACCESS_COMPILE)

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

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/i386/jitinterfacex86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class JIT_TrialAlloc
MP_ALLOCATOR = 0x1,
SIZE_IN_EAX = 0x2,
OBJ_ARRAY = 0x4,
ALIGN8 = 0x8, // insert a dummy object to insure 8 byte alignment (until the next GC)
ALIGN8 = 0x8, // insert a dummy object to ensure 8 byte alignment (until the next GC)
ALIGN8OBJ = 0x10,
};

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/jitinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12920,7 +12920,7 @@ BOOL g_fAllowRel32 = TRUE;
// The reason that this is named UnsafeJitFunction is that this helper
// method is not thread safe! When multiple threads get in here for
// the same pMD, ALL of them MUST return the SAME value.
// To insure that this happens you must call MakeJitWorker.
// To ensure that this happens you must call MakeJitWorker.
// It creates a DeadlockAware list of methods being jitted and prevents us
// from trying to jit the same method more that once.
//
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/methodtable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class MethodDataCache
UINT32 m_iLastTouched;

#ifdef HOST_64BIT
UINT32 pad; // insures that we are a multiple of 8-bytes
UINT32 pad; // ensures that we are a multiple of 8-bytes
#endif
}; // class MethodDataCache

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/methodtable.inl
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ FORCEINLINE DWORD MethodTable::GetOffsetOfOptionalMember(OptionalMemberId id)
if (id == OptionalMember_##NAME) { \
return offset; \
} \
C_ASSERT(sizeof(TYPE) % sizeof(UINT_PTR) == 0); /* To insure proper alignment */ \
C_ASSERT(sizeof(TYPE) % sizeof(UINT_PTR) == 0); /* To ensure proper alignment */ \
if (Has##NAME()) { \
offset += sizeof(TYPE); \
}
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/vm/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ uint32_t StackTraceArray::CopyDataFrom(StackTraceArray const & src)

#ifdef _DEBUG
//===============================================================================
// Code that insures that our unmanaged version of Nullable is consistant with
// Code that ensures that our unmanaged version of Nullable is consistant with
// the managed version Nullable<T> for all T.

void Nullable::CheckFieldOffsets(TypeHandle nullableType)
Expand All @@ -1564,7 +1564,7 @@ void Nullable::CheckFieldOffsets(TypeHandle nullableType)

MethodTable* nullableMT = nullableType.GetMethodTable();

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

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/stackingallocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{
StackBlock *m_Next; // Next oldest block in list
DWORD_PTR m_Length; // Length of block excluding header (needs to be pointer-sized for alignment on IA64)
INDEBUG(Sentinel* m_Sentinel;) // insure that we don't fall of the end of the buffer
INDEBUG(Sentinel* m_Sentinel;) // ensure that we don't fall of the end of the buffer
INDEBUG(void** m_Pad;) // keep the size a multiple of 8
char *GetData() { return (char *)(this + 1);}
};
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/vm/threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ void Thread::InitThread()
// This message actually serves a purpose (which is why it is always run)
// The Stress log is run during hijacking, when other threads can be suspended
// at arbitrary locations (including when holding a lock that NT uses to serialize
// all memory allocations). By sending a message now, we insure that the stress
// all memory allocations). By sending a message now, we ensure that the stress
// log will not allocate memory at these critical times an avoid deadlock.
STRESS_LOG2(LF_ALWAYS, LL_ALWAYS, "SetupThread managed Thread %p Thread Id = %x\n", this, GetThreadId());

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

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

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

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

if (pFrame->GetReturnAddress() != 0)
{
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/threads.h
Original file line number Diff line number Diff line change
Expand Up @@ -3188,7 +3188,7 @@ class Thread
#endif // HOST_64BIT

// For debugging, you may want to make this number very large, (8K)
// should basically insure that no collisions happen
// should basically ensure that no collisions happen
#define OBJREF_TABSIZE 256
DWORD_PTR dangerousObjRefs[OBJREF_TABSIZE]; // Really objectRefs with lower bit stolen
// m_allObjRefEntriesBad is TRUE iff dangerousObjRefs are all marked as GC happened
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ Typical Baggage usage includes adding a few baggage properties and enumeration t
`TimeSpan Duration { get; private set; }` - Represents Activity duration if activity was stopped, TimeSpan.Zero otherwise.

### Id
`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.
`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.
Id is passed to external dependencies and considered as [ParentId](#parentid) for new external activity.

### ParentId
Expand Down
Loading

0 comments on commit be959e8

Please sign in to comment.