MCPcopy
hub / github.com/uber-go/nilaway / Prestrings

Method Prestrings

annotation/full_trigger.go:115–128  ·  view source on GitHub ↗

Prestrings returns Prestrings for clauses describing the production and consumption indicated by this FullTrigger, of the forms: "assigned into a field a bar.go:10" or "returned from the function foo at baz.go:25" If the Producer's expression is an artificial one created by NilAway instead of pulle

(pass *analysishelper.EnhancedPass)

Source from the content-addressed store, hash-verified

113// and producers that arise from non-trackable expressions correspond to those real non-trackable
114// expressions.
115func (t *FullTrigger) Prestrings(pass *analysishelper.EnhancedPass) (Prestring, Prestring) {
116 producerPrestring := t.Producer.Annotation.Prestring()
117 if pass.ExprIsAuthentic(t.Producer.Expr) {
118 producerPrestring = LocatedPrestring{
119 Contained: producerPrestring,
120 Location: t.truncatedProducerPos(pass),
121 }
122 }
123 consumerPrestring := LocatedPrestring{
124 Contained: t.Consumer.Annotation.Prestring(),
125 Location: t.truncatedConsumerPos(pass),
126 }
127 return producerPrestring, consumerPrestring
128}
129
130// FullTriggerSlicesEq returns true if the two passed slices of FullTriggers contain the same elements. It determines if
131// assertion trees have stabilized during the primary fixpoint loop in `BackpropAcrossFunc`

Callers 2

fullTriggerMethod · 0.80

Calls 4

truncatedProducerPosMethod · 0.95
truncatedConsumerPosMethod · 0.95
ExprIsAuthenticMethod · 0.80
PrestringMethod · 0.65

Tested by

no test coverage detected