]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: adjust lineno during import to get Pos right
authorDavid Chase <drchase@google.com>
Mon, 27 Nov 2017 23:06:17 +0000 (18:06 -0500)
committerDavid Chase <drchase@google.com>
Tue, 28 Nov 2017 22:36:55 +0000 (22:36 +0000)
commita5b759aab8b9e866c0bf2dd91ffde68b6bc6766b
treef833043e5b8ef9da8acd559b49214b539ec660e0
parent71a9c4430fb822e0116471fe17a339db04d5a6c6
cmd/compile: adjust lineno during import to get Pos right

Binary import sometimes constructs nodes using functions
that use the global lineno for the Position.  This causes
spurious numbers to appear in the assembly and the
debugging output.

Fix (targeted, because late in the cycle): save and restore
lineno around bimport calls known to use lineno-sensitive
functions.

Updates #22600.
(Comment: "This is a weird line to step through")

Change-Id: I9c4094670380609fe4b6696443fb02579521c596
Reviewed-on: https://go-review.googlesource.com/80115
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/bimport.go
src/cmd/compile/internal/ssa/testdata/hist.opt-dlv.nexts