]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/gc: delete Strlit, Zconv
authorRuss Cox <rsc@golang.org>
Mon, 2 Mar 2015 21:03:26 +0000 (16:03 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 3 Mar 2015 20:33:00 +0000 (20:33 +0000)
commitbed1f90d080da467d6abd416f76681ef58c9f79e
tree9dcd6e5bed18e8fa5efe61fedfce06ba56c89781
parent4bbd7ae8e04eb874f4866b198a287bb06eb5d5a3
cmd/internal/gc: delete Strlit, Zconv

Strlit was just a poor excuse for a Go string.
Use a Go string.
In the one case where it was a string-or-nil (Type.Note), use a *string.

Zconv was a poor excuse for %q. Use %q.
The only important part about Zconv's implementation
was that the compiler and linker agreed on the quoting rules.
Now they both use %q instead of having two Zconvs.

This CL *does* change the generated object files, because the
quoted strings end up in symbol names.
For example the string "\r\n" used to be named go.string."\r\n"
and is now go.string."\x0d\n".

Change-Id: I5c0d38e1570ffc495f0db1a20273c9564104a7e8
Reviewed-on: https://go-review.googlesource.com/6519
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
22 files changed:
src/cmd/5g/cgen.go
src/cmd/6g/cgen.go
src/cmd/8g/cgen.go
src/cmd/9g/cgen.go
src/cmd/internal/gc/closure.go
src/cmd/internal/gc/const.go
src/cmd/internal/gc/dcl.go
src/cmd/internal/gc/esc.go
src/cmd/internal/gc/export.go
src/cmd/internal/gc/fmt.go
src/cmd/internal/gc/go.go
src/cmd/internal/gc/go.y
src/cmd/internal/gc/lex.go
src/cmd/internal/gc/obj.go
src/cmd/internal/gc/order.go
src/cmd/internal/gc/reflect.go
src/cmd/internal/gc/sinit.go
src/cmd/internal/gc/subr.go
src/cmd/internal/gc/typecheck.go
src/cmd/internal/gc/walk.go
src/cmd/internal/gc/y.go
src/cmd/internal/ld/go.go