noder

package
v0.9.2202 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2024 License: BSD-3-Clause Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Addr

func Addr(pos src.XPos, x ir.Node) *ir.AddrExpr

func Deref

func Deref(pos src.XPos, typ *types.Type, x ir.Node) *ir.StarExpr

func FixValue

func FixValue(typ *types.Type, val constant.Value) constant.Value

FixValue returns val after converting and truncating it as appropriate for typ.

func LoadPackage

func LoadPackage(filenames []string)

func LookupFunc added in v0.7.2202

func LookupFunc(fullName string) (*ir.Func, error)

LookupMethodFunc returns the ir.Func for an arbitrary full symbol name if that function exists in the set of available export data.

This allows lookup of arbitrary functions and methods that aren't otherwise referenced by the local package and thus haven't been read yet.

TODO(prattmic): Does not handle instantiation of generic types. Currently profiles don't contain the original type arguments, so we won't be able to create the runtime dictionaries.

TODO(prattmic): Hit rate of this function is usually fairly low, and errors are only used when debug logging is enabled. Consider constructing cheaper errors by default.

func MakeWrappers

func MakeWrappers(target *ir.Package)

func Renameinit

func Renameinit() *types.Sym

func WriteExports

func WriteExports(out *bio.Writer)

Types

type ImplicitNode

type ImplicitNode interface {
	ir.Node
	SetImplicit(x bool)
}

func Implicit

func Implicit(n ImplicitNode) ImplicitNode

Implicit returns n after marking it as Implicit.

type WasmImport added in v0.7.2202

type WasmImport struct {
	Pos    syntax.Pos
	Module string
	Name   string
}

WasmImport stores metadata associated with the //go:wasmimport pragma

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL