]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: simplify noding const declarations
authorMatthew Dempsky <mdempsky@google.com>
Wed, 1 Feb 2017 00:31:11 +0000 (16:31 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 1 Feb 2017 20:25:37 +0000 (20:25 +0000)
commitb761b07bf909d9ff7d1fdc11083104fd4e28f252
tree2ff4ef2a5d90eeeeb81bda266cbecc198f054be5
parent1cbc5aa5290437e81859911cf8e022be2448cc09
cmd/compile: simplify noding const declarations

By grouping all the logic into constDecl, we're able to get rid of the
lastconst and lasttype globals, and simplify the logic slightly. Still
clunky, but much easier to reason about.

Change-Id: I446696c31084b3bfc1fd5d3651655a81ddd159ab
Reviewed-on: https://go-review.googlesource.com/36023
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/dcl.go
src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/noder.go