js: Generate vdl.RawBytes by default for any

MultiPart: 3/4
Change-Id: I2d71fe2b33a94fd560ee0fbc143a2ff7e1c1edfb
diff --git a/go/src/v.io/x/js.core/test_service/cache.vdl.go b/go/src/v.io/x/js.core/test_service/cache.vdl.go
index 08b2ae3..37d84cb 100644
--- a/go/src/v.io/x/js.core/test_service/cache.vdl.go
+++ b/go/src/v.io/x/js.core/test_service/cache.vdl.go
@@ -14,6 +14,7 @@
 	"v.io/v23/context"
 	"v.io/v23/rpc"
 	"v.io/v23/vdl"
+	"v.io/v23/vom"
 )
 
 // KeyPageResult is a page of 10 keys.
@@ -27,7 +28,7 @@
 // KeyValuePair is a representation of a cached key and value pair.
 type KeyValuePair struct {
 	Key   string
-	Value *vdl.Value
+	Value *vom.RawBytes
 }
 
 func (KeyValuePair) __VDLReflect(struct {
@@ -46,10 +47,10 @@
 // A Cache service mimics the memcache interface.
 type CacheClientMethods interface {
 	// Set sets a value for a key.
-	Set(_ *context.T, key string, value *vdl.Value, _ ...rpc.CallOpt) error
+	Set(_ *context.T, key string, value *vom.RawBytes, _ ...rpc.CallOpt) error
 	// Get returns the value for a key.  If the value is not found, returns
 	// a not found error.
-	Get(_ *context.T, key string, _ ...rpc.CallOpt) (*vdl.Value, error)
+	Get(_ *context.T, key string, _ ...rpc.CallOpt) (*vom.RawBytes, error)
 	// Same as Get, but casts the return argument to an byte.
 	GetAsByte(_ *context.T, key string, _ ...rpc.CallOpt) (byte, error)
 	// Same as Get, but casts the return argument to an int32.
@@ -71,7 +72,7 @@
 	// Same as Get, but casts the return argument to an error.
 	GetAsError(_ *context.T, key string, _ ...rpc.CallOpt) (error, error)
 	// AsMap returns the full contents of the cache as a map.
-	AsMap(*context.T, ...rpc.CallOpt) (map[string]*vdl.Value, error)
+	AsMap(*context.T, ...rpc.CallOpt) (map[string]*vom.RawBytes, error)
 	// KeyValuePairs returns the full contents of the cache as a slice of pairs.
 	KeyValuePairs(*context.T, ...rpc.CallOpt) ([]KeyValuePair, error)
 	// MostRecentSet returns the key and value and the timestamp for the most
@@ -102,12 +103,12 @@
 	name string
 }
 
-func (c implCacheClientStub) Set(ctx *context.T, i0 string, i1 *vdl.Value, opts ...rpc.CallOpt) (err error) {
+func (c implCacheClientStub) Set(ctx *context.T, i0 string, i1 *vom.RawBytes, opts ...rpc.CallOpt) (err error) {
 	err = v23.GetClient(ctx).Call(ctx, c.name, "Set", []interface{}{i0, i1}, nil, opts...)
 	return
 }
 
-func (c implCacheClientStub) Get(ctx *context.T, i0 string, opts ...rpc.CallOpt) (o0 *vdl.Value, err error) {
+func (c implCacheClientStub) Get(ctx *context.T, i0 string, opts ...rpc.CallOpt) (o0 *vom.RawBytes, err error) {
 	err = v23.GetClient(ctx).Call(ctx, c.name, "Get", []interface{}{i0}, []interface{}{&o0}, opts...)
 	return
 }
@@ -162,7 +163,7 @@
 	return
 }
 
-func (c implCacheClientStub) AsMap(ctx *context.T, opts ...rpc.CallOpt) (o0 map[string]*vdl.Value, err error) {
+func (c implCacheClientStub) AsMap(ctx *context.T, opts ...rpc.CallOpt) (o0 map[string]*vom.RawBytes, err error) {
 	err = v23.GetClient(ctx).Call(ctx, c.name, "AsMap", nil, []interface{}{&o0}, opts...)
 	return
 }
@@ -206,7 +207,7 @@
 		Advance() bool
 		// Value returns the item that was staged by Advance.  May panic if Advance
 		// returned false or was not called.  Never blocks.
-		Value() *vdl.Value
+		Value() *vom.RawBytes
 		// Err returns any error encountered by Advance.  Never blocks.
 		Err() error
 	}
@@ -247,13 +248,13 @@
 
 type implCacheMultiGetClientCall struct {
 	rpc.ClientCall
-	valRecv *vdl.Value
+	valRecv *vom.RawBytes
 	errRecv error
 }
 
 func (c *implCacheMultiGetClientCall) RecvStream() interface {
 	Advance() bool
-	Value() *vdl.Value
+	Value() *vom.RawBytes
 	Err() error
 } {
 	return implCacheMultiGetClientCallRecv{c}
@@ -268,7 +269,7 @@
 	c.c.errRecv = c.c.Recv(&c.c.valRecv)
 	return c.c.errRecv == nil
 }
-func (c implCacheMultiGetClientCallRecv) Value() *vdl.Value {
+func (c implCacheMultiGetClientCallRecv) Value() *vom.RawBytes {
 	return c.c.valRecv
 }
 func (c implCacheMultiGetClientCallRecv) Err() error {
@@ -305,10 +306,10 @@
 // A Cache service mimics the memcache interface.
 type CacheServerMethods interface {
 	// Set sets a value for a key.
-	Set(_ *context.T, _ rpc.ServerCall, key string, value *vdl.Value) error
+	Set(_ *context.T, _ rpc.ServerCall, key string, value *vom.RawBytes) error
 	// Get returns the value for a key.  If the value is not found, returns
 	// a not found error.
-	Get(_ *context.T, _ rpc.ServerCall, key string) (*vdl.Value, error)
+	Get(_ *context.T, _ rpc.ServerCall, key string) (*vom.RawBytes, error)
 	// Same as Get, but casts the return argument to an byte.
 	GetAsByte(_ *context.T, _ rpc.ServerCall, key string) (byte, error)
 	// Same as Get, but casts the return argument to an int32.
@@ -330,7 +331,7 @@
 	// Same as Get, but casts the return argument to an error.
 	GetAsError(_ *context.T, _ rpc.ServerCall, key string) (error, error)
 	// AsMap returns the full contents of the cache as a map.
-	AsMap(*context.T, rpc.ServerCall) (map[string]*vdl.Value, error)
+	AsMap(*context.T, rpc.ServerCall) (map[string]*vom.RawBytes, error)
 	// KeyValuePairs returns the full contents of the cache as a slice of pairs.
 	KeyValuePairs(*context.T, rpc.ServerCall) ([]KeyValuePair, error)
 	// MostRecentSet returns the key and value and the timestamp for the most
@@ -352,10 +353,10 @@
 // is the streaming methods.
 type CacheServerStubMethods interface {
 	// Set sets a value for a key.
-	Set(_ *context.T, _ rpc.ServerCall, key string, value *vdl.Value) error
+	Set(_ *context.T, _ rpc.ServerCall, key string, value *vom.RawBytes) error
 	// Get returns the value for a key.  If the value is not found, returns
 	// a not found error.
-	Get(_ *context.T, _ rpc.ServerCall, key string) (*vdl.Value, error)
+	Get(_ *context.T, _ rpc.ServerCall, key string) (*vom.RawBytes, error)
 	// Same as Get, but casts the return argument to an byte.
 	GetAsByte(_ *context.T, _ rpc.ServerCall, key string) (byte, error)
 	// Same as Get, but casts the return argument to an int32.
@@ -377,7 +378,7 @@
 	// Same as Get, but casts the return argument to an error.
 	GetAsError(_ *context.T, _ rpc.ServerCall, key string) (error, error)
 	// AsMap returns the full contents of the cache as a map.
-	AsMap(*context.T, rpc.ServerCall) (map[string]*vdl.Value, error)
+	AsMap(*context.T, rpc.ServerCall) (map[string]*vom.RawBytes, error)
 	// KeyValuePairs returns the full contents of the cache as a slice of pairs.
 	KeyValuePairs(*context.T, rpc.ServerCall) ([]KeyValuePair, error)
 	// MostRecentSet returns the key and value and the timestamp for the most
@@ -422,11 +423,11 @@
 	gs   *rpc.GlobState
 }
 
-func (s implCacheServerStub) Set(ctx *context.T, call rpc.ServerCall, i0 string, i1 *vdl.Value) error {
+func (s implCacheServerStub) Set(ctx *context.T, call rpc.ServerCall, i0 string, i1 *vom.RawBytes) error {
 	return s.impl.Set(ctx, call, i0, i1)
 }
 
-func (s implCacheServerStub) Get(ctx *context.T, call rpc.ServerCall, i0 string) (*vdl.Value, error) {
+func (s implCacheServerStub) Get(ctx *context.T, call rpc.ServerCall, i0 string) (*vom.RawBytes, error) {
 	return s.impl.Get(ctx, call, i0)
 }
 
@@ -470,7 +471,7 @@
 	return s.impl.GetAsError(ctx, call, i0)
 }
 
-func (s implCacheServerStub) AsMap(ctx *context.T, call rpc.ServerCall) (map[string]*vdl.Value, error) {
+func (s implCacheServerStub) AsMap(ctx *context.T, call rpc.ServerCall) (map[string]*vom.RawBytes, error) {
 	return s.impl.AsMap(ctx, call)
 }
 
@@ -516,7 +517,7 @@
 			Doc:  "// Set sets a value for a key.",
 			InArgs: []rpc.ArgDesc{
 				{"key", ``},   // string
-				{"value", ``}, // *vdl.Value
+				{"value", ``}, // *vom.RawBytes
 			},
 		},
 		{
@@ -526,7 +527,7 @@
 				{"key", ``}, // string
 			},
 			OutArgs: []rpc.ArgDesc{
-				{"", ``}, // *vdl.Value
+				{"", ``}, // *vom.RawBytes
 			},
 		},
 		{
@@ -633,7 +634,7 @@
 			Name: "AsMap",
 			Doc:  "// AsMap returns the full contents of the cache as a map.",
 			OutArgs: []rpc.ArgDesc{
-				{"", ``}, // map[string]*vdl.Value
+				{"", ``}, // map[string]*vom.RawBytes
 			},
 		},
 		{
@@ -694,7 +695,7 @@
 		// Send places the item onto the output stream.  Returns errors encountered
 		// while sending.  Blocks if there is no buffer space; will unblock when
 		// buffer space is available.
-		Send(item *vdl.Value) error
+		Send(item *vom.RawBytes) error
 	}
 }
 
@@ -746,7 +747,7 @@
 
 // SendStream returns the send side of the Cache.MultiGet server stream.
 func (s *CacheMultiGetServerCallStub) SendStream() interface {
-	Send(item *vdl.Value) error
+	Send(item *vom.RawBytes) error
 } {
 	return implCacheMultiGetServerCallSend{s}
 }
@@ -755,6 +756,6 @@
 	s *CacheMultiGetServerCallStub
 }
 
-func (s implCacheMultiGetServerCallSend) Send(item *vdl.Value) error {
+func (s implCacheMultiGetServerCallSend) Send(item *vom.RawBytes) error {
 	return s.s.Send(item)
 }
diff --git a/go/src/v.io/x/js.core/test_service/invoke_method_caveat_id.vdl.go b/go/src/v.io/x/js.core/test_service/invoke_method_caveat_id.vdl.go
index 396cfc8..ac8fd09 100644
--- a/go/src/v.io/x/js.core/test_service/invoke_method_caveat_id.vdl.go
+++ b/go/src/v.io/x/js.core/test_service/invoke_method_caveat_id.vdl.go
@@ -13,6 +13,7 @@
 	"v.io/v23/context"
 	"v.io/v23/rpc"
 	"v.io/v23/vdl"
+	"v.io/v23/vom"
 
 	// VDL user imports
 	"v.io/v23/security"
@@ -21,7 +22,7 @@
 
 type TestCaveatData struct {
 	A string
-	B *vdl.Value // Use any for value so that we can confirm VDL is being used properly.
+	B *vom.RawBytes // Use any for value so that we can confirm VDL is being used properly.
 }
 
 func (TestCaveatData) __VDLReflect(struct {
@@ -154,7 +155,7 @@
 // InvokeMethodWithCaveatedIdentityClientMethods is the client interface
 // containing InvokeMethodWithCaveatedIdentity methods.
 type InvokeMethodWithCaveatedIdentityClientMethods interface {
-	Invoke(_ *context.T, name string, cavDesc security.CaveatDescriptor, cavParam *vdl.Value, _ ...rpc.CallOpt) error
+	Invoke(_ *context.T, name string, cavDesc security.CaveatDescriptor, cavParam *vom.RawBytes, _ ...rpc.CallOpt) error
 }
 
 // InvokeMethodWithCaveatedIdentityClientStub adds universal methods to InvokeMethodWithCaveatedIdentityClientMethods.
@@ -172,7 +173,7 @@
 	name string
 }
 
-func (c implInvokeMethodWithCaveatedIdentityClientStub) Invoke(ctx *context.T, i0 string, i1 security.CaveatDescriptor, i2 *vdl.Value, opts ...rpc.CallOpt) (err error) {
+func (c implInvokeMethodWithCaveatedIdentityClientStub) Invoke(ctx *context.T, i0 string, i1 security.CaveatDescriptor, i2 *vom.RawBytes, opts ...rpc.CallOpt) (err error) {
 	err = v23.GetClient(ctx).Call(ctx, c.name, "Invoke", []interface{}{i0, i1, i2}, nil, opts...)
 	return
 }
@@ -180,7 +181,7 @@
 // InvokeMethodWithCaveatedIdentityServerMethods is the interface a server writer
 // implements for InvokeMethodWithCaveatedIdentity.
 type InvokeMethodWithCaveatedIdentityServerMethods interface {
-	Invoke(_ *context.T, _ rpc.ServerCall, name string, cavDesc security.CaveatDescriptor, cavParam *vdl.Value) error
+	Invoke(_ *context.T, _ rpc.ServerCall, name string, cavDesc security.CaveatDescriptor, cavParam *vom.RawBytes) error
 }
 
 // InvokeMethodWithCaveatedIdentityServerStubMethods is the server interface containing
@@ -218,7 +219,7 @@
 	gs   *rpc.GlobState
 }
 
-func (s implInvokeMethodWithCaveatedIdentityServerStub) Invoke(ctx *context.T, call rpc.ServerCall, i0 string, i1 security.CaveatDescriptor, i2 *vdl.Value) error {
+func (s implInvokeMethodWithCaveatedIdentityServerStub) Invoke(ctx *context.T, call rpc.ServerCall, i0 string, i1 security.CaveatDescriptor, i2 *vom.RawBytes) error {
 	return s.impl.Invoke(ctx, call, i0, i1, i2)
 }
 
@@ -243,7 +244,7 @@
 			InArgs: []rpc.ArgDesc{
 				{"name", ``},     // string
 				{"cavDesc", ``},  // security.CaveatDescriptor
-				{"cavParam", ``}, // *vdl.Value
+				{"cavParam", ``}, // *vom.RawBytes
 			},
 		},
 	},
diff --git a/go/src/v.io/x/js.core/test_service/test_serviced/cache_impl.go b/go/src/v.io/x/js.core/test_service/test_serviced/cache_impl.go
index 7c7c59e..08c0d2d 100644
--- a/go/src/v.io/x/js.core/test_service/test_serviced/cache_impl.go
+++ b/go/src/v.io/x/js.core/test_service/test_serviced/cache_impl.go
@@ -13,8 +13,8 @@
 
 	"v.io/v23/context"
 	"v.io/v23/rpc"
-	"v.io/v23/vdl"
 	"v.io/v23/verror"
+	"v.io/v23/vom"
 	"v.io/x/js.core/test_service"
 )
 
@@ -25,18 +25,18 @@
 // A simple in-memory implementation of a Cache service.
 type cacheImpl struct {
 	mu             sync.Mutex
-	cache          map[string]*vdl.Value
+	cache          map[string]*vom.RawBytes
 	mostRecent     test_service.KeyValuePair
 	lastUpdateTime time.Time
 }
 
 // NewCached returns a new implementation of CacheServerMethods.
 func NewCached() test_service.CacheServerMethods {
-	return &cacheImpl{cache: make(map[string]*vdl.Value)}
+	return &cacheImpl{cache: make(map[string]*vom.RawBytes)}
 }
 
 // Set sets a value for a key.  This should never return an error.
-func (c *cacheImpl) Set(ctx *context.T, _ rpc.ServerCall, key string, value *vdl.Value) error {
+func (c *cacheImpl) Set(ctx *context.T, _ rpc.ServerCall, key string, value *vom.RawBytes) error {
 	c.mu.Lock()
 	ctx.VI(0).Info("Set called with %v", key)
 	c.cache[key] = value
@@ -48,7 +48,7 @@
 
 // Get returns the value for a key.  If the key is not in the map, it returns
 // an error.
-func (c *cacheImpl) Get(ctx *context.T, _ rpc.ServerCall, key string) (*vdl.Value, error) {
+func (c *cacheImpl) Get(ctx *context.T, _ rpc.ServerCall, key string) (*vom.RawBytes, error) {
 	c.mu.Lock()
 	defer c.mu.Unlock()
 	if value, ok := c.cache[key]; ok {
@@ -133,7 +133,7 @@
 }
 
 // AsMap returns the full contents of the cache as a map.
-func (c *cacheImpl) AsMap(*context.T, rpc.ServerCall) (map[string]*vdl.Value, error) {
+func (c *cacheImpl) AsMap(*context.T, rpc.ServerCall) (map[string]*vom.RawBytes, error) {
 	return c.cache, nil
 }
 
diff --git a/go/src/v.io/x/js.core/test_service/test_serviced/invoke_method_caveat_id_impl.go b/go/src/v.io/x/js.core/test_service/test_serviced/invoke_method_caveat_id_impl.go
index ea55bcb..3480627 100644
--- a/go/src/v.io/x/js.core/test_service/test_serviced/invoke_method_caveat_id_impl.go
+++ b/go/src/v.io/x/js.core/test_service/test_serviced/invoke_method_caveat_id_impl.go
@@ -11,7 +11,6 @@
 	"v.io/v23/context"
 	"v.io/v23/rpc"
 	"v.io/v23/security"
-	"v.io/v23/vdl"
 	"v.io/v23/vom"
 	"v.io/x/js.core/test_service"
 	vsecurity "v.io/x/ref/lib/security"
@@ -28,7 +27,7 @@
 // Invoke is a method on the InvokeMethodWithCaveatedIdentity service that
 // invokes "AMethod" on the service with the provided name with an identity
 // blessed with a caveat with the provided CaveatDescriptor.
-func (i *invokeMethWCavIdImpl) Invoke(ctx *context.T, call rpc.ServerCall, name string, cavDesc security.CaveatDescriptor, cavParam *vdl.Value) error {
+func (i *invokeMethWCavIdImpl) Invoke(ctx *context.T, call rpc.ServerCall, name string, cavDesc security.CaveatDescriptor, cavParam *vom.RawBytes) error {
 	bytes, err := vom.Encode(cavParam)
 	if err != nil {
 		return err