From fcec17bc9d5df1ae57008d29e1651934408a1767 Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 11 Sep 2025 10:36:34 +0300 Subject: [PATCH 1/3] Initial commit with task details for issue #390 Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: https://github.com/linksplatform/Data.Doublets/issues/390 --- CLAUDE.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 000000000..8e64c6562 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +Issue to solve: https://github.com/linksplatform/Data.Doublets/issues/390 +Your prepared branch: issue-390-5e4626de +Your prepared working directory: /tmp/gh-issue-solver-1757576102655 + +Proceed. \ No newline at end of file From 78f21341ca212762d00e416705f216f525bf8033 Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 11 Sep 2025 10:36:52 +0300 Subject: [PATCH 2/3] Remove CLAUDE.md - PR created successfully --- CLAUDE.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 8e64c6562..000000000 --- a/CLAUDE.md +++ /dev/null @@ -1,5 +0,0 @@ -Issue to solve: https://github.com/linksplatform/Data.Doublets/issues/390 -Your prepared branch: issue-390-5e4626de -Your prepared working directory: /tmp/gh-issue-solver-1757576102655 - -Proceed. \ No newline at end of file From a73e291274924e6b20351249fc5b339a73b9e372 Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 11 Sep 2025 10:46:31 +0300 Subject: [PATCH 3/3] Rename IsUnusedLink() method to IsDeleted() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Renamed IsUnusedLink() method to IsDeleted() in both C# and C++ implementations - Updated all references and usage of the method across the codebase - Updated method documentation to reflect the new name and clearer semantics - This change improves code clarity by distinguishing between: - Unused Link: Link that is not used by any other link as source/target - Deleted Link: Link that is marked as deleted Fixes #390 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../Memory/Split/Generic/SplitMemoryLinksBase.h | 6 +++--- .../Memory/United/Generic/UnitedMemoryLinksBase.h | 6 +++--- .../Memory/Split/Generic/SplitMemoryLinksBase.cs | 8 ++++---- .../Memory/United/Generic/UnitedMemoryLinksBase.cs | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cpp/Platform.Data.Doublets/Memory/Split/Generic/SplitMemoryLinksBase.h b/cpp/Platform.Data.Doublets/Memory/Split/Generic/SplitMemoryLinksBase.h index c180989c5..933ef571d 100644 --- a/cpp/Platform.Data.Doublets/Memory/Split/Generic/SplitMemoryLinksBase.h +++ b/cpp/Platform.Data.Doublets/Memory/Split/Generic/SplitMemoryLinksBase.h @@ -868,7 +868,7 @@ namespace Platform::Data::Doublets::Memory::Split::Generic _indexMemory.UsedCapacity(_indexMemory.UsedCapacity() - LinkIndexPartSizeInBytes); // Убираем все связи, находящиеся в списке свободных в конце файла, до тех пор, пока не дойдём до первой существующей связи // Позволяет оптимизировать количество выделенных связей (AllocatedLinks) - while ((this->GetHeaderReference().AllocatedLinks > LinkAddressType{0}) && this->IsUnusedLink(this->GetHeaderReference().AllocatedLinks)) + while ((this->GetHeaderReference().AllocatedLinks > LinkAddressType{0}) && this->IsDeleted(this->GetHeaderReference().AllocatedLinks)) { UnusedLinksListMethods->Detach(this->GetHeaderReference().AllocatedLinks); --this->GetHeaderReference().AllocatedLinks; @@ -881,7 +881,7 @@ namespace Platform::Data::Doublets::Memory::Split::Generic } public: - bool IsUnusedLink(LinkAddressType linkIndex) const + bool IsDeleted(LinkAddressType linkIndex) const { if (GetHeaderReference().FirstFreeLink != linkIndex) // May be this check is not needed { @@ -900,7 +900,7 @@ namespace Platform::Data::Doublets::Memory::Split::Generic { return (linkAddress >= Constants.InternalReferencesRange.Minimum) && (linkAddress <= this->GetHeaderReference().AllocatedLinks) - && !IsUnusedLink(linkAddress); + && !IsDeleted(linkAddress); } public: diff --git a/cpp/Platform.Data.Doublets/Memory/United/Generic/UnitedMemoryLinksBase.h b/cpp/Platform.Data.Doublets/Memory/United/Generic/UnitedMemoryLinksBase.h index 1cf381a1a..33d8c0916 100644 --- a/cpp/Platform.Data.Doublets/Memory/United/Generic/UnitedMemoryLinksBase.h +++ b/cpp/Platform.Data.Doublets/Memory/United/Generic/UnitedMemoryLinksBase.h @@ -423,7 +423,7 @@ { --header.AllocatedLinks; _memory.UsedCapacity(_memory.UsedCapacity() - LinkSizeInBytes); - while ((header.AllocatedLinks > LinkAddressType {}) && IsUnusedLink(header.AllocatedLinks)) + while ((header.AllocatedLinks > LinkAddressType {}) && IsDeleted(header.AllocatedLinks)) { _UnusedLinksListMethods->Detach(header.AllocatedLinks); --header.AllocatedLinks; @@ -461,10 +461,10 @@ { return false; } - return (linkAddress >= Constants.InternalReferencesRange.Minimum) && (linkAddress <= this->GetHeaderReference().AllocatedLinks) && !IsUnusedLink(linkAddress); + return (linkAddress >= Constants.InternalReferencesRange.Minimum) && (linkAddress <= this->GetHeaderReference().AllocatedLinks) && !IsDeleted(linkAddress); } - bool IsUnusedLink(LinkAddressType linkIndex) const + bool IsDeleted(LinkAddressType linkIndex) const { if (GetHeaderReference().FirstFreeLink != linkIndex)// May be this check is not needed { diff --git a/csharp/Platform.Data.Doublets/Memory/Split/Generic/SplitMemoryLinksBase.cs b/csharp/Platform.Data.Doublets/Memory/Split/Generic/SplitMemoryLinksBase.cs index 9ab5ade78..cc9cc9ba7 100644 --- a/csharp/Platform.Data.Doublets/Memory/Split/Generic/SplitMemoryLinksBase.cs +++ b/csharp/Platform.Data.Doublets/Memory/Split/Generic/SplitMemoryLinksBase.cs @@ -748,7 +748,7 @@ public virtual TLinkAddress Delete(IList? restriction, WriteHandle _indexMemory.UsedCapacity -= LinkIndexPartSizeInBytes; // Убираем все связи, находящиеся в списке свободных в конце файла, до тех пор, пока не дойдём до первой существующей связи // Позволяет оптимизировать количество выделенных связей (AllocatedLinks) - while ((header.AllocatedLinks > GetZero()) && IsUnusedLink(linkIndex: header.AllocatedLinks)) + while ((header.AllocatedLinks > GetZero()) && IsDeleted(linkIndex: header.AllocatedLinks)) { UnusedLinksListMethods.Detach(freeLink: header.AllocatedLinks); header.AllocatedLinks = header.AllocatedLinks - TLinkAddress.One; @@ -942,12 +942,12 @@ protected virtual void ResetPointers() [MethodImpl(methodImplOptions: MethodImplOptions.AggressiveInlining)] protected virtual bool Exists(TLinkAddress link) { - return (link >= Constants.InternalReferencesRange.Minimum) && (link <= GetHeaderReference().AllocatedLinks) && !IsUnusedLink(linkIndex: link); + return (link >= Constants.InternalReferencesRange.Minimum) && (link <= GetHeaderReference().AllocatedLinks) && !IsDeleted(linkIndex: link); } /// /// - /// Determines whether this instance is unused link. + /// Determines whether this instance is deleted. /// /// /// @@ -960,7 +960,7 @@ protected virtual bool Exists(TLinkAddress link) /// /// [MethodImpl(methodImplOptions: MethodImplOptions.AggressiveInlining)] - protected virtual bool IsUnusedLink(TLinkAddress linkIndex) + protected virtual bool IsDeleted(TLinkAddress linkIndex) { if ((GetHeaderReference().FirstFreeLink != linkIndex)) // May be this check is not needed { diff --git a/csharp/Platform.Data.Doublets/Memory/United/Generic/UnitedMemoryLinksBase.cs b/csharp/Platform.Data.Doublets/Memory/United/Generic/UnitedMemoryLinksBase.cs index ecaa89d37..abc2ab7d1 100644 --- a/csharp/Platform.Data.Doublets/Memory/United/Generic/UnitedMemoryLinksBase.cs +++ b/csharp/Platform.Data.Doublets/Memory/United/Generic/UnitedMemoryLinksBase.cs @@ -562,7 +562,7 @@ public virtual TLinkAddress Delete(IList? restriction, WriteHandle _memory.UsedCapacity -= LinkSizeInBytes; // Убираем все связи, находящиеся в списке свободных в конце файла, до тех пор, пока не дойдём до первой существующей связи // Позволяет оптимизировать количество выделенных связей (AllocatedLinks) - while (GreaterThan(header.AllocatedLinks, GetZero()) && IsUnusedLink(header.AllocatedLinks)) + while (GreaterThan(header.AllocatedLinks, GetZero()) && IsDeleted(header.AllocatedLinks)) { UnusedLinksListMethods.Detach(header.AllocatedLinks); header.AllocatedLinks = header.AllocatedLinks - TLinkAddress.One; @@ -666,11 +666,11 @@ protected virtual void ResetPointers() protected virtual bool Exists(TLinkAddress link) => GreaterOrEqualThan(link, Constants.InternalReferencesRange.Minimum) && LessOrEqualThan(link, GetHeaderReference().AllocatedLinks) - && !IsUnusedLink(link); + && !IsDeleted(link); /// /// - /// Determines whether this instance is unused link. + /// Determines whether this instance is deleted. /// /// /// @@ -683,7 +683,7 @@ protected virtual bool Exists(TLinkAddress link) /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected virtual bool IsUnusedLink(TLinkAddress linkIndex) + protected virtual bool IsDeleted(TLinkAddress linkIndex) { if (!AreEqual(GetHeaderReference().FirstFreeLink, linkIndex)) // May be this check is not needed {