From 059879e14301660c9fce1e5e59bdfaef89fc4aaf Mon Sep 17 00:00:00 2001 From: Reapor-Yurnero Date: Wed, 20 May 2020 22:48:41 -0700 Subject: Implement gap tracking in the segment set. This change was derived from a change by: Reapor-Yurnero And has been modified by: Adin Scannell (The original change author is preserved for the commit.) This change implements gap tracking in the segment set by adding additional information in each node, and using that information to speed up gap finding from a linear scan to a O(log(n)) walk of the tree. This gap tracking is optional, and will default to off except for segment instances that set gapTracking equal to 1 in their const lists. PiperOrigin-RevId: 312621607 --- tools/go_generics/generics.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/go_generics/generics.go') diff --git a/tools/go_generics/generics.go b/tools/go_generics/generics.go index e9cc2c753..0860ca9db 100644 --- a/tools/go_generics/generics.go +++ b/tools/go_generics/generics.go @@ -223,7 +223,9 @@ func main() { } else { switch kind { case globals.KindType, globals.KindVar, globals.KindConst, globals.KindFunction: - ident.Name = *prefix + ident.Name + *suffix + if ident.Name != "_" { + ident.Name = *prefix + ident.Name + *suffix + } case globals.KindTag: // Modify the state tag appropriately. if m := stateTagRegexp.FindStringSubmatch(ident.Name); m != nil { -- cgit v1.2.3