compiler: inline functions with assignments and return statements

Support inlining functions that contain only assignments and return
statements, with expressions of either constants or parameters.
Functions that contain other kinds of statements or expressions are
not yet inlined.  With this change, about 100 functions in the
standard library are inlinable.

Change-Id: I3784ab8acb5c471386d338a5c92f97b8b6bfe21a
Reviewed-on: https://go-review.googlesource.com/c/150073
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
4 files changed