Add various methods extracted from !81
This adds various methods that were originally added as part of !81 (merged). Moving these changes to a separate MR will make it a bit easier to review the changes introduced for the self hosting compiler.
This adds various methods that were originally added as part of !81 (merged). Moving these changes to a separate MR will make it a bit easier to review the changes introduced for the self hosting compiler.