compiler: record final type for numeric expressions
commit69f634cc6716cc12a759cb827b218bb2f14cd58c
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Nov 2018 23:29:15 +0000 (27 23:29 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Nov 2018 23:29:15 +0000 (27 23:29 +0000)
tree64a5c3a3eacb60fdeed40da0d460c6c6a27647f0
parentc8fb3443911413cc88f316305fc6b7bf4861ccaa
compiler: record final type for numeric expressions

    Inlinable function bodies are generated after the determine_types pass,
    so we know the type for all constants.  Rather than try to determine
    it again when inlining, record the type in the export data, using a
    $convert expression.  Reduce the number of explicit $convert
    expressions by recording a type context with the expected type in
    cases where that type is known.

    Reviewed-on: https://go-review.googlesource.com/c/150071

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266534 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/export.h
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/types.cc