]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: allow deduplication of long strings
authorJosh Bleecher Snyder <josharian@gmail.com>
Thu, 10 Mar 2016 19:14:22 +0000 (11:14 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 14 Mar 2016 19:54:58 +0000 (19:54 +0000)
commita0232ea0dddfcc0827fd4094cbf261d85f0ae8f2
treec2af845d82d85dbfcd9a99ac199e618ddeeab380
parent13f74db304fdf6dc6241485d6e6f3f6a0327633c
cmd/compile: allow deduplication of long strings

String symbols' names used to appear in the final binary.
Using a string's contents as it's symbol's name
was a thus a bad idea if the string's name was long.
Recent improvements by crawshaw have changed that.

Instead of placing long strings behind opaque names
in local packages, place them in the global string
package and make them content-addressable.
Symbol names still occur in the object files,
so use a hash to avoid needless length there.

Reduces the size of cmd/go by 30k.

Change-Id: Ifdbbaf47bf44352418c90ddd903d5106e48db4f1
Reviewed-on: https://go-review.googlesource.com/20524
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
src/cmd/compile/internal/gc/obj.go