MCPcopy Create free account
hub / github.com/despiteallobjections/amigo / emitDebugRef

Method emitDebugRef

types/reader.go:71–98  ·  view source on GitHub ↗
(v Value)

Source from the content-addressed store, hash-verified

69}
70
71func (r *reader) emitDebugRef(v Value) {
72 if v == nil {
73 panic("nil")
74 }
75
76 if !r.bool() {
77 return // blank, const, or predeclared
78 }
79
80 e := r.exprTODO()
81 isAddr := r.bool()
82 var obj Object
83 if r.bool() {
84 obj = r.obj()
85 }
86
87 if !r.b.debugInfo() {
88 // TODO(mdempsky): Allow skipping reading the expr/obj
89 // entirely in this case?
90 return // debugging not enabled
91 }
92 r.b.emit(&DebugRef{
93 X: v,
94 Expr: e,
95 IsAddr: isAddr,
96 object: obj,
97 })
98}

Callers 2

assignMethod · 0.95
exprMethod · 0.95

Calls 5

boolMethod · 0.95
exprTODOMethod · 0.95
objMethod · 0.95
debugInfoMethod · 0.80
emitMethod · 0.45

Tested by

no test coverage detected