• Matthew Dempsky's avatar
    cmd/compile: get rid of redundant Type helper functions · 1624a9c9
    Matthew Dempsky authored
    Replace Isfixedarray, Isslice, and Isinter with the IsArray, IsSlice,
    and IsInterface methods added for SSA. Rewrite performed mechanically
    using gofmt -w -r "Isfoo(t) -> t.IsFoo()".
    
    Because the IsFoo methods panic when given a nil pointer, a handful of
    call sites had to be modified to check for nil Type values. These
    aren't strictly necessary, because nil Type values should only occur
    in invalid Go source programs, so it would be okay if we panicked on
    them and gave up type checking the rest of the package. However, there
    are a couple regress tests that expect we continue, so add checks to
    keep those tests passing. (See #15029.)
    
    Passes toolstash -cmp.
    
    Change-Id: I511c6ac4cfdf3f9cbdb3e52a5fa91b6d09d82f80
    Reviewed-on: https://go-review.googlesource.com/21336Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    1624a9c9
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...