@@ -15765,19 +15765,31 @@ var base64chars = []byte{
1576515765 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '$', '%',
1576615766}
1576715767
15768- func (b *KeyBuilder) WriteInt (value int ) {
15768+ func (b *KeyBuilder) WriteUint64 (value uint64 ) {
1576915769 for value != 0 {
1577015770 b.WriteByte(base64chars[value&0x3F])
1577115771 value >>= 6
1577215772 }
1577315773}
1577415774
15775+ func (b *KeyBuilder) WriteInt(value int) {
15776+ b.WriteUint64(uint64(int64(value)))
15777+ }
15778+
15779+ func (b *KeyBuilder) WriteSymbolId(id ast.SymbolId) {
15780+ b.WriteUint64(uint64(id))
15781+ }
15782+
1577515783func (b *KeyBuilder) WriteSymbol(s *ast.Symbol) {
15776- b.WriteInt(int(ast.GetSymbolId(s)))
15784+ b.WriteSymbolId(ast.GetSymbolId(s))
15785+ }
15786+
15787+ func (b *KeyBuilder) WriteTypeId(id TypeId) {
15788+ b.WriteUint64(uint64(id))
1577715789}
1577815790
1577915791func (b *KeyBuilder) WriteType(t *Type) {
15780- b.WriteInt(int( t.id) )
15792+ b.WriteTypeId( t.id)
1578115793}
1578215794
1578315795func (b *KeyBuilder) WriteTypes(types []*Type) {
@@ -15792,7 +15804,7 @@ func (b *KeyBuilder) WriteTypes(types []*Type) {
1579215804 if tail {
1579315805 b.WriteByte(',')
1579415806 }
15795- b.WriteInt(int( startId) )
15807+ b.WriteTypeId( startId)
1579615808 if count > 1 {
1579715809 b.WriteByte(':')
1579815810 b.WriteInt(count)
@@ -15850,9 +15862,13 @@ func (b *KeyBuilder) WriteGenericTypeReferences(source *Type, target *Type, igno
1585015862 return constrained
1585115863}
1585215864
15865+ func (b *KeyBuilder) WriteNodeId(id ast.NodeId) {
15866+ b.WriteUint64(uint64(id))
15867+ }
15868+
1585315869func (b *KeyBuilder) WriteNode(node *ast.Node) {
1585415870 if node != nil {
15855- b.WriteInt(int( ast.GetNodeId(node) ))
15871+ b.WriteNodeId( ast.GetNodeId(node))
1585615872 }
1585715873}
1585815874
@@ -15917,7 +15933,7 @@ func getTupleKey(elementInfos []TupleElementInfo, readonly bool) string {
1591715933 b.WriteByte('*')
1591815934 }
1591915935 if e.labeledDeclaration != nil {
15920- b.WriteInt(int(ast.GetNodeId( e.labeledDeclaration)) )
15936+ b.WriteNode( e.labeledDeclaration)
1592115937 }
1592215938 }
1592315939 if readonly {
@@ -15946,7 +15962,7 @@ func getIndexedAccessKey(objectType *Type, indexType *Type, accessFlags AccessFl
1594615962 b.WriteByte(',')
1594715963 b.WriteType(indexType)
1594815964 b.WriteByte(',')
15949- b.WriteInt(int (accessFlags))
15965+ b.WriteUint64(uint64 (accessFlags))
1595015966 b.WriteAlias(alias)
1595115967 return b.String()
1595215968}
@@ -15993,7 +16009,7 @@ func getRelationKey(source *Type, target *Type, intersectionState IntersectionSt
1599316009 }
1599416010 if intersectionState != IntersectionStateNone {
1599516011 b.WriteByte(':')
15996- b.WriteInt(int (intersectionState))
16012+ b.WriteUint64(uint64 (intersectionState))
1599716013 }
1599816014 if constrained {
1599916015 // We mark keys with type references that reference constrained type parameters such that we know
0 commit comments