From d3a93e8370682fa5231bc94faf11ed3681b2ac99 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 19 Oct 2016 14:41:46 +0200 Subject: sys: attach Dir to all types Dir is a static info, so we don't need to compute, propagate and attach it in prog whenever we generate/change programs. Attach Dir to all types. --- prog/encodingexec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prog/encodingexec.go') diff --git a/prog/encodingexec.go b/prog/encodingexec.go index 239ef3514..f30cb7073 100644 --- a/prog/encodingexec.go +++ b/prog/encodingexec.go @@ -69,7 +69,7 @@ func (p *Prog) SerializeForExec() []byte { if arg1.Kind == ArgData && len(arg1.Data) == 0 { return } - if arg1.Dir != DirOut { + if arg1.Type.Dir() != sys.DirOut { w.write(ExecInstrCopyin) w.write(physicalAddr(arg) + w.args[arg1].Offset) w.writeArg(arg1) -- cgit mrf-deployment