compiler: rationalize external symbol names
commit13f2fdb87742d34363138de56faf1f82bf580092
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Jan 2018 23:50:09 +0000 (24 23:50 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Jan 2018 23:50:09 +0000 (24 23:50 +0000)
treea782ef29045ab50de17cac215b8c30c9a3b61aa2
parent9ff3f8aca1f2f44429138b819e0bb838140b5314
compiler: rationalize external symbol names

    Encode all external symbol names using only ASCII alphanumeric
    characters, underscore, and dot.  Use a scheme that can be reliably
    demangled to a somewhat readable version as described in the long
    comment in names.cc.

    A minor cleanup discovered during this was that we were treating
    function types as different if one had a NULL parameters_ field and
    another has a non-NULL parameters_ field that has no parameters.  This
    worked because we mangled them slightly differently.  We now mangle
    them the same, so we treat them as equal, as we should anyhow.

    Reviewed-on: https://go-review.googlesource.com/89555

* go.go-torture/execute/names-1.go: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257033 138bc75d-0d04-0410-961f-82ee72b054a4
19 files changed:
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/escape.cc
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/go-encode-id.cc
gcc/go/gofrontend/go-encode-id.h
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/gogo.h
gcc/go/gofrontend/lex.cc
gcc/go/gofrontend/names.cc
gcc/go/gofrontend/statements.cc
gcc/go/gofrontend/types.cc
gcc/testsuite/ChangeLog
gcc/testsuite/go.go-torture/execute/names-1.go [new file with mode: 0644]
libgo/go/runtime/crash_test.go
libgo/go/runtime/panic.go
libgo/go/runtime/pprof/pprof_test.go
libgo/go/syscall/wait.c
libgo/runtime/go-callers.c
libgo/runtime/go-unsafe-pointer.c