mirror of
https://github.com/burrowers/garble.git
synced 2025-12-24 12:58:05 +08:00
update go_std_tables.go with go1.23.3
No changes to the values. However, to avoid noise with every bugfix release changing all the lines, only use go1.X rather than go1.X.Y to annotate each of the entries in maps and lists.
This commit is contained in:
committed by
Paul Scheduikat
parent
30d1d8cbb7
commit
4e71f1aee3
@@ -11,6 +11,7 @@ import (
|
||||
"cmp"
|
||||
"fmt"
|
||||
"go/format"
|
||||
"go/version"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
@@ -20,7 +21,7 @@ import (
|
||||
"text/template"
|
||||
)
|
||||
|
||||
var goVersions = []string{"go1.23.0"}
|
||||
var goVersions = []string{"go1.23.3"}
|
||||
|
||||
var tmplTables = template.Must(template.New("").Parse(`
|
||||
// Code generated by scripts/gen_go_std_tables.go; DO NOT EDIT.
|
||||
@@ -31,13 +32,13 @@ package main
|
||||
|
||||
var runtimeAndDeps = map[string]bool{
|
||||
{{- range $path := .RuntimeAndDeps }}
|
||||
"{{ $path.String }}": true, // {{ $path.GoVersion }}
|
||||
"{{ $path.String }}": true, // {{ $path.GoVersionLang }}
|
||||
{{- end }}
|
||||
}
|
||||
|
||||
var runtimeLinknamed = []string{
|
||||
{{- range $path := .RuntimeLinknamed }}
|
||||
"{{ $path.String }}", // {{ $path.GoVersion }}
|
||||
"{{ $path.String }}", // {{ $path.GoVersionLang }}
|
||||
{{- end }}
|
||||
// The net package linknames to the runtime, not the other way around.
|
||||
// TODO: support this automatically via our script.
|
||||
@@ -48,7 +49,7 @@ var compilerIntrinsics = map[string]map[string]bool{
|
||||
{{- range $intr := .CompilerIntrinsics }}
|
||||
"{{ $intr.Path }}": {
|
||||
{{- range $name := $intr.Names }}
|
||||
"{{ $name.String }}": true, // {{ $name.GoVersion }}
|
||||
"{{ $name.String }}": true, // {{ $name.GoVersionLang }}
|
||||
{{- end }}
|
||||
},
|
||||
{{- end }}
|
||||
@@ -80,8 +81,8 @@ func (t tmplIntrinsic) Equal(t2 tmplIntrinsic) bool {
|
||||
}
|
||||
|
||||
type versionedString struct {
|
||||
String string
|
||||
GoVersion string
|
||||
String string
|
||||
GoVersionLang string
|
||||
}
|
||||
|
||||
func (v versionedString) Compare(v2 versionedString) int {
|
||||
@@ -89,7 +90,7 @@ func (v versionedString) Compare(v2 versionedString) int {
|
||||
return c
|
||||
}
|
||||
// Negated so that newer Go versions go first.
|
||||
return -cmp.Compare(v.GoVersion, v2.GoVersion)
|
||||
return -cmp.Compare(v.GoVersionLang, v2.GoVersionLang)
|
||||
}
|
||||
|
||||
func (v versionedString) Equal(v2 versionedString) bool {
|
||||
@@ -106,8 +107,8 @@ func cmdGo(goVersion string, args ...string) versionedString {
|
||||
panic(err)
|
||||
}
|
||||
return versionedString{
|
||||
String: string(bytes.TrimSpace(out)), // no trailing newline
|
||||
GoVersion: goVersion,
|
||||
String: string(bytes.TrimSpace(out)), // no trailing newline
|
||||
GoVersionLang: version.Lang(goVersion),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,8 +125,8 @@ func lines(vs versionedString) []versionedString {
|
||||
var versioned []versionedString
|
||||
for _, s := range split {
|
||||
versioned = append(versioned, versionedString{
|
||||
String: s,
|
||||
GoVersion: vs.GoVersion,
|
||||
String: s,
|
||||
GoVersionLang: vs.GoVersionLang,
|
||||
})
|
||||
}
|
||||
return versioned
|
||||
@@ -168,8 +169,8 @@ func main() {
|
||||
continue
|
||||
}
|
||||
runtimeLinknamed = append(runtimeLinknamed, versionedString{
|
||||
String: path,
|
||||
GoVersion: goroot.GoVersion,
|
||||
String: path,
|
||||
GoVersionLang: goroot.GoVersionLang,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -197,8 +198,8 @@ func main() {
|
||||
}
|
||||
path, name := m[2], m[3]
|
||||
vs := versionedString{
|
||||
String: name,
|
||||
GoVersion: goroot.GoVersion,
|
||||
String: name,
|
||||
GoVersionLang: goroot.GoVersionLang,
|
||||
}
|
||||
if i := compilerIntrinsicsIndexByPath[path]; i == 0 {
|
||||
compilerIntrinsicsIndexByPath[path] = len(compilerIntrinsics)
|
||||
|
||||
Reference in New Issue
Block a user