[dev.regabi] cmd/compile: minor walkExpr cleanups
This CL cleans up a few minor points in walkExpr: 1. We don't actually care about computing the type-size of all expressions that are walked. We care about computing the type-size of all expressions that are *returned* by walk, as these are the expressions that will actually be seen by the back end. 2. There's no need to call typecheck.EvalConst anymore. EvalConst used to be responsible for doing additional constant folding during walk; but for a while a now, it has done only as much constant folding as is required during type checking (because doing further constant folding led to too many issues with Go spec compliance). Instead, more aggressive constant folding is handled entirely by SSA. 3. The code for detecting string constants and generating their symbols can be simplified somewhat. Passes toolstash -cmp. Change-Id: I464ef5bceb8a97689c8f55435369a3402a5ebc55 Reviewed-on: https://go-review.googlesource.com/c/go/+/280434 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by:Cuong Manh Le <cuong.manhle.vn@gmail.com>
Loading
Please sign in to comment