]> Cypherpunks repositories - gostls13.git/commit
internal/exportdata, cmd/compile/internal/noder: merge export data handling
authorTim King <taking@google.com>
Thu, 14 Nov 2024 20:04:39 +0000 (12:04 -0800)
committerGo LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Fri, 22 Nov 2024 00:04:39 +0000 (00:04 +0000)
commit0edea47f264a4185d78e00e1e9e977d99f5c997b
treed826d7f38902c80dd36ced8d273bde047b737a95
parentd306003ff8fa4d5fbbebdd2eb186137b6328dca4
internal/exportdata, cmd/compile/internal/noder: merge export data handling

Unify how go/types, types2, and noder read in unified export data from
GC-created files.

This splits FindExportData into smaller pieces for improved code
sharing.
- FindPackageDefinition finds the package definition file in the ar
  archive.
- ReadObjectHeaders reads the object headers.
- ReadExportDataHeader reads the export data format header.

There is a new convenience wrapper ReadUnified that combines all of
these. This documents the expected archive contents.

Updates noder and the importers to use these.
This also adjusts when end-of-section marker ("\n$$\n") checking happens.

Change-Id: Iec2179b0a1ae7f69eb12d077018f731116a77f13
Reviewed-on: https://go-review.googlesource.com/c/go/+/628155
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Tim King <taking@google.com>
src/cmd/compile/internal/importer/gcimporter.go
src/cmd/compile/internal/noder/import.go
src/go/internal/gcimporter/gcimporter.go
src/internal/exportdata/exportdata.go