aboutsummaryrefslogtreecommitdiff
path: root/src/strings/replace.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2018-03-31 16:49:07 -0700
committerMatthew Dempsky <mdempsky@google.com>2018-04-02 04:09:29 +0000
commit0250ef910f9a979a2151bd8e02b2641b74cf2f27 (patch)
tree152b68bb021558977775d102c3b59c8e105be35e /src/strings/replace.go
parent3c588b3fe7e1394f7df981284f1dc4c0a2b32b14 (diff)
downloadgo-0250ef910f9a979a2151bd8e02b2641b74cf2f27.tar.xz
cmd/compile: refactor constant rewriting
Extract all rewrite-to-OLITERAL expressions to use a single setconst helper function. Does not pass toolstash-check for two reasons: 1) We now consistently clear Left/Right/etc when rewriting Nodes into OLITERALs, which results in their inlining complexity being correctly computed. So more functions can now be inlined. 2) We preserve Pos, so PC line tables change somewhat. Change-Id: I2b5c293bee7c69c2ccd704677f5aba4ec40e3155 Reviewed-on: https://go-review.googlesource.com/103860 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Diffstat (limited to 'src/strings/replace.go')
0 files changed, 0 insertions, 0 deletions