]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: make numberlines line mismatch check ignore columns
authorDavid Chase <drchase@google.com>
Thu, 2 May 2019 17:36:10 +0000 (13:36 -0400)
committerDavid Chase <drchase@google.com>
Mon, 6 May 2019 17:43:30 +0000 (17:43 +0000)
This does not repair #31786, and in fact also unfixes the revert
of CL 174617.  We were just getting lucky when it looked like
it was working.  And unfortunately for the bug, there does not
appear to be any particular problems with the line numbers;
if anything they're a couple of extras, i.e., stepping might
repeat, rather than skip.  Delve works fine either way.

Updates #31786.

Change-Id: I5c2fdc2a0265bb99773b3a85492a3db557dffee4
Reviewed-on: https://go-review.googlesource.com/c/go/+/174948
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/numberlines.go

index ef5e13320680a1a1a2b6bc68945a03e3bce2b33e..9bdb357d351e2296ac40516b221d005d5741ef7f 100644 (file)
@@ -149,7 +149,7 @@ func numberLines(f *Func) {
                } else {
                        for _, p := range b.Preds {
                                pbi := p.Block().ID
-                               if endlines[pbi] != firstPos {
+                               if endlines[pbi].Line() != firstPos.Line() || !endlines[pbi].SameFile(firstPos) {
                                        b.Values[firstPosIndex].Pos = firstPos.WithIsStmt()
                                        break
                                }