mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/noder: remove unused noding code
This CL simplifies and removes some old noding code, which isn't necessary any more. Most notably, we no longer need separate posMaps for each noder, because noders are only used for parsing now. Before we started using types2, noders were also responsible for constructed (untyped) IR, so posMaps were necessary to translate syntax.Pos into src.XPos. Change-Id: Ic761abcd727f5ecefc71b611635a0f5b088c941f Reviewed-on: https://go-review.googlesource.com/c/go/+/463738 Auto-Submit: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
7cf8593140
commit
178080740c
4 changed files with 13 additions and 94 deletions
|
|
@ -72,15 +72,3 @@ func (m *posMap) makeSrcPosBase(b0 *syntax.PosBase) *src.PosBase {
|
|||
|
||||
return b1
|
||||
}
|
||||
|
||||
func (m *posMap) join(other *posMap) {
|
||||
if m.bases == nil {
|
||||
m.bases = make(map[*syntax.PosBase]*src.PosBase)
|
||||
}
|
||||
for k, v := range other.bases {
|
||||
if m.bases[k] != nil {
|
||||
base.Fatalf("duplicate posmap bases")
|
||||
}
|
||||
m.bases[k] = v
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue