aboutsummaryrefslogtreecommitdiffstats
path: root/prog/encodingexec.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2015-12-29 15:00:57 +0100
committerDmitry Vyukov <dvyukov@google.com>2015-12-29 15:00:57 +0100
commite6529b30ec934f285d57dc16dd8acbbab074f102 (patch)
tree9bf9673e44997f24e702833904294f3116d4f209 /prog/encodingexec.go
parentd40104b8a35f01d31cad1f11e312e76e034ffc4a (diff)
sys: add union type
Diffstat (limited to 'prog/encodingexec.go')
-rw-r--r--prog/encodingexec.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/prog/encodingexec.go b/prog/encodingexec.go
index 3b68f6c98..2424a1caa 100644
--- a/prog/encodingexec.go
+++ b/prog/encodingexec.go
@@ -59,6 +59,10 @@ func (p *Prog) SerializeForExec() []byte {
}
return
}
+ if arg1.Kind == ArgUnion {
+ rec(arg1.Option)
+ return
+ }
if sys.IsPad(arg1.Type) {
return
}
@@ -172,11 +176,6 @@ func (w *execContext) writeArg(arg *Arg) {
}
w.write(v)
}
- case ArgGroup:
- // Squash groups.
- for _, arg1 := range arg.Inner {
- w.writeArg(arg1)
- }
default:
panic("unknown arg type")
}