From ab4b148b34b55427cf82f4dd67f0773aada301be Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 6 Dec 2018 18:53:57 +0100 Subject: prog: add Prog.Finalize Prog.Finalize combines assignSizesCall, SanitizeCall and validate. Intended for users who build own programs, so that we don't need to expose all individual methods. --- prog/prog.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'prog/prog.go') diff --git a/prog/prog.go b/prog/prog.go index 575680882..69c76c019 100644 --- a/prog/prog.go +++ b/prog/prog.go @@ -20,6 +20,14 @@ type Call struct { Comment string } +func (p *Prog) Finalize() error { + for _, c := range p.Calls { + p.Target.assignSizesCall(c) + p.Target.SanitizeCall(c) + } + return p.validate() +} + type Arg interface { Type() Type Size() uint64 -- cgit mrf-deployment