search

package
v0.0.0-...-3f344d0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

normal primitives include mutex, rwmutex, waitgroup, once, cond, pool

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alive_mutexs

func Alive_mutexs(target_fn ssa.Function) map[ssa.Instruction][]string

func Chan_name_SRC

func Chan_name_SRC(target_inst ssa.Instruction) (fullname string, partname string)

Before use this function, need to make sure that target_inst is one of chan_send/receive/close If the inst is "<- s.ch1", then this function returns "ch1"

func Chan_name_make

func Chan_name_make(target_inst ssa.Instruction) (fullname string, partname string)

Before use this function, need to make sure that target_inst is ssa.Makechan

func Chan_name_select

func Chan_name_select(inst *ssa.Select, state *ssa.SelectState) (fullname string, partname string)

Before use this function, need to make sure that target_inst is *ssa.Select If the inst is "<- s.ch1", then this function returns "ch1"

func Chan_name_value

func Chan_name_value(target_value ssa.Value) string

Chan_name_value is typically used on ssa.Value that is ssa.SelectState.Chan or ssa.UnOp.X (Op == Arrow) or ssa.Send.Chan This function can return name of channel in ssa.Value, which need to be *ch1 (UnOp+Alloc) or *mytype.fieldch1 (UnOp+FieldAddr+Alloc)

func Cond_name_and_line

func Cond_name_and_line(inst ssa.Instruction) (string, string)

func Find_prim

func Find_prim(inst ssa.Instruction) *ssa.Value

func First_inst_with_solid_position

func First_inst_with_solid_position(fn *ssa.Function) ssa.Instruction

func Is_fn_in_slice

func Is_fn_in_slice(target *ssa.Function, slice []*ssa.Function) bool

func Is_inst_in_slice

func Is_inst_in_slice(target ssa.Instruction, slice []ssa.Instruction) bool

func Lines_using_name_between

func Lines_using_name_between(position_a token.Position, position_b token.Position, name string, exclude_line int) (result []string)

func Mutex_name

func Mutex_name(inst ssa.Instruction) string

func Read_inst_line

func Read_inst_line(inst ssa.Instruction) string

func Read_position

func Read_position(p token.Position) string

func Receiver_name_of_method

func Receiver_name_of_method(fn ssa.Function) string

func Str_All_Index

func Str_All_Index(str string, sub string) (result []int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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