channel

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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Dynamic_size = 12344321
View Source
const Edited = "Edited"
View Source
const Send, Recv, Close, MakeChan = "Send", "Recv", "Close", "MakeChan"

Variables

This section is empty.

Functions

This section is empty.

Types

type Ch_close

type Ch_close struct {
	Name       string
	Inst       ssa.Instruction // this can be *ssa.Call or *ssa.Defer
	Is_defer   bool
	Whole_line string
	Status     string

	Locks    []*locker.Lock_op // This field is specially designed for C6A
	Wrappers []*Wrapper        // This field is specially designed for C6A

	Parent *Channel
	// contains filtered or unexported fields
}

type Ch_escape

type Ch_escape struct {
	Name       string
	Inst       ssa.Instruction
	Whole_line string
	Status     string

	Locks    []*locker.Lock_op // This field is specially designed for C6A
	Wrappers []*Wrapper        // This field is specially designed for C6A

	Parent *Channel
	// contains filtered or unexported fields
}

type Ch_recv

type Ch_recv struct {
	Name             string
	Inst             ssa.Instruction // this can be *ssa.UnOp or *ssa.Select
	Case_index       int             // If Inst is *ssa.UnOp, Case_index = -1; else Case_index is the index of case of *ssa.Select
	Is_case_blocking bool
	Whole_line       string
	Status           string

	Locks    []*locker.Lock_op // This field is specially designed for C6A
	Wrappers []*Wrapper        // This field is specially designed for C6A

	Parent *Channel
	// contains filtered or unexported fields
}

type Ch_send

type Ch_send struct {
	Name             string
	Inst             ssa.Instruction // this can be *ssa.Send or *ssa.Select
	Case_index       int             // If Inst is *ssa.Send, Case_index = -1; else Case_index is the index of case of *ssa.Select
	Is_case_blocking bool
	Whole_line       string
	Status           string

	Locks    []*locker.Lock_op // This field is specially designed for C6A
	Wrappers []*Wrapper        // This field is specially designed for C6A

	Parent *Channel
	// contains filtered or unexported fields
}

type Chan_op

type Chan_op interface {
	// contains filtered or unexported methods
}

type Channel

type Channel struct {
	Name      string
	Make_inst ssa.Instruction
	Pkg       string
	Buffer    int

	Sends   []*Ch_send
	Recvs   []*Ch_recv
	Closes  []*Ch_close
	Escapes []*Ch_escape

	Status string
}

func (*Channel) Debug_print_chan

func (a_chan *Channel) Debug_print_chan()

func (*Channel) Modify_status

func (ch *Channel) Modify_status(str 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     Chan_op  // the wrapped operation
}

Wrapper records a function that "contains" a chan_op. "Contains" means the function directly uses this chan_op, or its callee (or callee's callee) uses this chan_op. The maximum layer is C6A_call_chain_layer_for_chan_wrapper

Jump to

Keyboard shortcuts

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