Skip to content

Reuse helpers for numeric operations and object addresses - #1041

Merged
Kyle-Ye merged 6 commits into
mainfrom
optimize/helper
Sep 5, 2026
Merged

Reuse helpers for numeric operations and object addresses#1041
Kyle-Ye merged 6 commits into
mainfrom
optimize/helper

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Sep 5, 2026

Copy link
Copy Markdown
Member

Summary

  • Use unsafeIncrement() and unsafeDecrement() for supported wrapping arithmetic.
  • Use address(of:) for object pointers in graph setup, property lookup, image handling, and logging.
  • Use formMin, formMax, min(_:ifPresent:), and mappingNaN(to:) for bounds, optional limits, and NaN fallbacks, preserving comparison order and existing behavior.

@Kyle-Ye
Kyle-Ye requested a review from Mx-Iris as a code owner September 5, 2026 17:00
@github-actions github-actions Bot added the type: maintenance Refactor, cleanup, dependency bump, NFC, or internal maintenance. label Sep 5, 2026
@tuist

tuist Bot commented Sep 5, 2026

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Cache hit rate Tests Skipped Ran Commit
OpenSwiftUI 0 % 1122 0 1122 0f45befa8

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI 2m 28s 0f45befa8

@Kyle-Ye
Kyle-Ye merged commit aa16533 into main Sep 5, 2026
2 of 8 checks passed
@Kyle-Ye
Kyle-Ye deleted the optimize/helper branch September 5, 2026 17:13
@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 20.51282% with 62 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.26%. Comparing base (5d6ccc8) to head (5e40e74).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...enSwiftUICore/Render/DisplayList/DisplayList.swift 18.18% 9 Missing ⚠️
...re/Render/DisplayList/DisplayListViewUpdater.swift 0.00% 6 Missing ⚠️
Sources/OpenSwiftUI/Layout/JindoTripleVStack.swift 0.00% 4 Missing ⚠️
...nSwiftUICore/Layout/Dynamic/DynamicContainer.swift 0.00% 4 Missing ⚠️
Sources/OpenSwiftUICore/Graph/GraphHost.swift 0.00% 3 Missing ⚠️
...e/Render/DisplayList/DisplayListViewPlatform.swift 0.00% 3 Missing ⚠️
.../Render/GeometryEffect/MatchedGeometryEffect.swift 0.00% 3 Missing ⚠️
Sources/OpenSwiftUI/App/App/AppGraph.swift 0.00% 2 Missing ⚠️
.../OpenSwiftUICore/Event/Gesture/RepeatGesture.swift 0.00% 2 Missing ⚠️
Sources/OpenSwiftUICore/Layout/View/ViewSize.swift 0.00% 2 Missing ⚠️
... and 21 more

❗ There is a different number of reports uploaded between BASE (5d6ccc8) and HEAD (5e40e74). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (5d6ccc8) HEAD (5e40e74)
2 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1041       +/-   ##
===========================================
- Coverage   29.22%   17.26%   -11.96%     
===========================================
  Files         783      735       -48     
  Lines       62154    54308     -7846     
===========================================
- Hits        18164     9378     -8786     
- Misses      43990    44930      +940     

☔ View full report in Codecov by Harness.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: maintenance Refactor, cleanup, dependency bump, NFC, or internal maintenance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant