compiler: delete lowered constant strings

If we lower a constant string operation in a Binary_expression,
delete the strings.  This is safe because constant strings are always
newly allocated.

This is a hack to use much less memory when compiling the new
time/tzdata package, which has a file that contains the sum of over
13,000 constant strings.  We don't do this for numeric expressions
because that could cause us to delete an Iota_expression.

We should have a cleaner approach to memory usage some day.

Change-Id: I0e91328633f379d227c957922e0843ce8c23c186
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/246266
Reviewed-by: Cherry Zhang <cherryyz@google.com>
1 file changed