• 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
..
builtin Loading commit data...
testdata Loading commit data...
alg.go Loading commit data...
align.go Loading commit data...
bexport.go Loading commit data...
bimport.go Loading commit data...
builtin.go Loading commit data...
builtin_test.go Loading commit data...
bv.go Loading commit data...
cgen.go Loading commit data...
closure.go Loading commit data...
const.go Loading commit data...
cplx.go Loading commit data...
dcl.go Loading commit data...
esc.go Loading commit data...
export.go Loading commit data...
float_test.go Loading commit data...
fmt.go Loading commit data...
gen.go Loading commit data...
global_test.go Loading commit data...
go.go Loading commit data...
gsubr.go Loading commit data...
init.go Loading commit data...
inl.go Loading commit data...
lex.go Loading commit data...
magic.go Loading commit data...
main.go Loading commit data...
mkbuiltin.go Loading commit data...
mpfloat.go Loading commit data...
mpint.go Loading commit data...
obj.go Loading commit data...
opnames.go Loading commit data...
order.go Loading commit data...
parser.go Loading commit data...
pgen.go Loading commit data...
pgen_test.go Loading commit data...
plive.go Loading commit data...
popt.go Loading commit data...
racewalk.go Loading commit data...
range.go Loading commit data...
reflect.go Loading commit data...
reflect_test.go Loading commit data...
reg.go Loading commit data...
select.go Loading commit data...
sinit.go Loading commit data...
sizeof_test.go Loading commit data...
ssa.go Loading commit data...
ssa_test.go Loading commit data...
subr.go Loading commit data...
swt.go Loading commit data...
swt_test.go Loading commit data...
syntax.go Loading commit data...
type.go Loading commit data...
typecheck.go Loading commit data...
universe.go Loading commit data...
unsafe.go Loading commit data...
util.go Loading commit data...
walk.go Loading commit data...