Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type-ref in static data #613

Merged
merged 1 commit into from
Jun 20, 2021
Merged

Add type-ref in static data #613

merged 1 commit into from
Jun 20, 2021

Conversation

water111
Copy link
Collaborator

@water111 water111 commented Jun 20, 2021

This adds a type-ref form to the compiler/decompiler to insert a reference to a type in a static object.

There's something weird about this though - the game has type-refs on types that aren't defined yet. When the linker encounters these, it allocates memory for the type, and in order to do this, it needs to know the number of methods. To support this, if the type system can't figure out the number of methods, you can manually add a :method-count argument.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 954700138

  • 53 of 80 (66.25%) changed or added relevant lines in 9 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.006%) to 69.35%

Changes Missing Coverage Covered Lines Changed/Added Lines %
decompiler/ObjectFile/LinkedObjectFileCreation.cpp 0 1 0.0%
goalc/compiler/compilation/Static.cpp 15 21 71.43%
common/type_system/TypeSystem.cpp 23 33 69.7%
decompiler/util/data_decompile.cpp 0 10 0.0%
Files with Coverage Reduction New Missed Lines %
decompiler/ObjectFile/LinkedObjectFileCreation.cpp 1 0%
game/system/iop_thread.cpp 1 96.08%
Totals Coverage Status
Change from base Build 953624705: -0.006%
Covered Lines: 36639
Relevant Lines: 52832

💛 - Coveralls

@water111 water111 merged commit 4f8403d into master Jun 20, 2021
@water111 water111 deleted the w/type-in-static-data branch June 20, 2021 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants