...

Package devirt

import "cmd/compile/internal/test/testdata/pgo/devirtualize"
Overview
Index
Subdirectories

Overview ▾

func AddFn

func AddFn(a, b int) int

func DirectCall

func DirectCall() bool

func ExerciseFuncClosure

func ExerciseFuncClosure(iter int, a1, a2 AddFunc, m1, m2 mult.MultFunc) int

ExerciseFuncClosure calls mostly a1 and m1.

This is a simplified version of ExerciseFuncConcrete, but we need two distinct call sites to test two different types of function values.

func ExerciseFuncConcrete

func ExerciseFuncConcrete(iter int, a1, a2 AddFunc, m1, m2 mult.MultFunc) int

ExerciseFuncConcrete calls mostly a1 and m1.

func ExerciseFuncField

func ExerciseFuncField(iter int, a1, a2 AddFunc, m1, m2 mult.MultFunc) int

ExerciseFuncField calls mostly a1 and m1.

This is a simplified version of ExerciseFuncConcrete, but accessing the function values via a struct field.

func ExerciseIface

func ExerciseIface(iter int, a1, a2 Adder, m1, m2 mult.Multiplier) int

ExerciseIface calls mostly a1 and m1.

func ExerciseIfaceZeroWeight

func ExerciseIfaceZeroWeight()

ExerciseIfaceZeroWeight never calls IfaceZeroWeight, so the callee is not expected to appear in the profile.

func ExerciseIndirCallZeroWeight

func ExerciseIndirCallZeroWeight()

ExerciseIndirCallZeroWeight never calls IndirCallZeroWeight, so the callee is not expected to appear in the profile.

func IfaceZeroWeight

func IfaceZeroWeight(a *Add, b Adder) bool

func IndirCallZeroWeight

func IndirCallZeroWeight(indirectCall func() bool) bool

func IndirectCall

func IndirectCall() bool

func SubFn

func SubFn(a, b int) int

type Add

type Add struct{}

func (Add) Add

func (Add) Add(a, b int) int

type AddFunc

type AddFunc func(int, int) int

func AddClosure

func AddClosure() AddFunc

func SubClosure

func SubClosure() AddFunc

type Adder

type Adder interface {
    Add(a, b int) int
}

type Sub

type Sub struct{}

func (Sub) Add

func (Sub) Add(a, b int) int

Subdirectories

Name Synopsis
..