summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimunkin <[email protected]>2025-09-08 14:07:08 +0300
committerimunkin <[email protected]>2025-09-08 14:44:31 +0300
commit8733bea995aa241e78baff8762032ac6a2468be6 (patch)
treeaa6ddb1289972db6a9d31d40b3689417b2d11b4f
parentb549ff529c1d8c90af438ffd2fcc8b1d5c6e3713 (diff)
YQL-19526: Purge UpdateLinks and DoUpdateLinks unused methods
commit_hash:43b40a73ee87080e26ea3be1d0ba95a94a01674f
-rw-r--r--yql/essentials/minikql/mkql_node.cpp337
-rw-r--r--yql/essentials/minikql/mkql_node.h50
2 files changed, 0 insertions, 387 deletions
diff --git a/yql/essentials/minikql/mkql_node.cpp b/yql/essentials/minikql/mkql_node.cpp
index febb4c89868..b4425e12f09 100644
--- a/yql/essentials/minikql/mkql_node.cpp
+++ b/yql/essentials/minikql/mkql_node.cpp
@@ -258,24 +258,6 @@ bool TNode::Equals(const TNode& nodeToCompare) const {
}
}
-void TNode::UpdateLinks(const THashMap<TNode*, TNode*>& links) {
- const auto kind = Type_->GetKind();
- switch (kind) {
- case TType::EKind::Type:
- return static_cast<TType&>(*this).UpdateLinks(links);
-
-#define APPLY(kind, type) \
- case TType::EKind::kind: \
- return static_cast<type&>(*this).DoUpdateLinks(links);
-
- LITERALS_LIST(APPLY)
-
-#undef APPLY
- default:
- Y_ABORT();
- }
-}
-
TNode* TNode::CloneOnCallableWrite(const TTypeEnvironment& env) const {
const auto kind = Type_->GetKind();
switch (kind) {
@@ -370,21 +352,6 @@ void TType::Accept(INodeVisitor& visitor) {
}
}
-void TType::UpdateLinks(const THashMap<TNode*, TNode*>& links) {
- switch (Kind) {
-
-#define APPLY(kind, type) \
- case EKind::kind: \
- return static_cast<type&>(*this).DoUpdateLinks(links);
-
- TYPES_LIST(APPLY)
-
-#undef APPLY
- default:
- Y_ABORT();
- }
-}
-
TNode* TType::CloneOnCallableWrite(const TTypeEnvironment& env) const {
switch (Kind) {
@@ -496,10 +463,6 @@ bool TTypeType::IsConvertableTo(const TTypeType& typeToCompare, bool ignoreTagge
return IsSameType(typeToCompare);
}
-void TTypeType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- Y_UNUSED(links);
-}
-
TNode* TTypeType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
Y_UNUSED(env);
return const_cast<TTypeType*>(this);
@@ -545,10 +508,6 @@ bool TDataType::IsConvertableTo(const TDataType& typeToCompare, bool ignoreTagge
return IsSameType(typeToCompare);
}
-void TDataType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- Y_UNUSED(links);
-}
-
TNode* TDataType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
Y_UNUSED(env);
return const_cast<TDataType*>(this);
@@ -594,15 +553,6 @@ TDataLiteral* TDataLiteral::Create(const NUdf::TUnboxedValuePod& value, TDataTyp
return ::new(env.Allocate<TDataLiteral>()) TDataLiteral(value, type);
}
-void TDataLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto typeIt = links.find(Type_);
- if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
- Y_DEBUG_ABORT_UNLESS(Type_->Equals(*newNode));
- Type_ = static_cast<TType*>(newNode);
- }
-}
-
TNode* TDataLiteral::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
Y_UNUSED(env);
return const_cast<TDataLiteral*>(this);
@@ -680,10 +630,6 @@ bool TPgType::IsConvertableTo(const TPgType& typeToCompare, bool ignoreTagged) c
return IsSameType(typeToCompare);
}
-void TPgType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- Y_UNUSED(links);
-}
-
TNode* TPgType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
Y_UNUSED(env);
return const_cast<TPgType*>(this);
@@ -785,18 +731,6 @@ bool TStructType::IsConvertableTo(const TStructType& typeToCompare, bool ignoreT
return true;
}
-void TStructType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- for (ui32 i = 0; i < MembersCount_; ++i) {
- auto& member = Members_[i];
- auto memberIt = links.find(member.second);
- if (memberIt != links.end()) {
- TNode* newNode = memberIt->second;
- Y_DEBUG_ABORT_UNLESS(member.second->Equals(*newNode));
- member.second = static_cast<TType*>(newNode);
- }
- }
-}
-
TNode* TStructType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
bool needClone = false;
for (ui32 i = 0; i < MembersCount_; ++i) {
@@ -901,25 +835,6 @@ TStructLiteral* TStructLiteral::Create(ui32 valuesCount, const TRuntimeNode* val
return ::new(env.Allocate<TStructLiteral>()) TStructLiteral(allocatedValues, type);
}
-void TStructLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto typeIt = links.find(Type_);
- if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
- Y_DEBUG_ABORT_UNLESS(Type_->Equals(*newNode));
- Type_ = static_cast<TType*>(newNode);
- }
-
- for (ui32 i = 0; i < GetValuesCount(); ++i) {
- auto& value = Values_[i];
- auto valueIt = links.find(value.GetNode());
- if (valueIt != links.end()) {
- TNode* newNode = valueIt->second;
- Y_DEBUG_ABORT_UNLESS(value.GetNode()->Equals(*newNode));
- value = TRuntimeNode(newNode, value.IsImmediate());
- }
- }
-}
-
TNode* TStructLiteral::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto typeNewNode = (TNode*)Type_->GetCookie();
bool needClone = false;
@@ -996,15 +911,6 @@ bool TListType::IsConvertableTo(const TListType& typeToCompare, bool ignoreTagge
return GetItemType()->IsConvertableTo(*typeToCompare.GetItemType(), ignoreTagged);
}
-void TListType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto itemTypeIt = links.find(GetItemType());
- if (itemTypeIt != links.end()) {
- TNode* newNode = itemTypeIt->second;
- Y_DEBUG_ABORT_UNLESS(GetItemType()->Equals(*newNode));
- Data_ = static_cast<TType*>(newNode);
- }
-}
-
TNode* TListType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newTypeNode = (TNode*)GetItemType()->GetCookie();
if (!newTypeNode)
@@ -1051,25 +957,6 @@ TListLiteral* TListLiteral::Create(TRuntimeNode* items, ui32 count, TListType* t
return ::new(env.Allocate<TListLiteral>()) TListLiteral(allocatedItems, count, type, env);
}
-void TListLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto typeIt = links.find(Type_);
- if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
- Y_DEBUG_ABORT_UNLESS(Type_->Equals(*newNode));
- Type_ = static_cast<TType*>(newNode);
- }
-
- for (ui32 i = 0; i < Count_; ++i) {
- auto& item = Items_[i];
- auto itemIt = links.find(item.GetNode());
- if (itemIt != links.end()) {
- TNode* newNode = itemIt->second;
- Y_DEBUG_ABORT_UNLESS(item.GetNode()->Equals(*newNode));
- item = TRuntimeNode(newNode, item.IsImmediate());
- }
- }
-}
-
TNode* TListLiteral::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newTypeNode = (TNode*)Type_->GetCookie();
bool needClone = false;
@@ -1171,15 +1058,6 @@ bool TStreamType::IsConvertableTo(const TStreamType& typeToCompare, bool ignoreT
return GetItemType()->IsConvertableTo(*typeToCompare.GetItemType(), ignoreTagged);
}
-void TStreamType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto itemTypeIt = links.find(GetItemType());
- if (itemTypeIt != links.end()) {
- TNode* newNode = itemTypeIt->second;
- Y_DEBUG_ABORT_UNLESS(GetItemType()->Equals(*newNode));
- Data_ = static_cast<TType*>(newNode);
- }
-}
-
TNode* TStreamType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newTypeNode = (TNode*)GetItemType()->GetCookie();
if (!newTypeNode)
@@ -1215,15 +1093,6 @@ bool TFlowType::IsConvertableTo(const TFlowType& typeToCompare, bool ignoreTagge
return GetItemType()->IsConvertableTo(*typeToCompare.GetItemType(), ignoreTagged);
}
-void TFlowType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto itemTypeIt = links.find(GetItemType());
- if (itemTypeIt != links.end()) {
- TNode* newNode = itemTypeIt->second;
- Y_DEBUG_ABORT_UNLESS(GetItemType()->Equals(*newNode));
- Data_ = static_cast<TType*>(newNode);
- }
-}
-
TNode* TFlowType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newTypeNode = (TNode*)GetItemType()->GetCookie();
if (!newTypeNode)
@@ -1259,15 +1128,6 @@ bool TOptionalType::IsConvertableTo(const TOptionalType& typeToCompare, bool ign
return GetItemType()->IsConvertableTo(*typeToCompare.GetItemType(), ignoreTagged);
}
-void TOptionalType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto itemTypeIt = links.find(GetItemType());
- if (itemTypeIt != links.end()) {
- TNode* newNode = itemTypeIt->second;
- Y_DEBUG_ABORT_UNLESS(GetItemType()->Equals(*newNode));
- Data_ = static_cast<TType*>(newNode);
- }
-}
-
TNode* TOptionalType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newTypeNode = (TNode*)GetItemType()->GetCookie();
if (!newTypeNode)
@@ -1303,15 +1163,6 @@ bool TTaggedType::IsConvertableTo(const TTaggedType& typeToCompare, bool ignoreT
return Tag_ == typeToCompare.Tag_ && GetBaseType()->IsConvertableTo(*typeToCompare.GetBaseType(), ignoreTagged);
}
-void TTaggedType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto itemTypeIt = links.find(GetBaseType());
- if (itemTypeIt != links.end()) {
- TNode* newNode = itemTypeIt->second;
- Y_DEBUG_ABORT_UNLESS(GetBaseType()->Equals(*newNode));
- BaseType_ = static_cast<TType*>(newNode);
- }
-}
-
TNode* TTaggedType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newTypeNode = (TNode*)GetBaseType()->GetCookie();
if (!newTypeNode)
@@ -1354,24 +1205,6 @@ TOptionalLiteral* TOptionalLiteral::Create(TRuntimeNode item, TOptionalType* typ
return ::new(env.Allocate<TOptionalLiteral>()) TOptionalLiteral(item, type);
}
-void TOptionalLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto typeIt = links.find(Type_);
- if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
- Y_DEBUG_ABORT_UNLESS(Type_->Equals(*newNode));
- Type_ = static_cast<TType*>(newNode);
- }
-
- if (Item_.GetNode()) {
- auto itemIt = links.find(Item_.GetNode());
- if (itemIt != links.end()) {
- TNode* newNode = itemIt->second;
- Y_DEBUG_ABORT_UNLESS(Item_.GetNode()->Equals(*newNode));
- Item_ = TRuntimeNode(newNode, Item_.IsImmediate());
- }
- }
-}
-
TNode* TOptionalLiteral::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newTypeNode = (TNode*)Type_->GetCookie();
auto newItemNode = Item_.GetNode() ? (TNode*)Item_.GetNode()->GetCookie() : nullptr;
@@ -1421,22 +1254,6 @@ bool TDictType::IsConvertableTo(const TDictType& typeToCompare, bool ignoreTagge
&& PayloadType_->IsConvertableTo(*typeToCompare.PayloadType_, ignoreTagged);
}
-void TDictType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto keyTypeIt = links.find(KeyType_);
- if (keyTypeIt != links.end()) {
- TNode* newNode = keyTypeIt->second;
- Y_DEBUG_ABORT_UNLESS(KeyType_->Equals(*newNode));
- KeyType_ = static_cast<TType*>(newNode);
- }
-
- auto payloadTypeIt = links.find(PayloadType_);
- if (payloadTypeIt != links.end()) {
- TNode* newNode = payloadTypeIt->second;
- Y_DEBUG_ABORT_UNLESS(PayloadType_->Equals(*newNode));
- PayloadType_ = static_cast<TType*>(newNode);
- }
-}
-
TNode* TDictType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newKeyType = (TNode*)KeyType_->GetCookie();
auto newPayloadType = (TNode*)PayloadType_->GetCookie();
@@ -1508,32 +1325,6 @@ TDictLiteral* TDictLiteral::Create(ui32 itemsCount, const std::pair<TRuntimeNode
return ::new(env.Allocate<TDictLiteral>()) TDictLiteral(itemsCount, allocatedItems, type);
}
-void TDictLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto typeIt = links.find(Type_);
- if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
- Y_DEBUG_ABORT_UNLESS(Type_->Equals(*newNode));
- Type_ = static_cast<TType*>(newNode);
- }
-
- for (ui32 i = 0; i < ItemsCount_; ++i) {
- auto& item = Items_[i];
- auto itemKeyIt = links.find(item.first.GetNode());
- if (itemKeyIt != links.end()) {
- TNode* newNode = itemKeyIt->second;
- Y_DEBUG_ABORT_UNLESS(item.first.GetNode()->Equals(*newNode));
- item.first = TRuntimeNode(newNode, item.first.IsImmediate());
- }
-
- auto itemPayloadIt = links.find(item.second.GetNode());
- if (itemPayloadIt != links.end()) {
- TNode* newNode = itemPayloadIt->second;
- Y_DEBUG_ABORT_UNLESS(item.second.GetNode()->Equals(*newNode));
- item.second = TRuntimeNode(newNode, item.second.IsImmediate());
- }
- }
-}
-
TNode* TDictLiteral::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newTypeNode = (TNode*)Type_->GetCookie();
bool needClone = false;
@@ -1738,34 +1529,6 @@ void TCallableType::SetOptionalArgumentsCount(ui32 count) {
}
}
-void TCallableType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto returnTypeIt = links.find(ReturnType_);
- if (returnTypeIt != links.end()) {
- TNode* newNode = returnTypeIt->second;
- Y_DEBUG_ABORT_UNLESS(ReturnType_->Equals(*newNode));
- ReturnType_ = static_cast<TType*>(newNode);
- }
-
- for (ui32 i = 0; i < ArgumentsCount_; ++i) {
- auto& arg = Arguments_[i];
- auto argIt = links.find(arg);
- if (argIt != links.end()) {
- TNode* newNode = argIt->second;
- Y_DEBUG_ABORT_UNLESS(arg->Equals(*newNode));
- arg = static_cast<TType*>(newNode);
- }
- }
-
- if (Payload_) {
- auto payloadIt = links.find(Payload_);
- if (payloadIt != links.end()) {
- TNode* newNode = payloadIt->second;
- Y_DEBUG_ABORT_UNLESS(Payload_->Equals(*newNode));
- Payload_ = newNode;
- }
- }
-}
-
TNode* TCallableType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newReturnTypeNode = (TNode*)ReturnType_->GetCookie();
auto newPayloadNode = Payload_ ? (TNode*)Payload_->GetCookie() : nullptr;
@@ -1864,34 +1627,6 @@ TCallable* TCallable::Create(TRuntimeNode result, TCallableType* type, const TTy
return ::new(env.Allocate<TCallable>()) TCallable(result, type);
}
-void TCallable::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto typeIt = links.find(Type_);
- if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
- Y_DEBUG_ABORT_UNLESS(Type_->Equals(*newNode));
- Type_ = static_cast<TType*>(newNode);
- }
-
- for (ui32 i = 0; i < InputsCount_; ++i) {
- auto& input = Inputs_[i];
- auto inputIt = links.find(input.GetNode());
- if (inputIt != links.end()) {
- TNode* newNode = inputIt->second;
- Y_DEBUG_ABORT_UNLESS(input.GetNode()->Equals(*newNode));
- input = TRuntimeNode(newNode, input.IsImmediate());
- }
- }
-
- if (Result_.GetNode()) {
- auto resultIt = links.find(Result_.GetNode());
- if (resultIt != links.end()) {
- TNode* newNode = resultIt->second;
- Y_DEBUG_ABORT_UNLESS(Result_.GetNode()->Equals(*newNode));
- Result_ = TRuntimeNode(newNode, Result_.IsImmediate());
- }
- }
-}
-
TNode* TCallable::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newTypeNode = (TNode*)Type_->GetCookie();
auto newResultNode = Result_.GetNode() ? (TNode*)Result_.GetNode()->GetCookie() : nullptr;
@@ -2056,10 +1791,6 @@ bool TAnyType::IsConvertableTo(const TAnyType& typeToCompare, bool ignoreTagged)
return IsSameType(typeToCompare);
}
-void TAnyType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- Y_UNUSED(links);
-}
-
TNode* TAnyType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
Y_UNUSED(env);
return const_cast<TAnyType*>(this);
@@ -2077,17 +1808,6 @@ TAny* TAny::Create(const TTypeEnvironment& env) {
return ::new(env.Allocate<TAny>()) TAny(env.GetAnyTypeLazy());
}
-void TAny::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- if (Item_.GetNode()) {
- auto itemIt = links.find(Item_.GetNode());
- if (itemIt != links.end()) {
- TNode* newNode = itemIt->second;
- Y_DEBUG_ABORT_UNLESS(Item_.GetNode()->Equals(*newNode));
- Item_ = TRuntimeNode(newNode, Item_.IsImmediate());
- }
- }
-}
-
TNode* TAny::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
if (!Item_.GetNode())
return const_cast<TAny*>(this);
@@ -2162,25 +1882,6 @@ TTupleLiteral* TTupleLiteral::Create(ui32 valuesCount, const TRuntimeNode* value
return ::new(env.Allocate<TTupleLiteral>()) TTupleLiteral(allocatedValues, type);
}
-void TTupleLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto typeIt = links.find(Type_);
- if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
- Y_DEBUG_ABORT_UNLESS(Type_->Equals(*newNode));
- Type_ = static_cast<TType*>(newNode);
- }
-
- for (ui32 i = 0; i < GetValuesCount(); ++i) {
- auto& value = Values_[i];
- auto valueIt = links.find(value.GetNode());
- if (valueIt != links.end()) {
- TNode* newNode = valueIt->second;
- Y_DEBUG_ABORT_UNLESS(value.GetNode()->Equals(*newNode));
- value = TRuntimeNode(newNode, value.IsImmediate());
- }
- }
-}
-
TNode* TTupleLiteral::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newTypeNode = (TNode*)Type_->GetCookie();
bool needClone = false;
@@ -2246,10 +1947,6 @@ bool TResourceType::IsConvertableTo(const TResourceType& typeToCompare, bool ign
return IsSameType(typeToCompare);
}
-void TResourceType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- Y_UNUSED(links);
-}
-
TNode* TResourceType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
Y_UNUSED(env);
return const_cast<TResourceType*>(this);
@@ -2295,15 +1992,6 @@ TVariantType::TVariantType(TType* underlyingType, const TTypeEnvironment& env, b
}
}
-void TVariantType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto itemTypeIt = links.find(GetUnderlyingType());
- if (itemTypeIt != links.end()) {
- TNode* newNode = itemTypeIt->second;
- Y_DEBUG_ABORT_UNLESS(GetUnderlyingType()->Equals(*newNode));
- Data_ = static_cast<TType*>(newNode);
- }
-}
-
TNode* TVariantType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newTypeNode = (TNode*)GetUnderlyingType()->GetCookie();
if (!newTypeNode) {
@@ -2350,22 +2038,6 @@ bool TVariantLiteral::Equals(const TVariantLiteral& nodeToCompare) const {
return Item_.GetNode()->Equals(*nodeToCompare.GetItem().GetNode());
}
-void TVariantLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- auto typeIt = links.find(Type_);
- if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
- Y_DEBUG_ABORT_UNLESS(Type_->Equals(*newNode));
- Type_ = static_cast<TType*>(newNode);
- }
-
- auto itemIt = links.find(Item_.GetNode());
- if (itemIt != links.end()) {
- TNode* newNode = itemIt->second;
- Y_DEBUG_ABORT_UNLESS(Item_.GetNode()->Equals(*newNode));
- Item_ = TRuntimeNode(newNode, Item_.IsImmediate());
- }
-}
-
TNode* TVariantLiteral::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newTypeNode = (TNode*)Type_->GetCookie();
auto newItemNode = (TNode*)Item_.GetNode()->GetCookie();
@@ -2407,15 +2079,6 @@ bool TBlockType::IsConvertableTo(const TBlockType& typeToCompare, bool ignoreTag
GetItemType()->IsConvertableTo(*typeToCompare.GetItemType(), ignoreTagged);
}
-void TBlockType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- const auto itemTypeIt = links.find(ItemType_);
- if (itemTypeIt != links.end()) {
- auto* newNode = itemTypeIt->second;
- Y_DEBUG_ABORT_UNLESS(ItemType_->Equals(*newNode));
- ItemType_ = static_cast<TType*>(newNode);
- }
-}
-
TNode* TBlockType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
auto newTypeNode = (TNode*)ItemType_->GetCookie();
if (!newTypeNode) {
diff --git a/yql/essentials/minikql/mkql_node.h b/yql/essentials/minikql/mkql_node.h
index abe346c98a6..36de67dd08b 100644
--- a/yql/essentials/minikql/mkql_node.h
+++ b/yql/essentials/minikql/mkql_node.h
@@ -108,7 +108,6 @@ public:
void Accept(INodeVisitor& visitor);
bool Equals(const TNode& nodeToCompare) const;
- void UpdateLinks(const THashMap<TNode*, TNode*>& links);
// replace map stored in cookies
TNode* CloneOnCallableWrite(const TTypeEnvironment& env) const;
void Freeze(const TTypeEnvironment& env);
@@ -208,7 +207,6 @@ public:
bool IsConvertableTo(const TType& typeToCompare, bool ignoreTagged = false) const;
void Accept(INodeVisitor& visitor);
- void UpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* CloneOnCallableWrite(const TTypeEnvironment& env) const;
void Freeze(const TTypeEnvironment& env);
bool IsPresortSupported() const {
@@ -233,7 +231,6 @@ private:
{
}
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -257,7 +254,6 @@ private:
: TType(SingularKind, type, true)
{}
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -289,7 +285,6 @@ private:
: TNode(GetTypeOfSingular<SingularKind>(env))
{}
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -523,7 +518,6 @@ public:
protected:
TDataType(NUdf::TDataTypeId schemeType, const TTypeEnvironment& env);
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -568,7 +562,6 @@ private:
using TNode::Equals;
bool Equals(const TDataLiteral& nodeToCompare) const;
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
};
@@ -594,7 +587,6 @@ public:
protected:
TPgType(ui32 typeId, const TTypeEnvironment& env);
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -663,7 +655,6 @@ public:
private:
TStructType(ui32 membersCount, std::pair<TInternName, TType*>* members, const TTypeEnvironment& env, bool validate = true);
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
static bool CalculatePresortSupport(ui32 membersCount, std::pair<TInternName, TType*>* members);
@@ -697,7 +688,6 @@ private:
using TNode::Equals;
bool Equals(const TStructLiteral& nodeToCompare) const;
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -728,7 +718,6 @@ public:
private:
TListType(TType* itemType, const TTypeEnvironment& env, bool validate = true);
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -759,7 +748,6 @@ private:
using TNode::Equals;
bool Equals(const TListLiteral& nodeToCompare) const;
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -787,7 +775,6 @@ public:
private:
TStreamType(TType* itemType, const TTypeEnvironment& env, bool validate = true);
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -814,7 +801,6 @@ public:
private:
TFlowType(TType* itemType, const TTypeEnvironment& env, bool validate = true);
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -841,7 +827,6 @@ public:
private:
TOptionalType(TType* itemType, const TTypeEnvironment& env, bool validate = true);
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -874,7 +859,6 @@ private:
using TNode::Equals;
bool Equals(const TOptionalLiteral& nodeToCompare) const;
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -907,7 +891,6 @@ public:
private:
TDictType(TType* keyType, TType* payloadType, const TTypeEnvironment& env, bool validate = true);
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -938,7 +921,6 @@ private:
using TNode::Equals;
bool Equals(const TDictLiteral& nodeToCompare) const;
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -1003,7 +985,6 @@ private:
TCallableType(const TInternName& name, TType* returnType, ui32 argumentsCount, TType** arguments,
TNode* payload, const TTypeEnvironment& env);
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -1081,7 +1062,6 @@ private:
using TNode::Equals;
bool Equals(const TCallable& nodeToCompare) const;
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -1132,7 +1112,6 @@ private:
static TAnyType* Create(TTypeType* type, const TTypeEnvironment& env);
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
};
@@ -1163,7 +1142,6 @@ private:
using TNode::Equals;
bool Equals(const TAny& nodeToCompare) const;
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
private:
@@ -1255,18 +1233,6 @@ public:
}
private:
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- for (ui32 i = 0; i < ElementsCount_; ++i) {
- auto &element = Elements_[i];
- auto elementIt = links.find(element);
- if (elementIt != links.end()) {
- TNode* newNode = elementIt->second;
- Y_DEBUG_ABORT_UNLESS(element->Equals(*newNode));
- element = static_cast<TType*>(newNode);
- }
- }
- }
-
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
bool needClone = false;
for (ui32 i = 0; i < ElementsCount_; ++i) {
@@ -1362,7 +1328,6 @@ private:
using TNode::Equals;
bool Equals(const TTupleLiteral& nodeToCompare) const;
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -1397,7 +1362,6 @@ private:
, Tag_(tag)
{}
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -1432,7 +1396,6 @@ public:
private:
TTaggedType(TType* baseType, TInternName tag, const TTypeEnvironment& env);
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -1477,7 +1440,6 @@ public:
private:
TVariantType(TType* underlyingType, const TTypeEnvironment& env, bool validate = true);
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -1507,7 +1469,6 @@ private:
using TNode::Equals;
bool Equals(const TVariantLiteral& nodeToCompare) const;
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -1546,7 +1507,6 @@ public:
private:
TBlockType(TType* itemType, EShape shape, const TTypeEnvironment& env);
- void DoUpdateLinks(const THashMap<TNode*, TNode*>& links);
TNode* DoCloneOnCallableWrite(const TTypeEnvironment& env) const;
void DoFreeze(const TTypeEnvironment& env);
@@ -1618,11 +1578,6 @@ bool TSingularType<SingularKind>::IsConvertableTo(const TSingularType<SingularKi
}
template <TType::EKind SingularKind>
-void TSingularType<SingularKind>::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- Y_UNUSED(links);
-}
-
-template <TType::EKind SingularKind>
TNode* TSingularType<SingularKind>::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
Y_UNUSED(env);
return const_cast<TSingularType<SingularKind>*>(this);
@@ -1646,11 +1601,6 @@ bool TSingular<SingularKind>::Equals(const TSingular<SingularKind>& nodeToCompar
template <TType::EKind SingularKind>
-void TSingular<SingularKind>::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
- Y_UNUSED(links);
-}
-
-template <TType::EKind SingularKind>
TNode* TSingular<SingularKind>::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
Y_UNUSED(env);
return const_cast<TSingular<SingularKind>*>(this);