]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: stop storing TFIELD types in Node.Type
authorMatthew Dempsky <mdempsky@google.com>
Mon, 14 Mar 2016 07:24:43 +0000 (00:24 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 14 Mar 2016 21:12:29 +0000 (21:12 +0000)
commitc278f9302ea14148324941a5cf312ca7d90f6e30
treea19331863aa1a53c952aafcd7a0243adb5b3ae7b
parent9bffcf382b4f484876782a35bdff7297a60ab814
cmd/compile: stop storing TFIELD types in Node.Type

Currently, the only use for this is on the Left side of OKEY nodes
within struct literals.  esc and fmt only care so they can recognize
that the ONAME nodes are actually field names, which need special
handling.

sinit additionally needs to know the field's offset within the struct,
which we can provide via Xoffset.

Passes toolstash/buildall.

Change-Id: I362d965e161f4d80fcd9c9bae0dfacc657dc0b29
Reviewed-on: https://go-review.googlesource.com/20676
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/esc.go
src/cmd/compile/internal/gc/fmt.go
src/cmd/compile/internal/gc/sinit.go
src/cmd/compile/internal/gc/syntax.go
src/cmd/compile/internal/gc/typecheck.go