mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: add typChan
Passes toolstash -cmp. Change-Id: I2c71882f957c44047c7ac83c78236dcc3dfa15a1 Reviewed-on: https://go-review.googlesource.com/21304 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
331f962508
commit
09c672d50a
3 changed files with 13 additions and 16 deletions
|
|
@ -3050,9 +3050,7 @@ func (p *parser) hidden_type_misc() *Type {
|
|||
default:
|
||||
// LCHAN hidden_type_non_recv_chan
|
||||
s2 := p.hidden_type_non_recv_chan()
|
||||
ss := typ(TCHAN)
|
||||
ss.Type = s2
|
||||
ss.Chan = Cboth
|
||||
ss := typeChan(s2, Cboth)
|
||||
return ss
|
||||
|
||||
case '(':
|
||||
|
|
@ -3060,18 +3058,14 @@ func (p *parser) hidden_type_misc() *Type {
|
|||
p.next()
|
||||
s3 := p.hidden_type_recv_chan()
|
||||
p.want(')')
|
||||
ss := typ(TCHAN)
|
||||
ss.Type = s3
|
||||
ss.Chan = Cboth
|
||||
ss := typeChan(s3, Cboth)
|
||||
return ss
|
||||
|
||||
case LCOMM:
|
||||
// LCHAN hidden_type
|
||||
p.next()
|
||||
s3 := p.hidden_type()
|
||||
ss := typ(TCHAN)
|
||||
ss.Type = s3
|
||||
ss.Chan = Csend
|
||||
ss := typeChan(s3, Csend)
|
||||
return ss
|
||||
}
|
||||
|
||||
|
|
@ -3090,9 +3084,7 @@ func (p *parser) hidden_type_recv_chan() *Type {
|
|||
p.want(LCHAN)
|
||||
s3 := p.hidden_type()
|
||||
|
||||
ss := typ(TCHAN)
|
||||
ss.Type = s3
|
||||
ss.Chan = Crecv
|
||||
ss := typeChan(s3, Crecv)
|
||||
return ss
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue