Refactor and rename Parrot_pf_load_language
completed by: Aleksandar
mentors: Andrew Whitworth
Task Description
The function Parrot_load_language in src/packfile/api.c is too large and complicated. It will be easier to understand and maintain if it can be broken into smaller functions with descriptive names and limited variable scopes. Refactor this function. Break the logic into smaller static functions where possible. Clean up the code. Add comments to describe parts of the logic whose purpose is not obvious. Also, rename the function from Parrot_load_language to Parrot_pf_load_language (the _pf_ tells what subsystem the function is in). Make sure to update all references to the function throughout the codebase.
Steps To Complete This Task
- Create a fork of parrot.git on github.com
- Perform all the necessary code and/or documentation changes
- run "make headerizer" to update header files with the new function name
- Build parrot and run it's test suite (make fulltest) to verify that things still work
- You can also submit a smoke report with "make smoke", but that is optional. This requires installing a few Perl modules from CPAN.
- Create a Github pull request (button on the upper right of your fork) to have your changes incorporated into the master repository
Benefits
- Cleaner, properly factored code is easier to read and understand. It is also easier to maintain over long periods of time if people understand what it does and individual bits of logic are broken into atomic operations.
Requirements
- C Programming