| 1 | // Copyright 2021 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package triescip-go gomod golang.org/x/tools . `golang.org/x/tools/go/callgraph/vta/internal/trie`/ |
| 6 | |
| 7 | import ( |
| 8 | "strconvscip-go gomod github.com/golang/go/src go1.25.0 strconv/" |
| 9 | "sync/atomicscip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/" |
| 10 | ) |
| 11 | |
| 12 | // Scope represents a distinct collection of maps. |
| 13 | // Maps with the same Scope can be equal. Maps in different scopes are distinct. |
| 14 | // Each Builder creates maps within a unique Scope. |
| 15 | type Scopescip-go gomod golang.org/x/tools . `golang.org/x/tools/go/callgraph/vta/internal/trie`/Scope# struct { |
| 16 | idscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/callgraph/vta/internal/trie`/Scope#id. int32 |
| 17 | } |
| 18 | |
| 19 | var nextScopeIdscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/callgraph/vta/internal/trie`/nextScopeId. atomicscip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/.Int32scip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/Int32# |
| 20 | |
| 21 | func newScopescip-go gomod golang.org/x/tools . `golang.org/x/tools/go/callgraph/vta/internal/trie`/newScope().() Scopescip-go gomod golang.org/x/tools . `golang.org/x/tools/go/callgraph/vta/internal/trie`/Scope# { |
| 22 | id := nextScopeIdscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/callgraph/vta/internal/trie`/nextScopeId..Addscip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/Int32#Add().(1) |
| 23 | return Scopescip-go gomod golang.org/x/tools . `golang.org/x/tools/go/callgraph/vta/internal/trie`/Scope#{idscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/callgraph/vta/internal/trie`/Scope#id.: id} |
| 24 | } |
| 25 | |
| 26 | func (s Scopescip-go gomod golang.org/x/tools . `golang.org/x/tools/go/callgraph/vta/internal/trie`/Scope#) Stringscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/callgraph/vta/internal/trie`/Scope#String().() string { |
| 27 | return strconvscip-go gomod github.com/golang/go/src go1.25.0 strconv/.Itoascip-go gomod github.com/golang/go/src go1.25.0 strconv/Itoa().(int(s.idscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/callgraph/vta/internal/trie`/Scope#id.)) |
| 28 | } |