go/pkg/mod/golang.org/x/[email protected]/go/internal/gcimporter/iexport.go

const bundleVersion

// IExportData writes indexed export data for pkg to out.
//
// If no file set is provided, position info will be missing.
// The package path of the top-level package will not be recorded,
// so that calls to IImportData can override with a provided package path.
func IExportData(out io.Writer, fset *token.FileSet, pkg *types.Package) error {}

// IExportBundle writes an indexed export bundle for pkgs to out.
func IExportBundle(out io.Writer, fset *token.FileSet, pkgs []*types.Package) error {}

func iexportCommon(out io.Writer, fset *token.FileSet, bundle bool, pkgs []*types.Package) (err error) {}

// writeIndex writes out an object index. mainIndex indicates whether
// we're writing out the main index, which is also read by
// non-compiler tools and includes a complete package description
// (i.e., name and height).
func (w *exportWriter) writeIndex(index map[types.Object]uint64) {}

// indexName returns the 'indexed' name of an object. It differs from
// obj.Name() only for type parameter names, where we include the subscripted
// type parameter ID.
//
// TODO(rfindley): remove this once we no longer need subscripts.
func indexName(obj types.Object) (res string) {}

type iexporter

// stringOff returns the offset of s within the string section.
// If not already present, it's added to the end.
func (p *iexporter) stringOff(s string) uint64 {}

// pushDecl adds n to the declaration work queue, if not already present.
func (p *iexporter) pushDecl(obj types.Object) {}

type exportWriter

func (w *exportWriter) exportPath(pkg *types.Package) string {}

func (p *iexporter) doDecl(obj types.Object) {}

func (w *exportWriter) tag(tag byte) {}

func (w *exportWriter) pos(pos token.Pos) {}

func (w *exportWriter) posV1(pos token.Pos) {}

func (w *exportWriter) posV0(pos token.Pos) {}

func (w *exportWriter) pkg(pkg *types.Package) {}

func (w *exportWriter) qualifiedIdent(obj types.Object) {}

func (w *exportWriter) typ(t types.Type, pkg *types.Package) {}

func (p *iexporter) newWriter() *exportWriter {}

func (w *exportWriter) flush() uint64 {}

func (p *iexporter) typOff(t types.Type, pkg *types.Package) uint64 {}

func (w *exportWriter) startType(k itag) {}

func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) {}

func (w *exportWriter) setPkg(pkg *types.Package, write bool) {}

func (w *exportWriter) signature(sig *types.Signature) {}

func (w *exportWriter) typeList(ts *typeparams.TypeList, pkg *types.Package) {}

func (w *exportWriter) tparamList(list *typeparams.TypeParamList, pkg *types.Package) {}

func (w *exportWriter) paramList(tup *types.Tuple) {}

func (w *exportWriter) param(obj types.Object) {}

func (w *exportWriter) value(typ types.Type, v constant.Value) {}

// constantToFloat converts a constant.Value with kind constant.Float to a
// big.Float.
func constantToFloat(x constant.Value) *big.Float {}

// mpint exports a multi-precision integer.
//
// For unsigned types, small values are written out as a single
// byte. Larger values are written out as a length-prefixed big-endian
// byte string, where the length prefix is encoded as its complement.
// For example, bytes 0, 1, and 2 directly represent the integer
// values 0, 1, and 2; while bytes 255, 254, and 253 indicate a 1-,
// 2-, and 3-byte big-endian string follow.
//
// Encoding for signed types use the same general approach as for
// unsigned types, except small values use zig-zag encoding and the
// bottom bit of length prefix byte for large values is reserved as a
// sign bit.
//
// The exact boundary between small and large encodings varies
// according to the maximum number of bytes needed to encode a value
// of type typ. As a special case, 8-bit types are always encoded as a
// single byte.
//
// TODO(mdempsky): Is this level of complexity really worthwhile?
func (w *exportWriter) mpint(x *big.Int, typ types.Type) {}

// mpfloat exports a multi-precision floating point number.
//
// The number's value is decomposed into mantissa × 2**exponent, where
// mantissa is an integer. The value is written out as mantissa (as a
// multi-precision integer) and then the exponent, except exponent is
// omitted if mantissa is zero.
func (w *exportWriter) mpfloat(f *big.Float, typ types.Type) {}

func (w *exportWriter) bool(b bool) bool {}

func (w *exportWriter) int64(x int64)   {}

func (w *exportWriter) uint64(x uint64) {}

func (w *exportWriter) string(s string) {}

func (w *exportWriter) localIdent(obj types.Object) {}

type intWriter

func (w *intWriter) int64(x int64) {}

func (w *intWriter) uint64(x uint64) {}

func assert(cond bool) {}

type objQueue

// empty returns true if q contains no Nodes.
func (q *objQueue) empty() bool {}

// pushTail appends n to the tail of the queue.
func (q *objQueue) pushTail(obj types.Object) {}

// popHead pops a node from the head of the queue. It panics if q is empty.
func (q *objQueue) popHead() types.Object {}