• Josh Bleecher Snyder's avatar
    cmd/compile: add typArray, typSlice, and typDDDArray · eb98e515
    Josh Bleecher Snyder authored
    These are the first of several convenience
    constructors for types.
    
    They are part of type field encapsulation.
    This removes most external writes to TARRAY Type and Bound fields.
    
    substAny still directly fiddles with the .Type field.
    substAny generally needs access to Type internals.
    It will be moved to type.go in a future CL.
    
    bimport still directly writes the .Type field.
    This is hard to change.
    
    Also of note:
    
    * inl.go contains an (apparently irrelevant) bug fix:
      as.Right was given the wrong type.
      vararrtype was previously unused.
    * I believe that aindex (subr.go) never creates slices,
      but it is safer to keep existing behavior.
      The removal of -1 as a constant there is part
      of hiding that implementation detail.
      Future CLs will finish that job.
    
    Passes toolstash -cmp.
    
    Change-Id: If09bf001a874d7dba08e9ad0bcd6722860af4b91
    Reviewed-on: https://go-review.googlesource.com/21249Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    eb98e515
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vet Loading commit data...
yacc Loading commit data...