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

Method Finalize

ecgo/builder/finalize.go:11–22  ·  view source on GitHub ↗

Finalize processes deferred functions, converts boolean and nonzero assertions to zero assertions, and adds public variables to the output.

()

Source from the content-addressed store, hash-verified

9// Finalize processes deferred functions, converts boolean and nonzero assertions to zero assertions,
10// and adds public variables to the output.
11func (r *Root) Finalize() *irsource.RootCircuit {
12 res := make(map[uint64]*irsource.Circuit)
13 for x, b := range r.registry.m {
14 res[x] = b.builder.Finalize()
15 }
16 return &irsource.RootCircuit{
17 NumPublicInputs: r.nbPublicInputs,
18 ExpectedNumOutputZeroes: 0,
19 Circuits: res,
20 Field: r.field,
21 }
22}
23
24func (builder *builder) Finalize() *irsource.Circuit {
25 // defers may change during the process

Callers 1

CompileFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected