try to use the same str object for all code filenames when compiling or unmarshalling (#12190)

This should reduce memory usage.
5 files changed