MCPcopy Create free account
hub / github.com/PolyhedraZK/ExpanderCompilerCollection / ceToId

Method ceToId

ecgo/builder/builder.go:138–148  ·  view source on GitHub ↗
(x constraint.Element)

Source from the content-addressed store, hash-verified

136}
137
138func (builder *builder) ceToId(x constraint.Element) int {
139 builder.instructions = append(builder.instructions, irsource.Instruction{
140 Type: irsource.ConstantLike,
141 ExtraId: 0,
142 Const: x,
143 })
144 res := builder.addVarId()
145 builder.constValues = append(builder.constValues, x)
146 builder.varConstId[res] = len(builder.constValues) - 1
147 return res
148}
149
150// toVariable will return (and allocate if neccesary) an Expression from given value
151//

Callers 1

toVariableIdMethod · 0.95

Calls 1

addVarIdMethod · 0.95

Tested by

no test coverage detected