Skip to content

Commit

Permalink
Delete INVALID_POINTER_VALUE.
Browse files Browse the repository at this point in the history
I would like to remove it because:
1) it was debug only;
2) there were no null checks for `compHndBBtab`, because it is a dependent variable
so there was no need to ditinguish valid null pointer from a bad invalid pointer;
3) that is the only place where this mechanism was used.
  • Loading branch information
Sergey Andreenko committed Mar 27, 2020
1 parent 8347f1c commit c9ee223
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions src/coreclr/src/jit/jit.h
Original file line number Diff line number Diff line change
Expand Up @@ -762,12 +762,6 @@ extern int jitNativeCode(CORINFO_METHOD_HANDLE methodHnd,
JitFlags* compileFlags,
void* inlineInfoPtr);

#ifdef HOST_64BIT
const size_t INVALID_POINTER_VALUE = 0xFEEDFACEABADF00D;
#else
const size_t INVALID_POINTER_VALUE = 0xFEEDFACE;
#endif

// Constants for making sure size_t fit into smaller types.
const size_t MAX_USHORT_SIZE_T = static_cast<size_t>(static_cast<unsigned short>(-1));
const size_t MAX_UNSIGNED_SIZE_T = static_cast<size_t>(static_cast<unsigned>(-1));
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/jit/jiteh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,7 @@ void Compiler::fgRemoveEHTableEntry(unsigned XTnum)
if (compHndBBtabCount == 0)
{
// No more entries remaining.
INDEBUG(compHndBBtab = (EHblkDsc*)INVALID_POINTER_VALUE;)
compHndBBtab = nullptr;
}
else
{
Expand Down

0 comments on commit c9ee223

Please sign in to comment.