Skip to content

refactor: standardize MethodImplOptions with named constants - #566

Merged
Nucs merged 1 commit into
masterfrom
MethodImplOptions
Feb 14, 2026
Merged

Nucs merged 1 commit into
masterfrom
MethodImplOptions

Conversation

@Nucs

@Nucs Nucs commented Feb 14, 2026

Copy link
Copy Markdown
Member

Closes #565

Summary

  • Replace magic numbers (MethodImplOptions)768 and (MethodImplOptions)512 with named constants
  • Add MethodImplOptionsConstants class exposed via global using static
  • 134 files changed, ~2,600 replacements

Usage

[MethodImpl(OptimizeAndInline)]  // was (MethodImplOptions)768
[MethodImpl(Optimize)]           // was (MethodImplOptions)512
[MethodImpl(Inline)]             // was MethodImplOptions.AggressiveInlining

Replace magic numbers with self-documenting named constants:
- (MethodImplOptions)768 → OptimizeAndInline
- (MethodImplOptions)512 → Optimize
- MethodImplOptions.AggressiveInlining → Inline

Add MethodImplOptionsConstants class with:
- OptimizeAndInline: AggressiveInlining | AggressiveOptimization (768)
- Optimize: AggressiveOptimization (512)
- Inline: AggressiveInlining (256)

Exposed via global using static for direct access without prefix.

Files changed: 128
Replacements: ~2579 occurrences
@Nucs
Nucs merged commit 602b9fc into master Feb 14, 2026
3 checks passed
@Nucs Nucs added the refactor Code cleanup without behavior change label Feb 14, 2026
@Nucs
Nucs deleted the MethodImplOptions branch April 12, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code cleanup without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor/Cleanup] standardize MethodImplOptions magic numbers with named constants

1 participant