(id int64)
| 225 | } |
| 226 | |
| 227 | func (gen *idGenerator) renumberStable(id int64) int64 { |
| 228 | if id == 0 { |
| 229 | return 0 |
| 230 | } |
| 231 | if newID, found := gen.idMap[id]; found { |
| 232 | return newID |
| 233 | } |
| 234 | nextID := gen.nextID() |
| 235 | gen.idMap[id] = nextID |
| 236 | return nextID |
| 237 | } |
| 238 | |
| 239 | // OptimizerContext embeds Env and Issues instances to make it easy to type-check and evaluate |
| 240 | // subexpressions and report any errors encountered along the way. The context also embeds the |