diff options
| author | vvvv <[email protected]> | 2025-10-09 12:25:18 +0300 |
|---|---|---|
| committer | vvvv <[email protected]> | 2025-10-09 12:57:17 +0300 |
| commit | cb77d014972b2cdb27d2e6d979fc3a2772b27ad4 (patch) | |
| tree | 7f3bcd8ce71c6bd0f3ccc11e31b9f665475b819e /yql/essentials/minikql/comp_nodes/mkql_removemember.cpp | |
| parent | d58a8990d353b051c27e1069141117fdfde64358 (diff) | |
YQL-20086 minikql
commit_hash:e96f7390db5fcbe7e9f64f898141a263ad522daa
Diffstat (limited to 'yql/essentials/minikql/comp_nodes/mkql_removemember.cpp')
| -rw-r--r-- | yql/essentials/minikql/comp_nodes/mkql_removemember.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/yql/essentials/minikql/comp_nodes/mkql_removemember.cpp b/yql/essentials/minikql/comp_nodes/mkql_removemember.cpp index 02020bc2bfd..c7b84257184 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_removemember.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_removemember.cpp @@ -1,5 +1,5 @@ #include "mkql_removemember.h" -#include <yql/essentials/minikql/computation/mkql_computation_node_codegen.h> // Y_IGNORE +#include <yql/essentials/minikql/computation/mkql_computation_node_codegen.h> // Y_IGNORE #include <yql/essentials/minikql/computation/mkql_computation_node_holders.h> #include <yql/essentials/minikql/computation/mkql_computation_node_holders_codegen.h> #include <yql/essentials/minikql/mkql_node_cast.h> @@ -9,8 +9,9 @@ namespace NMiniKQL { namespace { -class TRemoveMemberWrapper : public TMutableCodegeneratorFallbackNode<TRemoveMemberWrapper> { +class TRemoveMemberWrapper: public TMutableCodegeneratorFallbackNode<TRemoveMemberWrapper> { typedef TMutableCodegeneratorFallbackNode<TRemoveMemberWrapper> TBaseComputation; + public: TRemoveMemberWrapper(TComputationMutables& mutables, IComputationNode* structObj, ui32 index, std::vector<EValueRepresentation>&& representations) : TBaseComputation(mutables, EValueRepresentation::Boxed) @@ -18,7 +19,8 @@ public: , Index(index) , Representations(std::move(representations)) , Cache(mutables) - {} + { + } NUdf::TUnboxedValuePod DoCalculate(TComputationContext& ctx) const { const auto& baseStruct = StructObj->GetValue(ctx); @@ -51,8 +53,9 @@ public: #ifndef MKQL_DISABLE_CODEGEN Value* DoGenerateGetValue(const TCodegenContext& ctx, BasicBlock*& block) const { - if (Representations.size() > CodegenArraysFallbackLimit) + if (Representations.size() > CodegenArraysFallbackLimit) { return TBaseComputation::DoGenerateGetValue(ctx, block); + } auto& context = ctx.Codegen.GetContext(); @@ -63,9 +66,7 @@ public: const auto idxType = Type::getInt32Ty(context); const auto type = ArrayType::get(valType, newSize); const auto itmsType = PointerType::getUnqual(type); - const auto itms = *Stateless_ || ctx.AlwaysInline ? - new AllocaInst(itmsType, 0U, "itms", &ctx.Func->getEntryBlock().back()): - new AllocaInst(itmsType, 0U, "itms", block); + const auto itms = *Stateless_ || ctx.AlwaysInline ? new AllocaInst(itmsType, 0U, "itms", &ctx.Func->getEntryBlock().back()) : new AllocaInst(itmsType, 0U, "itms", block); const auto result = Cache.GenNewArray(newSize, itms, ctx, block); const auto itemsPtr = new LoadInst(itmsType, itms, "items", block); @@ -121,8 +122,9 @@ public: BranchInst::Create(done, block); } block = done; - if (StructObj->IsTemporaryValue()) + if (StructObj->IsTemporaryValue()) { CleanupBoxed(array, ctx, block); + } return result; } #endif @@ -138,7 +140,7 @@ private: const TContainerCacheOnContext Cache; }; -} +} // namespace IComputationNode* WrapRemoveMember(TCallable& callable, const TComputationNodeFactoryContext& ctx) { MKQL_ENSURE(callable.GetInputsCount() == 2, "Expected 2 args"); @@ -159,5 +161,5 @@ IComputationNode* WrapRemoveMember(TCallable& callable, const TComputationNodeFa return new TRemoveMemberWrapper(ctx.Mutables, structObj, index, std::move(representations)); } -} -} +} // namespace NMiniKQL +} // namespace NKikimr |
