functions

package
v2.0.10+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2018 License: MIT, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNilError

func IsNilError(fn *ssa.Function) bool

Types

type Description

type Description struct {
	// The function is known to be pure
	Pure bool
	// The function is known to be a stub
	Stub bool
	// The function is known to never return (panics notwithstanding)
	Infinite bool
	// Variable ranges
	Ranges vrp.Ranges
	Loops  []Loop
	// Function returns an error as its last argument, but it is
	// always nil
	NilError            bool
	ConcreteReturnTypes []*types.Tuple
}

type Descriptions

type Descriptions struct {
	CallGraph *callgraph.Graph
	// contains filtered or unexported fields
}

func NewDescriptions

func NewDescriptions(prog *ssa.Program) *Descriptions

func (*Descriptions) Get

func (d *Descriptions) Get(fn *ssa.Function) Description

func (*Descriptions) IsPure

func (d *Descriptions) IsPure(fn *ssa.Function) bool

func (*Descriptions) IsStub

func (d *Descriptions) IsStub(fn *ssa.Function) bool

IsStub reports whether a function is a stub. A function is considered a stub if it has no instructions or exactly one instruction, which must be either returning only constant values or a panic.

type Loop

type Loop map[*ssa.BasicBlock]bool

Jump to

Keyboard shortcuts

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