scala/scala — pull request #3539 by Blaisorblade (2014-02-17 04:51:54+00:00)
Title: Avoid storing source file contents twice

BatchSourceFile instances contain two almost identical character arrays,
content0 and content. What's worse, content0 is even public. Instead,
content0 should just be a constructor parameter. This seems the residual
of an incomplete refactoring.

I observed this waste of memory during debugging; after applying this
patch, I've verified by hand that the second field indeed disappears.

I don't expect a measurable difference, but this patch is not premature
optimization because it makes code more logical.