Skip to content

Add SwiftCorelibsCoreFoundation, Utilities targets and UtilitiesTests#203

Merged
Kyle-Ye merged 8 commits intomainfrom
feature/utilities-and-corelib-targets
Feb 24, 2026
Merged

Add SwiftCorelibsCoreFoundation, Utilities targets and UtilitiesTests#203
Kyle-Ye merged 8 commits intomainfrom
feature/utilities-and-corelib-targets

Conversation

@Kyle-Ye
Copy link
Contributor

@Kyle-Ye Kyle-Ye commented Feb 24, 2026

Summary

  • Add SwiftCorelibsCoreFoundation target providing CoreFoundation headers for non-Darwin platforms
  • Add Utilities target by refactoring utility code (HashTable, Heap, ForwardList, cf_ptr, objc_ptr, free_deleter) out of OpenAttributeGraphCxx into a standalone module
  • Add UtilitiesTests target with tests for ForwardList, HashTable, and Heap
  • Add platform/malloc.h for cross-platform malloc zone shims
  • Enable typed memory operations (-ftyped-memory-operations, -ftyped-cxx-new-delete) on Darwin platforms for xzone malloc support
  • Add Utilities.hpp umbrella header and update modulemaps
  • Fix point_hash and update header documentation
  • Update CREDITS.md to reflect Compute-based origins of new targets

Test plan

  • Verify swift build succeeds on macOS
  • Verify swift test passes UtilitiesTests (ForwardList, HashTable, Heap)
  • Verify cross-platform build on Linux via swift build

Extract Util files from OpenAttributeGraphCxx into a standalone
Utilities target with its own Base.hpp to avoid circular dependencies.
Add SwiftCorelibsCoreFoundation target with CF headers for non-Darwin
platform support.
Add -ftyped-memory-operations and -ftyped-cxx-new-delete to shared
C/C++ settings so malloc() and operator new are rewritten to their
type-aware variants (malloc_type_malloc, operator new with
std::__type_descriptor_t), matching AttributeGraph's codegen.

Also add darwinPlatforms extension and simplify OAGTupleWithBuffer
by removing the manual malloc_type_malloc call now that the compiler
handles the rewrite automatically.
Match Compute's layout by using an explicit umbrella header instead
of an umbrella directory in the modulemap.
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 10.12%. Comparing base (af45d6a) to head (065cdc2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #203   +/-   ##
=======================================
  Coverage   10.12%   10.12%           
=======================================
  Files          28       28           
  Lines         820      820           
=======================================
  Hits           83       83           
  Misses        737      737           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye Kyle-Ye merged commit 911b7c9 into main Feb 24, 2026
5 of 6 checks passed
@Kyle-Ye Kyle-Ye deleted the feature/utilities-and-corelib-targets branch February 24, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant