Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup some dead code #110579

Merged
merged 4 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/coreclr/inc/clr/fs.h

This file was deleted.

4 changes: 0 additions & 4 deletions src/coreclr/inc/clr/fs/path.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@

#include "clrtypes.h"

#include "strsafe.h"

#include "clr/str.h"

namespace clr
{
namespace fs
Expand Down
27 changes: 0 additions & 27 deletions src/coreclr/inc/clr/str.h

This file was deleted.

54 changes: 0 additions & 54 deletions src/coreclr/pal/src/include/pal/misc.h

This file was deleted.

1 change: 0 additions & 1 deletion src/coreclr/pal/src/init/pal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ SET_DEFAULT_DEBUG_CHANNEL(PAL); // some headers have code with asserts, so do th
#include "../thread/procprivate.hpp"
#include "pal/module.h"
#include "pal/virtual.h"
#include "pal/misc.h"
#include "pal/environ.h"
#include "pal/utils.h"
#include "pal/debug.h"
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/pal/src/misc/fmtmessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Revision History:
#include "pal/dbgmsg.h"
#include "pal/critsect.h"
#include "pal/module.h"
#include "pal/misc.h"

#include "errorstrings.h"

Expand Down
1 change: 0 additions & 1 deletion src/coreclr/pal/src/misc/perftrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Module Name:
#include "pal/perftrace.h"
#include "pal/dbgmsg.h"
#include "pal/cruntime.h"
#include "pal/misc.h"

/* Standard headers */
#include <stdio.h>
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/pal/src/misc/time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Module Name:

#include "pal/palinternal.h"
#include "pal/dbgmsg.h"
#include "pal/misc.h"

#include <time.h>
#include <sys/time.h>
Expand Down
56 changes: 0 additions & 56 deletions src/coreclr/vm/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1889,62 +1889,6 @@ int __cdecl stricmpUTF8(const char* szStr1, const char* szStr2)
}

#ifndef DACCESS_COMPILE
//
//
// COMCharacter and Helper functions
//
//

#ifndef TARGET_UNIX
/*============================GetCharacterInfoHelper============================
**Determines character type info (digit, whitespace, etc) for the given char.
**Args: c is the character on which to operate.
** CharInfoType is one of CT_CTYPE1, CT_CTYPE2, CT_CTYPE3 and specifies the type
** of information being requested.
**Returns: The bitmask returned by GetStringTypeEx. The caller needs to know
** how to interpret this.
**Exceptions: ArgumentException if GetStringTypeEx fails.
==============================================================================*/
INT32 GetCharacterInfoHelper(WCHAR c, INT32 CharInfoType)
{
WRAPPER_NO_CONTRACT;

unsigned short result=0;
if (!GetStringTypeEx(LOCALE_USER_DEFAULT, CharInfoType, &(c), 1, &result)) {
_ASSERTE(!"This should not happen, verify the arguments passed to GetStringTypeEx()");
}
return(INT32)result;
}
#endif // !TARGET_UNIX

/*==============================nativeIsWhiteSpace==============================
**The locally available version of IsWhiteSpace. Designed to be called by other
**native methods. The work is mostly done by GetCharacterInfoHelper
**Args: c -- the character to check.
**Returns: true if c is whitespace, false otherwise.
**Exceptions: Only those thrown by GetCharacterInfoHelper.
==============================================================================*/
BOOL COMCharacter::nativeIsWhiteSpace(WCHAR c)
{
WRAPPER_NO_CONTRACT;

#ifndef TARGET_UNIX
if (c <= (WCHAR) 0x7F) // common case
{
BOOL result = (c == ' ') || (c == '\r') || (c == '\n') || (c == '\t') || (c == '\f') || (c == (WCHAR) 0x0B);

ASSERT(result == ((GetCharacterInfoHelper(c, CT_CTYPE1) & C1_SPACE)!=0));

return result;
}

// GetCharacterInfoHelper costs around 160 instructions
return((GetCharacterInfoHelper(c, CT_CTYPE1) & C1_SPACE)!=0);
#else // !TARGET_UNIX
return iswspace(c);
#endif // !TARGET_UNIX
}

BOOL RuntimeFileNotFound(HRESULT hr)
{
LIMITED_METHOD_CONTRACT;
Expand Down
18 changes: 0 additions & 18 deletions src/coreclr/vm/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@
#include "posterror.h"
#include <type_traits>

// Hot cache lines need to be aligned to cache line size to improve performance
#if defined(TARGET_ARM64)
#define MAX_CACHE_LINE_SIZE 128
#else
#define MAX_CACHE_LINE_SIZE 64
#endif

#ifndef DACCESS_COMPILE
#if defined(TARGET_WINDOWS) && defined(TARGET_ARM64)
// Flag to check if atomics feature is available on
Expand Down Expand Up @@ -800,17 +793,6 @@ BOOL DbgIsExecutable(LPVOID lpMem, SIZE_T length);

int GetRandomInt(int maxVal);

//
//
// COMCHARACTER
//
//
class COMCharacter {
public:
//These are here for support from native code. They are never called from our managed classes.
static BOOL nativeIsWhiteSpace(WCHAR c);
};

// ======================================================================================
// Simple, reusable 100ns timer for normalizing ticks. For use in Q/FCalls to avoid discrepency with
// tick frequency between native and managed.
Expand Down
Loading