From 6a0382b54364673499ec19d3cdad20534c564bce Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 5 May 2018 11:43:00 +0200 Subject: prog: rework validation code The current code is total, unstructured mess. Since we now have 1:1 type -> arg correspondence, rework validation around args. This makes code much cleaner and 30% shorter. --- prog/prog.go | 1 + 1 file changed, 1 insertion(+) (limited to 'prog/prog.go') diff --git a/prog/prog.go b/prog/prog.go index 19f5e319f..3474950b9 100644 --- a/prog/prog.go +++ b/prog/prog.go @@ -21,6 +21,7 @@ type Call struct { type Arg interface { Type() Type Size() uint64 + validate(ctx *validCtx) error } type ArgCommon struct { -- cgit mrf-deployment