Skip to content

Refactor - transform classes to use singleton pattern#1291

Merged
tgiphil merged 6 commits into
mosa:masterfrom
tgiphil:609-refactor
May 10, 2026
Merged

Refactor - transform classes to use singleton pattern#1291
tgiphil merged 6 commits into
mosa:masterfrom
tgiphil:609-refactor

Conversation

@tgiphil

@tgiphil tgiphil commented May 10, 2026

Copy link
Copy Markdown
Member

This pull request refactors several transform classes to implement the singleton pattern. Instead of creating new instances each time, these classes now expose a static Instance property and have private constructors. This change improves memory usage and performance by reusing the same instance.

Copilot AI and others added 5 commits April 5, 2026 15:45
* Initial plan

* Add .github/copilot-instructions.md for agent onboarding

Co-authored-by: tgiphil <124747+tgiphil@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tgiphil <124747+tgiphil@users.noreply.github.com>
- Introduced "Agent Coding Rules" in copilot-instructions.md, prohibiting unsafe code, manual edits to generated files, and changes to Mosa.UnitTests by AI/Copilot.
- Clarified .NET SDK requirements, now preferring .NET 10 SDK for local development and explaining CI roll-forward.
- Updated style guide to note "unsafe" is forbidden despite its presence in modifier order.
- Added copilot-instructions.md as a solution item in a new "Copilot" folder in Mosa.sln for visibility in Visual Studio.
Improving reporting accuracy and consistency
Cleaning up naming, structure, and shutdown behavior
@tgiphil tgiphil self-assigned this May 10, 2026
@tgiphil tgiphil added this to the 2.6 Release milestone May 10, 2026
@tgiphil tgiphil requested a review from Copilot May 10, 2026 22:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Changed EmitBinary from a public property to a private property with getter and setter, limiting its visibility within the class. This encapsulates the field and prevents external modification.
@tgiphil tgiphil merged commit 3de0a74 into mosa:master May 10, 2026
67 checks passed
@tgiphil tgiphil deleted the 609-refactor branch May 10, 2026 22:36
@tgiphil tgiphil restored the 609-refactor branch May 10, 2026 22:36
@tgiphil tgiphil deleted the 609-refactor branch May 10, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants