]> Cypherpunks repositories - gostls13.git/commitdiff
go/types: generate recording.go
authorRobert Griesemer <gri@golang.org>
Wed, 31 Jul 2024 20:12:50 +0000 (13:12 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 1 Aug 2024 00:14:29 +0000 (00:14 +0000)
Change-Id: I530df137bcb5094a828f97ecbe204265b50c8546
Reviewed-on: https://go-review.googlesource.com/c/go/+/602118
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Tim King <taking@google.com>
src/go/types/generate_test.go
src/go/types/recording.go

index 79a8e77a75c45b2c7d08224b6c6db9c62222e29a..de2e63d163bf2e4dde90a07ca7dd29596f9e01cb 100644 (file)
@@ -159,9 +159,15 @@ var filemap = map[string]action{
                        "syntax.StringLit->token.STRING") // must happen before renaming identifiers
                renameIdents(f, "syntax->ast")
        },
-       "package.go":       nil,
-       "pointer.go":       nil,
-       "predicates.go":    nil,
+       "package.go":    nil,
+       "pointer.go":    nil,
+       "predicates.go": nil,
+       "recording.go": func(f *ast.File) {
+               renameImportPath(f, `"cmd/compile/internal/syntax"->"go/ast"`)
+               renameSelectorExprs(f, "syntax.Name->ast.Ident") // must happen before renaming identifiers
+               renameIdents(f, "syntax->ast")
+               fixAtPosCall(f)
+       },
        "scope.go":         func(f *ast.File) { fixTokenPos(f); renameIdents(f, "InsertLazy->_InsertLazy") },
        "selection.go":     nil,
        "sizes.go":         func(f *ast.File) { renameIdents(f, "IsSyncAtomicAlign64->_IsSyncAtomicAlign64") },
index fa7383598303d8880ddc5579816088281099a343..8bdc0dfa0e8ec90f502fcc64cb5f898658159901 100644 (file)
@@ -1,9 +1,12 @@
+// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/recording.go
+
 // Copyright 2024 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
 // This file implements recording of type information
-// in the types.Info maps.
+// in the types2.Info maps.
 
 package types