From b40d502736438fcd899cda22e92fd0a159eecf4f Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 29 Oct 2016 23:42:36 +0200 Subject: prog: remote Type argument from Arg.Size/Value They are not necessary since we now always have types attached to args. Also remove sys.Type.InnerType as it is not necessary now as well. --- prog/encodingexec.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'prog/encodingexec.go') diff --git a/prog/encodingexec.go b/prog/encodingexec.go index f30cb7073..4c2cd2524 100644 --- a/prog/encodingexec.go +++ b/prog/encodingexec.go @@ -46,7 +46,7 @@ func (p *Prog) SerializeForExec() []byte { w.args[base] = &argInfo{} } w.args[arg] = &argInfo{Offset: w.args[base].CurSize} - w.args[base].CurSize += arg.Size(arg.Type) + w.args[base].CurSize += arg.Size() }) // Generate copyin instructions that fill in data into pointer arguments. foreachArg(c, func(arg, _ *Arg, _ *[]*Arg) { @@ -105,7 +105,7 @@ func (p *Prog) SerializeForExec() []byte { instrSeq++ w.write(ExecInstrCopyout) w.write(physicalAddr(base) + info.Offset) - w.write(arg.Size(arg.Type)) + w.write(arg.Size()) default: panic("bad arg kind in copyout") } @@ -147,21 +147,21 @@ func (w *execContext) writeArg(arg *Arg) { switch arg.Kind { case ArgConst: w.write(ExecArgConst) - w.write(arg.Size(arg.Type)) - w.write(arg.Value(arg.Type)) + w.write(arg.Size()) + w.write(arg.Value()) case ArgResult: w.write(ExecArgResult) - w.write(arg.Size(arg.Type)) + w.write(arg.Size()) w.write(w.args[arg.Res].Idx) w.write(arg.OpDiv) w.write(arg.OpAdd) case ArgPointer: w.write(ExecArgConst) - w.write(arg.Size(arg.Type)) + w.write(arg.Size()) w.write(physicalAddr(arg)) case ArgPageSize: w.write(ExecArgConst) - w.write(arg.Size(arg.Type)) + w.write(arg.Size()) w.write(arg.AddrPage * pageSize) case ArgData: w.write(ExecArgData) -- cgit mrf-deployment