mirror of
https://github.com/golang/go
synced 2024-11-24 09:30:07 -07:00
cmd/compile: pre init shapeMap
This commit is contained in:
parent
3d3f5d912b
commit
ff1fa78a36
@ -1447,9 +1447,6 @@ func Shapify(t *types.Type, index int) *types.Type {
|
|||||||
u = types.Types[types.TUINT8].PtrTo()
|
u = types.Types[types.TUINT8].PtrTo()
|
||||||
}
|
}
|
||||||
|
|
||||||
if shapeMap == nil {
|
|
||||||
shapeMap = map[int]map[*types.Type]*types.Type{}
|
|
||||||
}
|
|
||||||
submap := shapeMap[index]
|
submap := shapeMap[index]
|
||||||
if submap == nil {
|
if submap == nil {
|
||||||
submap = map[*types.Type]*types.Type{}
|
submap = map[*types.Type]*types.Type{}
|
||||||
@ -1479,4 +1476,4 @@ func Shapify(t *types.Type, index int) *types.Type {
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
var shapeMap map[int]map[*types.Type]*types.Type
|
var shapeMap = map[int]map[*types.Type]*types.Type{}
|
||||||
|
Loading…
Reference in New Issue
Block a user