Commit 3a7a255
internal/export/idna: make more space for mapping index
This prepares for an upcoming Unicode upgrade.
Beyond Unicode 13 the size of mappings will grow beyond
what can be represented in the allocated 13 bits. Instread
of doubling the size of info, we introduce a table of indices
into the mappings data. This also allows us to remove the
length byte, reducing the overhead of introducing this new
table.
This change allows for about a 5x growth of the number
of mappings, which should suffice for the foreseeable
future.
Change-Id: Id475dc2473145a1f36bd83b983fa4aa170df6206
Reviewed-on: https://go-review.googlesource.com/c/text/+/501515
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>1 parent d61dd50 commit 3a7a255
5 files changed
Lines changed: 1620 additions & 1458 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | | - | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
| |||
133 | 138 | | |
134 | 139 | | |
135 | 140 | | |
136 | | - | |
| 141 | + | |
137 | 142 | | |
138 | 143 | | |
139 | 144 | | |
140 | 145 | | |
141 | | - | |
142 | 146 | | |
| 147 | + | |
143 | 148 | | |
144 | 149 | | |
145 | 150 | | |
| |||
0 commit comments