]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/syntax: expose additional information for gc
authorMatthew Dempsky <mdempsky@google.com>
Tue, 16 Aug 2016 20:33:29 +0000 (13:33 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 19 Aug 2016 01:09:52 +0000 (01:09 +0000)
commit117793624b630b0ee63abb16dcb019301adc6472
treede7abfdde47e7fe0307b26d5ad6164ad5136a52e
parent4e8c11379345f08ccf47239f7e0ea192917f602a
cmd/compile/internal/syntax: expose additional information for gc

gc needs access to line offsets for Nodes. It also needs access to the
end line offset for function bodies so it knows what line number to
use for things like implicit returns and defer executions.

Lastly, include an extra bool to distinguish between simple and full
slice expressions. This is redundant in valid parse trees, but needed
by gc for producing complete warnings in invalid inputs.

Change-Id: I64baf334a35c72336d26fa6755c67eb9d6f4e93c
Reviewed-on: https://go-review.googlesource.com/27196
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/syntax/nodes.go
src/cmd/compile/internal/syntax/parser.go