mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typeparams] cmd/compile: move def of comparable to end of predeclared slices
This avoids changing the export ABI. Change-Id: I58950c1f4c21859d91d66d352b88e8c0972b5b8c Reviewed-on: https://go-review.googlesource.com/c/go/+/333164 Trust: Dan Scales <danscales@google.com> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
c65ca97a45
commit
85267f402c
3 changed files with 9 additions and 6 deletions
|
|
@ -101,8 +101,6 @@ var predeclared = []types2.Type{
|
||||||
|
|
||||||
// error
|
// error
|
||||||
types2.Universe.Lookup("error").Type(),
|
types2.Universe.Lookup("error").Type(),
|
||||||
// comparable
|
|
||||||
types2.Universe.Lookup("comparable").Type(),
|
|
||||||
|
|
||||||
// untyped types
|
// untyped types
|
||||||
types2.Typ[types2.UntypedBool],
|
types2.Typ[types2.UntypedBool],
|
||||||
|
|
@ -121,6 +119,9 @@ var predeclared = []types2.Type{
|
||||||
|
|
||||||
// used internally by gc; never used by this package or in .a files
|
// used internally by gc; never used by this package or in .a files
|
||||||
anyType{},
|
anyType{},
|
||||||
|
|
||||||
|
// comparable
|
||||||
|
types2.Universe.Lookup("comparable").Type(),
|
||||||
}
|
}
|
||||||
|
|
||||||
type anyType struct{}
|
type anyType struct{}
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,6 @@ func predeclared() []*types.Type {
|
||||||
|
|
||||||
// error
|
// error
|
||||||
types.ErrorType,
|
types.ErrorType,
|
||||||
// comparable
|
|
||||||
types.ComparableType,
|
|
||||||
|
|
||||||
// untyped types
|
// untyped types
|
||||||
types.UntypedBool,
|
types.UntypedBool,
|
||||||
|
|
@ -98,6 +96,9 @@ func predeclared() []*types.Type {
|
||||||
|
|
||||||
// any type, for builtin export data
|
// any type, for builtin export data
|
||||||
types.Types[types.TANY],
|
types.Types[types.TANY],
|
||||||
|
|
||||||
|
// comparable
|
||||||
|
types.ComparableType,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return predecl
|
return predecl
|
||||||
|
|
|
||||||
|
|
@ -104,8 +104,6 @@ var predeclared = []types.Type{
|
||||||
|
|
||||||
// error
|
// error
|
||||||
types.Universe.Lookup("error").Type(),
|
types.Universe.Lookup("error").Type(),
|
||||||
// comparable
|
|
||||||
types.Universe.Lookup("comparable").Type(),
|
|
||||||
|
|
||||||
// untyped types
|
// untyped types
|
||||||
types.Typ[types.UntypedBool],
|
types.Typ[types.UntypedBool],
|
||||||
|
|
@ -124,6 +122,9 @@ var predeclared = []types.Type{
|
||||||
|
|
||||||
// used internally by gc; never used by this package or in .a files
|
// used internally by gc; never used by this package or in .a files
|
||||||
anyType{},
|
anyType{},
|
||||||
|
|
||||||
|
// comparable
|
||||||
|
types.Universe.Lookup("comparable").Type(),
|
||||||
}
|
}
|
||||||
|
|
||||||
type anyType struct{}
|
type anyType struct{}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue