aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/testdata/code.json.gz
diff options
context:
space:
mode:
authorDavid Crawshaw <crawshaw@golang.org>2016-03-21 13:21:55 -0400
committerDavid Crawshaw <crawshaw@golang.org>2016-03-25 00:13:49 +0000
commit24ce64d1a967eb9c4f1a42e7371362b09920bd60 (patch)
tree5526a0d14cc557e3a3811a177b8b77866cd64b43 /src/encoding/json/testdata/code.json.gz
parent0a82ed5d7c6db2c01a840e2a494cb6ff22a02823 (diff)
downloadgo-24ce64d1a967eb9c4f1a42e7371362b09920bd60.tar.xz
cmd/compile, runtime: new static name encoding
Create a byte encoding designed for static Go names. It is intended to be a compact representation of a name and optional tag data that can be turned into a Go string without allocating, and describes whether or not it is exported without unicode table. The encoding is described in reflect/type.go: // The first byte is a bit field containing: // // 1<<0 the name is exported // 1<<1 tag data follows the name // 1<<2 pkgPath *string follow the name and tag // // The next two bytes are the data length: // // l := uint16(data[1])<<8 | uint16(data[2]) // // Bytes [3:3+l] are the string data. // // If tag data follows then bytes 3+l and 3+l+1 are the tag length, // with the data following. // // If the import path follows, then ptrSize bytes at the end of // the data form a *string. The import path is only set for concrete // methods that are defined in a different package than their type. Shrinks binary sizes: cmd/go: 164KB (1.6%) jujud: 1.0MB (1.5%) For #6853. Change-Id: I46b6591015b17936a443c9efb5009de8dfe8b609 Reviewed-on: https://go-review.googlesource.com/20968 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/encoding/json/testdata/code.json.gz')
0 files changed, 0 insertions, 0 deletions