diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2019-09-17 18:32:04 -0700 |
|---|---|---|
| committer | Matthew Dempsky <mdempsky@google.com> | 2019-09-18 02:31:34 +0000 |
| commit | 2fc6366fb56aa77efa3cecd44ce941472786a418 (patch) | |
| tree | 5f318cc0351f408ed8d34dc0b246a5ef1c77c98e /src/cmd/compile/internal/gc/noder.go | |
| parent | 1b2c7948963543286516f78f0b0d52956f58d82c (diff) | |
| download | go-2fc6366fb56aa77efa3cecd44ce941472786a418.tar.xz | |
cmd/compile: remove OCASE and rename OXCASE to OCASE
We used to use OXCASE to represent general, possibly multi-valued
cases, and then desugar these during walk into single-value cases
represented by OCASE.
In CL 194660, we switched to eliminated the desugaring step and
instead handle the multi-valued cases directly, which eliminates the
need for an OCASE Op. Instead, we can simply remove OCASE, and rename
OXCASE to just OCASE.
Passes toolstash-check.
Change-Id: I3cc184340f9081d37453927cca1c059267fdbc12
Reviewed-on: https://go-review.googlesource.com/c/go/+/196117
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/gc/noder.go')
| -rw-r--r-- | src/cmd/compile/internal/gc/noder.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/gc/noder.go b/src/cmd/compile/internal/gc/noder.go index 6bbabb45dd..91c7fd49b1 100644 --- a/src/cmd/compile/internal/gc/noder.go +++ b/src/cmd/compile/internal/gc/noder.go @@ -1188,7 +1188,7 @@ func (p *noder) caseClauses(clauses []*syntax.CaseClause, tswitch *Node, rbrace } p.openScope(clause.Pos()) - n := p.nod(clause, OXCASE, nil, nil) + n := p.nod(clause, OCASE, nil, nil) if clause.Cases != nil { n.List.Set(p.exprList(clause.Cases)) } @@ -1244,7 +1244,7 @@ func (p *noder) commClauses(clauses []*syntax.CommClause, rbrace syntax.Pos) []* } p.openScope(clause.Pos()) - n := p.nod(clause, OXCASE, nil, nil) + n := p.nod(clause, OCASE, nil, nil) if clause.Comm != nil { n.List.Set1(p.stmt(clause.Comm)) } |
