Removed duplicates/unused code from src\jit\jitstd. (#1272)
authorDmitriy Maksimov <Dmitriy.Maksimov@gmail.com>
Mon, 6 Jan 2020 19:25:42 +0000 (05:25 +1000)
committerBruce Forstall <brucefo@microsoft.com>
Mon, 6 Jan 2020 19:25:42 +0000 (11:25 -0800)
make_signed/make_unsigned moved to clr_std/type_traits.
Removed pair.h and type_traits.h

Fix #27557

19 files changed:
src/coreclr/src/inc/clr_std/type_traits
src/coreclr/src/jit/arraystack.h
src/coreclr/src/jit/assertionprop.cpp
src/coreclr/src/jit/block.cpp
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/jithashtable.h
src/coreclr/src/jit/jitstd.h
src/coreclr/src/jit/jitstd/algorithm.h
src/coreclr/src/jit/jitstd/functional.h
src/coreclr/src/jit/jitstd/list.h
src/coreclr/src/jit/jitstd/pair.h [deleted file]
src/coreclr/src/jit/jitstd/type_traits.h [deleted file]
src/coreclr/src/jit/jitstd/utility.h
src/coreclr/src/jit/jitstd/vector.h
src/coreclr/src/jit/rangecheck.cpp
src/coreclr/src/jit/ssabuilder.h
src/coreclr/src/jit/ssarenamestate.h
src/coreclr/src/jit/utils.cpp
src/coreclr/src/jit/valuenum.cpp

index 5001038..334c53b 100644 (file)
@@ -187,6 +187,70 @@ namespace std
     };
 
     //-----------------------------------------------------------------------------------------
+    // TEMPLATE CLASS make_unsigned
+    template<typename Type1>
+    struct make_unsigned
+    {
+    };
+
+    template<>
+    struct make_unsigned<int>
+    {
+        typedef unsigned int type;
+    };
+
+#ifndef PLATFORM_UNIX
+
+    template<>
+    struct make_unsigned<long>
+    {
+        typedef unsigned long type;
+    };
+
+#endif // !PLATFORM_UNIX
+
+    template<>
+    struct make_unsigned<__int64>
+    {
+        typedef unsigned __int64 type;
+    };
+
+    template<>
+    struct make_unsigned<size_t>
+    {
+        typedef size_t type;
+    };
+
+    //-----------------------------------------------------------------------------------------
+    // TEMPLATE CLASS make_signed
+    template<typename Type1>
+    struct make_signed
+    {
+    };
+
+    template<>
+    struct make_signed<unsigned int>
+    {
+        typedef signed int type;
+    };
+
+#ifndef PLATFORM_UNIX
+
+    template<>
+    struct make_signed<unsigned long>
+    {
+        typedef signed long type;
+    };
+
+#endif // !PLATFORM_UNIX
+
+    template<>
+    struct make_signed<unsigned __int64>
+    {
+        typedef signed __int64 type;
+    };
+
+    //-----------------------------------------------------------------------------------------
     // TEMPLATE CLASS is_lvalue_reference
     template<class _Ty>
     struct is_lvalue_reference
index 76268ac..5b62ce6 100644 (file)
@@ -46,7 +46,7 @@ public:
             Realloc();
         }
 
-        new (&data[tosIndex], jitstd::placement_t()) T(jitstd::forward<Args>(args)...);
+        new (&data[tosIndex], jitstd::placement_t()) T(std::forward<Args>(args)...);
         tosIndex++;
     }
 
index b610048..e50b127 100644 (file)
@@ -1938,7 +1938,7 @@ AssertionInfo Compiler::optAssertionGenJtrue(GenTree* tree)
     // Check for op1 or op2 to be lcl var and if so, keep it in op1.
     if ((op1->gtOper != GT_LCL_VAR) && (op2->gtOper == GT_LCL_VAR))
     {
-        jitstd::swap(op1, op2);
+        std::swap(op1, op2);
     }
     // If op1 is lcl and op2 is const or lcl, create assertion.
     if ((op1->gtOper == GT_LCL_VAR) &&
@@ -1951,7 +1951,7 @@ AssertionInfo Compiler::optAssertionGenJtrue(GenTree* tree)
     if (((op1->gtOper != GT_IND) || (op1->AsOp()->gtOp1->gtOper != GT_LCL_VAR)) &&
         ((op2->gtOper == GT_IND) && (op2->AsOp()->gtOp1->gtOper == GT_LCL_VAR)))
     {
-        jitstd::swap(op1, op2);
+        std::swap(op1, op2);
     }
     // If op1 is ind, then extract op1's oper.
     if ((op1->gtOper == GT_IND) && (op1->AsOp()->gtOp1->gtOper == GT_LCL_VAR))
@@ -1962,7 +1962,7 @@ AssertionInfo Compiler::optAssertionGenJtrue(GenTree* tree)
     // Look for a call to an IsInstanceOf helper compared to a nullptr
     if ((op2->gtOper != GT_CNS_INT) && (op1->gtOper == GT_CNS_INT))
     {
-        jitstd::swap(op1, op2);
+        std::swap(op1, op2);
     }
     // Validate op1 and op2
     if ((op1->gtOper != GT_CALL) || (op1->AsCall()->gtCallType != CT_HELPER) || (op1->TypeGet() != TYP_REF) || // op1
index 88f297d..62242d8 100644 (file)
@@ -40,8 +40,8 @@ flowList* ShuffleHelper(unsigned hash, flowList* res)
         {
             // Swap res with head.
             prev->flNext = head;
-            jitstd::swap(head->flNext, res->flNext);
-            jitstd::swap(head, res);
+            std::swap(head->flNext, res->flNext);
+            std::swap(head, res);
         }
     }
     return head;
index 1c8ff9a..3553133 100644 (file)
@@ -327,7 +327,7 @@ public:
         }
 
         unsigned ssaNum    = GetMinSsaNum() + m_count;
-        m_array[m_count++] = T(jitstd::forward<Args>(args)...);
+        m_array[m_count++] = T(std::forward<Args>(args)...);
 
         // Ensure that the first SSA number we allocate is SsaConfig::FIRST_SSA_NUM
         assert((ssaNum == SsaConfig::FIRST_SSA_NUM) || (m_count > 1));
index c186f87..2ae55f8 100644 (file)
@@ -308,7 +308,7 @@ public:
 
         if (n == nullptr)
         {
-            n = new (m_alloc) Node(m_table[index], k, jitstd::forward<Args>(args)...);
+            n = new (m_alloc) Node(m_table[index], k, std::forward<Args>(args)...);
 
             m_table[index] = n;
             m_tableCount++;
@@ -768,7 +768,7 @@ private:
         Value m_val;
 
         template <class... Args>
-        Node(Node* next, Key k, Args&&... args) : m_next(next), m_key(k), m_val(jitstd::forward<Args>(args)...)
+        Node(Node* next, Key k, Args&&... args) : m_next(next), m_key(k), m_val(std::forward<Args>(args)...)
         {
         }
 
index 5d89694..09095a3 100644 (file)
@@ -3,9 +3,6 @@
 // See the LICENSE file in the project root for more information.
 
 #include "allocator.h"
-#include "functional.h"
 #include "list.h"
-#include "pair.h"
-#include "type_traits.h"
 #include "utility.h"
 #include "vector.h"
index ef7204e..460bf08 100644 (file)
@@ -9,43 +9,6 @@
 namespace jitstd
 {
 
-template <typename InputIterator, typename CompareValue>
-InputIterator find(InputIterator first, InputIterator last,
-                   const CompareValue& value)
-{
-    for (; first != last; ++first)
-    {
-        if (*first == value)
-        {
-            return first;
-        }
-    }
-    return last;
-}
-
-template <typename InputIterator, typename Pred>
-InputIterator find_if(InputIterator first, InputIterator last, const Pred& pred)
-{
-    for (; first != last; ++first)
-    {
-        if (pred(*first))
-        {
-            return first;
-        }
-    }
-    return last;
-}
-
-template<typename InputIterator, typename Function>
-Function for_each(InputIterator first, InputIterator last, Function func)
-{
-    for (; first != last; ++first)
-    {
-        func(*first);
-    }
-    return func;
-}
-
 namespace
 {
 // Sort the elements in range [first, last] using insertion sort, an efficient alternative
@@ -109,16 +72,16 @@ void quick_sort(RandomAccessIterator first, RandomAccessIterator last, Less less
         // The usual median of 3 pivot, we'll have *first <= *pivot <= *last.
         if (less(*pivot, *first))
         {
-            swap(*pivot, *first);
+            std::swap(*pivot, *first);
         }
 
         if (less(*last, *pivot))
         {
-            swap(*pivot, *last);
+            std::swap(*pivot, *last);
 
             if (less(*pivot, *first))
             {
-                swap(*pivot, *first);
+                std::swap(*pivot, *first);
             }
         }
 
@@ -167,7 +130,7 @@ void quick_sort(RandomAccessIterator first, RandomAccessIterator last, Less less
 
             // We now have *newLast <= *pivot <= *newFirst so we need to swap
             // *newFirst and *newLast.
-            swap(*newFirst, *newLast);
+            std::swap(*newFirst, *newLast);
 
             // pivot is an iterator and not the actual value, if the value gets
             // swapped we need to update the iterator to point to the new place.
index 31456a8..f9d4592 100644 (file)
@@ -9,21 +9,6 @@
 namespace jitstd
 {
 
-template <typename T>
-void swap(T& a, T& b)
-{
-    T t(a);
-    a = b;
-    b = t;
-}
-
-template <typename Arg, typename Result>
-struct unary_function
-{
-    typedef Arg argument_type;
-    typedef Result result_type;
-};
-
 template <typename Arg1, typename Arg2, typename Result>
 struct binary_function
 {
@@ -41,22 +26,4 @@ struct greater : binary_function<T, T, bool>
     }
 };
 
-template <typename T>
-struct equal_to : binary_function<T, T, bool>
-{
-    bool operator()(const T& lhs, const T& rhs) const
-    {
-        return lhs == rhs;
-    }
-};
-
-template <typename T>
-struct identity : unary_function<T, T>
-{
-    const T& operator()(const T& op) const
-    {
-        return op;
-    }
-};
-
 } // end of namespace jitstd.
index 1120137..5f28bdf 100644 (file)
@@ -23,7 +23,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
 #include "iterator.h"
 #include "functional.h"
-#include "utility.h"
+#include "clr_std/utility"
 
 namespace jitstd
 {
@@ -261,7 +261,7 @@ private:
 
         template <class... Args>
         Node(Args&&... args)
-            : m_value(jitstd::forward<Args>(args)...)
+            : m_value(std::forward<Args>(args)...)
         {
         }
     };
@@ -482,7 +482,7 @@ template <typename... Args>
 typename list<T, Allocator>::iterator
     list<T, Allocator>::emplace(iterator position, Args&&... args)
 {
-    Node* pNewNode = new (m_nodeAllocator.allocate(1), placement_t()) Node(jitstd::forward<Args>(args)...);
+    Node* pNewNode = new (m_nodeAllocator.allocate(1), placement_t()) Node(std::forward<Args>(args)...);
     insert_new_node_helper(position.m_pNode, pNewNode);
     return iterator(pNewNode);
 }
@@ -611,7 +611,7 @@ template <typename T, typename Allocator>
 template <typename... Args>
 void list<T, Allocator>::emplace_back(Args&&... args)
 {
-    emplace(end(), jitstd::forward<Args>(args)...);
+    emplace(end(), std::forward<Args>(args)...);
 }
 
 template <typename T, typename Allocator>
@@ -624,7 +624,7 @@ template <typename T, typename Allocator>
 template <typename... Args>
 void list<T, Allocator>::emplace_front(Args&&... args)
 {
-    emplace(begin(), jitstd::forward<Args>(args)...);
+    emplace(begin(), std::forward<Args>(args)...);
 }
 
 template <typename T, typename Allocator>
@@ -705,9 +705,9 @@ void list<T, Allocator>::reverse()
 {
     for (Node* p = m_pHead; p != NULL; p = p->m_pNext)
     {
-        jitstd::swap(p->m_pPrev, p->m_pNext);
+        std::swap(p->m_pPrev, p->m_pNext);
     }
-    jitstd::swap(m_pHead, m_pTail);
+    std::swap(m_pHead, m_pTail);
 }
 
 template <typename T, typename Allocator>
@@ -757,11 +757,11 @@ void list<T, Allocator>::splice(iterator position, list& x, iterator first, iter
 template <typename T, typename Allocator>
 void list<T, Allocator>::swap(list<T, Allocator>& lst)
 {
-    jitstd::swap(lst.m_pHead, m_pHead);
-    jitstd::swap(lst.m_pTail, m_pTail);
-    jitstd::swap(lst.m_nSize, m_nSize);
-    jitstd::swap(lst.m_allocator, m_allocator);
-    jitstd::swap(lst.m_nodeAllocator, m_nodeAllocator);
+    std::swap(lst.m_pHead, m_pHead);
+    std::swap(lst.m_pTail, m_pTail);
+    std::swap(lst.m_nSize, m_nSize);
+    std::swap(lst.m_allocator, m_allocator);
+    std::swap(lst.m_nodeAllocator, m_nodeAllocator);
 }
 
 template <typename T, typename Allocator>
diff --git a/src/coreclr/src/jit/jitstd/pair.h b/src/coreclr/src/jit/jitstd/pair.h
deleted file mode 100644 (file)
index f306000..0000000
+++ /dev/null
@@ -1,57 +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.
-
-
-
-#pragma once
-
-namespace jitstd
-{
-template <typename Type1, typename Type2>
-class pair
-{
-public:
-    Type1 first;
-    Type2 second;
-
-    pair(const Type1& fst, const Type2& sec)
-        : first(fst)
-        , second(sec)
-    {
-    }
-
-    template <typename AltType1, typename AltType2>
-    pair(const AltType1& fst, const AltType2& sec)
-        : first((Type1) fst)
-        , second((Type2) sec)
-    {
-    }
-
-    template <typename AltType1, typename AltType2>
-    pair(const pair<AltType1, AltType2>& that)
-        : first((Type1) that.first)
-        , second((Type2) that.second)
-    {
-    }
-
-    pair(const pair& that)
-        : first(that.first)
-        , second(that.second)
-    {
-    }
-
-    template <typename AltType1, typename AltType2>
-    const pair<Type1, Type2>& operator=(const pair<AltType1, AltType2>& pair)
-    {
-        first = pair.first;
-        second = pair.second;
-        return *this;
-    }
-
-    bool operator==(const pair<Type1, Type2>& other) const
-    {
-        return (other.first == first && other.second == second);
-    }
-};
-}
diff --git a/src/coreclr/src/jit/jitstd/type_traits.h b/src/coreclr/src/jit/jitstd/type_traits.h
deleted file mode 100644 (file)
index cf690a5..0000000
+++ /dev/null
@@ -1,230 +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.
-
-
-#pragma once
-
-namespace jitstd
-{
-template <typename T>
-struct remove_const
-{
-    typedef T type;
-};
-
-template <typename T>
-struct remove_const<const T>
-{
-    typedef T type;
-};
-
-template <typename T>
-struct remove_volatile
-{
-    typedef T type;
-};
-
-template <typename T>
-struct remove_volatile<volatile T>
-{
-    typedef T type;
-};
-
-template <typename T>
-struct remove_cv : remove_const<typename remove_volatile<T>::type>
-{
-};
-
-template <typename T>
-struct remove_reference
-{
-    typedef T type;
-};
-
-template <typename T>
-struct remove_reference<T&>
-{
-    typedef T type;
-};
-
-template <typename T>
-struct remove_reference<T&&>
-{
-    typedef T type;
-};
-
-template <typename T>
-struct is_lvalue_reference
-{
-    enum { value = false };
-};
-
-template <typename T>
-struct is_lvalue_reference<T&>
-{
-    enum { value = true };
-};
-
-template <typename T>
-struct is_unqualified_pointer
-{
-    enum { value = false };
-};
-
-template <typename T>
-struct is_unqualified_pointer<T*>
-{
-    enum { value = true };
-};
-
-template <typename T>
-struct is_pointer : is_unqualified_pointer<typename remove_cv<T>::type>
-{
-};
-
-template <typename T>
-struct is_integral
-{
-    enum { value = false };
-};
-
-template<>
-struct is_integral<bool>
-{
-    enum { value = true };
-};
-
-template<>
-struct is_integral<char>
-{
-    enum { value = true };
-};
-
-template<>
-struct is_integral<unsigned char>
-{
-    enum { value = true };
-};
-
-template<>
-struct is_integral<signed char>
-{
-    enum { value = true };
-};
-
-template<>
-struct is_integral<unsigned short>
-{
-    enum { value = true };
-};
-
-template<>
-struct is_integral<signed short>
-{
-    enum { value = true };
-};
-
-template<>
-struct is_integral<unsigned int>
-{
-    enum { value = true };
-};
-
-template<>
-struct is_integral<signed int>
-{
-    enum { value = true };
-};
-
-template<>
-struct is_integral<unsigned __int64>
-{
-    enum { value = true };
-};
-
-template<>
-struct is_integral<signed __int64>
-{
-    enum { value = true };
-};
-
-
-template<bool Pred, typename Type1, typename Type2>
-struct conditional
-{
-};
-
-template<typename Type1, typename Type2>
-struct conditional<true, Type1, Type2>
-{
-    typedef Type1 type;
-};
-
-template<typename Type1, typename Type2>
-struct conditional<false, Type1, Type2>
-{
-    typedef Type2 type;
-};
-
-template<typename Type1>
-struct make_unsigned
-{
-};
-
-template<>
-struct make_unsigned<int>
-{
-    typedef unsigned int type;
-};
-
-#ifndef _HOST_UNIX_
-
-template<>
-struct make_unsigned<long>
-{
-    typedef unsigned long type;
-};
-
-#endif // !_HOST_UNIX_
-
-template<>
-struct make_unsigned<__int64>
-{
-    typedef unsigned __int64 type;
-};
-
-template<>
-struct make_unsigned<size_t>
-{
-    typedef size_t type;
-};
-
-template<typename Type1>
-struct make_signed
-{
-};
-
-template<>
-struct make_signed<unsigned int>
-{
-    typedef signed int type;
-};
-
-#ifndef _HOST_UNIX_
-
-template<>
-struct make_signed<unsigned long>
-{
-    typedef signed long type;
-};
-
-#endif // !_HOST_UNIX_
-
-template<>
-struct make_signed<unsigned __int64>
-{
-    typedef signed __int64 type;
-};
-
-} // namespace jitstd
index 3de6f32..119450e 100644 (file)
@@ -6,27 +6,11 @@
 
 #pragma once
 
-#include "pair.h"
-#include "type_traits.h"
+#include "clr_std/type_traits"
 
 namespace jitstd
 {
 
-template <typename T>
-inline
-T&& forward(typename jitstd::remove_reference<T>::type& arg)
-{
-    return static_cast<T&&>(arg);
-}
-
-template <typename T>
-inline
-T&& forward(typename jitstd::remove_reference<T>::type&& arg)
-{
-    static_assert(!jitstd::is_lvalue_reference<T>::value, "unexpected lvalue reference");
-    return static_cast<T&&>(arg);
-}
-
 namespace utility
 {
     // Template class for scoped execution of a lambda.
@@ -46,53 +30,6 @@ namespace utility
         scoped_code(const T& l) : l(l) { }
         ~scoped_code() { l(); }
     };
-
-
-    // Ensures that "wset" is the union of the initial state of "wset" and "rset".
-    // Elements from "rset" that were not in "wset" are added to "cset."
-    template <typename Set>
-    bool set_union(Set& wset, const Set& rset, Set& cset)
-    {
-        bool change = false;
-        for (typename Set::const_iterator i = rset.begin(); i != rset.end(); ++i)
-        {
-            jitstd::pair<typename Set::iterator, bool> result = wset.insert(*i);
-            if (result.second)
-            {
-                change = true;
-                cset.insert(*i);
-            }
-        }
-        return change;
-    }
-
-    template <typename Set>
-    bool set_union(Set& wset, const Set& rset)
-    {
-        bool change = false;
-        for (typename Set::const_iterator i = rset.begin(); i != rset.end(); ++i)
-        {
-            jitstd::pair<typename Set::iterator, bool> result = wset.insert(*i);
-            change |= result.second;
-        }
-        return change;
-    }
-
-    template <typename Set>
-    bool set_difference(Set& wset, const Set& rset)
-    {
-        bool change = false;
-        for (typename Set::const_iterator i = rset.begin(); i != rset.end(); ++i)
-        {
-            if (wset.find(*i) != wset.end())
-            {
-                wset.erase(*i);
-                change = true;
-            }
-        }
-
-        return change;
-    }
 } // end of namespace utility.
 
 } // end of namespace jitstd.
index ff37141..9ffde55 100644 (file)
@@ -679,11 +679,11 @@ typename vector<T, Allocator>::size_type vector<T, Allocator>::size() const
 template <typename T, typename Allocator>
 void vector<T, Allocator>::swap(vector<T, Allocator>& vec)
 {
-    jitstd::swap(m_pArray, vec.m_pArray);
-    jitstd::swap(m_nSize, vec.m_nSize);
-    jitstd::swap(m_nCapacity, vec.m_nCapacity);
-    jitstd::swap(m_nCapacity, vec.m_nCapacity);
-    jitstd::swap(m_allocator, vec.m_allocator);
+    std::swap(m_pArray, vec.m_pArray);
+    std::swap(m_nSize, vec.m_nSize);
+    std::swap(m_nCapacity, vec.m_nCapacity);
+    std::swap(m_nCapacity, vec.m_nCapacity);
+    std::swap(m_allocator, vec.m_allocator);
 }
 
 // =======================================================================================
index ce2b2a6..022df50 100644 (file)
@@ -334,7 +334,7 @@ bool RangeCheck::IsBinOpMonotonicallyIncreasing(GenTreeOp* binop)
     // Check if we have a var + const.
     if (op2->OperGet() == GT_LCL_VAR)
     {
-        jitstd::swap(op1, op2);
+        std::swap(op1, op2);
     }
     if (op1->OperGet() != GT_LCL_VAR)
     {
index b15c5cf..5bdc752 100644 (file)
@@ -11,7 +11,7 @@
 typedef int LclVarNum;
 
 // Pair of a local var name eg: V01 and Ssa number; eg: V01_01
-typedef jitstd::pair<LclVarNum, int> SsaVarName;
+typedef std::pair<LclVarNum, int> SsaVarName;
 
 class SsaBuilder
 {
index bf7dac1..5edc200 100644 (file)
@@ -107,7 +107,7 @@ private:
             stack = m_alloc.allocate<StackNode>(1);
         }
 
-        return new (stack, jitstd::placement_t()) StackNode(jitstd::forward<Args>(args)...);
+        return new (stack, jitstd::placement_t()) StackNode(std::forward<Args>(args)...);
     }
 
     // Push a SSA number onto a stack
index 630d996..427544f 100644 (file)
@@ -2200,7 +2200,7 @@ T GetUnsignedMagic(T d, bool* add /*out*/, int* shift /*out*/)
         return magic->magic;
     }
 
-    typedef typename jitstd::make_signed<T>::type ST;
+    typedef typename std::make_signed<T>::type ST;
 
     const unsigned bits       = sizeof(T) * 8;
     const unsigned bitsMinus1 = bits - 1;
@@ -2355,7 +2355,7 @@ T GetSignedMagic(T denom, int* shift /*out*/)
     const int bits         = sizeof(T) * 8;
     const int bits_minus_1 = bits - 1;
 
-    typedef typename jitstd::make_unsigned<T>::type UT;
+    typedef typename std::make_unsigned<T>::type UT;
 
     const UT two_nminus1 = UT(1) << bits_minus_1;
 
index e1ea75c..0b72dde 100644 (file)
@@ -634,7 +634,7 @@ float ValueNumStore::EvalOpSpecialized<float>(VNFunc vnf, float v0, float v1)
 template <typename T>
 T ValueNumStore::EvalOpSpecialized(VNFunc vnf, T v0, T v1)
 {
-    typedef typename jitstd::make_unsigned<T>::type UT;
+    typedef typename std::make_unsigned<T>::type UT;
 
     assert((sizeof(T) == 4) || (sizeof(T) == 8));
 
@@ -853,7 +853,7 @@ int ValueNumStore::EvalComparison<float>(VNFunc vnf, float v0, float v1)
 template <typename T>
 int ValueNumStore::EvalComparison(VNFunc vnf, T v0, T v1)
 {
-    typedef typename jitstd::make_unsigned<T>::type UT;
+    typedef typename std::make_unsigned<T>::type UT;
 
     // Here we handle the compare ops that are the same for all integer types.
     if (vnf < VNF_Boundary)
@@ -1956,7 +1956,7 @@ ValueNum ValueNumStore::VNForFunc(var_types typ, VNFunc func, ValueNum arg0VN, V
         // Order arg0 arg1 by numerical VN value.
         if (arg0VN > arg1VN)
         {
-            jitstd::swap(arg0VN, arg1VN);
+            std::swap(arg0VN, arg1VN);
         }
     }