GSoC/GCI Archive
Google Code-in 2011 Parrot Foundation

Cleanup compiler functions

completed by: Aleksandar

mentors: Andrew Whitworth

Task Description

Parrot Ticket #2135 suggests an improvement to the Parrot_compile_string and Parrot_compile_file functions in the file src/interp/inter_misc.c. Currently this function assumes that the given text or file is to be compiled using the default PIR compiler. However, this is not always going to be the case.

NOTE: Due to some other work, these functions might be renamed to Parrot_interp_compile_string and Parrot_interp_compile_file in src/interp/api.c

Fix these two functions in the following ways:

  1. Parrot_compile_file should take three arguments: PARROT_INTERP, STRING *fullname, and STRING *compiler.
  2. Update all places that call Parrot_compile_file to pass in the correct compiler name string to use ("PIR" or "PASM" for most existing cases)
  3. Parrot_compile_string should take three arguments: PARROT_INTERP, STRING *code and STRING *compiler. Notice that the "error" parameter is disappearing and will not be replaced.
  4. run "make headerizer" to update all .h files
  5. Update all places that call Parrot_compile_string to use the correct arguments.
  6. Update tests and documentation that reference these functions

Steps To Complete This Task

  1. Create a fork of parrot.git on github.com
  2. Perform all the necessary code and/or documentation changes
  3. Build parrot and run it's test suite (make fulltest) to verify that things still work
  4. You can also submit a smoke report with "make smoke", but that is optional. This requires installing a few Perl modules from CPAN.
  5. Create a Github pull request (button on the upper right of your fork) to have your changes incorporated into the master repository

Benefits

  1. Stuff

Requirements

  1. Knowledge of BLANK.
  2. Abillity of BLANK.

Additional Links