go/src/cmd/compile/internal/gc
David Lazar 1c6ef9aeed cmd/compile: copy literals when inlining
Without this, literals keep their original source positions through
inlining, which results in strange jumps in line numbers of inlined
function bodies. By copying literals, inlining can update their source
position like other nodes.

Fixes #15453.

Change-Id: Iad5d9bbfe183883794213266dc30e31bab89ee69
Reviewed-on: https://go-review.googlesource.com/37232
Run-TryBot: David Lazar <lazard@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2017-03-03 21:29:32 +00:00
..
builtin cmd/compile, runtime: specialize convT2x, don't alloc for zero vals 2017-02-28 19:23:33 +00:00
testdata cmd/compile: emit fused multiply-{add,subtract} instructions on s390x 2017-02-28 15:34:20 +00:00
alg.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
align.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
asm_test.go cmd/dist, cmd/compile: eliminate mergeEnvLists copies 2017-03-02 22:26:23 +00:00
bexport.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
bimport.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
bitset.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
builtin.go cmd/compile, runtime: specialize convT2x, don't alloc for zero vals 2017-02-28 19:23:33 +00:00
builtin_test.go all: use testing.GoToolPath instead of "go" 2016-08-30 22:49:11 +00:00
bv.go cmd/compile: make liveness more efficient 2017-02-03 19:41:44 +00:00
closure.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
const.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
constFold_test.go cmd/compile: fix bad generated format strings in test 2016-08-16 14:14:51 +00:00
dcl.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
esc.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
export.go cmd/compile: skip reexporting types in reexportdep 2017-02-02 04:25:40 +00:00
fixedbugs_test.go cmd/compile: inline convT2{I,E} when result doesn't escape 2016-09-19 02:37:08 +00:00
float_test.go cmd/compile: fix uint<->float conversion on 386 2016-08-16 17:20:11 +00:00
fmt.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
gen.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
global_test.go all: use testing.GoToolPath instead of "go" 2016-08-30 22:49:11 +00:00
go.go cmd/compile/internal/gc: separate builtin and real runtime packages 2017-03-01 01:06:32 +00:00
gsubr.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
iface_test.go cmd/compile: inline convT2{I,E} when result doesn't escape 2016-09-19 02:37:08 +00:00
init.go cmd/compile: eliminate OASWB 2017-02-10 22:31:58 +00:00
inl.go cmd/compile: copy literals when inlining 2017-03-03 21:29:32 +00:00
lex.go cmd/compile/internal/gc: unexport or remove global functions 2017-02-10 17:57:38 +00:00
lex_test.go cmd/compile: provide line number for cgo directive error (fix a TODO) 2017-02-02 21:24:50 +00:00
logic_test.go cmd/compile: add tests for logical simplification rewrite rules 2016-05-26 22:16:52 +00:00
main.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
mkbuiltin.go cmd/compile: update signature of runtime.memclr* 2017-02-28 19:22:29 +00:00
mpfloat.go cmd/dist: copy needed packages from standard library during bootstrap 2016-10-17 15:22:11 +00:00
mpint.go cmd/dist: copy needed packages from standard library during bootstrap 2016-10-17 15:22:11 +00:00
noder.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
obj.go cmd/compile, cmd/asm: remove Link.Plists 2017-03-01 00:29:23 +00:00
opnames.go cmd/compile/internal/gc: remove OHMUL Op 2017-03-03 17:47:53 +00:00
order.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
pgen.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
pgen_test.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
phi.go cmd/compile: speed up hot phi insertion code 2017-02-03 05:36:22 +00:00
plive.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
racewalk.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
range.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
reflect.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
reflect_test.go cmd/compile/internal/gc: use sort.Interface for reflect methods 2015-09-21 22:27:53 +00:00
select.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
shift_test.go cmd/compile: test non-constant shifts 2016-06-01 00:06:00 +00:00
sinit.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
sizeof_test.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
ssa.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
ssa_test.go cmd/compile/internal/gc: make tests run faster 2016-11-03 01:07:08 +00:00
subr.go cmd/compile,link: generate PC-value tables with inlining information 2017-03-03 21:29:30 +00:00
swt.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
swt_test.go cmd/dist: copy needed packages from standard library during bootstrap 2016-10-17 15:22:11 +00:00
syntax.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
timings.go cmd/compile: add compiler phase timing 2016-08-17 17:27:04 +00:00
trace.go cmd/compile/internal/gc: add runtime/trace support 2016-10-12 13:57:26 +00:00
type.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
typecheck.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00
universe.go cmd/compile/internal/gc: remove OHMUL Op 2017-03-03 17:47:53 +00:00
unsafe.go cmd/compile: handle unsafe builtins like universal builtins 2016-10-18 22:34:44 +00:00
util.go cmd/compile,link: generate PC-value tables with inlining information 2017-03-03 21:29:30 +00:00
walk.go cmd/compile: pack bool fields in Node, Name, Func and Type structs to bitsets 2017-03-03 21:06:03 +00:00