summaryrefslogtreecommitdiff
path: root/src/jit/compiler.hpp
diff options
context:
space:
mode:
authorSergey Andreenko <seandree@microsoft.com>2017-10-16 19:46:37 -0700
committerSergey Andreenko <seandree@microsoft.com>2017-10-17 10:57:05 -0700
commitd17bce2d3404af1ac0125bfeca0bacc0ee6bccaa (patch)
tree51d84f724db404f8d6ad21e97c9d84fac261ec41 /src/jit/compiler.hpp
parent944bbe448173082b907972e0bd01ffd57e10e5c3 (diff)
downloadcoreclr-d17bce2d3404af1ac0125bfeca0bacc0ee6bccaa.tar.gz
coreclr-d17bce2d3404af1ac0125bfeca0bacc0ee6bccaa.tar.bz2
coreclr-d17bce2d3404af1ac0125bfeca0bacc0ee6bccaa.zip
move ReplaceWith to cpp
to make DEBUG_DESTROY_NODE visible.
Diffstat (limited to 'src/jit/compiler.hpp')
-rw-r--r--src/jit/compiler.hpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/jit/compiler.hpp b/src/jit/compiler.hpp
index 7263718388..4007b4aaaa 100644
--- a/src/jit/compiler.hpp
+++ b/src/jit/compiler.hpp
@@ -1456,45 +1456,6 @@ inline void GenTree::SetOper(genTreeOps oper, ValueNumberUpdate vnUpdate)
}
}
-//------------------------------------------------------------------------
-// ReplaceWith: replace this with the src node. The source must be an isolated node
-// and cannot be used after the replacement.
-//
-// Arguments:
-// src - source tree, that replaces this.
-// comp - the compiler instance to transfer annotations for arrays.
-//
-inline void GenTree::ReplaceWith(GenTree* src, Compiler* comp)
-{
- // The source may be big only if the target is also a big node
- assert((gtDebugFlags & GTF_DEBUG_NODE_LARGE) || GenTree::s_gtNodeSizes[src->gtOper] == TREE_NODE_SZ_SMALL);
-
- // The check is effective only if nodes have been already threaded.
- assert((src->gtPrev == nullptr) && (src->gtNext == nullptr));
-
- RecordOperBashing(OperGet(), src->OperGet()); // nop unless NODEBASH_STATS is enabled
-
- GenTreePtr prev = gtPrev;
- GenTreePtr next = gtNext;
- // The VTable pointer is copied intentionally here
- memcpy((void*)this, (void*)src, src->GetNodeSize());
- this->gtPrev = prev;
- this->gtNext = next;
-
-#ifdef DEBUG
- gtSeqNum = 0;
-#endif
- // Transfer any annotations.
- if (src->OperGet() == GT_IND && src->gtFlags & GTF_IND_ARR_INDEX)
- {
- ArrayInfo arrInfo;
- bool b = comp->GetArrayInfoMap()->Lookup(src, &arrInfo);
- assert(b);
- comp->GetArrayInfoMap()->Set(this, arrInfo);
- }
- DEBUG_DESTROY_NODE(src);
-}
-
inline GenTreePtr Compiler::gtNewCastNode(var_types typ, GenTreePtr op1, var_types castType)
{
GenTreePtr res = new (this, GT_CAST) GenTreeCast(typ, op1, castType);