Remove "new string" opcodes
completed by: Aleksandar
mentors: Andrew Whitworth
Parrot uses immutable strings internally. This means that string buffers, once created, cannot be modified. This is an important tool to prevent string data contention when in a multi-threaded environment, and is also a powerful tool for compilers and optimizers to use to optimize and better manage resources.
Parrot provides some old, legacy opcodes which do not make sense if Parrot's string types are immutable. The "new" opcode, which returns a new, empty string is one such opcode. In fact, there are two "new" opcodes, both of which don't make sense. Your task is to delete the "new" opcodes from src/ops/string.ops and update any code which might accidentally be relying on them.
Steps To Complete This Task
- Create a fork of parrot.git on github.com
- Build Parrot (This is IMPORTANT)
- Remove the "new" opcodes from src/ops/string.ops
- Run "make bootstrap-ops" to rebuild the ops files for Parrot. Notice that the rebuild requires an existing build of Parrot to perform. This step may take several minutes.
- Build Parrot and run its test suite ("make test") to verify that things still work
- Fix any broken tests or other broken code which might still be relying on the old opcodes (test again to verify, if changes are made)
- Create a Github pull request (button on the upper right of your fork) to have your changes incorporated into the master repository
- The "new string" opcodes are deprecated and need to be removed. They do not make any sense in the context of Parrot's current string implementation and are confusing. Getting rid of them helps to decrease confusion and decreases maintenance burden.
- C programming Language