aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/export_test.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2015-07-24 11:28:12 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2015-07-24 20:43:32 +0000
commit8d31df18afd682b8440f3ea82033c01b144c65c8 (patch)
treed0fb594670d5d75682212725fceec0e7a73734cf /src/cmd/compile/internal/ssa/export_test.go
parentd90e0481bf0c2f5ba13ed0ae1872b223f0c5ce9c (diff)
downloadgo-8d31df18afd682b8440f3ea82033c01b144c65c8.tar.gz
go-8d31df18afd682b8440f3ea82033c01b144c65c8.zip
[dev.ssa] cmd/compile: use string contents instead of offset from string header
This generates more efficient code. Before: 0x003a 00058 (rr.go:7) LEAQ go.string.hdr."="(SB), BX 0x0041 00065 (rr.go:7) LEAQ 16(BX), BP 0x0045 00069 (rr.go:7) MOVQ BP, 16(SP) After: 0x003a 00058 (rr.go:7) LEAQ go.string."="(SB), BX 0x0041 00065 (rr.go:7) MOVQ BX, 16(SP) It also matches the existing backend and is more robust to other changes, such as CL 11698, which I believe broke the current code. This CL fixes the encoding/base64 tests, as run with: GOGC=off GOSSAPKG=base64 go test -a encoding/base64 Change-Id: I3c475bed1dd3335cc14e13309e11d23f0ed32c17 Reviewed-on: https://go-review.googlesource.com/12654 Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/export_test.go')
-rw-r--r--src/cmd/compile/internal/ssa/export_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/export_test.go b/src/cmd/compile/internal/ssa/export_test.go
index cec4abff56..d13729efbf 100644
--- a/src/cmd/compile/internal/ssa/export_test.go
+++ b/src/cmd/compile/internal/ssa/export_test.go
@@ -15,7 +15,7 @@ type DummyFrontend struct {
t testing.TB
}
-func (DummyFrontend) StringSym(s string) interface{} {
+func (DummyFrontend) StringData(s string) interface{} {
return nil
}