Documentation ¶
Overview ¶
normal primitives include mutex, rwmutex, waitgroup, once, cond, pool
Index ¶
- func Alive_mutexs(target_fn ssa.Function) map[ssa.Instruction][]string
- func Chan_name_SRC(target_inst ssa.Instruction) (fullname string, partname string)
- func Chan_name_make(target_inst ssa.Instruction) (fullname string, partname string)
- func Chan_name_select(inst *ssa.Select, state *ssa.SelectState) (fullname string, partname string)
- func Chan_name_value(target_value ssa.Value) string
- func Cond_name_and_line(inst ssa.Instruction) (string, string)
- func Find_prim(inst ssa.Instruction) *ssa.Value
- func First_inst_with_solid_position(fn *ssa.Function) ssa.Instruction
- func Is_fn_in_slice(target *ssa.Function, slice []*ssa.Function) bool
- func Is_inst_in_slice(target ssa.Instruction, slice []ssa.Instruction) bool
- func Lines_using_name_between(position_a token.Position, position_b token.Position, name string, ...) (result []string)
- func Mutex_name(inst ssa.Instruction) string
- func Read_inst_line(inst ssa.Instruction) string
- func Read_position(p token.Position) string
- func Receiver_name_of_method(fn ssa.Function) string
- func Str_All_Index(str string, sub string) (result []int)
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 ¶
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 ¶
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 First_inst_with_solid_position ¶
func First_inst_with_solid_position(fn *ssa.Function) ssa.Instruction
func Is_inst_in_slice ¶
func Is_inst_in_slice(target ssa.Instruction, slice []ssa.Instruction) bool
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 Receiver_name_of_method ¶
func Str_All_Index ¶
Types ¶
This section is empty.