go/src/cmd/compile/internal/syntax
Matthew Dempsky 1ded8334f7 [release-branch.go1.9] cmd/compile/internal/syntax: fix source buffer refilling
The previous code seems to have an off-by-1 in it somewhere, the
consequence being that we didn't properly preserve all of the old
buffer contents that we intended to.

After spending a while looking at the existing window-shifting logic,
I wasn't able to understand exactly how it was supposed to work or
where the issue was, so I rewrote it to be (at least IMO) more
obviously correct.

Fixes #21938.

Change-Id: I1ed7bbc1e1751a52ab5f7cf0411ae289586dc345
Reviewed-on: https://go-review.googlesource.com/64830
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-on: https://go-review.googlesource.com/70977
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2017-10-25 20:23:03 +00:00
..
branches.go cmd/compile/internal/syntax: compute BranchStmt.Target statements 2017-04-21 22:30:55 +00:00
dumper.go cmd/compile/internal/syntax: print position info for names in tree dump 2017-03-06 23:45:14 +00:00
dumper_test.go cmd/compile/internal/syntax: compute BranchStmt.Target statements 2017-04-21 22:30:55 +00:00
nodes.go cmd/compile/internal/syntax: compute BranchStmt.Target statements 2017-04-21 22:30:55 +00:00
nodes_test.go [release-branch.go1.9] cmd/compile: replace GOROOT in //line directives 2017-10-25 20:22:55 +00:00
parser.go [release-branch.go1.9] cmd/compile: replace GOROOT in //line directives 2017-10-25 20:22:55 +00:00
parser_test.go [release-branch.go1.9] cmd/compile: replace GOROOT in //line directives 2017-10-25 20:22:55 +00:00
printer.go cmd/compile/internal/syntax: always construct a correct syntax tree 2017-03-25 21:01:49 +00:00
printer_test.go [release-branch.go1.9] cmd/compile: replace GOROOT in //line directives 2017-10-25 20:22:55 +00:00
scanner.go cmd/compile/internal/syntax: start line offset (column) numbers at 1 2017-03-09 23:28:48 +00:00
scanner_test.go [release-branch.go1.9] cmd/compile/internal/syntax: fix source buffer refilling 2017-10-25 20:23:03 +00:00
source.go [release-branch.go1.9] cmd/compile/internal/syntax: fix source buffer refilling 2017-10-25 20:23:03 +00:00
syntax.go [release-branch.go1.9] cmd/compile: replace GOROOT in //line directives 2017-10-25 20:22:55 +00:00
tokens.go Revert "cmd/compile/internal/syntax: support for alias declarations" 2016-11-05 00:46:39 +00:00