Skip to content

Commit

Permalink
unicode/bidi: remove unused global
Browse files Browse the repository at this point in the history
It seems like controlToClass variable is not used anymore.
As it allocates in init we should remove it.
Before:
init golang.org/x/text/unicode/bidi @0.70 ms, 0.003 ms clock, 272 bytes, 2 allocs
After:
init golang.org/x/text/unicode/bidi @0.79 ms, 0 ms clock, 0 bytes, 0 allocs

Change-Id: I79b236feb841c45908431cdb440bd1f4eb082d00
Reviewed-on: https://go-review.googlesource.com/c/text/+/449595
Run-TryBot: Ian Lance Taylor <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
Reviewed-by: Michael Knyszek <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
  • Loading branch information
Thorleon authored and gopherbot committed Nov 10, 2022
1 parent ada7473 commit c8236a6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
12 changes: 0 additions & 12 deletions unicode/bidi/gen_trieval.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ const (
unknownClass = ^Class(0)
)

var controlToClass = map[rune]Class{
0x202D: LRO, // LeftToRightOverride,
0x202E: RLO, // RightToLeftOverride,
0x202A: LRE, // LeftToRightEmbedding,
0x202B: RLE, // RightToLeftEmbedding,
0x202C: PDF, // PopDirectionalFormat,
0x2066: LRI, // LeftToRightIsolate,
0x2067: RLI, // RightToLeftIsolate,
0x2068: FSI, // FirstStrongIsolate,
0x2069: PDI, // PopDirectionalIsolate,
}

// A trie entry has the following bits:
// 7..5 XOR mask for brackets
// 4 1: Bracket open, 0: Bracket close
Expand Down
12 changes: 0 additions & 12 deletions unicode/bidi/trieval.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c8236a6

Please sign in to comment.