• Josh Bleecher Snyder's avatar
    cmd/vet: improve asmdecl parameter handling · 4af11480
    Josh Bleecher Snyder authored
    The asmdecl check had hand-rolled code that
    calculated the size and offset of parameters
    based only on the AST.
    It included a list of known named types.
    
    This CL changes asmdecl to use go/types instead.
    This allows us to easily handle named types.
    It also adds support for structs, arrays,
    and complex parameters.
    
    It improves the default names given to unnamed
    parameters. Previously, all anonymous arguments were
    called "unnamed", and the first anonymous return
    argument was called "ret".
    Anonymous arguments are now called arg, arg1, arg2,
    etc., depending on the index in the argument list.
    Return arguments are ret, ret1, ret2.
    
    This CL also fixes a bug in the printing of
    composite data type sizes.
    
    Updates #11041
    
    Change-Id: I1085116a26fe6199480b680eff659eb9ab31769b
    Reviewed-on: https://go-review.googlesource.com/27150
    Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRob Pike <r@golang.org>
    4af11480
Name
Last commit
Last update
..
divergent Loading commit data...
incomplete Loading commit data...
tagtest Loading commit data...
asm.go Loading commit data...
asm1.s Loading commit data...
asm2.s Loading commit data...
asm3.s Loading commit data...
asm4.s Loading commit data...
asm5.s Loading commit data...
assign.go Loading commit data...
atomic.go Loading commit data...
bool.go Loading commit data...
buildtag.go Loading commit data...
buildtag_bad.go Loading commit data...
cgo.go Loading commit data...
cgo2.go Loading commit data...
composite.go Loading commit data...
copylock.go Loading commit data...
copylock_func.go Loading commit data...
copylock_range.go Loading commit data...
deadcode.go Loading commit data...
lostcancel.go Loading commit data...
method.go Loading commit data...
nilfunc.go Loading commit data...
print.go Loading commit data...
rangeloop.go Loading commit data...
shadow.go Loading commit data...
shift.go Loading commit data...
structtag.go Loading commit data...
tests_test.go Loading commit data...
unsafeptr.go Loading commit data...
unused.go Loading commit data...