diff options
author | Jan Kotas <jkotas@microsoft.com> | 2018-11-28 18:18:04 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 18:18:04 -0800 |
commit | b6d47b3a1b5b05c25968701615707e381f35a7ce (patch) | |
tree | 33056aabf9b36b2fbfd7d91218bd0a6fa3ff2cf3 /src/palrt | |
parent | e7ead79fedc52e17f2cf9befd5c0f5091d70f909 (diff) | |
download | coreclr-b6d47b3a1b5b05c25968701615707e381f35a7ce.tar.gz coreclr-b6d47b3a1b5b05c25968701615707e381f35a7ce.tar.bz2 coreclr-b6d47b3a1b5b05c25968701615707e381f35a7ce.zip |
Delete code related to LoaderOptimization and SharedDomain (#21031)
Diffstat (limited to 'src/palrt')
-rw-r--r-- | src/palrt/convert.h | 126 | ||||
-rw-r--r-- | src/palrt/shstr.h | 138 |
2 files changed, 0 insertions, 264 deletions
diff --git a/src/palrt/convert.h b/src/palrt/convert.h deleted file mode 100644 index 8e3a9d4903..0000000000 --- a/src/palrt/convert.h +++ /dev/null @@ -1,126 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -// -// =========================================================================== -// File: convert.h -// -// =========================================================================== - -/*** -*Purpose: -* Common header (shared by convert.cpp and decimal.cpp) for numeric -* conversions and other math stuff. -* -*Revision History: -* -* -* -*Implementation Notes: -* -*****************************************************************************/ - -#ifndef _CONVERT_H_ /* { */ -#define _CONVERT_H_ - -//*********************************************************************** -// -// Structures -// - -typedef union{ - struct { -#if BIGENDIAN - ULONG sign:1; - ULONG exp:11; - ULONG mantHi:20; - ULONG mantLo; -#else // BIGENDIAN - ULONG mantLo; - ULONG mantHi:20; - ULONG exp:11; - ULONG sign:1; -#endif - } u; - double dbl; -} DBLSTRUCT; - -// Intializer for a DBLSTRUCT -#if BIGENDIAN -#define DEFDS(Lo, Hi, exp, sign) { {sign, exp, Hi, Lo } } -#else -#define DEFDS(Lo, Hi, exp, sign) { {Lo, Hi, exp, sign} } -#endif - - -typedef struct { -#if BIGENDIAN - ULONG sign:1; - ULONG exp:8; - ULONG mant:23; -#else - ULONG mant:23; - ULONG exp:8; - ULONG sign:1; -#endif -} SNGSTRUCT; - - - -typedef union { - DWORDLONG int64; - struct { -#ifdef BIGENDIAN - ULONG Hi; - ULONG Lo; -#else - ULONG Lo; - ULONG Hi; -#endif - } u; -} SPLIT64; - - - -//*********************************************************************** -// -// Constants -// - -static const ULONG ulTenToTenDiv4 = 2500000000U; -static const ULONG ulTenToNine = 1000000000U; - -//*********************************************************************** -// -// Inlines for Decimal -// - - -#ifndef UInt32x32To64 -#define UInt32x32To64(a, b) ((DWORDLONG)((DWORD)(a)) * (DWORDLONG)((DWORD)(b))) -#endif - -#define Div64by32(num, den) ((ULONG)((DWORDLONG)(num) / (ULONG)(den))) -#define Mod64by32(num, den) ((ULONG)((DWORDLONG)(num) % (ULONG)(den))) - -inline DWORDLONG DivMod32by32(ULONG num, ULONG den) -{ - SPLIT64 sdl; - - sdl.u.Lo = num / den; - sdl.u.Hi = num % den; - return sdl.int64; -} - -inline DWORDLONG DivMod64by32(DWORDLONG num, ULONG den) -{ - SPLIT64 sdl; - - sdl.u.Lo = Div64by32(num, den); - sdl.u.Hi = Mod64by32(num, den); - return sdl.int64; -} - -#endif /* } _CONVERT_H_ */ diff --git a/src/palrt/shstr.h b/src/palrt/shstr.h deleted file mode 100644 index 64d2c22a98..0000000000 --- a/src/palrt/shstr.h +++ /dev/null @@ -1,138 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -// -// =========================================================================== -// File: shstr.h -// -// ShStr class ported from shlwapi for urlpars.cpp (especially for Fusion) -// =========================================================================== - -#ifndef _SHSTR_H_ - -// default shstr to something small, so we don't waste too much stack space -// MAX_PATH is used frequently, so we'd like to a factor of that - so that -// if we do grow to MAX_PATH size, we don't waste any extra. -#define DEFAULT_SHSTR_LENGTH (MAX_PATH_FNAME/4) - - -#ifdef UNICODE -#define ShStr ShStrW -#define UrlStr UrlStrW -#endif //UNICODE - - -class ShStrW -{ -public: - - // - // Constructors - // - ShStrW(); - - // - // Destructor - // - ~ShStrW() - {Reset();} - - // - // the first are the only ones that count - // - HRESULT SetStr(LPCSTR pszStr, DWORD cchStr); - HRESULT SetStr(LPCSTR pszStr); - HRESULT SetStr(LPCWSTR pwszStr, DWORD cchStr); - - // the rest just call into the first three - HRESULT SetStr(LPCWSTR pwszStr) - {return SetStr(pwszStr, (DWORD) -1);} - HRESULT SetStr(ShStrW &shstr) - {return SetStr(shstr._pszStr);} - - - ShStrW& operator=(LPCSTR pszStr) - {SetStr(pszStr); return *this;} - ShStrW& operator=(LPCWSTR pwszStr) - {SetStr(pwszStr); return *this;} - ShStrW& operator=(ShStrW &shstr) - {SetStr(shstr._pszStr); return *this;} - - - LPCWSTR GetStr() - {return _pszStr;} - operator LPCWSTR() - {return _pszStr;} - - LPWSTR GetInplaceStr(void) - {return _pszStr;} - - // People want to play with the bytes in OUR internal buffer. If they - // call us correctly, and assume that the resulting pointer is only valid - // as far as they want or as far as the current length, then let them. - LPWSTR GetModifyableStr(DWORD cchSizeToModify) - { - if (cchSizeToModify > _cchSize) - if (FAILED(SetSize(cchSizeToModify))) - return NULL; - return _pszStr; - } - - HRESULT Append(LPCWSTR pszStr, DWORD cchStr); - HRESULT Append(LPCWSTR pszStr) - {return Append(pszStr, (DWORD) -1);} - HRESULT Append(WCHAR ch) - {return Append(&ch, 1);} - - - VOID Reset(); - -#ifdef DEBUG - BOOL IsValid(); -#else - BOOL IsValid() - {return (BOOL) (_pszStr ? TRUE : FALSE);} -#endif //DEBUG - - DWORD GetSize() - {ASSERT(!(_cchSize % DEFAULT_SHSTR_LENGTH)); return (_pszStr ? _cchSize : 0);} - - HRESULT SetSize(DWORD cchSize); - DWORD GetLen() - {return lstrlenW(_pszStr);} - - - -protected: -// friend UrlStr; -/* - TCHAR GetAt(DWORD cch) - {return cch < _cchSize ? _pszStr[cch] : TEXT('\0');} - TCHAR SetAt(TCHAR ch, DWORD cch) - {return cch < _cchSize ? _pszStr[cch] = ch : TEXT('\0');} -*/ -private: - - HRESULT _SetStr(LPCSTR psz); - HRESULT _SetStr(LPCSTR psz, DWORD cb); - HRESULT _SetStr(LPCWSTR pwszStr, DWORD cchStr); - - WCHAR _szDefaultBuffer[DEFAULT_SHSTR_LENGTH]; - LPWSTR _pszStr; - DWORD _cchSize; - - -}; //ShStrW - -#ifdef UNICODE -typedef ShStrW SHSTR; -typedef ShStrW *PSHSTR; -#endif //UNICODE - -typedef ShStrW SHSTRW; -typedef ShStrW *PSHSTRW; - - -#endif // _SHSTR_H_ |