Documentation ¶
Index ¶
Constants ¶
View Source
const BroadC int = 1
View Source
const C_Broadcast = "C_Broadcast"
View Source
const C_Signal = "C_Signal"
View Source
const C_Wait = "C_Wait"
View Source
const Edited = "Edited"
View Source
const Sign int = 0
View Source
const Wait int = 2
Variables ¶
View Source
var Cond_makes []*Cond_make // A global variable used to record all make lines of a conditional variable
Functions ¶
func Scan_cond_inst_return_value_comment ¶
func Scan_cond_inst_return_value_comment(inst ssa.Instruction) (v ssa.Value, comment string)
Types ¶
type Cond ¶
type Cond struct { Name string Make_inst ssa.Instruction Pkg string Signs []*Cond_op Broadc []*Cond_op Waits []*Cond_op All_op []*Cond_op Status string }
func Scan_inst_and_record_to_slice ¶
func Scan_inst_and_record_to_slice(all_conds []*Cond, inst ssa.Instruction) (result []*Cond)
Scan_inst_and_record_to_slice take the original slice of *Cond and an inst as inputs, and returns updated slice of *Cond The update will happen when inst is Signal/Broadcast/Wait of a sync.Cond
type Cond_make ¶
type Cond_make struct { Whole_line string Locker string Inst ssa.Instruction Pkg string }
type Wrapper ¶
type Wrapper struct { Fn *ssa.Function // When compare two Wrapper, can't directly compare fn or inst, because pointer will change during each compilation Fn_str string Inst ssa.Instruction Callee *Wrapper // if callee is nil, then inst is the chan_op itself, else inst is calling to another Wrapper Op *Cond_op // the wrapped operation }
Wrapper records a function that "contains" a cond_op. "Contains" means the function directly uses this cond_op, or its callee (or callee's callee) uses this cond_op. The maximum layer is C6A_call_chain_layer_for_chan_wrapper
Click to show internal directories.
Click to hide internal directories.